Show More
@@ -1502,11 +1502,19 b' def parentspec(repo, subset, x, n, order' | |||
|
1502 | 1502 | if n == 0: |
|
1503 | 1503 | ps.add(r) |
|
1504 | 1504 | elif n == 1: |
|
1505 | try: | |
|
1505 | 1506 | ps.add(cl.parentrevs(r)[0]) |
|
1507 | except error.WdirUnsupported: | |
|
1508 | ps.add(repo[r].parents()[0].rev()) | |
|
1506 | 1509 | elif n == 2: |
|
1510 | try: | |
|
1507 | 1511 | parents = cl.parentrevs(r) |
|
1508 | 1512 | if parents[1] != node.nullrev: |
|
1509 | 1513 | ps.add(parents[1]) |
|
1514 | except error.WdirUnsupported: | |
|
1515 | parents = repo[r].parents() | |
|
1516 | if len(parents) == 2: | |
|
1517 | ps.add(parents[1].rev()) | |
|
1510 | 1518 | return subset & ps |
|
1511 | 1519 | |
|
1512 | 1520 | @predicate('present(set)', safe=True) |
@@ -1227,6 +1227,12 b' Test working-directory revision' | |||
|
1227 | 1227 | 0 files updated, 0 files merged, 1 files removed, 0 files unresolved |
|
1228 | 1228 | $ hg debugrevspec 'wdir()^' |
|
1229 | 1229 | 7 |
|
1230 | $ hg debugrevspec 'wdir()^1' | |
|
1231 | 7 | |
|
1232 | $ hg debugrevspec 'wdir()^2' | |
|
1233 | $ hg debugrevspec 'wdir()^3' | |
|
1234 | hg: parse error: ^ expects a number 0, 1, or 2 | |
|
1235 | [255] | |
|
1230 | 1236 | For tests consistency |
|
1231 | 1237 | $ hg up 9 |
|
1232 | 1238 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
General Comments 0
You need to be logged in to leave comments.
Login now