##// END OF EJS Templates
fixed git diff function when initial revision had no parents to compare with
marcink -
r2499:c919d8c4 beta
parent child Browse files
Show More
@@ -195,7 +195,9 b' class GitChangeset(BaseChangeset):'
195 return _prev(self, branch)
195 return _prev(self, branch)
196
196
197 def diff(self, ignore_whitespace=True, context=3):
197 def diff(self, ignore_whitespace=True, context=3):
198 return ''.join(self.repository.get_diff(self, self.parents[0],
198 rev1 = self.parents[0] if self.parents else self.repository.EMPTY_CHANGESET
199 rev2 = self
200 return ''.join(self.repository.get_diff(rev1, rev2,
199 ignore_whitespace=ignore_whitespace,
201 ignore_whitespace=ignore_whitespace,
200 context=context))
202 context=context))
201
203
General Comments 0
You need to be logged in to leave comments. Login now