##// END OF EJS Templates
bookmarks: abort 'push -B .' when no active bookmark
liscju -
r29354:af849596 default
parent child Browse files
Show More
@@ -17,6 +17,7 b' from .node import ('
17 17 )
18 18 from . import (
19 19 encoding,
20 error,
20 21 lock as lockmod,
21 22 obsolete,
22 23 util,
@@ -154,7 +155,10 b' class bmstore(dict):'
154 155
155 156 def expandname(self, bname):
156 157 if bname == '.':
158 if self.active:
157 159 return self.active
160 else:
161 raise error.Abort(_("no active bookmark"))
158 162 return bname
159 163
160 164 def _readactive(repo, marks):
@@ -113,6 +113,19 b' export the active bookmark'
113 113 exporting bookmark V
114 114 [1]
115 115
116 exporting the active bookmark with 'push -B .'
117 demand that one of the bookmarks is activated
118
119 $ hg update -r default
120 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
121 (leaving bookmark V)
122 $ hg push -B . ../a
123 abort: no active bookmark
124 [255]
125 $ hg update -r V
126 0 files updated, 0 files merged, 1 files removed, 0 files unresolved
127 (activating bookmark V)
128
116 129 delete the bookmark
117 130
118 131 $ hg book -d V
General Comments 0
You need to be logged in to leave comments. Login now