Mercurial > hg
comparison mercurial/bundlerepo.py @ 30743:2df983125d37
revlog: add 'raw' argument to revision and _addrevision
This patch introduces a new 'raw' argument (defaults to False) to revlog's
revision() and _addrevision() methods.
When the 'raw' argument is set to True, it indicates the revision data should be
handled as raw data by the flagprocessor.
Note: Given revlog.addgroup() calls are restricted to changegroup generation, we
can always set raw to True when calling revlog._addrevision() from
revlog.addgroup().
author | Remi Chaintron <remi@fb.com> |
---|---|
date | Thu, 05 Jan 2017 17:16:07 +0000 |
parents | be5b2098a817 |
children | c1b7b2285522 |
comparison
equal
deleted
inserted
replaced
30742:d3e2d39b97ea | 30743:2df983125d37 |
---|---|
115 return revlog.revlog.revdiff(self, rev1, rev2) | 115 return revlog.revlog.revdiff(self, rev1, rev2) |
116 | 116 |
117 return mdiff.textdiff(self.revision(self.node(rev1)), | 117 return mdiff.textdiff(self.revision(self.node(rev1)), |
118 self.revision(self.node(rev2))) | 118 self.revision(self.node(rev2))) |
119 | 119 |
120 def revision(self, nodeorrev): | 120 def revision(self, nodeorrev, raw=False): |
121 """return an uncompressed revision of a given node or revision | 121 """return an uncompressed revision of a given node or revision |
122 number. | 122 number. |
123 """ | 123 """ |
124 if isinstance(nodeorrev, int): | 124 if isinstance(nodeorrev, int): |
125 rev = nodeorrev | 125 rev = nodeorrev |