Mercurial > hg > hg-git
diff hggit/git_handler.py @ 705:373f854ff58f
git_handler.fetch: only import commits reachable from requested heads
Previously we'd attempt to import every single reachable commit in the Git
object store.
The test adds another branch to the Git repo and doesn't import it until much
later. Previously we'd import it when we ran `hg -R hgrepo pull -r beta`. Now
we won't.
author | Siddharth Agarwal <sid0@fb.com> |
---|---|
date | Tue, 04 Mar 2014 16:23:11 -0800 |
parents | 4cddcb768cf4 |
children | 4f0a154ae374 |
line wrap: on
line diff
--- a/hggit/git_handler.py +++ b/hggit/git_handler.py @@ -206,7 +206,8 @@ oldheads = self.repo.changelog.heads() imported = 0 if refs: - imported = self.import_git_objects(remote_name, refs) + filteredrefs = self.filter_refs(refs, heads) + imported = self.import_git_objects(remote_name, filteredrefs) self.import_tags(refs) self.update_hg_bookmarks(refs) if remote_name: