hg diff takes 30 seconds to find nothing.
Matt Mackall
mpm at selenic.com
Thu Dec 7 05:14:36 UTC 2006
On Wed, Dec 06, 2006 at 07:59:48PM -0500, Rob Landley wrote:
> Why does "hg diff" do the equivalent of a "find ." in the repository
> directory, rather than just looking at the manifest to get its file list?
>
> My source directory has a "build" directory generated under it when I do test
> builds, and this has tens of thousands of files in it (extracted tarballs,
> etc), and doing an "hg diff" in this directory with a clean cache can take
> over 30 seconds to tell me that nothing it's tracking actually changed.
>
> I did an strace -f of hg (0.9.1), and sure enough it's looking at files that
> have never been checked in. Why is it even bothering to look at files that
> aren't in the manifest? Can there possibly be differences between them?
No good reason. It uses basically the same code path that commit does.
You probably want to add build/ to your .hgignore and then both diff
and commit will be fast again.
--
Mathematics is the supreme nostalgia of our time.
More information about the Mercurial
mailing list