Show More
@@ -353,6 +353,21 def clone(ui, peeropts, source, dest=Non | |||||
353 | if dircleanup: |
|
353 | if dircleanup: | |
354 | dircleanup.close() |
|
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 | if destrepo.local(): |
|
371 | if destrepo.local(): | |
357 | fp = destrepo.opener("hgrc", "w", text=True) |
|
372 | fp = destrepo.opener("hgrc", "w", text=True) | |
358 | fp.write("[paths]\n") |
|
373 | fp.write("[paths]\n") | |
@@ -381,21 +396,6 def clone(ui, peeropts, source, dest=Non | |||||
381 | destrepo.ui.status(_("updating to branch %s\n") % bn) |
|
396 | destrepo.ui.status(_("updating to branch %s\n") % bn) | |
382 | _update(destrepo, uprev) |
|
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 | return srcrepo, destrepo |
|
399 | return srcrepo, destrepo | |
400 | finally: |
|
400 | finally: | |
401 | release(srclock, destlock) |
|
401 | release(srclock, destlock) |
@@ -118,9 +118,9 clone via pull | |||||
118 | adding manifests |
|
118 | adding manifests | |
119 | adding file changes |
|
119 | adding file changes | |
120 | added 1 changesets with 4 changes to 4 files |
|
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 | updating to branch default |
|
122 | updating to branch default | |
122 | 4 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
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 | checking changesets |
|
125 | checking changesets | |
126 | checking manifests |
|
126 | checking manifests |
General Comments 0
You need to be logged in to leave comments.
Login now