Mercurial > hg
diff hgext/convert/git.py @ 4768:f52bfe566583
convert: import all branches from git repositories
author | Brendan Cully <brendan@kublai.com> |
---|---|
date | Sun, 01 Jul 2007 22:00:25 -0700 |
parents | 2d0a823cbba5 |
children | 15a3cbfc6568 |
line wrap: on
line diff
--- a/hgext/convert/git.py Sun Jul 01 21:09:08 2007 -0700 +++ b/hgext/convert/git.py Sun Jul 01 22:00:25 2007 -0700 @@ -20,9 +20,11 @@ self.encoding = 'utf-8' def getheads(self): - rev = self.rev or 'HEAD' - fh = self.gitcmd("git-rev-parse --verify %s" % rev) - return [fh.read()[:-1]] + if not self.rev: + return self.gitcmd('git-rev-parse --branches').read().splitlines() + else: + fh = self.gitcmd("git-rev-parse --verify %s" % self.rev) + return [fh.read()[:-1]] def catfile(self, rev, type): if rev == "0" * 40: raise IOError()