Show More
@@ -1311,8 +1311,8 b' def phabsend(ui, repo, *revs, **opts):' | |||||
1311 | # --fold option implies this, and the auto restacking of orphans requires |
|
1311 | # --fold option implies this, and the auto restacking of orphans requires | |
1312 | # it. Otherwise A+C in A->B->C will cause B to be orphaned, and C' to |
|
1312 | # it. Otherwise A+C in A->B->C will cause B to be orphaned, and C' to | |
1313 | # get A' as a parent. |
|
1313 | # get A' as a parent. | |
1314 |
def _fail_nonlinear_revs(revs, |
|
1314 | def _fail_nonlinear_revs(revs, revtype): | |
1315 |
badnodes = [repo[r].node() for r in revs |
|
1315 | badnodes = [repo[r].node() for r in revs] | |
1316 | raise error.Abort( |
|
1316 | raise error.Abort( | |
1317 | _(b"cannot phabsend multiple %s revisions: %s") |
|
1317 | _(b"cannot phabsend multiple %s revisions: %s") | |
1318 | % (revtype, scmutil.nodesummaries(repo, badnodes)), |
|
1318 | % (revtype, scmutil.nodesummaries(repo, badnodes)), | |
@@ -1321,11 +1321,11 b' def phabsend(ui, repo, *revs, **opts):' | |||||
1321 |
|
1321 | |||
1322 | heads = repo.revs(b'heads(%ld)', revs) |
|
1322 | heads = repo.revs(b'heads(%ld)', revs) | |
1323 | if len(heads) > 1: |
|
1323 | if len(heads) > 1: | |
1324 |
_fail_nonlinear_revs(heads |
|
1324 | _fail_nonlinear_revs(heads, b"head") | |
1325 |
|
1325 | |||
1326 | roots = repo.revs(b'roots(%ld)', revs) |
|
1326 | roots = repo.revs(b'roots(%ld)', revs) | |
1327 | if len(roots) > 1: |
|
1327 | if len(roots) > 1: | |
1328 |
_fail_nonlinear_revs(roots |
|
1328 | _fail_nonlinear_revs(roots, b"root") | |
1329 |
|
1329 | |||
1330 | fold = opts.get(b'fold') |
|
1330 | fold = opts.get(b'fold') | |
1331 | if fold: |
|
1331 | if fold: |
@@ -596,7 +596,7 b' Phabimport accepts multiple DREVSPECs' | |||||
596 | Phabsend requires a linear range of commits |
|
596 | Phabsend requires a linear range of commits | |
597 |
|
597 | |||
598 | $ hg phabsend -r 0+2+3 |
|
598 | $ hg phabsend -r 0+2+3 | |
599 | abort: cannot phabsend multiple head revisions: c44b38f24a45 |
|
599 | abort: cannot phabsend multiple head revisions: c44b38f24a45 aaef04066140 | |
600 | (the revisions must form a linear chain) |
|
600 | (the revisions must form a linear chain) | |
601 | [255] |
|
601 | [255] | |
602 |
|
602 |
General Comments 0
You need to be logged in to leave comments.
Login now