Mercurial > hg
comparison hgext/convert/git.py @ 11134:33010ff1fd6f
convert: merge sources getmode() into getfile()
author | Patrick Mezard <pmezard@gmail.com> |
---|---|
date | Sun, 09 May 2010 21:52:34 +0200 |
parents | b3af02b1f19f |
children | be9c4131a8f4 |
comparison
equal
deleted
inserted
replaced
11133:d7b6aab612b4 | 11134:33010ff1fd6f |
---|---|
65 if ret: | 65 if ret: |
66 raise util.Abort(_('cannot read %r object at %s') % (type, rev)) | 66 raise util.Abort(_('cannot read %r object at %s') % (type, rev)) |
67 return data | 67 return data |
68 | 68 |
69 def getfile(self, name, rev): | 69 def getfile(self, name, rev): |
70 return self.catfile(rev, "blob") | 70 data = self.catfile(rev, "blob") |
71 | 71 mode = self.modecache[(name, rev)] |
72 def getmode(self, name, rev): | 72 return data, mode |
73 return self.modecache[(name, rev)] | |
74 | 73 |
75 def getchanges(self, version): | 74 def getchanges(self, version): |
76 self.modecache = {} | 75 self.modecache = {} |
77 fh = self.gitopen("git diff-tree -z --root -m -r %s" % version) | 76 fh = self.gitopen("git diff-tree -z --root -m -r %s" % version) |
78 changes = [] | 77 changes = [] |