##// END OF EJS Templates
clone: get all bookmarks before updating
Arne Babenhauserheide -
r15590:dbdb8aa7 default
parent child Browse files
Show More
@@ -353,6 +353,21 def clone(ui, peeropts, source, dest=Non
353 353 if dircleanup:
354 354 dircleanup.close()
355 355
356 # clone all bookmarks
357 if destrepo.local() and srcrepo.capable("pushkey"):
358 rb = srcrepo.listkeys('bookmarks')
359 for k, n in rb.iteritems():
360 try:
361 m = destrepo.lookup(n)
362 destrepo._bookmarks[k] = m
363 except error.RepoLookupError:
364 pass
365 if rb:
366 bookmarks.write(destrepo)
367 elif srcrepo.local() and destrepo.capable("pushkey"):
368 for k, n in srcrepo._bookmarks.iteritems():
369 destrepo.pushkey('bookmarks', k, '', hex(n))
370
356 371 if destrepo.local():
357 372 fp = destrepo.opener("hgrc", "w", text=True)
358 373 fp.write("[paths]\n")
@@ -381,21 +396,6 def clone(ui, peeropts, source, dest=Non
381 396 destrepo.ui.status(_("updating to branch %s\n") % bn)
382 397 _update(destrepo, uprev)
383 398
384 # clone all bookmarks
385 if destrepo.local() and srcrepo.capable("pushkey"):
386 rb = srcrepo.listkeys('bookmarks')
387 for k, n in rb.iteritems():
388 try:
389 m = destrepo.lookup(n)
390 destrepo._bookmarks[k] = m
391 except error.RepoLookupError:
392 pass
393 if rb:
394 bookmarks.write(destrepo)
395 elif srcrepo.local() and destrepo.capable("pushkey"):
396 for k, n in srcrepo._bookmarks.iteritems():
397 destrepo.pushkey('bookmarks', k, '', hex(n))
398
399 399 return srcrepo, destrepo
400 400 finally:
401 401 release(srclock, destlock)
@@ -118,9 +118,9 clone via pull
118 118 adding manifests
119 119 adding file changes
120 120 added 1 changesets with 4 changes to 4 files
121 warning: localhost certificate with fingerprint 91:4f:1a:ff:87:24:9c:09:b6:85:9b:88:b1:90:6d:30:75:64:91:ca not verified (check hostfingerprints or web.cacerts config setting)
121 122 updating to branch default
122 123 4 files updated, 0 files merged, 0 files removed, 0 files unresolved
123 warning: localhost certificate with fingerprint 91:4f:1a:ff:87:24:9c:09:b6:85:9b:88:b1:90:6d:30:75:64:91:ca not verified (check hostfingerprints or web.cacerts config setting)
124 124 $ hg verify -R copy-pull
125 125 checking changesets
126 126 checking manifests
General Comments 0
You need to be logged in to leave comments. Login now