Mercurial > hg
comparison mercurial/repair.py @ 24170:fbc4d550a6ab
repair: setup hookargs when processing bundle2s
addchangegroup() modifies its behavior based on the transaction source.
This is incorrect for bundle2 repair files, causing rebases to abort when this
option is enabled.
This diff specifies the source type in the way recommended by comments in
bundle2.py and adds a test to ensure that rebases with the experimental option
work successfully.
author | Eric Sumner <ericsumner@fb.com> |
---|---|
date | Fri, 20 Feb 2015 13:55:01 -0800 |
parents | 33d1b81c6ef0 |
children | f962692853c0 |
comparison
equal
deleted
inserted
replaced
24168:4e865115566e | 24170:fbc4d550a6ab |
---|---|
179 if not repo.ui.verbose: | 179 if not repo.ui.verbose: |
180 # silence internal shuffling chatter | 180 # silence internal shuffling chatter |
181 repo.ui.pushbuffer() | 181 repo.ui.pushbuffer() |
182 if isinstance(gen, bundle2.unbundle20): | 182 if isinstance(gen, bundle2.unbundle20): |
183 tr = repo.transaction('strip') | 183 tr = repo.transaction('strip') |
184 tr.hookargs = {'source': 'strip', | |
185 'url': 'bundle:' + vfs.join(chgrpfile)} | |
184 try: | 186 try: |
185 bundle2.processbundle(repo, gen, lambda: tr) | 187 bundle2.processbundle(repo, gen, lambda: tr) |
186 tr.close() | 188 tr.close() |
187 finally: | 189 finally: |
188 tr.release() | 190 tr.release() |