Show More
@@ -830,7 +830,12 b' def addbookmarks(repo, tr, names, rev=No' | |||||
830 | cur = repo.changectx('.').node() |
|
830 | cur = repo.changectx('.').node() | |
831 | newact = None |
|
831 | newact = None | |
832 | changes = [] |
|
832 | changes = [] | |
833 |
hiddenrev |
|
833 | hiddenrev = None | |
|
834 | ||||
|
835 | # unhide revs if any | |||
|
836 | if rev: | |||
|
837 | repo = scmutil.unhidehashlikerevs(repo, [rev], 'nowarn') | |||
|
838 | ||||
834 | for mark in names: |
|
839 | for mark in names: | |
835 | mark = checkformat(repo, mark) |
|
840 | mark = checkformat(repo, mark) | |
836 | if newact is None: |
|
841 | if newact is None: | |
@@ -840,17 +845,16 b' def addbookmarks(repo, tr, names, rev=No' | |||||
840 | return |
|
845 | return | |
841 | tgt = cur |
|
846 | tgt = cur | |
842 | if rev: |
|
847 | if rev: | |
843 | repo = scmutil.unhidehashlikerevs(repo, [rev], 'nowarn') |
|
|||
844 | ctx = scmutil.revsingle(repo, rev) |
|
848 | ctx = scmutil.revsingle(repo, rev) | |
845 | if ctx.hidden(): |
|
849 | if ctx.hidden(): | |
846 |
hiddenrev |
|
850 | hiddenrev = ctx.hex()[:12] | |
847 | tgt = ctx.node() |
|
851 | tgt = ctx.node() | |
848 | for bm in marks.checkconflict(mark, force, tgt): |
|
852 | for bm in marks.checkconflict(mark, force, tgt): | |
849 | changes.append((bm, None)) |
|
853 | changes.append((bm, None)) | |
850 | changes.append((mark, tgt)) |
|
854 | changes.append((mark, tgt)) | |
851 | if hiddenrevs: |
|
855 | ||
852 | repo.ui.warn(_("bookmarking hidden changeset %s\n") % |
|
856 | if hiddenrev: | |
853 | ', '.join(hiddenrevs)) |
|
857 | repo.ui.warn(_("bookmarking hidden changeset %s\n") % hiddenrev) | |
854 | marks.applychanges(repo, tr, changes) |
|
858 | marks.applychanges(repo, tr, changes) | |
855 | if not inactive and cur == marks[newact] and not rev: |
|
859 | if not inactive and cur == marks[newact] and not rev: | |
856 | activate(repo, newact) |
|
860 | activate(repo, newact) |
General Comments 0
You need to be logged in to leave comments.
Login now