changeset 22627:808df84fba83

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
author Pierre-Yves David <pierre-yves.david@fb.com>
date Fri, 26 Sep 2014 11:31:15 -0700
parents fb74a5833467
children 2805d23e1f88
files mercurial/bookmarks.py
diffstat 1 files changed, 2 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- 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