# HG changeset patch # User Matt Mackall # Date 2014-10-02 21:43:50 # Node ID b3f74b405c2014f154fe622a30751298945ccccb # Parent 2805d23e1f885ff183b900e4407d3c31758d5b59 bookmarks: fix divergent bookmark path normalization diff --git a/mercurial/bookmarks.py b/mercurial/bookmarks.py --- a/mercurial/bookmarks.py +++ b/mercurial/bookmarks.py @@ -338,9 +338,11 @@ def _diverge(ui, b, path, localmarks): break # try to use an @pathalias suffix # if an @pathalias already exists, we overwrite (update) it - path = str(util.url(path)) + if path.startswith("file:"): + path = util.url(path).path for p, u in ui.configitems("paths"): - u = str(util.url(path)) + if u.startswith("file:"): + u = util.url(u).path if path == u: n = '%s@%s' % (b, p) return n