# HG changeset patch # User Edouard Gomez # Date 1224369143 -7200 # Node ID a8e4e599e17f9c84921a70dee021c942c2b65886 # Parent b9bf36905b553d588f994f35e41f8d020f0dc61b convert: return remote branches in git source When converting git repos, all stuff happening on branches seems to be ignored. This is caused by the fact a "git clone" of a remote git repo has all its branches prefixed with "origin/". By chance, the "origin/master" branch is always linked to a local "master" branch. So getheads() returns only the master head, and it ignores all the other heads. Make sure getheads() returns all heads, forcing remote branches to be return by git-rev-parse. diff -r b9bf36905b55 -r a8e4e599e17f hgext/convert/git.py --- a/hgext/convert/git.py Fri Oct 24 16:20:53 2008 +0200 +++ b/hgext/convert/git.py Sun Oct 19 00:32:23 2008 +0200 @@ -38,7 +38,7 @@ def getheads(self): if not self.rev: - return self.gitcmd('git rev-parse --branches').read().splitlines() + return self.gitcmd('git rev-parse --branches --remotes').read().splitlines() else: fh = self.gitcmd("git rev-parse --verify %s" % self.rev) return [fh.read()[:-1]]