comparison hgext/convert/git.py @ 5380:a5a7f7fd5554

convert_git: add --filemap support
author Alexis S. L. Carvalho <alexis@cecm.usp.br>
date Thu, 04 Oct 2007 23:21:37 -0300
parents 24de027551c1
children 67d3daa8ac42
comparison
equal deleted inserted replaced
5379:d3e51dc804f8 5380:a5a7f7fd5554
120 continue 120 continue
121 tag = tag[len(prefix):-3] 121 tag = tag[len(prefix):-3]
122 tags[tag] = node 122 tags[tag] = node
123 123
124 return tags 124 return tags
125
126 def getchangedfiles(self, version, i):
127 changes = []
128 if i is None:
129 fh = self.gitcmd("git-diff-tree --root -m -r %s" % version)
130 for l in fh:
131 if "\t" not in l:
132 continue
133 m, f = l[:-1].split("\t")
134 changes.append(f)
135 fh.close()
136 else:
137 fh = self.gitcmd("git-diff-tree --name-only --root -r %s %s^%s --"
138 % (version, version, i+1))
139 changes = [f.rstrip('\n') for f in fh]
140 fh.close()
141
142 return changes