##// END OF EJS Templates
revpair: handle odd ranges (issue3474)
Matt Mackall -
r16790:2a0efa11 stable
parent child Browse files
Show More
@@ -524,9 +524,11 b' def revpair(repo, revs):'
524 l = revrange(repo, revs)
524 l = revrange(repo, revs)
525
525
526 if len(l) == 0:
526 if len(l) == 0:
527 if revs:
528 raise util.Abort(_('empty revision range'))
527 return repo.dirstate.p1(), None
529 return repo.dirstate.p1(), None
528
530
529 if len(l) == 1:
531 if len(l) == 1 and len(revs) == 1 and _revrangesep not in revs[0]:
530 return repo.lookup(l[0]), None
532 return repo.lookup(l[0]), None
531
533
532 return repo.lookup(l[0]), repo.lookup(l[-1])
534 return repo.lookup(l[0]), repo.lookup(l[-1])
@@ -29,6 +29,12 b' Testing diff --change'
29 -first
29 -first
30 +second
30 +second
31
31
32 Test dumb revspecs (issue3474)
33
34 $ hg diff -r 2:2
35 $ hg diff -r "2 and 1"
36 abort: empty revision range
37 [255]
32
38
33 Testing diff --change when merge:
39 Testing diff --change when merge:
34
40
General Comments 0
You need to be logged in to leave comments. Login now