Show More
@@ -7,7 +7,7 b'' | |||||
7 | # GNU General Public License version 2 or any later version. |
|
7 | # GNU General Public License version 2 or any later version. | |
8 |
|
8 | |||
9 |
|
9 | |||
10 |
from mercurial import hg, |
|
10 | from mercurial import hg, localrepo | |
11 | from mercurial.lock import release |
|
11 | from mercurial.lock import release | |
12 | import weakref |
|
12 | import weakref | |
13 |
|
13 | |||
@@ -24,16 +24,12 b' def compress(ui, repo, dest):' | |||||
24 |
|
24 | |||
25 | src_cl = repo.changelog |
|
25 | src_cl = repo.changelog | |
26 | tar_cl = target.changelog |
|
26 | tar_cl = target.changelog | |
27 | changedfiles = set() |
|
|||
28 | mmfs = {} |
|
|||
29 | collect = changegroup.collector(src_cl, mmfs, changedfiles) |
|
|||
30 | total = len(repo) |
|
27 | total = len(repo) | |
31 |
|
28 | |||
32 | for r in src_cl: |
|
29 | for r in src_cl: | |
33 | p = [src_cl.node(i) for i in src_cl.parentrevs(r)] |
|
30 | p = [src_cl.node(i) for i in src_cl.parentrevs(r)] | |
34 |
|
|
31 | tar_cl.addrevision(src_cl.revision(src_cl.node(r)), trp, | |
35 |
|
|
32 | src_cl.linkrev(r), p[0], p[1]) | |
36 | collect(nd) |
|
|||
37 | ui.progress(('adding changesets'), r, unit=('revisions'), |
|
33 | ui.progress(('adding changesets'), r, unit=('revisions'), | |
38 | total=total) |
|
34 | total=total) | |
39 |
|
35 | |||
@@ -46,8 +42,11 b' def compress(ui, repo, dest):' | |||||
46 | ui.progress(('adding manifest'), r, unit=('revisions'), |
|
42 | ui.progress(('adding manifest'), r, unit=('revisions'), | |
47 | total=total) |
|
43 | total=total) | |
48 |
|
44 | |||
49 | total = len(changedfiles) |
|
45 | # only keep indexes and filter "data/" prefix and ".i" suffix | |
50 | for cnt, f in enumerate(changedfiles): |
|
46 | datafiles = [fn[5:-2] for fn, f2, size in repo.store.datafiles() | |
|
47 | if size and fn.endswith('.i')] | |||
|
48 | total = len(datafiles) | |||
|
49 | for cnt, f in enumerate(datafiles): | |||
51 | sf = repo.file(f) |
|
50 | sf = repo.file(f) | |
52 | tf = target.file(f) |
|
51 | tf = target.file(f) | |
53 | for r in sf: |
|
52 | for r in sf: |
General Comments 0
You need to be logged in to leave comments.
Login now