##// END OF EJS Templates
bookmarks: allow renaming active bookmark using '.'
David Demelier -
r33901:10f1809a default
parent child Browse files
Show More
@@ -968,6 +968,7 b' def bookmark(ui, repo, *names, **opts):'
968 968 raise error.Abort(_("new bookmark name required"))
969 969 elif len(names) > 1:
970 970 raise error.Abort(_("only one new bookmark name allowed"))
971 rename = repo._bookmarks.expandname(rename)
971 972 bookmarks.rename(repo, tr, rename, names[0], force, inactive)
972 973 elif names:
973 974 bookmarks.addbookmarks(repo, tr, names, rev, force, inactive)
@@ -191,6 +191,28 b' force rename to existent bookmark'
191 191
192 192 $ hg bookmark -f -m X Y
193 193
194 rename bookmark using .
195
196 $ hg book rename-me
197 $ hg book -m . renamed
198 $ hg bookmark
199 X2 1:925d80f479bb
200 Y 2:db815d6d32e6
201 Z 0:f7b1eb17ad24
202 * renamed 2:db815d6d32e6
203 $ hg up -q Y
204 $ hg book -d renamed
205
206 rename bookmark using . with no active bookmark
207
208 $ hg book rename-me
209 $ hg book -i rename-me
210 $ hg book -m . renamed
211 abort: no active bookmark
212 [255]
213 $ hg up -q Y
214 $ hg book -d rename-me
215
194 216 list bookmarks
195 217
196 218 $ hg bookmark
General Comments 0
You need to be logged in to leave comments. Login now