# HG changeset patch # User Pierre-Yves David # Date 1411764953 25200 # Node ID d6ecdb8bfa16e7aed4f29b30fb094287156408ed # Parent 6e431e1635b687d0d80ab01338a12948d3e8be34 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. diff -r 6e431e1635b6 -r d6ecdb8bfa16 mercurial/hg.py --- a/mercurial/hg.py Fri Sep 26 17:44:00 2014 -0700 +++ b/mercurial/hg.py Fri Sep 26 13:55:53 2014 -0700 @@ -363,6 +363,11 @@ 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