Show More
@@ -818,7 +818,7 b' def bookmark(ui, repo, *names, **opts):' | |||||
818 | scmutil.checknewlabel(repo, mark, 'bookmark') |
|
818 | scmutil.checknewlabel(repo, mark, 'bookmark') | |
819 | return mark |
|
819 | return mark | |
820 |
|
820 | |||
821 | def checkconflict(repo, mark, force=False, target=None): |
|
821 | def checkconflict(repo, mark, cur, force=False, target=None): | |
822 | if mark in marks and not force: |
|
822 | if mark in marks and not force: | |
823 | if target: |
|
823 | if target: | |
824 | if marks[mark] == target and target == cur: |
|
824 | if marks[mark] == target and target == cur: | |
@@ -883,7 +883,7 b' def bookmark(ui, repo, *names, **opts):' | |||||
883 | mark = checkformat(names[0]) |
|
883 | mark = checkformat(names[0]) | |
884 | if rename not in marks: |
|
884 | if rename not in marks: | |
885 | raise util.Abort(_("bookmark '%s' does not exist") % rename) |
|
885 | raise util.Abort(_("bookmark '%s' does not exist") % rename) | |
886 | checkconflict(repo, mark, force) |
|
886 | checkconflict(repo, mark, cur, force) | |
887 | marks[mark] = marks[rename] |
|
887 | marks[mark] = marks[rename] | |
888 | if repo._bookmarkcurrent == rename and not inactive: |
|
888 | if repo._bookmarkcurrent == rename and not inactive: | |
889 | bookmarks.setcurrent(repo, mark) |
|
889 | bookmarks.setcurrent(repo, mark) | |
@@ -902,7 +902,7 b' def bookmark(ui, repo, *names, **opts):' | |||||
902 | tgt = cur |
|
902 | tgt = cur | |
903 | if rev: |
|
903 | if rev: | |
904 | tgt = scmutil.revsingle(repo, rev).node() |
|
904 | tgt = scmutil.revsingle(repo, rev).node() | |
905 | checkconflict(repo, mark, force, tgt) |
|
905 | checkconflict(repo, mark, cur, force, tgt) | |
906 | marks[mark] = tgt |
|
906 | marks[mark] = tgt | |
907 | if not inactive and cur == marks[newact] and not rev: |
|
907 | if not inactive and cur == marks[newact] and not rev: | |
908 | bookmarks.setcurrent(repo, newact) |
|
908 | bookmarks.setcurrent(repo, newact) |
General Comments 0
You need to be logged in to leave comments.
Login now