multiple [paths] sections in .hg/hgrc
TK Soh
teekaysoh at yahoo.com
Sat Sep 3 08:45:23 CDT 2005
* Thomas Arendsen Hein <thomas at intevation.de> wrote:
> Hi!
>
> You're right, this should not happen.
>
> * TK Soh <teekaysoh at yahoo.com> [20050903 11:49]:
> > --- a/mercurial/commands.py Thu Sep 1 19:13:56 2005
> > +++ b/mercurial/commands.py Sat Sep 3 09:44:48 2005
> > - for fn in "dirstate", "lock":
> > + for fn in "hgrc", "dirstate", "lock":
>
> This is the bug fix, though I think we should rather fix that
> cloning shouldn't link these files in the first place.
hg clone effective does a 'cp -al' on the .hg/ directory, so I think it'd be
less complicated just deleting the unwanted files than trying to skip them
during cp. It's probably faster that way too.
> > - f.write("\n[paths]\n")
> > - f.write("default = %s\n" % abspath)
> > + f.write("[paths]\n")
> > + f.write("default = %s\n\n" % abspath)
>
> > --- a/mercurial/localrepo.py Thu Sep 1 19:13:56 2005
> > +++ b/mercurial/localrepo.py Sat Sep 3 09:44:48 2005
> > f.write("[web]\n")
> > - f.write("contact = %s\n" % ui.shortuser(ui.username()))
> > + f.write("contact = %s\n\n" % ui.shortuser(ui.username()))
>
> This is something completely unrelated. And should either not be
> done (because there is no reason) or done in a separate changeset.
You are right, these are just trying to make hgrc look better. I took them out
of the bugfix.
# HG changeset patch
# User TK Soh <teekaysoh at yahoo.com>
# Node ID 7814aa08a8c95e49fb17ff3f33bba2e2fea82e5f
# Parent c165cbf56bb117ebdd226aea950e67b543a665e7
clone: fixed multiple "[paths]" sections in .hg/hgrc
diff -r c165cbf56bb1 -r 7814aa08a8c9 mercurial/commands.py
--- a/mercurial/commands.py Thu Sep 1 19:13:56 2005
+++ b/mercurial/commands.py Sat Sep 3 13:37:30 2005
@@ -610,7 +610,7 @@
util.copytree(os.path.join(source, ".hg"), os.path.join(dest, ".hg"),
copyfile)
- for fn in "dirstate", "lock":
+ for fn in "hgrc", "dirstate", "lock":
try:
os.unlink(os.path.join(dest, ".hg", fn))
except OSError:
__________________________________________________
Do You Yahoo!?
Tired of spam? Yahoo! Mail has the best spam protection around
http://mail.yahoo.com
More information about the Mercurial
mailing list