Why does "hg diff" iterate through . instead of .hg/data?
Rob Landley
rob at landley.net
Sun Jan 6 00:31:26 UTC 2008
Why does "hg diff" iterate through the working directory instead of .hg/data?
This causes a number of problems for me:
1) When I build my projects, some of them create lots and lots of temporary
files, enough that "hg diff" can sit there for 30 seconds faulting stuff in
from disks. I've done .hgignore files but they keep falling out of sync with
reality.
2) One of my subdirectories is a symlink outside the project tree (www, it
goes into to my web directory that gets rsynced up to my website, but I also
want this data under revision control in mercurial, yet I don't want to rsync
my working directory up to the website. Yes, my .hg directory in my working
directory is also a symlink into a subdirectory of the web directory, but
that one doesn't seem to cause problems.)
The problem with this is when I do "hg diff" to see what's changed, it doesn't
show me what's changed in the www directory. If I do "hg commit" it doesn't
automatically pick up stuff in the www directory. Instead I have to do "hg
diff www/*" explicitly, and then add the changed files.
Both of these would naturally "just work" if "hg diff" just used .hg/data as
the source of the files to check (or .hg/00manifest or something in the .hg
directory) instead of approaching it from the other direction.
Is there a reason to iterate through the directory contents instead of the
repository contents?
Rob
--
"One of my most productive days was throwing away 1000 lines of code."
- Ken Thompson.
More information about the Mercurial
mailing list