Show More
@@ -6142,8 +6142,20 b' def unbundle(ui, repo, fname1, *fnames, ' | |||||
6142 | for fname in fnames: |
|
6142 | for fname in fnames: | |
6143 | f = hg.openpath(ui, fname) |
|
6143 | f = hg.openpath(ui, fname) | |
6144 | gen = exchange.readbundle(ui, f, fname) |
|
6144 | gen = exchange.readbundle(ui, f, fname) | |
6145 | modheads = changegroup.addchangegroup(repo, gen, 'unbundle', |
|
6145 | if isinstance(gen, bundle2.unbundle20): | |
6146 | 'bundle:' + fname) |
|
6146 | tr = repo.transaction('unbundle') | |
|
6147 | try: | |||
|
6148 | op = bundle2.processbundle(repo, gen, lambda: tr) | |||
|
6149 | tr.close() | |||
|
6150 | finally: | |||
|
6151 | if tr: | |||
|
6152 | tr.release() | |||
|
6153 | changes = [r.get('result', 0) | |||
|
6154 | for r in op.records['changegroup']] | |||
|
6155 | modheads = changegroup.combineresults(changes) | |||
|
6156 | else: | |||
|
6157 | modheads = changegroup.addchangegroup(repo, gen, 'unbundle', | |||
|
6158 | 'bundle:' + fname) | |||
6147 | finally: |
|
6159 | finally: | |
6148 | lock.release() |
|
6160 | lock.release() | |
6149 |
|
6161 |
@@ -762,13 +762,11 b' Support for changegroup' | |||||
762 | 9520eea781bcca16c1e15acc0ba14335a0e8e5ba |
|
762 | 9520eea781bcca16c1e15acc0ba14335a0e8e5ba | |
763 | eea13746799a9e0bfd88f29d3c2e9dc9389f524f |
|
763 | eea13746799a9e0bfd88f29d3c2e9dc9389f524f | |
764 | 02de42196ebee42ef284b6780a87cdc96e8eaab6 |
|
764 | 02de42196ebee42ef284b6780a87cdc96e8eaab6 | |
765 |
$ hg unbundle |
|
765 | $ hg unbundle ../rev.hg2 | |
766 | adding changesets |
|
766 | adding changesets | |
767 | adding manifests |
|
767 | adding manifests | |
768 | adding file changes |
|
768 | adding file changes | |
769 | added 0 changesets with 0 changes to 3 files |
|
769 | added 0 changesets with 0 changes to 3 files | |
770 | 0 unread bytes |
|
|||
771 | addchangegroup return: 1 |
|
|||
772 |
|
770 | |||
773 | with reply |
|
771 | with reply | |
774 |
|
772 |
General Comments 0
You need to be logged in to leave comments.
Login now