Show More
@@ -32,20 +32,20 b' class convert_git(converter_source):' | |||
|
32 | 32 | if not os.path.exists(path + "/objects"): |
|
33 | 33 | raise NoRepo("%s does not look like a Git repo" % path) |
|
34 | 34 | |
|
35 |
checktool('git |
|
|
35 | checktool('git', 'git') | |
|
36 | 36 | |
|
37 | 37 | self.path = path |
|
38 | 38 | |
|
39 | 39 | def getheads(self): |
|
40 | 40 | if not self.rev: |
|
41 |
return self.gitcmd('git |
|
|
41 | return self.gitcmd('git rev-parse --branches').read().splitlines() | |
|
42 | 42 | else: |
|
43 |
fh = self.gitcmd("git |
|
|
43 | fh = self.gitcmd("git rev-parse --verify %s" % self.rev) | |
|
44 | 44 | return [fh.read()[:-1]] |
|
45 | 45 | |
|
46 | 46 | def catfile(self, rev, type): |
|
47 | 47 | if rev == "0" * 40: raise IOError() |
|
48 |
fh = self.gitcmd("git |
|
|
48 | fh = self.gitcmd("git cat-file %s %s" % (type, rev)) | |
|
49 | 49 | return fh.read() |
|
50 | 50 | |
|
51 | 51 | def getfile(self, name, rev): |
@@ -56,7 +56,7 b' class convert_git(converter_source):' | |||
|
56 | 56 | |
|
57 | 57 | def getchanges(self, version): |
|
58 | 58 | self.modecache = {} |
|
59 |
fh = self.gitcmd("git |
|
|
59 | fh = self.gitcmd("git diff-tree --root -m -r %s" % version) | |
|
60 | 60 | changes = [] |
|
61 | 61 | seen = {} |
|
62 | 62 | for l in fh: |
@@ -109,7 +109,7 b' class convert_git(converter_source):' | |||
|
109 | 109 | |
|
110 | 110 | def gettags(self): |
|
111 | 111 | tags = {} |
|
112 |
fh = self.gitcmd('git |
|
|
112 | fh = self.gitcmd('git ls-remote --tags "%s"' % self.path) | |
|
113 | 113 | prefix = 'refs/tags/' |
|
114 | 114 | for line in fh: |
|
115 | 115 | line = line.strip() |
@@ -126,7 +126,7 b' class convert_git(converter_source):' | |||
|
126 | 126 | def getchangedfiles(self, version, i): |
|
127 | 127 | changes = [] |
|
128 | 128 | if i is None: |
|
129 |
fh = self.gitcmd("git |
|
|
129 | fh = self.gitcmd("git diff-tree --root -m -r %s" % version) | |
|
130 | 130 | for l in fh: |
|
131 | 131 | if "\t" not in l: |
|
132 | 132 | continue |
@@ -134,7 +134,7 b' class convert_git(converter_source):' | |||
|
134 | 134 | changes.append(f) |
|
135 | 135 | fh.close() |
|
136 | 136 | else: |
|
137 |
fh = self.gitcmd('git |
|
|
137 | fh = self.gitcmd('git diff-tree --name-only --root -r %s "%s^%s" --' | |
|
138 | 138 | % (version, version, i+1)) |
|
139 | 139 | changes = [f.rstrip('\n') for f in fh] |
|
140 | 140 | fh.close() |
General Comments 0
You need to be logged in to leave comments.
Login now