##// END OF EJS Templates
scmutil: abort if an empty revision is given to revpair()...
Matt Harbison -
r26836:88c4e97b stable
parent child Browse files
Show More
@@ -717,6 +717,9 b' def revpair(repo, revs):'
717
717
718 if first is None:
718 if first is None:
719 raise error.Abort(_('empty revision range'))
719 raise error.Abort(_('empty revision range'))
720 if (first == second and len(revs) >= 2
721 and not all(revrange(repo, [r]) for r in revs)):
722 raise error.Abort(_('empty revision on one side of range'))
720
723
721 # if top-level is range expression, the result must always be a pair
724 # if top-level is range expression, the result must always be a pair
722 if first == second and len(revs) == 1 and not _pairspec(revs[0]):
725 if first == second and len(revs) == 1 and not _pairspec(revs[0]):
@@ -70,6 +70,12 b' Should diff cloned files directly:'
70 [1]
70 [1]
71 #endif
71 #endif
72
72
73 Specifying an empty revision should abort.
74
75 $ hg extdiff --patch --rev 'ancestor()' --rev 1
76 abort: empty revision on one side of range
77 [255]
78
73 Test diff during merge:
79 Test diff during merge:
74
80
75 $ hg update -C 0
81 $ hg update -C 0
General Comments 0
You need to be logged in to leave comments. Login now