Show More
@@ -993,7 +993,8 b' class revlog(object):' | |||||
993 | tr.replace(self.indexfile, trindex * self._io.size) |
|
993 | tr.replace(self.indexfile, trindex * self._io.size) | |
994 | self._chunkclear() |
|
994 | self._chunkclear() | |
995 |
|
995 | |||
996 |
def addrevision(self, text, transaction, link, p1, p2, cachedelta=None |
|
996 | def addrevision(self, text, transaction, link, p1, p2, cachedelta=None, | |
|
997 | node=None): | |||
997 | """add a revision to the log |
|
998 | """add a revision to the log | |
998 |
|
999 | |||
999 | text - the revision data to add |
|
1000 | text - the revision data to add | |
@@ -1001,11 +1002,14 b' class revlog(object):' | |||||
1001 | link - the linkrev data to add |
|
1002 | link - the linkrev data to add | |
1002 | p1, p2 - the parent nodeids of the revision |
|
1003 | p1, p2 - the parent nodeids of the revision | |
1003 | cachedelta - an optional precomputed delta |
|
1004 | cachedelta - an optional precomputed delta | |
|
1005 | node - nodeid of revision; typically node is not specified, and it is | |||
|
1006 | computed by default as hash(text, p1, p2), however subclasses might | |||
|
1007 | use different hashing method (and override checkhash() in such case) | |||
1004 | """ |
|
1008 | """ | |
1005 | if link == nullrev: |
|
1009 | if link == nullrev: | |
1006 | raise RevlogError(_("attempted to add linkrev -1 to %s") |
|
1010 | raise RevlogError(_("attempted to add linkrev -1 to %s") | |
1007 | % self.indexfile) |
|
1011 | % self.indexfile) | |
1008 | node = hash(text, p1, p2) |
|
1012 | node = node or hash(text, p1, p2) | |
1009 | if node in self.nodemap: |
|
1013 | if node in self.nodemap: | |
1010 | return node |
|
1014 | return node | |
1011 |
|
1015 |
General Comments 0
You need to be logged in to leave comments.
Login now