Mercurial > public > mercurial-scm > hg-stable
diff mercurial/hg.py @ 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 | d7b114493315 |
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'