bookmark: make the search for divergent names more robust
authorPierre-Yves David <pierre-yves.david@fb.com>
Fri, 26 Sep 2014 11:31:15 -0700
changeset 22627 808df84fba83
parent 22626 fb74a5833467
child 22628 2805d23e1f88
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
mercurial/bookmarks.py
--- 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