bookmark: make the search for divergent names more robust
We translate the "url we update from" and "the url in the config" into their
canonical representation. This is useful for urls that have multiple equivalent
forms:
/foo/bar/ == file:/foo/bar/ == file:///foo/bar
eg: hg pull --config path.bar=/foo/bar/ file:/foo/bar
--- a/mercurial/bookmarks.py Thu Sep 25 17:53:27 2014 -0700
+++ b/mercurial/bookmarks.py Fri Sep 26 11:31:15 2014 -0700
@@ -338,7 +338,9 @@
break
# try to use an @pathalias suffix
# if an @pathalias already exists, we overwrite (update) it
+ path = str(util.url(path))
for p, u in ui.configitems("paths"):
+ u = str(util.url(path))
if path == u:
n = '%s@%s' % (b, p)
return n