equal
deleted
inserted
replaced
1376 if ui.configbool('commands', 'rebase.requiredest'): |
1376 if ui.configbool('commands', 'rebase.requiredest'): |
1377 msg = _('rebase destination required by configuration') |
1377 msg = _('rebase destination required by configuration') |
1378 hint = _('use hg pull followed by hg rebase -d DEST') |
1378 hint = _('use hg pull followed by hg rebase -d DEST') |
1379 raise error.Abort(msg, hint=hint) |
1379 raise error.Abort(msg, hint=hint) |
1380 |
1380 |
1381 wlock = lock = None |
1381 with repo.wlock(), repo.lock(): |
1382 try: |
|
1383 wlock = repo.wlock() |
|
1384 lock = repo.lock() |
|
1385 if opts.get('update'): |
1382 if opts.get('update'): |
1386 del opts['update'] |
1383 del opts['update'] |
1387 ui.debug('--update and --rebase are not compatible, ignoring ' |
1384 ui.debug('--update and --rebase are not compatible, ignoring ' |
1388 'the update flag\n') |
1385 'the update flag\n') |
1389 |
1386 |
1423 else: |
1420 else: |
1424 ui.status(_('nothing to rebase - updating instead\n')) |
1421 ui.status(_('nothing to rebase - updating instead\n')) |
1425 # not passing argument to get the bare update behavior |
1422 # not passing argument to get the bare update behavior |
1426 # with warning and trumpets |
1423 # with warning and trumpets |
1427 commands.update(ui, repo) |
1424 commands.update(ui, repo) |
1428 finally: |
|
1429 release(lock, wlock) |
|
1430 else: |
1425 else: |
1431 if opts.get('tool'): |
1426 if opts.get('tool'): |
1432 raise error.Abort(_('--tool can only be used with --rebase')) |
1427 raise error.Abort(_('--tool can only be used with --rebase')) |
1433 ret = orig(ui, repo, *args, **opts) |
1428 ret = orig(ui, repo, *args, **opts) |
1434 |
1429 |