diff --git a/hggit/git_handler.py b/hggit/git_handler.py index 7d4e0b415bdd364e71294fc748fe3731841cb92c_aGdnaXQvZ2l0X2hhbmRsZXIucHk=..9d376aba9a51616e65830630f706ecbfcd554df8_aGdnaXQvZ2l0X2hhbmRsZXIucHk= 100644 --- a/hggit/git_handler.py +++ b/hggit/git_handler.py @@ -1891,6 +1891,9 @@ paths = [paths] for path in paths: + # ignore aliases + if hasattr(path, 'raw_url') and path.raw_url.scheme == b'path': + continue if push and path.pushloc == remote or path.loc == remote: return name diff --git a/tests/test-multiple-remotes.t b/tests/test-multiple-remotes.t index 7d4e0b415bdd364e71294fc748fe3731841cb92c_dGVzdHMvdGVzdC1tdWx0aXBsZS1yZW1vdGVzLnQ=..9d376aba9a51616e65830630f706ecbfcd554df8_dGVzdHMvdGVzdC1tdWx0aXBsZS1yZW1vdGVzLnQ= 100644 --- a/tests/test-multiple-remotes.t +++ b/tests/test-multiple-remotes.t @@ -36,8 +36,10 @@ no changes found $ hg tags tip 0:ff7a2f2d8d70 - default/not-master 0:ff7a2f2d8d70 - default/master 0:ff7a2f2d8d70 + git/not-master 0:ff7a2f2d8d70 + git/master 0:ff7a2f2d8d70 + bare/not-master 0:ff7a2f2d8d70 + bare/master 0:ff7a2f2d8d70 $ hg up master 1 files updated, 0 files merged, 0 files removed, 0 files unresolved @@ -58,6 +60,8 @@ $ hg tags tip 1:47580592d3d6 - default/master 1:47580592d3d6 - default/not-master 0:ff7a2f2d8d70 + git/master 1:47580592d3d6 + bare/master 1:47580592d3d6 + git/not-master 0:ff7a2f2d8d70 + bare/not-master 0:ff7a2f2d8d70