Mercurial > hg
comparison hgext/convert/git.py @ 4810:c2d529f288a1
convert: move some code into common init function
author | Brendan Cully <brendan@kublai.com> |
---|---|
date | Thu, 05 Jul 2007 12:08:48 -0700 |
parents | 15a3cbfc6568 |
children | 28b23b9073a8 |
comparison
equal
deleted
inserted
replaced
4809:4582c28e2874 | 4810:c2d529f288a1 |
---|---|
13 | 13 |
14 if os.path.isdir(path + "/.git"): | 14 if os.path.isdir(path + "/.git"): |
15 path += "/.git" | 15 path += "/.git" |
16 if not os.path.exists(path + "/objects"): | 16 if not os.path.exists(path + "/objects"): |
17 raise NoRepo("couldn't open GIT repo %s" % path) | 17 raise NoRepo("couldn't open GIT repo %s" % path) |
18 | |
19 self.path = path | 18 self.path = path |
20 self.ui = ui | |
21 self.rev = rev | |
22 self.encoding = 'utf-8' | |
23 | 19 |
24 def getheads(self): | 20 def getheads(self): |
25 if not self.rev: | 21 if not self.rev: |
26 return self.gitcmd('git-rev-parse --branches').read().splitlines() | 22 return self.gitcmd('git-rev-parse --branches').read().splitlines() |
27 else: | 23 else: |