Mercurial > hg-stable
changeset 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 | 81b170c41986 |
files | hgext/convert/git.py |
diffstat | 1 files changed, 5 insertions(+), 3 deletions(-) [+] |
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()