##// END OF EJS Templates
bookmarks: resolve target revision out of the bookmarks loop...
Yuya Nishihara -
r43997:1c91576b default
parent child Browse files
Show More
@@ -955,9 +955,14 b' def addbookmarks(repo, tr, names, rev=No'
955 changes = []
955 changes = []
956 hiddenrev = None
956 hiddenrev = None
957
957
958 tgt = cur
958 # unhide revs if any
959 # unhide revs if any
959 if rev:
960 if rev:
960 repo = scmutil.unhidehashlikerevs(repo, [rev], b'nowarn')
961 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()
961
966
962 for mark in names:
967 for mark in names:
963 mark = checkformat(repo, mark)
968 mark = checkformat(repo, mark)
@@ -966,12 +971,6 b' def addbookmarks(repo, tr, names, rev=No'
966 if inactive and mark == repo._activebookmark:
971 if inactive and mark == repo._activebookmark:
967 deactivate(repo)
972 deactivate(repo)
968 continue
973 continue
969 tgt = cur
970 if rev:
971 ctx = scmutil.revsingle(repo, rev)
972 if ctx.hidden():
973 hiddenrev = ctx.hex()[:12]
974 tgt = ctx.node()
975 for bm in marks.checkconflict(mark, force, tgt):
974 for bm in marks.checkconflict(mark, force, tgt):
976 changes.append((bm, None))
975 changes.append((bm, None))
977 changes.append((mark, tgt))
976 changes.append((mark, tgt))
General Comments 0
You need to be logged in to leave comments. Login now