Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 842173
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 15, 20262026-05-15T05:55:02+00:00 2026-05-15T05:55:02+00:00

I have a project I cloned over the network to the Mac hard drive

  • 0

I have a project I cloned over the network to the Mac hard drive (OS X Snow Leopard).

The project is about 1GB in the hard drive

du -s
2073848 .

so when I hg clone proj proj2

then when I

MacBook-Pro ~/development $ du -s proj
2073848 proj

MacBook-Pro ~/development $ du -s proj2
894840  proj2

MacBook-Pro ~/development $ du -s
2397928 .

so the clone seems not so cheap… probably around 400MB… is that so? also, the whole folder grew by about 200MB, which is not the total of proj and proj2 by the way… are there some links and some are not links, that’s why the overlapping is not counted twice?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-15T05:55:03+00:00Added an answer on May 15, 2026 at 5:55 am

    When possible, Mercurial will use hardlinks on the repository data, it will not use hardlinks on the working directory. Therefore, the only space it can save, is that of the .hg folder.

    If you’re using an editor that can break hardlinks, you can cp -al REPO REPOCLONE to use hardlinks on the entire directory, including the working directory, but be aware that it has some caveats. Quoting from the manual:

    For efficiency, hardlinks are used for
    cloning whenever the source and
    destination are on the same filesystem
    (note this applies only to the repository data, not to the working
    directory). Some filesystems, such as
    AFS,
    implement hardlinking incorrectly, but do not report errors. In these
    cases, use the –pull option to avoid
    hardlinking.

    In some cases, you can clone repositories and the working directory
    using full hardlinks with

    $ cp -al REPO REPOCLONE
    

    This is the fastest way to clone, but it is not always safe. The
    operation is not atomic (making sure
    REPO is not
    modified during the operation is up to you) and you have to make sure
    your editor breaks hardlinks (Emacs
    and most
    Linux Kernel tools do so). Also, this is not compatible with certain
    extensions that place their metadata
    under
    the .hg directory, such as mq.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I would like to clone a git project (from github, say), and have the
I have a remote project that have a branch. So I first clone the
So I have cloned a project at github and fixed a patch. Since this
I have cloned a rails project from Ryan Bates (complex forms samples) and am
I have cloned a project that includes some .csproj files. I don't need/like my
I have cloned project from repo and I need to create branch and in
I have cloned a project from a git repo into eclipse Helios using the
So I have a client who cloned an old project in Django to start
I have a project with a handful of submodules. Many of them are cloned
I have project asp.net with namespace test and I'm using resources (files Resource.resx and

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.