equal
deleted
inserted
replaced
971 repo.ui.write(_('hg update %s;\n') % target) |
971 repo.ui.write(_('hg update %s;\n') % target) |
972 if bookmark is not None: |
972 if bookmark is not None: |
973 repo.ui.write(_('hg bookmark %s -r %s;\n') |
973 repo.ui.write(_('hg bookmark %s -r %s;\n') |
974 % (bookmark, target)) |
974 % (bookmark, target)) |
975 else: |
975 else: |
976 ret = hg.update(repo, target.rev()) |
976 ret = hg.updatetotally(repo.ui, repo, target.node(), None) |
977 if not ret: |
977 if not ret: |
978 tr = lock = None |
978 tr = lock = None |
979 try: |
979 try: |
980 lock = repo.lock() |
980 lock = repo.lock() |
981 tr = repo.transaction('previous') |
981 tr = repo.transaction('previous') |
1048 wkctx = repo[None] |
1048 wkctx = repo[None] |
1049 wparents = wkctx.parents() |
1049 wparents = wkctx.parents() |
1050 if len(wparents) != 1: |
1050 if len(wparents) != 1: |
1051 raise error.Abort(_('merge in progress')) |
1051 raise error.Abort(_('merge in progress')) |
1052 if not opts['merge']: |
1052 if not opts['merge']: |
1053 try: |
1053 # we only skip the check if noconflict is set |
1054 cmdutil.bailifchanged(repo) |
1054 if ui.config('commands', 'update.check') == 'noconflict': |
1055 except error.Abort as exc: |
1055 pass |
1056 exc.hint = _('do you want --merge?') |
1056 else: |
1057 raise |
1057 try: |
|
1058 cmdutil.bailifchanged(repo) |
|
1059 except error.Abort as exc: |
|
1060 exc.hint = _('do you want --merge?') |
|
1061 raise |
1058 |
1062 |
1059 displayer = compat.changesetdisplayer(ui, repo, |
1063 displayer = compat.changesetdisplayer(ui, repo, |
1060 {'template': shorttemplate}) |
1064 {'template': shorttemplate}) |
1061 topic = not opts.get("no_topic", False) |
1065 topic = not opts.get("no_topic", False) |
1062 |
1066 |