mercurial/hg.py
changeset 17922 7f5dab94e48c
parent 17900 47fb48060e36
child 17938 fd903f89e42b
equal deleted inserted replaced
17921:4ac9cf3d810c 17922:7f5dab94e48c
   389 
   389 
   390         # clone all bookmarks except divergent ones
   390         # clone all bookmarks except divergent ones
   391         destrepo = destpeer.local()
   391         destrepo = destpeer.local()
   392         if destrepo and srcpeer.capable("pushkey"):
   392         if destrepo and srcpeer.capable("pushkey"):
   393             rb = srcpeer.listkeys('bookmarks')
   393             rb = srcpeer.listkeys('bookmarks')
       
   394             marks = destrepo._bookmarks
   394             for k, n in rb.iteritems():
   395             for k, n in rb.iteritems():
   395                 try:
   396                 try:
   396                     m = destrepo.lookup(n)
   397                     m = destrepo.lookup(n)
   397                     destrepo._bookmarks[k] = m
   398                     marks[k] = m
   398                 except error.RepoLookupError:
   399                 except error.RepoLookupError:
   399                     pass
   400                     pass
   400             if rb:
   401             if rb:
   401                 bookmarks.write(destrepo)
   402                 marks.write()
   402         elif srcrepo and destpeer.capable("pushkey"):
   403         elif srcrepo and destpeer.capable("pushkey"):
   403             for k, n in srcrepo._bookmarks.iteritems():
   404             for k, n in srcrepo._bookmarks.iteritems():
   404                 destpeer.pushkey('bookmarks', k, '', hex(n))
   405                 destpeer.pushkey('bookmarks', k, '', hex(n))
   405 
   406 
   406         if destrepo:
   407         if destrepo: