clone: copy .hg/bookmarks during copy clone

Now that the standard pull function includes bookmarks, we need to ensure that
a copy clone also copies the bookmarks. This will let us drop the manual bookmark
pulling done independently during a clone.
This commit is contained in:
Pierre-Yves David 2014-09-26 13:55:53 -07:00
parent 627b3886af
commit ef04e1697d

View File

@ -363,6 +363,11 @@ def clone(ui, peeropts, source, dest=None, pull=False, rev=None,
raise
destlock = copystore(ui, srcrepo, destpath)
# copy bookmarks over
srcbookmarks = srcrepo.join('bookmarks')
dstbookmarks = os.path.join(destpath, 'bookmarks')
if os.path.exists(srcbookmarks):
util.copyfile(srcbookmarks, dstbookmarks)
# Recomputing branch cache might be slow on big repos,
# so just copy it