##// END OF EJS Templates
bookmarks: shadow divergent bookmarks of foo with foo@n
Matt Mackall -
r15613:2fad18f1 default
parent child Browse files
Show More
@@ -155,7 +155,9 b' def listbookmarks(repo):'
155
155
156 d = {}
156 d = {}
157 for k, v in marks.iteritems():
157 for k, v in marks.iteritems():
158 d[k] = hex(v)
158 # don't expose local divergent bookmarks
159 if '@' not in k and not k.endswith('@'):
160 d[k] = hex(v)
159 return d
161 return d
160
162
161 def pushbookmark(repo, key, old, new):
163 def pushbookmark(repo, key, old, new):
@@ -192,8 +194,14 b' def updatefromremote(ui, repo, remote):'
192 changed = True
194 changed = True
193 ui.status(_("updating bookmark %s\n") % k)
195 ui.status(_("updating bookmark %s\n") % k)
194 else:
196 else:
195 ui.warn(_("not updating divergent"
197 for x in range(1, 100):
196 " bookmark %s\n") % k)
198 n = '%s@%d' % (k, x)
199 if n not in repo._bookmarks:
200 break
201 repo._bookmarks[n] = cr.node()
202 changed = True
203 ui.warn(_("divergent bookmark %s stored as %s\n") % (k, n))
204
197 if changed:
205 if changed:
198 write(repo)
206 write(repo)
199
207
@@ -117,10 +117,11 b' divergent bookmarks'
117 adding manifests
117 adding manifests
118 adding file changes
118 adding file changes
119 added 1 changesets with 1 changes to 1 files (+1 heads)
119 added 1 changesets with 1 changes to 1 files (+1 heads)
120 not updating divergent bookmark X
120 divergent bookmark X stored as X@1
121 (run 'hg heads' to see heads, 'hg merge' to merge)
121 (run 'hg heads' to see heads, 'hg merge' to merge)
122 $ hg book
122 $ hg book
123 * X 1:9b140be10808
123 * X 1:9b140be10808
124 X@1 2:0d2164f0ce0d
124 Y 0:4e3505fd9583
125 Y 0:4e3505fd9583
125 foo -1:000000000000
126 foo -1:000000000000
126 foobar -1:000000000000
127 foobar -1:000000000000
@@ -175,7 +176,7 b' hgweb'
175 $ hg pull -B Z http://localhost:$HGPORT/
176 $ hg pull -B Z http://localhost:$HGPORT/
176 pulling from http://localhost:$HGPORT/
177 pulling from http://localhost:$HGPORT/
177 no changes found
178 no changes found
178 not updating divergent bookmark X
179 divergent bookmark X stored as X@1
179 importing bookmark Z
180 importing bookmark Z
180 $ hg clone http://localhost:$HGPORT/ cloned-bookmarks
181 $ hg clone http://localhost:$HGPORT/ cloned-bookmarks
181 requesting all changes
182 requesting all changes
General Comments 0
You need to be logged in to leave comments. Login now