##// END OF EJS Templates
bookmarks: use changectx instead of remembering hex of hidden revision...
Yuya Nishihara -
r43998:fe2e0d10 default
parent child Browse files
Show More
@@ -953,16 +953,13 b' def addbookmarks(repo, tr, names, rev=No'
953 953 cur = repo[b'.'].node()
954 954 newact = None
955 955 changes = []
956 hiddenrev = None
957 956
958 tgt = cur
959 957 # unhide revs if any
960 958 if rev:
961 959 repo = scmutil.unhidehashlikerevs(repo, [rev], b'nowarn')
962 ctx = scmutil.revsingle(repo, rev)
963 if ctx.hidden():
964 hiddenrev = ctx.hex()[:12]
965 tgt = ctx.node()
960
961 ctx = scmutil.revsingle(repo, rev)
962 tgt = ctx.node()
966 963
967 964 for mark in names:
968 965 mark = checkformat(repo, mark)
@@ -979,11 +976,11 b' def addbookmarks(repo, tr, names, rev=No'
979 976 if not changes:
980 977 return
981 978
982 if hiddenrev:
983 repo.ui.warn(_(b"bookmarking hidden changeset %s\n") % hiddenrev)
979 if ctx.hidden():
980 repo.ui.warn(_(b"bookmarking hidden changeset %s\n") % ctx.hex()[:12])
984 981
985 982 if ctx.obsolete():
986 msg = obsutil._getfilteredreason(repo, b"%s" % hiddenrev, ctx)
983 msg = obsutil._getfilteredreason(repo, ctx.hex()[:12], ctx)
987 984 repo.ui.warn(b"(%s)\n" % msg)
988 985
989 986 marks.applychanges(repo, tr, changes)
General Comments 0
You need to be logged in to leave comments. Login now