Mercurial > public > mercurial-scm > hg-stable
diff tests/test-bundle2.t @ 20948:329cd74b52bd
bundle2: introduce a bundleoperation object
This object will hold all data and state gathered through the processing of a
bundle. This will allow:
- each handler to be aware of the things unbundled so far
- the caller to retrieve data about the execution
- bear useful object and logic (like repo, transaction)
- bear possible bundle2 reply triggered by the unbundling.
For now the object is very simple but it will grow at the same time as the
bundle2 implementation.
author | Pierre-Yves David <pierre-yves.david@fb.com> |
---|---|
date | Wed, 02 Apr 2014 22:24:44 -0700 |
parents | c33d7bf53812 |
children | 571f2903ff1e |
line wrap: on
line diff
--- a/tests/test-bundle2.t Wed Apr 02 13:50:57 2014 -0700 +++ b/tests/test-bundle2.t Wed Apr 02 22:24:44 2014 -0700 @@ -21,11 +21,11 @@ > assert len(ELEPHANTSSONG) == 178 # future test say 178 bytes, trust it. > > @bundle2.parthandler('test:song') - > def songhandler(repo, part): + > def songhandler(op, part): > """handle a "test:song" bundle2 part, printing the lyrics on stdin""" - > repo.ui.write('The choir start singing:\n') + > op.ui.write('The choir starts singing:\n') > for line in part.data.split('\n'): - > repo.ui.write(' %s\n' % line) + > op.ui.write(' %s\n' % line) > > @command('bundle2', > [('', 'param', [], 'stream level parameter'),