##// END OF EJS Templates
bookmarks: teach the -r option to use revsets
David Soria Parra -
r17686:6e4b9626 default
parent child Browse files
Show More
@@ -833,7 +833,7 b' def bookmark(ui, repo, mark=None, rev=No'
833 raise util.Abort(
833 raise util.Abort(
834 _("a bookmark cannot have the name of an existing branch"))
834 _("a bookmark cannot have the name of an existing branch"))
835 if rev:
835 if rev:
836 marks[mark] = repo.lookup(rev)
836 marks[mark] = scmutil.revsingle(repo, rev).node()
837 else:
837 else:
838 marks[mark] = cur
838 marks[mark] = cur
839 if not inactive and cur == marks[mark]:
839 if not inactive and cur == marks[mark]:
@@ -154,6 +154,19 b' list bookmarks'
154 * Y 2:db815d6d32e6
154 * Y 2:db815d6d32e6
155 Z 0:f7b1eb17ad24
155 Z 0:f7b1eb17ad24
156
156
157 bookmarks from a revset
158 $ hg bookmark -r '.^1' REVSET
159 $ hg bookmark -r ':tip' TIP
160 $ hg bookmarks
161 REVSET 0:f7b1eb17ad24
162 * TIP 2:db815d6d32e6
163 X2 1:925d80f479bb
164 Y 2:db815d6d32e6
165 Z 0:f7b1eb17ad24
166
167 $ hg bookmark -d REVSET
168 $ hg bookmark -d TIP
169
157 rename without new name
170 rename without new name
158
171
159 $ hg bookmark -m Y
172 $ hg bookmark -m Y
General Comments 0
You need to be logged in to leave comments. Login now