##// END OF EJS Templates
bookmarks: allow deleting active bookmark using '.'
David Demelier -
r33914:5cd6d482 default
parent child Browse files
Show More
@@ -917,6 +917,9 b' def bookmark(ui, repo, *names, **opts):'
917 917 diverged, a new 'divergent bookmark' of the form 'name@path' will
918 918 be created. Using :hg:`merge` will resolve the divergence.
919 919
920 Specifying bookmark as '.' to -m or -d options is equivalent to specifying
921 the active bookmark's name.
922
920 923 A bookmark named '@' has the special property that :hg:`clone` will
921 924 check it out by default if it exists.
922 925
@@ -962,6 +965,7 b' def bookmark(ui, repo, *names, **opts):'
962 965 if delete or rename or names or inactive:
963 966 with repo.wlock(), repo.lock(), repo.transaction('bookmark') as tr:
964 967 if delete:
968 names = pycompat.maplist(repo._bookmarks.expandname, names)
965 969 bookmarks.delete(repo, tr, names)
966 970 elif rename:
967 971 if not names:
@@ -213,6 +213,26 b' rename bookmark using . with no active b'
213 213 $ hg up -q Y
214 214 $ hg book -d rename-me
215 215
216 delete bookmark using .
217
218 $ hg book delete-me
219 $ hg book -d .
220 $ hg bookmark
221 X2 1:925d80f479bb
222 Y 2:db815d6d32e6
223 Z 0:f7b1eb17ad24
224 $ hg up -q Y
225
226 delete bookmark using . with no active bookmark
227
228 $ hg book delete-me
229 $ hg book -i delete-me
230 $ hg book -d .
231 abort: no active bookmark
232 [255]
233 $ hg up -q Y
234 $ hg book -d delete-me
235
216 236 list bookmarks
217 237
218 238 $ hg bookmark
General Comments 0
You need to be logged in to leave comments. Login now