Show More
@@ -394,9 +394,8 b' class cg1unpacker(object):' | |||
|
394 | 394 | |
|
395 | 395 | # process the files |
|
396 | 396 | repo.ui.status(_("adding file changes\n")) |
|
397 | pr = prog(_('files'), efiles) | |
|
398 | 397 | newrevs, newfiles = _addchangegroupfiles( |
|
399 |
repo, self, revmap, trp, |
|
|
398 | repo, self, revmap, trp, efiles, needfiles) | |
|
400 | 399 | revisions += newrevs |
|
401 | 400 | files += newfiles |
|
402 | 401 | |
@@ -1068,16 +1067,18 b' def changegroup(repo, basenodes, source)' | |||
|
1068 | 1067 | # to avoid a race we use changegroupsubset() (issue1320) |
|
1069 | 1068 | return changegroupsubset(repo, basenodes, repo.heads(), source) |
|
1070 | 1069 | |
|
1071 |
def _addchangegroupfiles(repo, source, revmap, trp, |
|
|
1070 | def _addchangegroupfiles(repo, source, revmap, trp, expectedfiles, needfiles): | |
|
1072 | 1071 | revisions = 0 |
|
1073 | 1072 | files = 0 |
|
1074 | 1073 | while True: |
|
1075 | 1074 | chunkdata = source.filelogheader() |
|
1076 | 1075 | if not chunkdata: |
|
1077 | 1076 | break |
|
1077 | files += 1 | |
|
1078 | 1078 | f = chunkdata["filename"] |
|
1079 | 1079 | repo.ui.debug("adding %s revisions\n" % f) |
|
1080 | pr() | |
|
1080 | repo.ui.progress(_('files'), files, unit=_('files'), | |
|
1081 | total=expectedfiles) | |
|
1081 | 1082 | fl = repo.file(f) |
|
1082 | 1083 | o = len(fl) |
|
1083 | 1084 | try: |
@@ -1086,7 +1087,6 b' def _addchangegroupfiles(repo, source, r' | |||
|
1086 | 1087 | except error.CensoredBaseError as e: |
|
1087 | 1088 | raise error.Abort(_("received delta base is censored: %s") % e) |
|
1088 | 1089 | revisions += len(fl) - o |
|
1089 | files += 1 | |
|
1090 | 1090 | if f in needfiles: |
|
1091 | 1091 | needs = needfiles[f] |
|
1092 | 1092 | for new in xrange(o, len(fl)): |
General Comments 0
You need to be logged in to leave comments.
Login now