Show More
@@ -1502,11 +1502,19 b' def parentspec(repo, subset, x, n, order' | |||||
1502 | if n == 0: |
|
1502 | if n == 0: | |
1503 | ps.add(r) |
|
1503 | ps.add(r) | |
1504 | elif n == 1: |
|
1504 | elif n == 1: | |
1505 | ps.add(cl.parentrevs(r)[0]) |
|
1505 | try: | |
|
1506 | ps.add(cl.parentrevs(r)[0]) | |||
|
1507 | except error.WdirUnsupported: | |||
|
1508 | ps.add(repo[r].parents()[0].rev()) | |||
1506 | elif n == 2: |
|
1509 | elif n == 2: | |
1507 | parents = cl.parentrevs(r) |
|
1510 | try: | |
1508 |
|
|
1511 | parents = cl.parentrevs(r) | |
1509 |
|
|
1512 | if parents[1] != node.nullrev: | |
|
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 | return subset & ps |
|
1518 | return subset & ps | |
1511 |
|
1519 | |||
1512 | @predicate('present(set)', safe=True) |
|
1520 | @predicate('present(set)', safe=True) |
@@ -1227,6 +1227,12 b' Test working-directory revision' | |||||
1227 | 0 files updated, 0 files merged, 1 files removed, 0 files unresolved |
|
1227 | 0 files updated, 0 files merged, 1 files removed, 0 files unresolved | |
1228 | $ hg debugrevspec 'wdir()^' |
|
1228 | $ hg debugrevspec 'wdir()^' | |
1229 | 7 |
|
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 | For tests consistency |
|
1236 | For tests consistency | |
1231 | $ hg up 9 |
|
1237 | $ hg up 9 | |
1232 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
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