Mercurial > hg
changeset 22646:d6ecdb8bfa16
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.
author | Pierre-Yves David <pierre-yves.david@fb.com> |
---|---|
date | Fri, 26 Sep 2014 13:55:53 -0700 |
parents | 6e431e1635b6 |
children | 5b6cd8526d56 |
files | mercurial/hg.py |
diffstat | 1 files changed, 5 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- 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