equal
deleted
inserted
replaced
35 error, |
35 error, |
36 extensions, |
36 extensions, |
37 hg, |
37 hg, |
38 merge as mergemod, |
38 merge as mergemod, |
39 mergeutil, |
39 mergeutil, |
|
40 node as nodemod, |
40 obsolete, |
41 obsolete, |
41 obsutil, |
42 obsutil, |
42 patch, |
43 patch, |
43 phases, |
44 phases, |
44 pycompat, |
45 pycompat, |
1263 elif srcf: |
1264 elif srcf: |
1264 src = scmutil.revrange(repo, [srcf]) |
1265 src = scmutil.revrange(repo, [srcf]) |
1265 if not src: |
1266 if not src: |
1266 ui.status(_(b'empty "source" revision set - nothing to rebase\n')) |
1267 ui.status(_(b'empty "source" revision set - nothing to rebase\n')) |
1267 return None |
1268 return None |
1268 rebaseset = repo.revs(b'(%ld)::', src) |
1269 rebaseset = repo.revs(b'(%ld)::', src) or src |
1269 assert rebaseset |
|
1270 else: |
1270 else: |
1271 base = scmutil.revrange(repo, [basef or b'.']) |
1271 base = scmutil.revrange(repo, [basef or b'.']) |
1272 if not base: |
1272 if not base: |
1273 ui.status( |
1273 ui.status( |
1274 _(b'empty "base" revision set - ' b"can't compute rebase set\n") |
1274 _(b'empty "base" revision set - ' b"can't compute rebase set\n") |
1339 _(b'nothing to rebase from %s to %s\n') |
1339 _(b'nothing to rebase from %s to %s\n') |
1340 % (b'+'.join(bytes(repo[r]) for r in base), dest) |
1340 % (b'+'.join(bytes(repo[r]) for r in base), dest) |
1341 ) |
1341 ) |
1342 return None |
1342 return None |
1343 |
1343 |
|
1344 if nodemod.wdirrev in rebaseset: |
|
1345 raise error.Abort(_(b'cannot rebase the working copy')) |
1344 rebasingwcp = repo[b'.'].rev() in rebaseset |
1346 rebasingwcp = repo[b'.'].rev() in rebaseset |
1345 ui.log( |
1347 ui.log( |
1346 b"rebase", |
1348 b"rebase", |
1347 b"rebasing working copy parent: %r\n", |
1349 b"rebasing working copy parent: %r\n", |
1348 rebasingwcp, |
1350 rebasingwcp, |