equal
deleted
inserted
replaced
4555 if opts.get('exact') and opts.get('edit'): |
4555 if opts.get('exact') and opts.get('edit'): |
4556 raise error.Abort(_('cannot use --exact with --edit')) |
4556 raise error.Abort(_('cannot use --exact with --edit')) |
4557 if opts.get('exact') and opts.get('prefix'): |
4557 if opts.get('exact') and opts.get('prefix'): |
4558 raise error.Abort(_('cannot use --exact with --prefix')) |
4558 raise error.Abort(_('cannot use --exact with --prefix')) |
4559 |
4559 |
4560 if update: |
|
4561 cmdutil.checkunfinished(repo) |
|
4562 if (opts.get('exact') or not opts.get('force')) and update: |
|
4563 cmdutil.bailifchanged(repo) |
|
4564 |
|
4565 base = opts["base"] |
4560 base = opts["base"] |
4566 wlock = dsguard = lock = tr = None |
4561 wlock = dsguard = lock = tr = None |
4567 msgs = [] |
4562 msgs = [] |
4568 ret = 0 |
4563 ret = 0 |
4569 |
4564 |
4570 |
4565 |
4571 try: |
4566 try: |
4572 try: |
4567 try: |
4573 wlock = repo.wlock() |
4568 wlock = repo.wlock() |
|
4569 |
|
4570 if update: |
|
4571 cmdutil.checkunfinished(repo) |
|
4572 if (opts.get('exact') or not opts.get('force')) and update: |
|
4573 cmdutil.bailifchanged(repo) |
|
4574 |
4574 if not opts.get('no_commit'): |
4575 if not opts.get('no_commit'): |
4575 lock = repo.lock() |
4576 lock = repo.lock() |
4576 tr = repo.transaction('import') |
4577 tr = repo.transaction('import') |
4577 else: |
4578 else: |
4578 dsguard = cmdutil.dirstateguard(repo, 'import') |
4579 dsguard = cmdutil.dirstateguard(repo, 'import') |