.hg* files in working directory (and archive)
Zoran Bosnjak
zoran.bosnjak at via.si
Wed Nov 25 01:09:15 CST 2009
Hello all,
there are some problems (no clean workaround) with .hg* files being inside
working directory:
- 'hg archive' command stores .hg* files too. I believe that this is a
leak of internal mercurial information to archive file. I could not find a
hg command to extract sources alone. A few extra (hidden) files are
generally not a problem, but there are situations when a user wants to
have a CLEAN archive. Simple and effective solution would be to add (-c
--clean) option to 'hg archive' which would skip mercurial files while
doing archive. The question is only: what files to skip?
-The second problem (same cause) is the opposite situation. If I want to
bring new set of sources to repository as they are, for example:
- hg update -r vendor_release1.0
- remove all files in working directory (but .hg*)
- place new sources in working directory
- hg addremove
- hg commit -m "new vendor release"
- hg tag vendor_release2.0
There is a problem on a second step. I think a mercurial command should be
provided to clean working directory of all user's files and keep mercurial
files. At the moment, user needs internal mercurial knowledge to perform
this task with filesystem manipulation. I've tried to find a way to
properly 'import' vendor sources to mercurial, but I could not find set of
hg commands to do it. Again it should be easy to add a flag to 'hg purge'
extension that would clean working directory this way.
I would like to extend mercurial to fix the problems above (new flags to
hg archive and hg purge). But, may I assume that .hg/ and .hg* - and
nothing more is (and will always be) mercurial internals? Is it better to
use (and maintain) explicit list of internal files so that manipulation
like this would be possible? Or maybe to move .hg* files inside
subdirectory of .hg/ so that they are distinguished based on location (but
still version controlled)? Please advice. Thanks a lot.
Zoran
More information about the Mercurial-devel
mailing list