##// END OF EJS Templates
getbundle: add `obsmarkers` argument to getbundle...
getbundle: add `obsmarkers` argument to getbundle This argument triggers the retrieval of all markers relevant to the set of changesets defined by the nodes in `heads`.

File last commit:

r22350:6d113cc7 default
r22353:47e3420a default
Show More
test-bundle2.t
1199 lines | 43.3 KiB | text/troff | Tads3Lexer
Pierre-Yves David
test-bundle2: add obsolescence information to be exchanged...
r22323
$ getmainid() {
> hg -R main log --template '{node}\n' --rev "$1"
> }
Pierre-Yves David
bundle2: very first version of a bundle2 bundler...
r20801
Create an extension to test bundle2 API
$ cat > bundle2.py << EOF
> """A small extension to test bundle2 implementation
>
> Current bundle2 implementation is far too limited to be used in any core
> code. We still need to be able to test it while it grow up.
> """
>
Matt Mackall
test-bundle2: add missing os import
r21964 > import sys, os
Matt Mackall
test-bundle2: move file mode setting after sys import
r21956 > from mercurial import cmdutil
> from mercurial import util
> from mercurial import bundle2
> from mercurial import scmutil
> from mercurial import discovery
> from mercurial import changegroup
> from mercurial import error
Pierre-Yves David
test-bundle2: add obsolescence information to be exchanged...
r22323 > from mercurial import obsolete
>
> obsolete._enabled = True
Matt Mackall
test-bundle2: move file mode setting after sys import
r21956 >
Pierre-Yves David
bundle2: make sure standard stream are binary...
r21547 > try:
> import msvcrt
> msvcrt.setmode(sys.stdin.fileno(), os.O_BINARY)
> msvcrt.setmode(sys.stdout.fileno(), os.O_BINARY)
> msvcrt.setmode(sys.stderr.fileno(), os.O_BINARY)
> except ImportError:
> pass
>
Pierre-Yves David
bundle2: very first version of a bundle2 bundler...
r20801 > cmdtable = {}
> command = cmdutil.command(cmdtable)
>
Pierre-Yves David
bundle2: support for bundling and unbundling payload...
r20876 > ELEPHANTSSONG = """Patali Dirapata, Cromda Cromda Ripalo, Pata Pata, Ko Ko Ko
> Bokoro Dipoulito, Rondi Rondi Pepino, Pata Pata, Ko Ko Ko
> Emana Karassoli, Loucra Loucra Ponponto, Pata Pata, Ko Ko Ko."""
> assert len(ELEPHANTSSONG) == 178 # future test say 178 bytes, trust it.
>
Pierre-Yves David
bundle2: introduce a `parthandler` decorator...
r20890 > @bundle2.parthandler('test:song')
Pierre-Yves David
bundle2: introduce a bundleoperation object...
r20948 > def songhandler(op, part):
Pierre-Yves David
bundle2: first version of a bundle processing...
r20889 > """handle a "test:song" bundle2 part, printing the lyrics on stdin"""
Pierre-Yves David
bundle2: introduce a bundleoperation object...
r20948 > op.ui.write('The choir starts singing:\n')
Pierre-Yves David
bundle2: record processing results in the bundleoperation object...
r20949 > verses = 0
Pierre-Yves David
bundle2: lazy unbundle of part payload...
r21019 > for line in part.read().split('\n'):
Pierre-Yves David
bundle2: introduce a bundleoperation object...
r20948 > op.ui.write(' %s\n' % line)
Pierre-Yves David
bundle2: record processing results in the bundleoperation object...
r20949 > verses += 1
> op.records.add('song', {'verses': verses})
Pierre-Yves David
bundle2: first version of a bundle processing...
r20889 >
Pierre-Yves David
bundle2: produce a bundle2 reply...
r20997 > @bundle2.parthandler('test:ping')
> def pinghandler(op, part):
> op.ui.write('received ping request (id %i)\n' % part.id)
Pierre-Yves David
bundle2: add capabilities support in `replycaps` part...
r21135 > if op.reply is not None and 'ping-pong' in op.reply.capabilities:
Pierre-Yves David
bundle2: include stderr when capturing handlers output...
r21133 > op.ui.write_err('replying to ping request (id %i)\n' % part.id)
Pierre-Yves David
bundle2: update all ``addpart`` callers to ``newpart``...
r21600 > op.reply.newpart('test:pong', [('in-reply-to', str(part.id))])
Pierre-Yves David
bundle2: produce a bundle2 reply...
r20997 >
Pierre-Yves David
bundle2: add capabilities support in `replycaps` part...
r21135 > @bundle2.parthandler('test:debugreply')
> def debugreply(op, part):
> """print data about the capacity of the bundle reply"""
> if op.reply is None:
> op.ui.write('debugreply: no reply\n')
> else:
> op.ui.write('debugreply: capabilities:\n')
> for cap in sorted(op.reply.capabilities):
> op.ui.write('debugreply: %r\n' % cap)
Pierre-Yves David
bundle2: support for capabilities with values...
r21136 > for val in op.reply.capabilities[cap]:
> op.ui.write('debugreply: %r\n' % val)
>
Pierre-Yves David
bundle2: support bundling simple parameter...
r20804 > @command('bundle2',
Pierre-Yves David
bundle2: support bundling of empty part (with a type)...
r20856 > [('', 'param', [], 'stream level parameter'),
Pierre-Yves David
bundle2: add some distinction between mandatory and advisory part...
r20891 > ('', 'unknown', False, 'include an unknown mandatory part in the bundle'),
Pierre-Yves David
bundle2: enforce all parameters in a part to be handled...
r21625 > ('', 'unknownparams', False, 'include an unknown part parameters in the bundle'),
Pierre-Yves David
bundle2: first crude version of bundling changeset with bundle2...
r20950 > ('', 'parts', False, 'include some arbitrary parts to the bundle'),
Pierre-Yves David
bundle2: introduce `replycaps` part for on-demand reply...
r21130 > ('', 'reply', False, 'produce a reply bundle'),
Pierre-Yves David
bundle2: fix raising errors during heads checking...
r21184 > ('', 'pushrace', False, 'includes a check:head part with unknown nodes'),
Pierre-Yves David
bundle2: first crude version of bundling changeset with bundle2...
r20950 > ('r', 'rev', [], 'includes those changeset in the bundle'),],
Pierre-Yves David
bundle2: add ability to write to a file to the test...
r20841 > '[OUTPUTFILE]')
> def cmdbundle2(ui, repo, path=None, **opts):
Pierre-Yves David
bundle2: very first version of a bundle2 bundler...
r20801 > """write a bundle2 container on standard ouput"""
Pierre-Yves David
bundle2: print debug information during bundling...
r20842 > bundler = bundle2.bundle20(ui)
Pierre-Yves David
bundle2: support bundling simple parameter...
r20804 > for p in opts['param']:
Pierre-Yves David
bundle2: support for bundling parameter value...
r20809 > p = p.split('=', 1)
Pierre-Yves David
bundle2: refuse empty parameter name...
r20813 > try:
> bundler.addparam(*p)
> except ValueError, exc:
> raise util.Abort('%s' % exc)
Pierre-Yves David
bundle2: support for bundling parameter value...
r20809 >
Pierre-Yves David
bundle2: introduce `replycaps` part for on-demand reply...
r21130 > if opts['reply']:
Pierre-Yves David
bundle2: protect capabilities name and values with url quoting...
r21137 > capsstring = 'ping-pong\nelephants=babar,celeste\ncity%3D%21=celeste%2Cville'
Pierre-Yves David
bundle2: update all ``addpart`` callers to ``newpart``...
r21600 > bundler.newpart('b2x:replycaps', data=capsstring)
Pierre-Yves David
bundle2: introduce `replycaps` part for on-demand reply...
r21130 >
Pierre-Yves David
bundle2: fix raising errors during heads checking...
r21184 > if opts['pushrace']:
Pierre-Yves David
bundle2: the ability to set ``data`` attribute of the part is now official...
r21604 > # also serve to test the assignement of data outside of init
> part = bundler.newpart('b2x:check:heads')
> part.data = '01234567890123456789'
Pierre-Yves David
bundle2: fix raising errors during heads checking...
r21184 >
Pierre-Yves David
bundle2: first crude version of bundling changeset with bundle2...
r20950 > revs = opts['rev']
> if 'rev' in opts:
> revs = scmutil.revrange(repo, opts['rev'])
> if revs:
> # very crude version of a changegroup part creation
> bundled = repo.revs('%ld::%ld', revs, revs)
> headmissing = [c.node() for c in repo.set('heads(%ld)', revs)]
> headcommon = [c.node() for c in repo.set('parents(%ld) - %ld', revs, revs)]
> outgoing = discovery.outgoing(repo.changelog, headcommon, headmissing)
> cg = changegroup.getlocalbundle(repo, 'test:bundle2', outgoing, None)
Pierre-Yves David
bundle2: update all ``addpart`` callers to ``newpart``...
r21600 > bundler.newpart('b2x:changegroup', data=cg.getchunks())
Pierre-Yves David
bundle2: first crude version of bundling changeset with bundle2...
r20950 >
Pierre-Yves David
bundle2: support bundling of empty part (with a type)...
r20856 > if opts['parts']:
Pierre-Yves David
bundle2: update all ``addpart`` callers to ``newpart``...
r21600 > bundler.newpart('test:empty')
Pierre-Yves David
bundle2: support bundling of empty part (with a type)...
r20856 > # add a second one to make sure we handle multiple parts
Pierre-Yves David
bundle2: update all ``addpart`` callers to ``newpart``...
r21600 > bundler.newpart('test:empty')
> bundler.newpart('test:song', data=ELEPHANTSSONG)
> bundler.newpart('test:debugreply')
Pierre-Yves David
bundle2: introduce a ``addparam`` method on part...
r21605 > mathpart = bundler.newpart('test:math')
> mathpart.addparam('pi', '3.14')
> mathpart.addparam('e', '2.72')
> mathpart.addparam('cooking', 'raw', mandatory=False)
> mathpart.data = '42'
Pierre-Yves David
bundle2: ignore advisory part with unknown parameters...
r21626 > # advisory known part with unknown mandatory param
> bundler.newpart('test:song', [('randomparam','')])
Pierre-Yves David
bundle2: add some distinction between mandatory and advisory part...
r20891 > if opts['unknown']:
Pierre-Yves David
bundle2: update all ``addpart`` callers to ``newpart``...
r21600 > bundler.newpart('test:UNKNOWN', data='some random content')
Pierre-Yves David
bundle2: enforce all parameters in a part to be handled...
r21625 > if opts['unknownparams']:
> bundler.newpart('test:SONG', [('randomparams', '')])
Pierre-Yves David
bundle2: produce a bundle2 reply...
r20997 > if opts['parts']:
Pierre-Yves David
bundle2: update all ``addpart`` callers to ``newpart``...
r21600 > bundler.newpart('test:ping')
Pierre-Yves David
bundle2: support bundling of empty part (with a type)...
r20856 >
Pierre-Yves David
bundle2: add ability to write to a file to the test...
r20841 > if path is None:
> file = sys.stdout
> else:
Matt Mackall
tests: more bundle2 non-binary file test fixes
r22089 > file = open(path, 'wb')
Pierre-Yves David
bundle2: add ability to write to a file to the test...
r20841 >
Pierre-Yves David
bundle2: support bundling simple parameter...
r20804 > for chunk in bundler.getchunks():
Pierre-Yves David
bundle2: add ability to write to a file to the test...
r20841 > file.write(chunk)
Pierre-Yves David
bundle2: a very first version of bundle2 unbundler...
r20802 >
Pierre-Yves David
bundle2: first version of a bundle processing...
r20889 > @command('unbundle2', [], '')
Pierre-Yves David
bundle2: produce a bundle2 reply...
r20997 > def cmdunbundle2(ui, repo, replypath=None):
Pierre-Yves David
bundle2: first version of a bundle processing...
r20889 > """process a bundle2 stream from stdin on the current repo"""
Pierre-Yves David
bundle2: add some distinction between mandatory and advisory part...
r20891 > try:
Pierre-Yves David
bundle2: make it possible have a global transaction for the unbundling...
r20952 > tr = None
Pierre-Yves David
bundle2: lock the repo during unbundle test...
r20946 > lock = repo.lock()
Pierre-Yves David
bundle2: make it possible have a global transaction for the unbundling...
r20952 > tr = repo.transaction('processbundle')
Pierre-Yves David
bundle2: read the whole bundle from stream on abort...
r20892 > try:
Pierre-Yves David
bundle2: feed a unbundle20 to the `processbundle` function...
r20947 > unbundler = bundle2.unbundle20(ui, sys.stdin)
Pierre-Yves David
bundle2: make it possible have a global transaction for the unbundling...
r20952 > op = bundle2.processbundle(repo, unbundler, lambda: tr)
> tr.close()
Pierre-Yves David
bundle2: move exception classes into the error module...
r21618 > except error.BundleValueError, exc:
Pierre-Yves David
bundle2: read the whole bundle from stream on abort...
r20892 > raise util.Abort('missing support for %s' % exc)
Pierre-Yves David
bundle2: fix raising errors during heads checking...
r21184 > except error.PushRaced, exc:
Pierre-Yves David
bundle2: add an error message to push race error...
r21185 > raise util.Abort('push race: %s' % exc)
Pierre-Yves David
bundle2: read the whole bundle from stream on abort...
r20892 > finally:
Pierre-Yves David
bundle2: make it possible have a global transaction for the unbundling...
r20952 > if tr is not None:
> tr.release()
Pierre-Yves David
bundle2: lock the repo during unbundle test...
r20946 > lock.release()
Pierre-Yves David
bundle2: read the whole bundle from stream on abort...
r20892 > remains = sys.stdin.read()
> ui.write('%i unread bytes\n' % len(remains))
Pierre-Yves David
bundle2: record processing results in the bundleoperation object...
r20949 > if op.records['song']:
> totalverses = sum(r['verses'] for r in op.records['song'])
> ui.write('%i total verses sung\n' % totalverses)
Pierre-Yves David
bundle2: first crude version of bundling changeset with bundle2...
r20950 > for rec in op.records['changegroup']:
> ui.write('addchangegroup return: %i\n' % rec['return'])
Pierre-Yves David
bundle2: produce a bundle2 reply...
r20997 > if op.reply is not None and replypath is not None:
Matt Mackall
tests: more bundle2 non-binary file test fixes
r22089 > file = open(replypath, 'wb')
Pierre-Yves David
bundle2: produce a bundle2 reply...
r20997 > for chunk in op.reply.getchunks():
> file.write(chunk)
Pierre-Yves David
bundle2: first version of a bundle processing...
r20889 >
Pierre-Yves David
bundle2: rename unbundle2 test command to statbundle2...
r20888 > @command('statbundle2', [], '')
> def cmdstatbundle2(ui, repo):
> """print statistic on the bundle2 container read from stdin"""
Pierre-Yves David
bundle2: print debug information during unbundling...
r20843 > unbundler = bundle2.unbundle20(ui, sys.stdin)
Pierre-Yves David
bundle2: implement the mandatory/advisory logic for parameter...
r20844 > try:
> params = unbundler.params
Pierre-Yves David
bundle2: raise BundleValueError error for stream level unsupported params...
r21628 > except error.BundleValueError, exc:
Pierre-Yves David
bundle2: implement the mandatory/advisory logic for parameter...
r20844 > raise util.Abort('unknown parameters: %s' % exc)
> ui.write('options count: %i\n' % len(params))
> for key in sorted(params):
Pierre-Yves David
bundle2: support for unbundling simple parameter...
r20805 > ui.write('- %s\n' % key)
Pierre-Yves David
bundle2: implement the mandatory/advisory logic for parameter...
r20844 > value = params[key]
Pierre-Yves David
bundle2: support for unbundling parameter value...
r20810 > if value is not None:
> ui.write(' %s\n' % value)
Pierre-Yves David
bundle2: lazily iterate over bundle parts in the test...
r21017 > count = 0
Pierre-Yves David
bundle2: use an official iterparts method to unbundle parts...
r21129 > for p in unbundler.iterparts():
Pierre-Yves David
bundle2: lazily iterate over bundle parts in the test...
r21017 > count += 1
Pierre-Yves David
bundle2: support unbundling empty part...
r20864 > ui.write(' :%s:\n' % p.type)
Pierre-Yves David
bundle2: part params
r20877 > ui.write(' mandatory: %i\n' % len(p.mandatoryparams))
> ui.write(' advisory: %i\n' % len(p.advisoryparams))
Pierre-Yves David
bundle2: lazy unbundle of part payload...
r21019 > ui.write(' payload: %i bytes\n' % len(p.read()))
Pierre-Yves David
bundle2: lazily iterate over bundle parts in the test...
r21017 > ui.write('parts count: %i\n' % count)
Pierre-Yves David
bundle2: very first version of a bundle2 bundler...
r20801 > EOF
$ cat >> $HGRCPATH << EOF
> [extensions]
> bundle2=$TESTTMP/bundle2.py
Pierre-Yves David
bundle2: move bundle2 config option to section "experimental"...
r21147 > [experimental]
> bundle2-exp=True
Pierre-Yves David
bundle2: allow bundle2 for pulling over the wire...
r21069 > [ui]
> ssh=python "$TESTDIR/dummyssh"
Pierre-Yves David
test-bundle2: add bookmark movement to the push test...
r22241 > logtemplate={rev}:{node|short} {phase} {author} {bookmarks} {desc|firstline}
Pierre-Yves David
bundle2: support for push over the wire...
r21075 > [web]
> push_ssl = false
> allow_push = *
Pierre-Yves David
bundle2: use non-publishing repo in test...
r21648 > [phases]
> publish=False
Pierre-Yves David
bundle2: very first version of a bundle2 bundler...
r20801 > EOF
The extension requires a repo (currently unused)
$ hg init main
$ cd main
Pierre-Yves David
bundle2: make sure the unbundler refuse non bundle2 stream...
r20803 $ touch a
$ hg add a
$ hg commit -m 'a'
Pierre-Yves David
bundle2: very first version of a bundle2 bundler...
r20801
Pierre-Yves David
bundle2: support bundling simple parameter...
r20804
Empty bundle
=================
- no option
- no parts
Test bundling
Pierre-Yves David
bundle2: very first version of a bundle2 bundler...
r20801
$ hg bundle2
Pierre-Yves David
bundle2: use HG2X in the header...
r21144 HG2X\x00\x00\x00\x00 (no-eol) (esc)
Pierre-Yves David
bundle2: a very first version of bundle2 unbundler...
r20802
Pierre-Yves David
bundle2: support bundling simple parameter...
r20804 Test unbundling
Pierre-Yves David
bundle2: a very first version of bundle2 unbundler...
r20802
Pierre-Yves David
bundle2: rename unbundle2 test command to statbundle2...
r20888 $ hg bundle2 | hg statbundle2
Pierre-Yves David
bundle2: a very first version of bundle2 unbundler...
r20802 options count: 0
parts count: 0
Pierre-Yves David
bundle2: make sure the unbundler refuse non bundle2 stream...
r20803
Test old style bundle are detected and refused
$ hg bundle --all ../bundle.hg
1 changesets found
Pierre-Yves David
bundle2: rename unbundle2 test command to statbundle2...
r20888 $ hg statbundle2 < ../bundle.hg
Pierre-Yves David
bundle2: make sure the unbundler refuse non bundle2 stream...
r20803 abort: unknown bundle version 10
[255]
Pierre-Yves David
bundle2: support bundling simple parameter...
r20804
Test parameters
=================
- some options
- no parts
advisory parameters, no value
-------------------------------
Simplest possible parameters form
Pierre-Yves David
bundle2: support for unbundling simple parameter...
r20805 Test generation simple option
Pierre-Yves David
bundle2: support bundling simple parameter...
r20804
$ hg bundle2 --param 'caution'
Pierre-Yves David
bundle2: use HG2X in the header...
r21144 HG2X\x00\x07caution\x00\x00 (no-eol) (esc)
Pierre-Yves David
bundle2: support bundling simple parameter...
r20804
Pierre-Yves David
bundle2: support for unbundling simple parameter...
r20805 Test unbundling
Pierre-Yves David
bundle2: rename unbundle2 test command to statbundle2...
r20888 $ hg bundle2 --param 'caution' | hg statbundle2
Pierre-Yves David
bundle2: support for unbundling simple parameter...
r20805 options count: 1
- caution
parts count: 0
Pierre-Yves David
bundle2: support bundling simple parameter...
r20804 Test generation multiple option
$ hg bundle2 --param 'caution' --param 'meal'
Pierre-Yves David
bundle2: use HG2X in the header...
r21144 HG2X\x00\x0ccaution meal\x00\x00 (no-eol) (esc)
Pierre-Yves David
bundle2: support for unbundling simple parameter...
r20805
Test unbundling
Pierre-Yves David
bundle2: rename unbundle2 test command to statbundle2...
r20888 $ hg bundle2 --param 'caution' --param 'meal' | hg statbundle2
Pierre-Yves David
bundle2: support for unbundling simple parameter...
r20805 options count: 2
- caution
- meal
parts count: 0
Pierre-Yves David
bundle2: support for bundling parameter value...
r20809 advisory parameters, with value
-------------------------------
Test generation
$ hg bundle2 --param 'caution' --param 'meal=vegan' --param 'elephants'
Pierre-Yves David
bundle2: use HG2X in the header...
r21144 HG2X\x00\x1ccaution meal=vegan elephants\x00\x00 (no-eol) (esc)
Pierre-Yves David
bundle2: support for bundling parameter value...
r20809
Pierre-Yves David
bundle2: support for unbundling parameter value...
r20810 Test unbundling
Pierre-Yves David
bundle2: rename unbundle2 test command to statbundle2...
r20888 $ hg bundle2 --param 'caution' --param 'meal=vegan' --param 'elephants' | hg statbundle2
Pierre-Yves David
bundle2: support for unbundling parameter value...
r20810 options count: 3
- caution
- elephants
- meal
vegan
parts count: 0
Pierre-Yves David
bundle2: urlquote stream parameter name and value...
r20811
parameter with special char in value
---------------------------------------------------
Test generation
$ hg bundle2 --param 'e|! 7/=babar%#==tutu' --param simple
Pierre-Yves David
bundle2: use HG2X in the header...
r21144 HG2X\x00)e%7C%21%207/=babar%25%23%3D%3Dtutu simple\x00\x00 (no-eol) (esc)
Pierre-Yves David
bundle2: urlunquote stream parameter name and value during unbundling...
r20812
Test unbundling
Pierre-Yves David
bundle2: rename unbundle2 test command to statbundle2...
r20888 $ hg bundle2 --param 'e|! 7/=babar%#==tutu' --param simple | hg statbundle2
Pierre-Yves David
bundle2: urlunquote stream parameter name and value during unbundling...
r20812 options count: 2
- e|! 7/
babar%#==tutu
- simple
parts count: 0
Pierre-Yves David
bundle2: refuse empty parameter name...
r20813
Pierre-Yves David
bundle2: implement the mandatory/advisory logic for parameter...
r20844 Test unknown mandatory option
---------------------------------------------------
Pierre-Yves David
bundle2: rename unbundle2 test command to statbundle2...
r20888 $ hg bundle2 --param 'Gravity' | hg statbundle2
Pierre-Yves David
bundle2: raise BundleValueError error for stream level unsupported params...
r21628 abort: unknown parameters: Stream Parameter - Gravity
Pierre-Yves David
bundle2: implement the mandatory/advisory logic for parameter...
r20844 [255]
Pierre-Yves David
bundle2: add ability to write to a file to the test...
r20841 Test debug output
---------------------------------------------------
Pierre-Yves David
bundle2: print debug information during unbundling...
r20843 bundling debug
Pierre-Yves David
bundle2: add ability to write to a file to the test...
r20841 $ hg bundle2 --debug --param 'e|! 7/=babar%#==tutu' --param simple ../out.hg2
Pierre-Yves David
bundle2: use HG2X in the header...
r21144 start emission of HG2X stream
Pierre-Yves David
bundle2: print debug information during bundling...
r20842 bundle parameter: e%7C%21%207/=babar%25%23%3D%3Dtutu simple
Pierre-Yves David
bundle2: support bundling of empty part (with a type)...
r20856 start of parts
Pierre-Yves David
bundle2: print debug information during bundling...
r20842 end of bundle
Pierre-Yves David
bundle2: add ability to write to a file to the test...
r20841
file content is ok
$ cat ../out.hg2
Pierre-Yves David
bundle2: use HG2X in the header...
r21144 HG2X\x00)e%7C%21%207/=babar%25%23%3D%3Dtutu simple\x00\x00 (no-eol) (esc)
Pierre-Yves David
bundle2: add ability to write to a file to the test...
r20841
Pierre-Yves David
bundle2: print debug information during unbundling...
r20843 unbundling debug
Pierre-Yves David
bundle2: rename unbundle2 test command to statbundle2...
r20888 $ hg statbundle2 --debug < ../out.hg2
Pierre-Yves David
bundle2: use HG2X in the header...
r21144 start processing of HG2X stream
Pierre-Yves David
bundle2: print debug information during unbundling...
r20843 reading bundle2 stream parameters
Pierre-Yves David
bundle2: implement the mandatory/advisory logic for parameter...
r20844 ignoring unknown parameter 'e|! 7/'
ignoring unknown parameter 'simple'
Pierre-Yves David
bundle2: print debug information during unbundling...
r20843 options count: 2
- e|! 7/
babar%#==tutu
- simple
start extraction of bundle2 parts
Pierre-Yves David
bundle2: support unbundling empty part...
r20864 part header size: 0
Pierre-Yves David
bundle2: print debug information during unbundling...
r20843 end of bundle2 stream
parts count: 0
Pierre-Yves David
bundle2: refuse empty parameter name...
r20813 Test buggy input
---------------------------------------------------
empty parameter name
$ hg bundle2 --param '' --quiet
abort: empty parameter name
[255]
Pierre-Yves David
bundle2: force the first char of parameter to be an letter....
r20814
bad parameter name
$ hg bundle2 --param 42babar
abort: non letter first character: '42babar'
[255]
Pierre-Yves David
bundle2: support bundling of empty part (with a type)...
r20856
Test part
=================
$ hg bundle2 --parts ../parts.hg2 --debug
Pierre-Yves David
bundle2: use HG2X in the header...
r21144 start emission of HG2X stream
Pierre-Yves David
bundle2: support bundling of empty part (with a type)...
r20856 bundle parameter:
start of parts
bundle part: "test:empty"
bundle part: "test:empty"
Pierre-Yves David
bundle2: support for bundling and unbundling payload...
r20876 bundle part: "test:song"
Pierre-Yves David
bundle2: add capabilities support in `replycaps` part...
r21135 bundle part: "test:debugreply"
Pierre-Yves David
bundle2: part params
r20877 bundle part: "test:math"
Pierre-Yves David
bundle2: ignore advisory part with unknown parameters...
r21626 bundle part: "test:song"
Pierre-Yves David
bundle2: produce a bundle2 reply...
r20997 bundle part: "test:ping"
Pierre-Yves David
bundle2: support bundling of empty part (with a type)...
r20856 end of bundle
$ cat ../parts.hg2
Pierre-Yves David
bundle2: use HG2X in the header...
r21144 HG2X\x00\x00\x00\x11 (esc)
Pierre-Yves David
bundle2: add an integer id to part...
r20995 test:empty\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x11 (esc)
test:empty\x00\x00\x00\x01\x00\x00\x00\x00\x00\x00\x00\x10 test:song\x00\x00\x00\x02\x00\x00\x00\x00\x00\xb2Patali Dirapata, Cromda Cromda Ripalo, Pata Pata, Ko Ko Ko (esc)
Pierre-Yves David
bundle2: support for bundling and unbundling payload...
r20876 Bokoro Dipoulito, Rondi Rondi Pepino, Pata Pata, Ko Ko Ko
Pierre-Yves David
bundle2: ignore advisory part with unknown parameters...
r21626 Emana Karassoli, Loucra Loucra Ponponto, Pata Pata, Ko Ko Ko.\x00\x00\x00\x00\x00\x16\x0ftest:debugreply\x00\x00\x00\x03\x00\x00\x00\x00\x00\x00\x00+ test:math\x00\x00\x00\x04\x02\x01\x02\x04\x01\x04\x07\x03pi3.14e2.72cookingraw\x00\x00\x00\x0242\x00\x00\x00\x00\x00\x1d test:song\x00\x00\x00\x05\x01\x00\x0b\x00randomparam\x00\x00\x00\x00\x00\x10 test:ping\x00\x00\x00\x06\x00\x00\x00\x00\x00\x00\x00\x00 (no-eol) (esc)
Pierre-Yves David
bundle2: support bundling of empty part (with a type)...
r20856
Pierre-Yves David
bundle2: rename unbundle2 test command to statbundle2...
r20888 $ hg statbundle2 < ../parts.hg2
Pierre-Yves David
bundle2: support unbundling empty part...
r20864 options count: 0
Pierre-Yves David
bundle2: support for bundling and unbundling payload...
r20876 :test:empty:
Pierre-Yves David
bundle2: part params
r20877 mandatory: 0
advisory: 0
Pierre-Yves David
bundle2: support for bundling and unbundling payload...
r20876 payload: 0 bytes
Pierre-Yves David
bundle2: support unbundling empty part...
r20864 :test:empty:
Pierre-Yves David
bundle2: part params
r20877 mandatory: 0
advisory: 0
Pierre-Yves David
bundle2: support for bundling and unbundling payload...
r20876 payload: 0 bytes
:test:song:
Pierre-Yves David
bundle2: part params
r20877 mandatory: 0
advisory: 0
Pierre-Yves David
bundle2: support for bundling and unbundling payload...
r20876 payload: 178 bytes
Pierre-Yves David
bundle2: add capabilities support in `replycaps` part...
r21135 :test:debugreply:
mandatory: 0
advisory: 0
payload: 0 bytes
Pierre-Yves David
bundle2: part params
r20877 :test:math:
mandatory: 2
advisory: 1
payload: 2 bytes
Pierre-Yves David
bundle2: ignore advisory part with unknown parameters...
r21626 :test:song:
mandatory: 1
advisory: 0
payload: 0 bytes
Pierre-Yves David
bundle2: produce a bundle2 reply...
r20997 :test:ping:
mandatory: 0
advisory: 0
payload: 0 bytes
Pierre-Yves David
bundle2: ignore advisory part with unknown parameters...
r21626 parts count: 7
Pierre-Yves David
bundle2: support unbundling empty part...
r20864
Pierre-Yves David
bundle2: rename unbundle2 test command to statbundle2...
r20888 $ hg statbundle2 --debug < ../parts.hg2
Pierre-Yves David
bundle2: use HG2X in the header...
r21144 start processing of HG2X stream
Pierre-Yves David
bundle2: support unbundling empty part...
r20864 reading bundle2 stream parameters
options count: 0
start extraction of bundle2 parts
Pierre-Yves David
bundle2: add an integer id to part...
r20995 part header size: 17
Pierre-Yves David
bundle2: support unbundling empty part...
r20864 part type: "test:empty"
Pierre-Yves David
bundle2: add an integer id to part...
r20995 part id: "0"
Pierre-Yves David
bundle2: support unbundling empty part...
r20864 part parameters: 0
Pierre-Yves David
bundle2: lazily iterate over bundle parts in the test...
r21017 :test:empty:
mandatory: 0
advisory: 0
Pierre-Yves David
bundle2: lazy unbundle of part payload...
r21019 payload chunk size: 0
Pierre-Yves David
bundle2: lazily iterate over bundle parts in the test...
r21017 payload: 0 bytes
Pierre-Yves David
bundle2: add an integer id to part...
r20995 part header size: 17
Pierre-Yves David
bundle2: support unbundling empty part...
r20864 part type: "test:empty"
Pierre-Yves David
bundle2: add an integer id to part...
r20995 part id: "1"
Pierre-Yves David
bundle2: support unbundling empty part...
r20864 part parameters: 0
Pierre-Yves David
bundle2: lazily iterate over bundle parts in the test...
r21017 :test:empty:
mandatory: 0
advisory: 0
Pierre-Yves David
bundle2: lazy unbundle of part payload...
r21019 payload chunk size: 0
Pierre-Yves David
bundle2: lazily iterate over bundle parts in the test...
r21017 payload: 0 bytes
Pierre-Yves David
bundle2: add an integer id to part...
r20995 part header size: 16
Pierre-Yves David
bundle2: support for bundling and unbundling payload...
r20876 part type: "test:song"
Pierre-Yves David
bundle2: add an integer id to part...
r20995 part id: "2"
Pierre-Yves David
bundle2: support for bundling and unbundling payload...
r20876 part parameters: 0
Pierre-Yves David
bundle2: lazily iterate over bundle parts in the test...
r21017 :test:song:
mandatory: 0
advisory: 0
Pierre-Yves David
bundle2: lazy unbundle of part payload...
r21019 payload chunk size: 178
payload chunk size: 0
Pierre-Yves David
bundle2: lazily iterate over bundle parts in the test...
r21017 payload: 178 bytes
Pierre-Yves David
bundle2: add capabilities support in `replycaps` part...
r21135 part header size: 22
part type: "test:debugreply"
part id: "3"
part parameters: 0
:test:debugreply:
mandatory: 0
advisory: 0
payload chunk size: 0
payload: 0 bytes
Pierre-Yves David
bundle2: add an integer id to part...
r20995 part header size: 43
Pierre-Yves David
bundle2: part params
r20877 part type: "test:math"
Pierre-Yves David
bundle2: add capabilities support in `replycaps` part...
r21135 part id: "4"
Pierre-Yves David
bundle2: part params
r20877 part parameters: 3
Pierre-Yves David
bundle2: lazily iterate over bundle parts in the test...
r21017 :test:math:
mandatory: 2
advisory: 1
Pierre-Yves David
bundle2: lazy unbundle of part payload...
r21019 payload chunk size: 2
payload chunk size: 0
Pierre-Yves David
bundle2: lazily iterate over bundle parts in the test...
r21017 payload: 2 bytes
Pierre-Yves David
bundle2: ignore advisory part with unknown parameters...
r21626 part header size: 29
part type: "test:song"
part id: "5"
part parameters: 1
:test:song:
mandatory: 1
advisory: 0
payload chunk size: 0
payload: 0 bytes
Pierre-Yves David
bundle2: produce a bundle2 reply...
r20997 part header size: 16
part type: "test:ping"
Pierre-Yves David
bundle2: ignore advisory part with unknown parameters...
r21626 part id: "6"
Pierre-Yves David
bundle2: produce a bundle2 reply...
r20997 part parameters: 0
:test:ping:
mandatory: 0
advisory: 0
Pierre-Yves David
bundle2: lazy unbundle of part payload...
r21019 payload chunk size: 0
Pierre-Yves David
bundle2: produce a bundle2 reply...
r20997 payload: 0 bytes
Pierre-Yves David
bundle2: lazily iterate over bundle parts in the test...
r21017 part header size: 0
end of bundle2 stream
Pierre-Yves David
bundle2: ignore advisory part with unknown parameters...
r21626 parts count: 7
Pierre-Yves David
bundle2: first version of a bundle processing...
r20889
Pierre-Yves David
bundle2: first crude version of bundling changeset with bundle2...
r20950 Test actual unbundling of test part
=======================================
Pierre-Yves David
bundle2: first version of a bundle processing...
r20889
Process the bundle
$ hg unbundle2 --debug < ../parts.hg2
Pierre-Yves David
bundle2: use HG2X in the header...
r21144 start processing of HG2X stream
Pierre-Yves David
bundle2: first version of a bundle processing...
r20889 reading bundle2 stream parameters
start extraction of bundle2 parts
Pierre-Yves David
bundle2: add an integer id to part...
r20995 part header size: 17
Pierre-Yves David
bundle2: first version of a bundle processing...
r20889 part type: "test:empty"
Pierre-Yves David
bundle2: add an integer id to part...
r20995 part id: "0"
Pierre-Yves David
bundle2: first version of a bundle processing...
r20889 part parameters: 0
Pierre-Yves David
bundle2: ignore advisory part with unknown parameters...
r21626 ignoring unsupported advisory part test:empty
Pierre-Yves David
bundle2: first version of a bundle processing...
r20889 payload chunk size: 0
Pierre-Yves David
bundle2: add an integer id to part...
r20995 part header size: 17
Pierre-Yves David
bundle2: first version of a bundle processing...
r20889 part type: "test:empty"
Pierre-Yves David
bundle2: add an integer id to part...
r20995 part id: "1"
Pierre-Yves David
bundle2: first version of a bundle processing...
r20889 part parameters: 0
Pierre-Yves David
bundle2: ignore advisory part with unknown parameters...
r21626 ignoring unsupported advisory part test:empty
Pierre-Yves David
bundle2: first version of a bundle processing...
r20889 payload chunk size: 0
Pierre-Yves David
bundle2: add an integer id to part...
r20995 part header size: 16
Pierre-Yves David
bundle2: first version of a bundle processing...
r20889 part type: "test:song"
Pierre-Yves David
bundle2: add an integer id to part...
r20995 part id: "2"
Pierre-Yves David
bundle2: first version of a bundle processing...
r20889 part parameters: 0
Pierre-Yves David
bundle2: lazy unbundle of part payload...
r21019 found a handler for part 'test:song'
The choir starts singing:
Pierre-Yves David
bundle2: first version of a bundle processing...
r20889 payload chunk size: 178
payload chunk size: 0
Patali Dirapata, Cromda Cromda Ripalo, Pata Pata, Ko Ko Ko
Bokoro Dipoulito, Rondi Rondi Pepino, Pata Pata, Ko Ko Ko
Emana Karassoli, Loucra Loucra Ponponto, Pata Pata, Ko Ko Ko.
Pierre-Yves David
bundle2: add capabilities support in `replycaps` part...
r21135 part header size: 22
part type: "test:debugreply"
part id: "3"
part parameters: 0
found a handler for part 'test:debugreply'
debugreply: no reply
payload chunk size: 0
Pierre-Yves David
bundle2: add an integer id to part...
r20995 part header size: 43
Pierre-Yves David
bundle2: first version of a bundle processing...
r20889 part type: "test:math"
Pierre-Yves David
bundle2: add capabilities support in `replycaps` part...
r21135 part id: "4"
Pierre-Yves David
bundle2: first version of a bundle processing...
r20889 part parameters: 3
Pierre-Yves David
bundle2: ignore advisory part with unknown parameters...
r21626 ignoring unsupported advisory part test:math
Pierre-Yves David
bundle2: first version of a bundle processing...
r20889 payload chunk size: 2
payload chunk size: 0
Pierre-Yves David
bundle2: ignore advisory part with unknown parameters...
r21626 part header size: 29
part type: "test:song"
part id: "5"
part parameters: 1
found a handler for part 'test:song'
ignoring unsupported advisory part test:song - randomparam
payload chunk size: 0
Pierre-Yves David
bundle2: produce a bundle2 reply...
r20997 part header size: 16
part type: "test:ping"
Pierre-Yves David
bundle2: ignore advisory part with unknown parameters...
r21626 part id: "6"
Pierre-Yves David
bundle2: produce a bundle2 reply...
r20997 part parameters: 0
found a handler for part 'test:ping'
Pierre-Yves David
bundle2: ignore advisory part with unknown parameters...
r21626 received ping request (id 6)
Pierre-Yves David
bundle2: lazy unbundle of part payload...
r21019 payload chunk size: 0
Pierre-Yves David
bundle2: first version of a bundle processing...
r20889 part header size: 0
end of bundle2 stream
Pierre-Yves David
bundle2: read the whole bundle from stream on abort...
r20892 0 unread bytes
Pierre-Yves David
bundle2: record processing results in the bundleoperation object...
r20949 3 total verses sung
Pierre-Yves David
bundle2: add some distinction between mandatory and advisory part...
r20891
Pierre-Yves David
bundle2: produce a bundle2 reply...
r20997 Unbundle with an unknown mandatory part
(should abort)
Pierre-Yves David
bundle2: add some distinction between mandatory and advisory part...
r20891
$ hg bundle2 --parts --unknown ../unknown.hg2
$ hg unbundle2 < ../unknown.hg2
Matt Mackall
tests: fix test output typo
r20951 The choir starts singing:
Pierre-Yves David
bundle2: add some distinction between mandatory and advisory part...
r20891 Patali Dirapata, Cromda Cromda Ripalo, Pata Pata, Ko Ko Ko
Bokoro Dipoulito, Rondi Rondi Pepino, Pata Pata, Ko Ko Ko
Emana Karassoli, Loucra Loucra Ponponto, Pata Pata, Ko Ko Ko.
Pierre-Yves David
bundle2: add capabilities support in `replycaps` part...
r21135 debugreply: no reply
Pierre-Yves David
bundle2: read the whole bundle from stream on abort...
r20892 0 unread bytes
Pierre-Yves David
bundle2: rename UnknownPartError to BundleValueError...
r21617 abort: missing support for test:unknown
Pierre-Yves David
bundle2: add some distinction between mandatory and advisory part...
r20891 [255]
Pierre-Yves David
bundle2: first crude version of bundling changeset with bundle2...
r20950
Pierre-Yves David
bundle2: enforce all parameters in a part to be handled...
r21625 Unbundle with an unknown mandatory part parameters
(should abort)
$ hg bundle2 --unknownparams ../unknown.hg2
$ hg unbundle2 < ../unknown.hg2
0 unread bytes
abort: missing support for test:song - randomparams
[255]
Pierre-Yves David
bundle2: produce a bundle2 reply...
r20997 unbundle with a reply
Pierre-Yves David
bundle2: introduce `replycaps` part for on-demand reply...
r21130 $ hg bundle2 --parts --reply ../parts-reply.hg2
$ hg unbundle2 ../reply.hg2 < ../parts-reply.hg2
Pierre-Yves David
bundle2: produce a bundle2 reply...
r20997 0 unread bytes
3 total verses sung
The reply is a bundle
$ cat ../reply.hg2
Pierre-Yves David
bundle2: move all parts into a `bx2` namespace...
r21146 HG2X\x00\x00\x00\x1f (esc)
b2x:output\x00\x00\x00\x00\x00\x01\x0b\x01in-reply-to3\x00\x00\x00\xd9The choir starts singing: (esc)
Pierre-Yves David
bundle2: capture remote stdout while unbundling...
r21131 Patali Dirapata, Cromda Cromda Ripalo, Pata Pata, Ko Ko Ko
Bokoro Dipoulito, Rondi Rondi Pepino, Pata Pata, Ko Ko Ko
Emana Karassoli, Loucra Loucra Ponponto, Pata Pata, Ko Ko Ko.
Pierre-Yves David
bundle2: move all parts into a `bx2` namespace...
r21146 \x00\x00\x00\x00\x00\x1f (esc)
b2x:output\x00\x00\x00\x01\x00\x01\x0b\x01in-reply-to4\x00\x00\x00\xc9debugreply: capabilities: (esc)
Pierre-Yves David
bundle2: protect capabilities name and values with url quoting...
r21137 debugreply: 'city=!'
debugreply: 'celeste,ville'
Pierre-Yves David
bundle2: add capabilities support in `replycaps` part...
r21135 debugreply: 'elephants'
Pierre-Yves David
bundle2: support for capabilities with values...
r21136 debugreply: 'babar'
debugreply: 'celeste'
Pierre-Yves David
bundle2: add capabilities support in `replycaps` part...
r21135 debugreply: 'ping-pong'
Pierre-Yves David
bundle2: ignore advisory part with unknown parameters...
r21626 \x00\x00\x00\x00\x00\x1e test:pong\x00\x00\x00\x02\x01\x00\x0b\x01in-reply-to7\x00\x00\x00\x00\x00\x1f (esc)
b2x:output\x00\x00\x00\x03\x00\x01\x0b\x01in-reply-to7\x00\x00\x00=received ping request (id 7) (esc)
replying to ping request (id 7)
Pierre-Yves David
bundle2: capture remote stdout while unbundling...
r21131 \x00\x00\x00\x00\x00\x00 (no-eol) (esc)
Pierre-Yves David
bundle2: produce a bundle2 reply...
r20997
The reply is valid
$ hg statbundle2 < ../reply.hg2
options count: 0
Pierre-Yves David
bundle2: move all parts into a `bx2` namespace...
r21146 :b2x:output:
Pierre-Yves David
bundle2: capture remote stdout while unbundling...
r21131 mandatory: 0
advisory: 1
payload: 217 bytes
Pierre-Yves David
bundle2: move all parts into a `bx2` namespace...
r21146 :b2x:output:
Pierre-Yves David
bundle2: add capabilities support in `replycaps` part...
r21135 mandatory: 0
advisory: 1
Pierre-Yves David
bundle2: protect capabilities name and values with url quoting...
r21137 payload: 201 bytes
Pierre-Yves David
bundle2: produce a bundle2 reply...
r20997 :test:pong:
mandatory: 1
advisory: 0
payload: 0 bytes
Pierre-Yves David
bundle2: move all parts into a `bx2` namespace...
r21146 :b2x:output:
Pierre-Yves David
bundle2: capture remote stdout while unbundling...
r21131 mandatory: 0
advisory: 1
Pierre-Yves David
bundle2: include stderr when capturing handlers output...
r21133 payload: 61 bytes
Pierre-Yves David
bundle2: add capabilities support in `replycaps` part...
r21135 parts count: 4
Pierre-Yves David
bundle2: capture remote stdout while unbundling...
r21131
Unbundle the reply to get the output:
$ hg unbundle2 < ../reply.hg2
remote: The choir starts singing:
remote: Patali Dirapata, Cromda Cromda Ripalo, Pata Pata, Ko Ko Ko
remote: Bokoro Dipoulito, Rondi Rondi Pepino, Pata Pata, Ko Ko Ko
remote: Emana Karassoli, Loucra Loucra Ponponto, Pata Pata, Ko Ko Ko.
Pierre-Yves David
bundle2: add capabilities support in `replycaps` part...
r21135 remote: debugreply: capabilities:
Pierre-Yves David
bundle2: protect capabilities name and values with url quoting...
r21137 remote: debugreply: 'city=!'
remote: debugreply: 'celeste,ville'
Pierre-Yves David
bundle2: add capabilities support in `replycaps` part...
r21135 remote: debugreply: 'elephants'
Pierre-Yves David
bundle2: support for capabilities with values...
r21136 remote: debugreply: 'babar'
remote: debugreply: 'celeste'
Pierre-Yves David
bundle2: add capabilities support in `replycaps` part...
r21135 remote: debugreply: 'ping-pong'
Pierre-Yves David
bundle2: ignore advisory part with unknown parameters...
r21626 remote: received ping request (id 7)
remote: replying to ping request (id 7)
Pierre-Yves David
bundle2: capture remote stdout while unbundling...
r21131 0 unread bytes
Pierre-Yves David
bundle2: produce a bundle2 reply...
r20997
Pierre-Yves David
bundle2: fix raising errors during heads checking...
r21184 Test push race detection
$ hg bundle2 --pushrace ../part-race.hg2
$ hg unbundle2 < ../part-race.hg2
0 unread bytes
Pierre-Yves David
bundle2: add an error message to push race error...
r21185 abort: push race: repository changed while pushing - please try again
Pierre-Yves David
bundle2: fix raising errors during heads checking...
r21184 [255]
Pierre-Yves David
bundle2: first crude version of bundling changeset with bundle2...
r20950 Support for changegroup
===================================
$ hg unbundle $TESTDIR/bundles/rebase.hg
adding changesets
adding manifests
adding file changes
added 8 changesets with 7 changes to 7 files (+3 heads)
(run 'hg heads' to see heads, 'hg merge' to merge)
$ hg log -G
Pierre-Yves David
test-bundle2: add bookmark movement to the push test...
r22241 o 8:02de42196ebe draft Nicolas Dumazet <nicdumz.commits@gmail.com> H
Pierre-Yves David
bundle2: first crude version of bundling changeset with bundle2...
r20950 |
Pierre-Yves David
test-bundle2: add bookmark movement to the push test...
r22241 | o 7:eea13746799a draft Nicolas Dumazet <nicdumz.commits@gmail.com> G
Pierre-Yves David
bundle2: use a smarter template for test...
r21647 |/|
Pierre-Yves David
test-bundle2: add bookmark movement to the push test...
r22241 o | 6:24b6387c8c8c draft Nicolas Dumazet <nicdumz.commits@gmail.com> F
Pierre-Yves David
bundle2: first crude version of bundling changeset with bundle2...
r20950 | |
Pierre-Yves David
test-bundle2: add bookmark movement to the push test...
r22241 | o 5:9520eea781bc draft Nicolas Dumazet <nicdumz.commits@gmail.com> E
Pierre-Yves David
bundle2: use a smarter template for test...
r21647 |/
Pierre-Yves David
test-bundle2: add bookmark movement to the push test...
r22241 | o 4:32af7686d403 draft Nicolas Dumazet <nicdumz.commits@gmail.com> D
Pierre-Yves David
bundle2: first crude version of bundling changeset with bundle2...
r20950 | |
Pierre-Yves David
test-bundle2: add bookmark movement to the push test...
r22241 | o 3:5fddd98957c8 draft Nicolas Dumazet <nicdumz.commits@gmail.com> C
Pierre-Yves David
bundle2: use a smarter template for test...
r21647 | |
Pierre-Yves David
test-bundle2: add bookmark movement to the push test...
r22241 | o 2:42ccdea3bb16 draft Nicolas Dumazet <nicdumz.commits@gmail.com> B
Pierre-Yves David
bundle2: use a smarter template for test...
r21647 |/
Pierre-Yves David
test-bundle2: add bookmark movement to the push test...
r22241 o 1:cd010b8cd998 draft Nicolas Dumazet <nicdumz.commits@gmail.com> A
Pierre-Yves David
bundle2: first crude version of bundling changeset with bundle2...
r20950
Pierre-Yves David
test-bundle2: add bookmark movement to the push test...
r22241 @ 0:3903775176ed draft test a
Pierre-Yves David
bundle2: first crude version of bundling changeset with bundle2...
r20950
$ hg bundle2 --debug --rev '8+7+5+4' ../rev.hg2
4 changesets found
list of changesets:
32af7686d403cf45b5d95f2d70cebea587ac806a
9520eea781bcca16c1e15acc0ba14335a0e8e5ba
eea13746799a9e0bfd88f29d3c2e9dc9389f524f
02de42196ebee42ef284b6780a87cdc96e8eaab6
Pierre-Yves David
bundle2: use HG2X in the header...
r21144 start emission of HG2X stream
Pierre-Yves David
bundle2: support chunk iterator as part data...
r21001 bundle parameter:
start of parts
Pierre-Yves David
bundle2: move all parts into a `bx2` namespace...
r21146 bundle part: "b2x:changegroup"
Pierre-Yves David
bundle2: first crude version of bundling changeset with bundle2...
r20950 bundling: 1/4 changesets (25.00%)
bundling: 2/4 changesets (50.00%)
bundling: 3/4 changesets (75.00%)
bundling: 4/4 changesets (100.00%)
bundling: 1/4 manifests (25.00%)
bundling: 2/4 manifests (50.00%)
bundling: 3/4 manifests (75.00%)
bundling: 4/4 manifests (100.00%)
bundling: D 1/3 files (33.33%)
bundling: E 2/3 files (66.67%)
bundling: H 3/3 files (100.00%)
end of bundle
$ cat ../rev.hg2
Pierre-Yves David
bundle2: move all parts into a `bx2` namespace...
r21146 HG2X\x00\x00\x00\x16\x0fb2x:changegroup\x00\x00\x00\x00\x00\x00\x00\x00\x06\x13\x00\x00\x00\xa42\xafv\x86\xd4\x03\xcfE\xb5\xd9_-p\xce\xbe\xa5\x87\xac\x80j_\xdd\xd9\x89W\xc8\xa5JMCm\xfe\x1d\xa9\xd8\x7f!\xa1\xb9{\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x002\xafv\x86\xd4\x03\xcfE\xb5\xd9_-p\xce\xbe\xa5\x87\xac\x80j\x00\x00\x00\x00\x00\x00\x00)\x00\x00\x00)6e1f4c47ecb533ffd0c8e52cdc88afb6cd39e20c (esc)
Pierre-Yves David
bundle2: first crude version of bundling changeset with bundle2...
r20950 \x00\x00\x00f\x00\x00\x00h\x00\x00\x00\x02D (esc)
\x00\x00\x00i\x00\x00\x00j\x00\x00\x00\x01D\x00\x00\x00\xa4\x95 \xee\xa7\x81\xbc\xca\x16\xc1\xe1Z\xcc\x0b\xa1C5\xa0\xe8\xe5\xba\xcd\x01\x0b\x8c\xd9\x98\xf3\x98\x1aZ\x81\x15\xf9O\x8d\xa4\xabP`\x89\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x95 \xee\xa7\x81\xbc\xca\x16\xc1\xe1Z\xcc\x0b\xa1C5\xa0\xe8\xe5\xba\x00\x00\x00\x00\x00\x00\x00)\x00\x00\x00)4dece9c826f69490507b98c6383a3009b295837d (esc)
\x00\x00\x00f\x00\x00\x00h\x00\x00\x00\x02E (esc)
\x00\x00\x00i\x00\x00\x00j\x00\x00\x00\x01E\x00\x00\x00\xa2\xee\xa17Fy\x9a\x9e\x0b\xfd\x88\xf2\x9d<.\x9d\xc98\x9fRO$\xb68|\x8c\x8c\xae7\x17\x88\x80\xf3\xfa\x95\xde\xd3\xcb\x1c\xf7\x85\x95 \xee\xa7\x81\xbc\xca\x16\xc1\xe1Z\xcc\x0b\xa1C5\xa0\xe8\xe5\xba\xee\xa17Fy\x9a\x9e\x0b\xfd\x88\xf2\x9d<.\x9d\xc98\x9fRO\x00\x00\x00\x00\x00\x00\x00)\x00\x00\x00)365b93d57fdf4814e2b5911d6bacff2b12014441 (esc)
\x00\x00\x00f\x00\x00\x00h\x00\x00\x00\x00\x00\x00\x00i\x00\x00\x00j\x00\x00\x00\x01G\x00\x00\x00\xa4\x02\xdeB\x19n\xbe\xe4.\xf2\x84\xb6x (esc)
\x87\xcd\xc9n\x8e\xaa\xb6$\xb68|\x8c\x8c\xae7\x17\x88\x80\xf3\xfa\x95\xde\xd3\xcb\x1c\xf7\x85\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x02\xdeB\x19n\xbe\xe4.\xf2\x84\xb6x (esc)
\x87\xcd\xc9n\x8e\xaa\xb6\x00\x00\x00\x00\x00\x00\x00)\x00\x00\x00)8bee48edc7318541fc0013ee41b089276a8c24bf (esc)
\x00\x00\x00f\x00\x00\x00f\x00\x00\x00\x02H (esc)
\x00\x00\x00g\x00\x00\x00h\x00\x00\x00\x01H\x00\x00\x00\x00\x00\x00\x00\x8bn\x1fLG\xec\xb53\xff\xd0\xc8\xe5,\xdc\x88\xaf\xb6\xcd9\xe2\x0cf\xa5\xa0\x18\x17\xfd\xf5#\x9c'8\x02\xb5\xb7a\x8d\x05\x1c\x89\xe4\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x002\xafv\x86\xd4\x03\xcfE\xb5\xd9_-p\xce\xbe\xa5\x87\xac\x80j\x00\x00\x00\x81\x00\x00\x00\x81\x00\x00\x00+D\x00c3f1ca2924c16a19b0656a84900e504e5b0aec2d (esc)
\x00\x00\x00\x8bM\xec\xe9\xc8&\xf6\x94\x90P{\x98\xc68:0 \xb2\x95\x83}\x00}\x8c\x9d\x88\x84\x13%\xf5\xc6\xb0cq\xb3[N\x8a+\x1a\x83\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x95 \xee\xa7\x81\xbc\xca\x16\xc1\xe1Z\xcc\x0b\xa1C5\xa0\xe8\xe5\xba\x00\x00\x00+\x00\x00\x00\xac\x00\x00\x00+E\x009c6fd0350a6c0d0c49d4a9c5017cf07043f54e58 (esc)
\x00\x00\x00\x8b6[\x93\xd5\x7f\xdfH\x14\xe2\xb5\x91\x1dk\xac\xff+\x12\x01DA(\xa5\x84\xc6^\xf1!\xf8\x9e\xb6j\xb7\xd0\xbc\x15=\x80\x99\xe7\xceM\xec\xe9\xc8&\xf6\x94\x90P{\x98\xc68:0 \xb2\x95\x83}\xee\xa17Fy\x9a\x9e\x0b\xfd\x88\xf2\x9d<.\x9d\xc98\x9fRO\x00\x00\x00V\x00\x00\x00V\x00\x00\x00+F\x0022bfcfd62a21a3287edbd4d656218d0f525ed76a (esc)
\x00\x00\x00\x97\x8b\xeeH\xed\xc71\x85A\xfc\x00\x13\xeeA\xb0\x89'j\x8c$\xbf(\xa5\x84\xc6^\xf1!\xf8\x9e\xb6j\xb7\xd0\xbc\x15=\x80\x99\xe7\xce\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x02\xdeB\x19n\xbe\xe4.\xf2\x84\xb6x (esc)
\x87\xcd\xc9n\x8e\xaa\xb6\x00\x00\x00+\x00\x00\x00V\x00\x00\x00\x00\x00\x00\x00\x81\x00\x00\x00\x81\x00\x00\x00+H\x008500189e74a9e0475e822093bc7db0d631aeb0b4 (esc)
\x00\x00\x00\x00\x00\x00\x00\x05D\x00\x00\x00b\xc3\xf1\xca)$\xc1j\x19\xb0ej\x84\x90\x0ePN[ (esc)
\xec-\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x002\xafv\x86\xd4\x03\xcfE\xb5\xd9_-p\xce\xbe\xa5\x87\xac\x80j\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x02D (esc)
\x00\x00\x00\x00\x00\x00\x00\x05E\x00\x00\x00b\x9co\xd05 (esc)
l\r (no-eol) (esc)
\x0cI\xd4\xa9\xc5\x01|\xf0pC\xf5NX\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x95 \xee\xa7\x81\xbc\xca\x16\xc1\xe1Z\xcc\x0b\xa1C5\xa0\xe8\xe5\xba\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x02E (esc)
\x00\x00\x00\x00\x00\x00\x00\x05H\x00\x00\x00b\x85\x00\x18\x9et\xa9\xe0G^\x82 \x93\xbc}\xb0\xd61\xae\xb0\xb4\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x02\xdeB\x19n\xbe\xe4.\xf2\x84\xb6x (esc)
\x87\xcd\xc9n\x8e\xaa\xb6\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x02H (esc)
\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00 (no-eol) (esc)
Pierre-Yves David
bundle2: introduce `replycaps` part for on-demand reply...
r21130 $ hg unbundle2 < ../rev.hg2
Pierre-Yves David
bundle2: first crude version of bundling changeset with bundle2...
r20950 adding changesets
adding manifests
adding file changes
added 0 changesets with 0 changes to 3 files
0 unread bytes
addchangegroup return: 1
Pierre-Yves David
bundle2: allow pulling changegroups using bundle2...
r20955
Pierre-Yves David
bundle2: introduce `replycaps` part for on-demand reply...
r21130 with reply
$ hg bundle2 --rev '8+7+5+4' --reply ../rev-rr.hg2
$ hg unbundle2 ../rev-reply.hg2 < ../rev-rr.hg2
0 unread bytes
addchangegroup return: 1
$ cat ../rev-reply.hg2
Pierre-Yves David
bundle2: move all parts into a `bx2` namespace...
r21146 HG2X\x00\x00\x003\x15b2x:reply:changegroup\x00\x00\x00\x00\x00\x02\x0b\x01\x06\x01in-reply-to1return1\x00\x00\x00\x00\x00\x1f (esc)
b2x:output\x00\x00\x00\x01\x00\x01\x0b\x01in-reply-to1\x00\x00\x00dadding changesets (esc)
Pierre-Yves David
bundle2: capture remote stdout while unbundling...
r21131 adding manifests
adding file changes
added 0 changesets with 0 changes to 3 files
\x00\x00\x00\x00\x00\x00 (no-eol) (esc)
Pierre-Yves David
bundle2: use reply part to return result of addchangegroup...
r20998
Pierre-Yves David
test-bundle2: add obsolescence information to be exchanged...
r22323 $ cd ..
Pierre-Yves David
bundle2: allow pulling changegroups using bundle2...
r20955 Real world exchange
=====================
Pierre-Yves David
test-bundle2: add obsolescence information to be exchanged...
r22323 Add more obsolescence information
$ hg -R main debugobsolete -d '0 0' 1111111111111111111111111111111111111111 `getmainid 9520eea781bc`
$ hg -R main debugobsolete -d '0 0' 2222222222222222222222222222222222222222 `getmainid 24b6387c8c8c`
Pierre-Yves David
bundle2: allow pulling changegroups using bundle2...
r20955
clone --pull
Pierre-Yves David
bundle2: add more phase movement in the test...
r21649 $ hg -R main phase --public cd010b8cd998
Pierre-Yves David
bundle2: allow pulling changegroups using bundle2...
r20955 $ hg clone main other --pull --rev 9520eea781bc
adding changesets
adding manifests
adding file changes
added 2 changesets with 2 changes to 2 files
updating to branch default
2 files updated, 0 files merged, 0 files removed, 0 files unresolved
$ hg -R other log -G
Pierre-Yves David
test-bundle2: add bookmark movement to the push test...
r22241 @ 1:9520eea781bc draft Nicolas Dumazet <nicdumz.commits@gmail.com> E
Pierre-Yves David
bundle2: allow pulling changegroups using bundle2...
r20955 |
Pierre-Yves David
test-bundle2: add bookmark movement to the push test...
r22241 o 0:cd010b8cd998 public Nicolas Dumazet <nicdumz.commits@gmail.com> A
Pierre-Yves David
bundle2: allow pulling changegroups using bundle2...
r20955
Pierre-Yves David
test-bundle2: add obsolescence information to be exchanged...
r22323 $ hg -R other debugobsolete
1111111111111111111111111111111111111111 9520eea781bcca16c1e15acc0ba14335a0e8e5ba 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
2222222222222222222222222222222222222222 24b6387c8c8cae37178880f3fa95ded3cb1cf785 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
Pierre-Yves David
bundle2: allow pulling changegroups using bundle2...
r20955
pull
Pierre-Yves David
bundle2: add more phase movement in the test...
r21649 $ hg -R main phase --public 9520eea781bc
Pierre-Yves David
bundle2: allow using bundle2 for push...
r21061 $ hg -R other pull -r 24b6387c8c8c
Pierre-Yves David
bundle2: allow pulling changegroups using bundle2...
r20955 pulling from $TESTTMP/main (glob)
searching for changes
adding changesets
adding manifests
adding file changes
Pierre-Yves David
bundle2: allow using bundle2 for push...
r21061 added 1 changesets with 1 changes to 1 files (+1 heads)
Pierre-Yves David
bundle2: allow pulling changegroups using bundle2...
r20955 (run 'hg heads' to see heads, 'hg merge' to merge)
Pierre-Yves David
bundle2: add more phase movement in the test...
r21649 $ hg -R other log -G
Pierre-Yves David
test-bundle2: add bookmark movement to the push test...
r22241 o 2:24b6387c8c8c draft Nicolas Dumazet <nicdumz.commits@gmail.com> F
Pierre-Yves David
bundle2: add more phase movement in the test...
r21649 |
Pierre-Yves David
test-bundle2: add bookmark movement to the push test...
r22241 | @ 1:9520eea781bc draft Nicolas Dumazet <nicdumz.commits@gmail.com> E
Pierre-Yves David
bundle2: add more phase movement in the test...
r21649 |/
Pierre-Yves David
test-bundle2: add bookmark movement to the push test...
r22241 o 0:cd010b8cd998 public Nicolas Dumazet <nicdumz.commits@gmail.com> A
Pierre-Yves David
bundle2: add more phase movement in the test...
r21649
Pierre-Yves David
test-bundle2: add obsolescence information to be exchanged...
r22323 $ hg -R other debugobsolete
1111111111111111111111111111111111111111 9520eea781bcca16c1e15acc0ba14335a0e8e5ba 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
2222222222222222222222222222222222222222 24b6387c8c8cae37178880f3fa95ded3cb1cf785 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
Pierre-Yves David
bundle2: allow using bundle2 for push...
r21061
Pierre-Yves David
bundle2: add more phase movement in the test...
r21649 pull empty (with phase movement)
$ hg -R main phase --public 24b6387c8c8c
$ hg -R other pull -r 24b6387c8c8c
pulling from $TESTTMP/main (glob)
no changes found
$ hg -R other log -G
Pierre-Yves David
test-bundle2: add bookmark movement to the push test...
r22241 o 2:24b6387c8c8c public Nicolas Dumazet <nicdumz.commits@gmail.com> F
Pierre-Yves David
bundle2: add more phase movement in the test...
r21649 |
Pierre-Yves David
test-bundle2: add bookmark movement to the push test...
r22241 | @ 1:9520eea781bc draft Nicolas Dumazet <nicdumz.commits@gmail.com> E
Pierre-Yves David
bundle2: add more phase movement in the test...
r21649 |/
Pierre-Yves David
test-bundle2: add bookmark movement to the push test...
r22241 o 0:cd010b8cd998 public Nicolas Dumazet <nicdumz.commits@gmail.com> A
Pierre-Yves David
bundle2: add more phase movement in the test...
r21649
Pierre-Yves David
test-bundle2: add obsolescence information to be exchanged...
r22323 $ hg -R other debugobsolete
1111111111111111111111111111111111111111 9520eea781bcca16c1e15acc0ba14335a0e8e5ba 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
2222222222222222222222222222222222222222 24b6387c8c8cae37178880f3fa95ded3cb1cf785 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
Durham Goode
bundle2: fix bundle2 pulling all revs on empty pulls...
r21584 pull empty
$ hg -R other pull -r 24b6387c8c8c
pulling from $TESTTMP/main (glob)
no changes found
Pierre-Yves David
bundle2: add more phase movement in the test...
r21649 $ hg -R other log -G
Pierre-Yves David
test-bundle2: add bookmark movement to the push test...
r22241 o 2:24b6387c8c8c public Nicolas Dumazet <nicdumz.commits@gmail.com> F
Pierre-Yves David
bundle2: add more phase movement in the test...
r21649 |
Pierre-Yves David
test-bundle2: add bookmark movement to the push test...
r22241 | @ 1:9520eea781bc draft Nicolas Dumazet <nicdumz.commits@gmail.com> E
Pierre-Yves David
bundle2: add more phase movement in the test...
r21649 |/
Pierre-Yves David
test-bundle2: add bookmark movement to the push test...
r22241 o 0:cd010b8cd998 public Nicolas Dumazet <nicdumz.commits@gmail.com> A
Pierre-Yves David
bundle2: add more phase movement in the test...
r21649
Pierre-Yves David
test-bundle2: add obsolescence information to be exchanged...
r22323 $ hg -R other debugobsolete
1111111111111111111111111111111111111111 9520eea781bcca16c1e15acc0ba14335a0e8e5ba 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
2222222222222222222222222222222222222222 24b6387c8c8cae37178880f3fa95ded3cb1cf785 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
Durham Goode
bundle2: fix bundle2 pulling all revs on empty pulls...
r21584
Pierre-Yves David
test-bundle2: add bookmark movement to the push test...
r22241 add extra data to test their exchange during push
$ hg -R main bookmark --rev eea13746799a book_eea1
Pierre-Yves David
test-bundle2: add obsolescence information to be exchanged...
r22323 $ hg -R main debugobsolete -d '0 0' 3333333333333333333333333333333333333333 `getmainid eea13746799a`
Pierre-Yves David
test-bundle2: add bookmark movement to the push test...
r22241 $ hg -R main bookmark --rev 02de42196ebe book_02de
Pierre-Yves David
test-bundle2: add obsolescence information to be exchanged...
r22323 $ hg -R main debugobsolete -d '0 0' 4444444444444444444444444444444444444444 `getmainid 02de42196ebe`
Pierre-Yves David
test-bundle2: add bookmark movement to the push test...
r22241 $ hg -R main bookmark --rev 42ccdea3bb16 book_42cc
Pierre-Yves David
test-bundle2: add obsolescence information to be exchanged...
r22323 $ hg -R main debugobsolete -d '0 0' 5555555555555555555555555555555555555555 `getmainid 42ccdea3bb16`
Pierre-Yves David
test-bundle2: add bookmark movement to the push test...
r22241 $ hg -R main bookmark --rev 5fddd98957c8 book_5fdd
Pierre-Yves David
test-bundle2: add obsolescence information to be exchanged...
r22323 $ hg -R main debugobsolete -d '0 0' 6666666666666666666666666666666666666666 `getmainid 5fddd98957c8`
Pierre-Yves David
test-bundle2: add bookmark movement to the push test...
r22241 $ hg -R main bookmark --rev 32af7686d403 book_32af
Pierre-Yves David
test-bundle2: add obsolescence information to be exchanged...
r22323 $ hg -R main debugobsolete -d '0 0' 7777777777777777777777777777777777777777 `getmainid 32af7686d403`
Pierre-Yves David
test-bundle2: add bookmark movement to the push test...
r22241
$ hg -R other bookmark --rev cd010b8cd998 book_eea1
$ hg -R other bookmark --rev cd010b8cd998 book_02de
$ hg -R other bookmark --rev cd010b8cd998 book_42cc
$ hg -R other bookmark --rev cd010b8cd998 book_5fdd
$ hg -R other bookmark --rev cd010b8cd998 book_32af
Pierre-Yves David
bundle2: allow using bundle2 for push...
r21061
Pierre-Yves David
bundle2: add more phase movement in the test...
r21649 $ hg -R main phase --public eea13746799a
Pierre-Yves David
test-bundle2: add bookmark movement to the push test...
r22241
push
$ hg -R main push other --rev eea13746799a --bookmark book_eea1
Pierre-Yves David
bundle2: allow using bundle2 for push...
r21061 pushing to other
searching for changes
Pierre-Yves David
bundle2: capture remote stdout while unbundling...
r21131 remote: adding changesets
remote: adding manifests
remote: adding file changes
remote: added 1 changesets with 0 changes to 0 files (-1 heads)
Pierre-Yves David
push: only push obsmarkers relevant to the "pushed subset"...
r22350 remote: 1 new obsolescence markers
Pierre-Yves David
test-bundle2: add bookmark movement to the push test...
r22241 updating bookmark book_eea1
exporting bookmark book_eea1
Pierre-Yves David
bundle2: add more phase movement in the test...
r21649 $ hg -R other log -G
Pierre-Yves David
test-bundle2: add bookmark movement to the push test...
r22241 o 3:eea13746799a public Nicolas Dumazet <nicdumz.commits@gmail.com> book_eea1 G
Pierre-Yves David
bundle2: add more phase movement in the test...
r21649 |\
Pierre-Yves David
test-bundle2: add bookmark movement to the push test...
r22241 | o 2:24b6387c8c8c public Nicolas Dumazet <nicdumz.commits@gmail.com> F
Pierre-Yves David
bundle2: add more phase movement in the test...
r21649 | |
Pierre-Yves David
test-bundle2: add bookmark movement to the push test...
r22241 @ | 1:9520eea781bc public Nicolas Dumazet <nicdumz.commits@gmail.com> E
Pierre-Yves David
bundle2: add more phase movement in the test...
r21649 |/
Pierre-Yves David
test-bundle2: add bookmark movement to the push test...
r22241 o 0:cd010b8cd998 public Nicolas Dumazet <nicdumz.commits@gmail.com> book_02de book_32af book_42cc book_5fdd A
Pierre-Yves David
bundle2: add more phase movement in the test...
r21649
Pierre-Yves David
test-bundle2: add obsolescence information to be exchanged...
r22323 $ hg -R other debugobsolete
1111111111111111111111111111111111111111 9520eea781bcca16c1e15acc0ba14335a0e8e5ba 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
2222222222222222222222222222222222222222 24b6387c8c8cae37178880f3fa95ded3cb1cf785 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
3333333333333333333333333333333333333333 eea13746799a9e0bfd88f29d3c2e9dc9389f524f 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
Pierre-Yves David
bundle2: allow bundle2 for pulling over the wire...
r21069
pull over ssh
Pierre-Yves David
test-bundle2: add bookmark movement to the push test...
r22241 $ hg -R other pull ssh://user@dummy/main -r 02de42196ebe --bookmark book_02de
Pierre-Yves David
bundle2: allow bundle2 for pulling over the wire...
r21069 pulling from ssh://user@dummy/main
searching for changes
adding changesets
adding manifests
adding file changes
added 1 changesets with 1 changes to 1 files (+1 heads)
Pierre-Yves David
test-bundle2: add bookmark movement to the push test...
r22241 updating bookmark book_02de
Pierre-Yves David
bundle2: allow bundle2 for pulling over the wire...
r21069 (run 'hg heads' to see heads, 'hg merge' to merge)
Pierre-Yves David
test-bundle2: add bookmark movement to the push test...
r22241 importing bookmark book_02de
Pierre-Yves David
test-bundle2: add obsolescence information to be exchanged...
r22323 $ hg -R other debugobsolete
1111111111111111111111111111111111111111 9520eea781bcca16c1e15acc0ba14335a0e8e5ba 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
2222222222222222222222222222222222222222 24b6387c8c8cae37178880f3fa95ded3cb1cf785 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
3333333333333333333333333333333333333333 eea13746799a9e0bfd88f29d3c2e9dc9389f524f 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
4444444444444444444444444444444444444444 02de42196ebee42ef284b6780a87cdc96e8eaab6 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
5555555555555555555555555555555555555555 42ccdea3bb16d28e1848c95fe2e44c000f3f21b1 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
6666666666666666666666666666666666666666 5fddd98957c8a54a4d436dfe1da9d87f21a1b97b 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
7777777777777777777777777777777777777777 32af7686d403cf45b5d95f2d70cebea587ac806a 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
Pierre-Yves David
bundle2: allow bundle2 for pulling over the wire...
r21069
pull over http
$ hg -R main serve -p $HGPORT -d --pid-file=main.pid -E main-error.log
$ cat main.pid >> $DAEMON_PIDS
Pierre-Yves David
test-bundle2: add bookmark movement to the push test...
r22241 $ hg -R other pull http://localhost:$HGPORT/ -r 42ccdea3bb16 --bookmark book_42cc
Pierre-Yves David
bundle2: allow bundle2 for pulling over the wire...
r21069 pulling from http://localhost:$HGPORT/
searching for changes
adding changesets
adding manifests
adding file changes
added 1 changesets with 1 changes to 1 files (+1 heads)
Pierre-Yves David
test-bundle2: add bookmark movement to the push test...
r22241 updating bookmark book_42cc
Pierre-Yves David
bundle2: allow bundle2 for pulling over the wire...
r21069 (run 'hg heads .' to see heads, 'hg merge' to merge)
Pierre-Yves David
test-bundle2: add bookmark movement to the push test...
r22241 importing bookmark book_42cc
Pierre-Yves David
bundle2: allow bundle2 for pulling over the wire...
r21069 $ cat main-error.log
Pierre-Yves David
test-bundle2: add obsolescence information to be exchanged...
r22323 $ hg -R other debugobsolete
1111111111111111111111111111111111111111 9520eea781bcca16c1e15acc0ba14335a0e8e5ba 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
2222222222222222222222222222222222222222 24b6387c8c8cae37178880f3fa95ded3cb1cf785 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
3333333333333333333333333333333333333333 eea13746799a9e0bfd88f29d3c2e9dc9389f524f 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
4444444444444444444444444444444444444444 02de42196ebee42ef284b6780a87cdc96e8eaab6 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
5555555555555555555555555555555555555555 42ccdea3bb16d28e1848c95fe2e44c000f3f21b1 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
6666666666666666666666666666666666666666 5fddd98957c8a54a4d436dfe1da9d87f21a1b97b 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
7777777777777777777777777777777777777777 32af7686d403cf45b5d95f2d70cebea587ac806a 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
Pierre-Yves David
bundle2: allow bundle2 for pulling over the wire...
r21069
Pierre-Yves David
bundle2: support for push over the wire...
r21075 push over ssh
Pierre-Yves David
bundle2: allow bundle2 for pulling over the wire...
r21069
Pierre-Yves David
test-bundle2: add bookmark movement to the push test...
r22241 $ hg -R main push ssh://user@dummy/other -r 5fddd98957c8 --bookmark book_5fdd
Pierre-Yves David
bundle2: support for push over the wire...
r21075 pushing to ssh://user@dummy/other
searching for changes
remote: adding changesets
remote: adding manifests
remote: adding file changes
remote: added 1 changesets with 1 changes to 1 files
Pierre-Yves David
test-bundle2: add bookmark movement to the push test...
r22241 updating bookmark book_5fdd
exporting bookmark book_5fdd
Pierre-Yves David
bundle2: add more phase movement in the test...
r21649 $ hg -R other log -G
Pierre-Yves David
test-bundle2: add bookmark movement to the push test...
r22241 o 6:5fddd98957c8 draft Nicolas Dumazet <nicdumz.commits@gmail.com> book_5fdd C
Pierre-Yves David
bundle2: add more phase movement in the test...
r21649 |
Pierre-Yves David
test-bundle2: add bookmark movement to the push test...
r22241 o 5:42ccdea3bb16 draft Nicolas Dumazet <nicdumz.commits@gmail.com> book_42cc B
Pierre-Yves David
bundle2: add more phase movement in the test...
r21649 |
Pierre-Yves David
test-bundle2: add bookmark movement to the push test...
r22241 | o 4:02de42196ebe draft Nicolas Dumazet <nicdumz.commits@gmail.com> book_02de H
Pierre-Yves David
bundle2: add more phase movement in the test...
r21649 | |
Pierre-Yves David
test-bundle2: add bookmark movement to the push test...
r22241 | | o 3:eea13746799a public Nicolas Dumazet <nicdumz.commits@gmail.com> book_eea1 G
Pierre-Yves David
bundle2: add more phase movement in the test...
r21649 | |/|
Pierre-Yves David
test-bundle2: add bookmark movement to the push test...
r22241 | o | 2:24b6387c8c8c public Nicolas Dumazet <nicdumz.commits@gmail.com> F
Pierre-Yves David
bundle2: add more phase movement in the test...
r21649 |/ /
Pierre-Yves David
test-bundle2: add bookmark movement to the push test...
r22241 | @ 1:9520eea781bc public Nicolas Dumazet <nicdumz.commits@gmail.com> E
Pierre-Yves David
bundle2: add more phase movement in the test...
r21649 |/
Pierre-Yves David
test-bundle2: add bookmark movement to the push test...
r22241 o 0:cd010b8cd998 public Nicolas Dumazet <nicdumz.commits@gmail.com> book_32af A
Pierre-Yves David
bundle2: add more phase movement in the test...
r21649
Pierre-Yves David
test-bundle2: add obsolescence information to be exchanged...
r22323 $ hg -R other debugobsolete
1111111111111111111111111111111111111111 9520eea781bcca16c1e15acc0ba14335a0e8e5ba 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
2222222222222222222222222222222222222222 24b6387c8c8cae37178880f3fa95ded3cb1cf785 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
3333333333333333333333333333333333333333 eea13746799a9e0bfd88f29d3c2e9dc9389f524f 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
4444444444444444444444444444444444444444 02de42196ebee42ef284b6780a87cdc96e8eaab6 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
5555555555555555555555555555555555555555 42ccdea3bb16d28e1848c95fe2e44c000f3f21b1 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
6666666666666666666666666666666666666666 5fddd98957c8a54a4d436dfe1da9d87f21a1b97b 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
7777777777777777777777777777777777777777 32af7686d403cf45b5d95f2d70cebea587ac806a 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
Pierre-Yves David
bundle2: support for push over the wire...
r21075
push over http
$ hg -R other serve -p $HGPORT2 -d --pid-file=other.pid -E other-error.log
$ cat other.pid >> $DAEMON_PIDS
Pierre-Yves David
bundle2: add more phase movement in the test...
r21649 $ hg -R main phase --public 32af7686d403
Pierre-Yves David
test-bundle2: add bookmark movement to the push test...
r22241 $ hg -R main push http://localhost:$HGPORT2/ -r 32af7686d403 --bookmark book_32af
Pierre-Yves David
bundle2: support for push over the wire...
r21075 pushing to http://localhost:$HGPORT2/
searching for changes
Pierre-Yves David
bundle2: capture remote stdout while unbundling...
r21131 remote: adding changesets
remote: adding manifests
remote: adding file changes
remote: added 1 changesets with 1 changes to 1 files
Pierre-Yves David
test-bundle2: add bookmark movement to the push test...
r22241 updating bookmark book_32af
exporting bookmark book_32af
Pierre-Yves David
bundle2: support for push over the wire...
r21075 $ cat other-error.log
Check final content.
$ hg -R other log -G
Pierre-Yves David
test-bundle2: add bookmark movement to the push test...
r22241 o 7:32af7686d403 public Nicolas Dumazet <nicdumz.commits@gmail.com> book_32af D
Pierre-Yves David
bundle2: support for push over the wire...
r21075 |
Pierre-Yves David
test-bundle2: add bookmark movement to the push test...
r22241 o 6:5fddd98957c8 public Nicolas Dumazet <nicdumz.commits@gmail.com> book_5fdd C
Pierre-Yves David
bundle2: support for push over the wire...
r21075 |
Pierre-Yves David
test-bundle2: add bookmark movement to the push test...
r22241 o 5:42ccdea3bb16 public Nicolas Dumazet <nicdumz.commits@gmail.com> book_42cc B
Pierre-Yves David
bundle2: support for push over the wire...
r21075 |
Pierre-Yves David
test-bundle2: add bookmark movement to the push test...
r22241 | o 4:02de42196ebe draft Nicolas Dumazet <nicdumz.commits@gmail.com> book_02de H
Pierre-Yves David
bundle2: support for push over the wire...
r21075 | |
Pierre-Yves David
test-bundle2: add bookmark movement to the push test...
r22241 | | o 3:eea13746799a public Nicolas Dumazet <nicdumz.commits@gmail.com> book_eea1 G
Pierre-Yves David
bundle2: use a smarter template for test...
r21647 | |/|
Pierre-Yves David
test-bundle2: add bookmark movement to the push test...
r22241 | o | 2:24b6387c8c8c public Nicolas Dumazet <nicdumz.commits@gmail.com> F
Pierre-Yves David
bundle2: use a smarter template for test...
r21647 |/ /
Pierre-Yves David
test-bundle2: add bookmark movement to the push test...
r22241 | @ 1:9520eea781bc public Nicolas Dumazet <nicdumz.commits@gmail.com> E
Pierre-Yves David
bundle2: use a smarter template for test...
r21647 |/
Pierre-Yves David
test-bundle2: add bookmark movement to the push test...
r22241 o 0:cd010b8cd998 public Nicolas Dumazet <nicdumz.commits@gmail.com> A
Pierre-Yves David
bundle2: support for push over the wire...
r21075
Pierre-Yves David
test-bundle2: add obsolescence information to be exchanged...
r22323 $ hg -R other debugobsolete
1111111111111111111111111111111111111111 9520eea781bcca16c1e15acc0ba14335a0e8e5ba 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
2222222222222222222222222222222222222222 24b6387c8c8cae37178880f3fa95ded3cb1cf785 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
3333333333333333333333333333333333333333 eea13746799a9e0bfd88f29d3c2e9dc9389f524f 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
4444444444444444444444444444444444444444 02de42196ebee42ef284b6780a87cdc96e8eaab6 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
5555555555555555555555555555555555555555 42ccdea3bb16d28e1848c95fe2e44c000f3f21b1 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
6666666666666666666666666666666666666666 5fddd98957c8a54a4d436dfe1da9d87f21a1b97b 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
7777777777777777777777777777777777777777 32af7686d403cf45b5d95f2d70cebea587ac806a 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
Pierre-Yves David
bundle2: gracefully handle abort during unbundle...
r21177
Error Handling
==============
Check that errors are properly returned to the client during push.
Setting up
$ cat > failpush.py << EOF
> """A small extension that makes push fails when using bundle2
>
> used to test error handling in bundle2
> """
>
> from mercurial import util
> from mercurial import bundle2
> from mercurial import exchange
> from mercurial import extensions
>
Pierre-Yves David
bundle2-test: use the new way to extend push content...
r21905 > def _pushbundle2failpart(pushop, bundler):
Pierre-Yves David
bundle2: make error testing more modular...
r21178 > reason = pushop.ui.config('failpush', 'reason', None)
> part = None
> if reason == 'abort':
Pierre-Yves David
bundle2: update all ``addpart`` callers to ``newpart``...
r21600 > bundler.newpart('test:abort')
Pierre-Yves David
bundle2: gracefully handle UnknownPartError during unbundle...
r21183 > if reason == 'unknown':
Pierre-Yves David
bundle2: update all ``addpart`` callers to ``newpart``...
r21600 > bundler.newpart('TEST:UNKNOWN')
Pierre-Yves David
bundle2: gracefully handle PushRaced error during unbundle...
r21186 > if reason == 'race':
> # 20 Bytes of crap
Pierre-Yves David
bundle2: update all ``addpart`` callers to ``newpart``...
r21600 > bundler.newpart('b2x:check:heads', data='01234567890123456789')
Pierre-Yves David
bundle2: gracefully handle abort during unbundle...
r21177 >
> @bundle2.parthandler("test:abort")
> def handleabort(op, part):
> raise util.Abort('Abandon ship!', hint="don't panic")
>
> def uisetup(ui):
Pierre-Yves David
push: rework the bundle2partsgenerators logic...
r22017 > exchange.b2partsgenmapping['failpart'] = _pushbundle2failpart
> exchange.b2partsgenorder.insert(0, 'failpart')
Pierre-Yves David
bundle2: gracefully handle abort during unbundle...
r21177 >
> EOF
$ cd main
$ hg up tip
3 files updated, 0 files merged, 1 files removed, 0 files unresolved
$ echo 'I' > I
$ hg add I
$ hg ci -m 'I'
$ hg id
e7ec4e813ba6 tip
$ cd ..
$ cat << EOF >> $HGRCPATH
> [extensions]
> failpush=$TESTTMP/failpush.py
> EOF
$ "$TESTDIR/killdaemons.py" $DAEMON_PIDS
$ hg -R other serve -p $HGPORT2 -d --pid-file=other.pid -E other-error.log
$ cat other.pid >> $DAEMON_PIDS
Doing the actual push: Abort error
Pierre-Yves David
bundle2: make error testing more modular...
r21178 $ cat << EOF >> $HGRCPATH
> [failpush]
> reason = abort
> EOF
Pierre-Yves David
bundle2: gracefully handle abort during unbundle...
r21177 $ hg -R main push other -r e7ec4e813ba6
pushing to other
searching for changes
abort: Abandon ship!
(don't panic)
[255]
$ hg -R main push ssh://user@dummy/other -r e7ec4e813ba6
pushing to ssh://user@dummy/other
searching for changes
abort: Abandon ship!
(don't panic)
[255]
$ hg -R main push http://localhost:$HGPORT2/ -r e7ec4e813ba6
pushing to http://localhost:$HGPORT2/
searching for changes
abort: Abandon ship!
(don't panic)
[255]
Pierre-Yves David
bundle2: gracefully handle UnknownPartError during unbundle...
r21183 Doing the actual push: unknown mandatory parts
$ cat << EOF >> $HGRCPATH
> [failpush]
> reason = unknown
> EOF
$ hg -R main push other -r e7ec4e813ba6
pushing to other
searching for changes
Pierre-Yves David
bundle2: rename UnknownPartError to BundleValueError...
r21617 abort: missing support for test:unknown
Pierre-Yves David
bundle2: gracefully handle UnknownPartError during unbundle...
r21183 [255]
$ hg -R main push ssh://user@dummy/other -r e7ec4e813ba6
pushing to ssh://user@dummy/other
searching for changes
Pierre-Yves David
bundle2: rename UnknownPartError to BundleValueError...
r21617 abort: missing support for test:unknown
Pierre-Yves David
bundle2: gracefully handle UnknownPartError during unbundle...
r21183 [255]
$ hg -R main push http://localhost:$HGPORT2/ -r e7ec4e813ba6
pushing to http://localhost:$HGPORT2/
searching for changes
Pierre-Yves David
bundle2: rename UnknownPartError to BundleValueError...
r21617 abort: missing support for test:unknown
Pierre-Yves David
bundle2: gracefully handle UnknownPartError during unbundle...
r21183 [255]
Pierre-Yves David
bundle2: gracefully handle PushRaced error during unbundle...
r21186
Doing the actual push: race
$ cat << EOF >> $HGRCPATH
> [failpush]
> reason = race
> EOF
$ hg -R main push other -r e7ec4e813ba6
pushing to other
searching for changes
abort: push failed:
'repository changed while pushing - please try again'
[255]
$ hg -R main push ssh://user@dummy/other -r e7ec4e813ba6
pushing to ssh://user@dummy/other
searching for changes
abort: push failed:
'repository changed while pushing - please try again'
[255]
$ hg -R main push http://localhost:$HGPORT2/ -r e7ec4e813ba6
pushing to http://localhost:$HGPORT2/
searching for changes
abort: push failed:
'repository changed while pushing - please try again'
[255]
Pierre-Yves David
bundle2: gracefully handle hook abort...
r21187
Doing the actual push: hook abort
$ cat << EOF >> $HGRCPATH
> [failpush]
> reason =
> [hooks]
> b2x-pretransactionclose.failpush = false
> EOF
$ "$TESTDIR/killdaemons.py" $DAEMON_PIDS
$ hg -R other serve -p $HGPORT2 -d --pid-file=other.pid -E other-error.log
$ cat other.pid >> $DAEMON_PIDS
$ hg -R main push other -r e7ec4e813ba6
pushing to other
searching for changes
transaction abort!
rollback completed
abort: b2x-pretransactionclose.failpush hook exited with status 1
[255]
$ hg -R main push ssh://user@dummy/other -r e7ec4e813ba6
pushing to ssh://user@dummy/other
searching for changes
abort: b2x-pretransactionclose.failpush hook exited with status 1
remote: transaction abort!
remote: rollback completed
[255]
$ hg -R main push http://localhost:$HGPORT2/ -r e7ec4e813ba6
pushing to http://localhost:$HGPORT2/
searching for changes
abort: b2x-pretransactionclose.failpush hook exited with status 1
[255]