Show More
@@ -41,6 +41,9 b' command = cmdutil.command(cmdtable)' | |||
|
41 | 41 | # leave the attribute unspecified. |
|
42 | 42 | testedwith = 'internal' |
|
43 | 43 | |
|
44 | def _nothingtorebase(): | |
|
45 | return 1 | |
|
46 | ||
|
44 | 47 | def _savegraft(ctx, extra): |
|
45 | 48 | s = ctx.extra().get('source', None) |
|
46 | 49 | if s is not None: |
@@ -290,13 +293,13 b' def rebase(ui, repo, **opts):' | |||
|
290 | 293 | if not rebaseset: |
|
291 | 294 | ui.status(_('empty "rev" revision set - ' |
|
292 | 295 | 'nothing to rebase\n')) |
|
293 |
return |
|
|
296 | return _nothingtorebase() | |
|
294 | 297 | elif srcf: |
|
295 | 298 | src = scmutil.revrange(repo, [srcf]) |
|
296 | 299 | if not src: |
|
297 | 300 | ui.status(_('empty "source" revision set - ' |
|
298 | 301 | 'nothing to rebase\n')) |
|
299 |
return |
|
|
302 | return _nothingtorebase() | |
|
300 | 303 | rebaseset = repo.revs('(%ld)::', src) |
|
301 | 304 | assert rebaseset |
|
302 | 305 | else: |
@@ -304,7 +307,7 b' def rebase(ui, repo, **opts):' | |||
|
304 | 307 | if not base: |
|
305 | 308 | ui.status(_('empty "base" revision set - ' |
|
306 | 309 | "can't compute rebase set\n")) |
|
307 |
return |
|
|
310 | return _nothingtorebase() | |
|
308 | 311 | commonanc = repo.revs('ancestor(%ld, %d)', base, dest).first() |
|
309 | 312 | if commonanc is not None: |
|
310 | 313 | rebaseset = repo.revs('(%d::(%ld) - %d)::', |
@@ -337,7 +340,7 b' def rebase(ui, repo, **opts):' | |||
|
337 | 340 | else: # can it happen? |
|
338 | 341 | ui.status(_('nothing to rebase from %s to %s\n') % |
|
339 | 342 | ('+'.join(str(repo[r]) for r in base), dest)) |
|
340 |
return |
|
|
343 | return _nothingtorebase() | |
|
341 | 344 | |
|
342 | 345 | allowunstable = obsolete.isenabled(repo, obsolete.allowunstableopt) |
|
343 | 346 | if (not (keepf or allowunstable) |
@@ -365,7 +368,7 b' def rebase(ui, repo, **opts):' | |||
|
365 | 368 | if not result: |
|
366 | 369 | # Empty state built, nothing to rebase |
|
367 | 370 | ui.status(_('nothing to rebase\n')) |
|
368 |
return |
|
|
371 | return _nothingtorebase() | |
|
369 | 372 | |
|
370 | 373 | root = min(rebaseset) |
|
371 | 374 | if not keepf and not repo[root].mutable(): |
General Comments 0
You need to be logged in to leave comments.
Login now