1163 del opts['rev'] |
1163 del opts['rev'] |
1164 # positional argument from pull conflicts with rebase's own |
1164 # positional argument from pull conflicts with rebase's own |
1165 # --source. |
1165 # --source. |
1166 if 'source' in opts: |
1166 if 'source' in opts: |
1167 del opts['source'] |
1167 del opts['source'] |
1168 rebase(ui, repo, **opts) |
1168 if rebase(ui, repo, **opts) == _nothingtorebase(): |
1169 branch = repo[None].branch() |
1169 branch = repo[None].branch() |
1170 dest = repo[branch].rev() |
1170 dest = repo[branch].rev() |
1171 if dest != repo['.'].rev(): |
1171 if dest != repo['.'].rev(): |
1172 # there was nothing to rebase we force an update |
1172 # there was nothing to rebase we force an update |
1173 hg.update(repo, dest) |
1173 hg.update(repo, dest) |
1174 if bookmarks.update(repo, [movemarkfrom], repo['.'].node()): |
1174 if bookmarks.update(repo, [movemarkfrom], |
1175 ui.status(_("updating bookmark %s\n") |
1175 repo['.'].node()): |
1176 % repo._activebookmark) |
1176 ui.status(_("updating bookmark %s\n") |
|
1177 % repo._activebookmark) |
1177 finally: |
1178 finally: |
1178 release(lock, wlock) |
1179 release(lock, wlock) |
1179 else: |
1180 else: |
1180 if opts.get('tool'): |
1181 if opts.get('tool'): |
1181 raise error.Abort(_('--tool can only be used with --rebase')) |
1182 raise error.Abort(_('--tool can only be used with --rebase')) |