Browse Source

remote-hg: small performance improvement

Load previous manifest first as Mercurial does; for caching reasons.

Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
maint
Felipe Contreras 12 years ago committed by Junio C Hamano
parent
commit
1a2636c297
  1. 3
      contrib/remote-helpers/git-remote-hg

3
contrib/remote-helpers/git-remote-hg

@ -230,8 +230,9 @@ def get_filechanges(repo, ctx, parent):
added = set() added = set()
removed = set() removed = set()


cur = ctx.manifest() # load earliest manifest first for caching reasons
prev = repo[parent].manifest().copy() prev = repo[parent].manifest().copy()
cur = ctx.manifest()


for fn in cur: for fn in cur:
if fn in prev: if fn in prev:

Loading…
Cancel
Save