error pulling from symbolic repo
TK Soh
teekaysoh at yahoo.com
Mon Aug 8 06:34:33 UTC 2005
--- Thomas Arendsen Hein <thomas at intevation.de> wrote:
> % hg paths
> default = selected
> selected = bos
> bos = http://www.serpentine.com/hg
> tah = http://hg.intevation.org/mercurial-tah/
> hg = http://selenic.com/hg
>
> With your patch 'hg pull' would pull from subdirectory 'selected',
> while 'hg pull selected' would pull from Bryan.
>
> So you want recursive lookup of paths, but here one has to make sure
> that no endless loop happens.
Agreed. Here's a quick hack on ui.expandpath(). Please comment.
diff -r 9c918287d10b mercurial/ui.py
--- a/mercurial/ui.py Thu Aug 4 21:31:25 2005
+++ b/mercurial/ui.py Mon Aug 8 14:35:46 2005
@@ -56,7 +56,13 @@
for name, path in self.configitems("paths"):
paths[name] = path
- return paths.get(loc, loc)
+ for i in paths.keys():
+ if paths.has_key(loc):
+ loc = paths[loc]
+ else:
+ break
+
+ return loc
def write(self, *args):
for a in args:
____________________________________________________
Start your day with Yahoo! - make it your home page
http://www.yahoo.com/r/hs
More information about the Mercurial
mailing list