Mercurial > hg
changeset 22648:ef62c66bee1b
clone: remove duplicated bookmark pulling
Now that all clone methods (copy, pull and push) also transport bookmarks, we can
safely drop the manual pulling that was performed during clone.
author | Pierre-Yves David <pierre-yves.david@fb.com> |
---|---|
date | Fri, 26 Sep 2014 13:56:20 -0700 |
parents | 5b6cd8526d56 |
children | 1d7a2422b90c |
files | mercurial/hg.py tests/test-clone.t tests/test-hardlinks.t tests/test-http-proxy.t tests/test-http.t |
diffstat | 5 files changed, 5 insertions(+), 30 deletions(-) [+] |
line wrap: on
line diff
--- a/mercurial/hg.py Fri Sep 26 15:15:49 2014 -0700 +++ b/mercurial/hg.py Fri Sep 26 13:56:20 2014 -0700 @@ -8,7 +8,7 @@ from i18n import _ from lock import release -from node import hex, nullid +from node import nullid import localrepo, bundlerepo, unionrepo, httppeer, sshpeer, statichttprepo import bookmarks, lock, util, extensions, error, node, scmutil, phases, url import cmdutil, discovery, repoview, exchange @@ -420,23 +420,7 @@ cleandir = None - # clone all bookmarks except divergent ones destrepo = destpeer.local() - if destrepo and srcpeer.capable("pushkey"): - rb = srcpeer.listkeys('bookmarks') - marks = destrepo._bookmarks - for k, n in rb.iteritems(): - try: - m = destrepo.lookup(n) - marks[k] = m - except error.RepoLookupError: - pass - if rb: - marks.write() - elif srcrepo and destpeer.capable("pushkey"): - for k, n in srcrepo._bookmarks.iteritems(): - destpeer.pushkey('bookmarks', k, '', hex(n)) - if destrepo: template = ( '# You may want to set your username here if it is not set\n'
--- a/tests/test-clone.t Fri Sep 26 15:15:49 2014 -0700 +++ b/tests/test-clone.t Fri Sep 26 13:56:20 2014 -0700 @@ -64,7 +64,6 @@ #if hardlink $ hg --debug clone -U . ../c linked 8 files - listing keys for "bookmarks" #else $ hg --debug clone -U . ../c copied 8 files
--- a/tests/test-hardlinks.t Fri Sep 26 15:15:49 2014 -0700 +++ b/tests/test-hardlinks.t Fri Sep 26 13:56:20 2014 -0700 @@ -57,7 +57,6 @@ $ hg clone -U --debug r1 r2 linked 7 files - listing keys for "bookmarks" Create non-hardlinked clone r3:
--- a/tests/test-http-proxy.t Fri Sep 26 15:15:49 2014 -0700 +++ b/tests/test-http-proxy.t Fri Sep 26 13:56:20 2014 -0700 @@ -101,29 +101,23 @@ * - - [*] "GET http://localhost:$HGPORT/?cmd=capabilities HTTP/1.1" - - (glob) * - - [*] "GET http://localhost:$HGPORT/?cmd=branchmap HTTP/1.1" - - (glob) * - - [*] "GET http://localhost:$HGPORT/?cmd=stream_out HTTP/1.1" - - (glob) - * - - [*] "GET http://localhost:$HGPORT/?cmd=listkeys HTTP/1.1" - - x-hgarg-1:namespace=bookmarks (glob) * - - [*] "GET http://localhost:$HGPORT/?cmd=capabilities HTTP/1.1" - - (glob) - * - - [*] "GET http://localhost:$HGPORT/?cmd=listkeys HTTP/1.1" - - x-hgarg-1:namespace=bookmarks (glob) - * - - [*] "GET http://localhost:$HGPORT/?cmd=batch HTTP/1.1" - - x-hgarg-1:cmds=heads+%3Bknown+nodes%3D (glob) - * - - [*] "GET http://localhost:$HGPORT/?cmd=getbundle HTTP/1.1" - - x-hgarg-1:common=0000000000000000000000000000000000000000&heads=83180e7845de420a1bb46896fd5fe05294f8d629 (glob) - * - - [*] "GET http://localhost:$HGPORT/?cmd=listkeys HTTP/1.1" - - x-hgarg-1:namespace=phases (glob) - * - - [*] "GET http://localhost:$HGPORT/?cmd=listkeys HTTP/1.1" - - x-hgarg-1:namespace=bookmarks (glob) + *- - [*] "GET http://localhost:$HGPORT/?cmd=listkeys HTTP/1.1" - - x-hgarg-1:namespace=bookmarks (glob) + *- - [*] "GET http://localhost:$HGPORT/?cmd=batch HTTP/1.1" - - x-hgarg-1:cmds=heads+%3Bknown+nodes%3D (glob) + *- - [*] "GET http://localhost:$HGPORT/?cmd=getbundle HTTP/1.1" - - x-hgarg-1:common=0000000000000000000000000000000000000000&heads=83180e7845de420a1bb46896fd5fe05294f8d629 (glob) + *- - [*] "GET http://localhost:$HGPORT/?cmd=listkeys HTTP/1.1" - - x-hgarg-1:namespace=phases (glob) * - - [*] "GET http://localhost:$HGPORT/?cmd=capabilities HTTP/1.1" - - (glob) * - - [*] "GET http://localhost:$HGPORT/?cmd=listkeys HTTP/1.1" - - x-hgarg-1:namespace=bookmarks (glob) * - - [*] "GET http://localhost:$HGPORT/?cmd=batch HTTP/1.1" - - x-hgarg-1:cmds=heads+%3Bknown+nodes%3D (glob) * - - [*] "GET http://localhost:$HGPORT/?cmd=getbundle HTTP/1.1" - - x-hgarg-1:common=0000000000000000000000000000000000000000&heads=83180e7845de420a1bb46896fd5fe05294f8d629 (glob) * - - [*] "GET http://localhost:$HGPORT/?cmd=listkeys HTTP/1.1" - - x-hgarg-1:namespace=phases (glob) - * - - [*] "GET http://localhost:$HGPORT/?cmd=listkeys HTTP/1.1" - - x-hgarg-1:namespace=bookmarks (glob) * - - [*] "GET http://localhost:$HGPORT/?cmd=capabilities HTTP/1.1" - - (glob) * - - [*] "GET http://localhost:$HGPORT/?cmd=listkeys HTTP/1.1" - - x-hgarg-1:namespace=bookmarks (glob) * - - [*] "GET http://localhost:$HGPORT/?cmd=batch HTTP/1.1" - - x-hgarg-1:cmds=heads+%3Bknown+nodes%3D (glob) * - - [*] "GET http://localhost:$HGPORT/?cmd=getbundle HTTP/1.1" - - x-hgarg-1:common=0000000000000000000000000000000000000000&heads=83180e7845de420a1bb46896fd5fe05294f8d629 (glob) * - - [*] "GET http://localhost:$HGPORT/?cmd=listkeys HTTP/1.1" - - x-hgarg-1:namespace=phases (glob) - * - - [*] "GET http://localhost:$HGPORT/?cmd=listkeys HTTP/1.1" - - x-hgarg-1:namespace=bookmarks (glob) * - - [*] "GET http://localhost:$HGPORT/?cmd=capabilities HTTP/1.1" - - (glob) * - - [*] "GET http://localhost:$HGPORT/?cmd=listkeys HTTP/1.1" - - x-hgarg-1:namespace=bookmarks (glob) * - - [*] "GET http://localhost:$HGPORT/?cmd=batch HTTP/1.1" - - x-hgarg-1:cmds=heads+%3Bknown+nodes%3D (glob) * - - [*] "GET http://localhost:$HGPORT/?cmd=getbundle HTTP/1.1" - - x-hgarg-1:common=0000000000000000000000000000000000000000&heads=83180e7845de420a1bb46896fd5fe05294f8d629 (glob) * - - [*] "GET http://localhost:$HGPORT/?cmd=listkeys HTTP/1.1" - - x-hgarg-1:namespace=phases (glob) - * - - [*] "GET http://localhost:$HGPORT/?cmd=listkeys HTTP/1.1" - - x-hgarg-1:namespace=bookmarks (glob) -
--- a/tests/test-http.t Fri Sep 26 15:15:49 2014 -0700 +++ b/tests/test-http.t Fri Sep 26 13:56:20 2014 -0700 @@ -251,7 +251,6 @@ "GET /?cmd=branchmap HTTP/1.1" 200 - "GET /?cmd=stream_out HTTP/1.1" 401 - "GET /?cmd=stream_out HTTP/1.1" 200 - - "GET /?cmd=listkeys HTTP/1.1" 200 - x-hgarg-1:namespace=bookmarks "GET /?cmd=capabilities HTTP/1.1" 200 - "GET /?cmd=lookup HTTP/1.1" 200 - x-hgarg-1:key=tip "GET /?cmd=listkeys HTTP/1.1" 401 - x-hgarg-1:namespace=namespaces