##// END OF EJS Templates
changeset_printer: use node.wdirrev to calculate meaningful parentrevs...
Yuya Nishihara -
r25739:3dabc9b7 default
parent child Browse files
Show More
@@ -1272,7 +1272,7 b' class changeset_printer(object):'
1272 1272 return parents
1273 1273 if self.ui.debugflag:
1274 1274 return [parents[0], self.repo['null']]
1275 if parents[0].rev() >= scmutil.intrev(self.repo, ctx.rev()) - 1:
1275 if parents[0].rev() >= scmutil.intrev(ctx.rev()) - 1:
1276 1276 return []
1277 1277 return parents
1278 1278
@@ -6,7 +6,7 b''
6 6 # GNU General Public License version 2 or any later version.
7 7
8 8 from i18n import _
9 from mercurial.node import nullrev
9 from mercurial.node import nullrev, wdirrev
10 10 import util, error, osutil, revset, similar, encoding, phases
11 11 import pathutil
12 12 import match as matchmod
@@ -662,11 +662,11 b' def rcpath():'
662 662 _rcpath = osrcpath()
663 663 return _rcpath
664 664
665 def intrev(repo, rev):
665 def intrev(rev):
666 666 """Return integer for a given revision that can be used in comparison or
667 667 arithmetic operation"""
668 668 if rev is None:
669 return len(repo)
669 return wdirrev
670 670 return rev
671 671
672 672 def revsingle(repo, revspec, default='.'):
@@ -1627,6 +1627,7 b' working-directory revision requires spec'
1627 1627
1628 1628 $ hg log -r 'wdir()'
1629 1629 changeset: 0:65624cd9070a+
1630 parent: 0:65624cd9070a
1630 1631 user: test
1631 1632 date: [A-Za-z0-9:+ ]+ (re)
1632 1633
General Comments 0
You need to be logged in to leave comments. Login now