tests/test-bundle2-remote-changegroup.t
author Martin von Zweigbergk <martinvonz@google.com>
Thu, 14 Jun 2018 15:08:19 -0700
changeset 38321 9b1536b02221
parent 37845 b4b7427b5786
child 38698 6437e89b64d5
permissions -rw-r--r--
backout: use context manager for locks Differential Revision: https://phab.mercurial-scm.org/D3744
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
36217
1ee1a42bfdae tests: test using both versions of SSH protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents: 34661
diff changeset
     1
#testcases sshv1 sshv2
1ee1a42bfdae tests: test using both versions of SSH protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents: 34661
diff changeset
     2
1ee1a42bfdae tests: test using both versions of SSH protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents: 34661
diff changeset
     3
#if sshv2
1ee1a42bfdae tests: test using both versions of SSH protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents: 34661
diff changeset
     4
  $ cat >> $HGRCPATH << EOF
1ee1a42bfdae tests: test using both versions of SSH protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents: 34661
diff changeset
     5
  > [experimental]
1ee1a42bfdae tests: test using both versions of SSH protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents: 34661
diff changeset
     6
  > sshpeer.advertise-v2 = true
1ee1a42bfdae tests: test using both versions of SSH protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents: 34661
diff changeset
     7
  > sshserver.support-v2 = true
1ee1a42bfdae tests: test using both versions of SSH protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents: 34661
diff changeset
     8
  > EOF
1ee1a42bfdae tests: test using both versions of SSH protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents: 34661
diff changeset
     9
#endif
1ee1a42bfdae tests: test using both versions of SSH protocol
Gregory Szorc <gregory.szorc@gmail.com>
parents: 34661
diff changeset
    10
23029
149fc8a44184 bundle2: client side support for a part to import external bundles
Mike Hommey <mh@glandium.org>
parents:
diff changeset
    11
Create an extension to test bundle2 remote-changegroup parts
149fc8a44184 bundle2: client side support for a part to import external bundles
Mike Hommey <mh@glandium.org>
parents:
diff changeset
    12
149fc8a44184 bundle2: client side support for a part to import external bundles
Mike Hommey <mh@glandium.org>
parents:
diff changeset
    13
  $ cat > bundle2.py << EOF
149fc8a44184 bundle2: client side support for a part to import external bundles
Mike Hommey <mh@glandium.org>
parents:
diff changeset
    14
  > """A small extension to test bundle2 remote-changegroup parts.
149fc8a44184 bundle2: client side support for a part to import external bundles
Mike Hommey <mh@glandium.org>
parents:
diff changeset
    15
  > 
149fc8a44184 bundle2: client side support for a part to import external bundles
Mike Hommey <mh@glandium.org>
parents:
diff changeset
    16
  > Current bundle2 implementation doesn't provide a way to generate those
149fc8a44184 bundle2: client side support for a part to import external bundles
Mike Hommey <mh@glandium.org>
parents:
diff changeset
    17
  > parts, so they must be created by extensions.
149fc8a44184 bundle2: client side support for a part to import external bundles
Mike Hommey <mh@glandium.org>
parents:
diff changeset
    18
  > """
29807
d4e026341e16 getchangegroup: take an 'outgoing' object as argument (API)
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 29672
diff changeset
    19
  > from mercurial import bundle2, changegroup, discovery, exchange, util
23029
149fc8a44184 bundle2: client side support for a part to import external bundles
Mike Hommey <mh@glandium.org>
parents:
diff changeset
    20
  > 
149fc8a44184 bundle2: client side support for a part to import external bundles
Mike Hommey <mh@glandium.org>
parents:
diff changeset
    21
  > def _getbundlechangegrouppart(bundler, repo, source, bundlecaps=None,
149fc8a44184 bundle2: client side support for a part to import external bundles
Mike Hommey <mh@glandium.org>
parents:
diff changeset
    22
  >                               b2caps=None, heads=None, common=None,
149fc8a44184 bundle2: client side support for a part to import external bundles
Mike Hommey <mh@glandium.org>
parents:
diff changeset
    23
  >                               **kwargs):
149fc8a44184 bundle2: client side support for a part to import external bundles
Mike Hommey <mh@glandium.org>
parents:
diff changeset
    24
  >     """this function replaces the changegroup part handler for getbundle.
149fc8a44184 bundle2: client side support for a part to import external bundles
Mike Hommey <mh@glandium.org>
parents:
diff changeset
    25
  >     It allows to create a set of arbitrary parts containing changegroups
149fc8a44184 bundle2: client side support for a part to import external bundles
Mike Hommey <mh@glandium.org>
parents:
diff changeset
    26
  >     and remote-changegroups, as described in a bundle2maker file in the
149fc8a44184 bundle2: client side support for a part to import external bundles
Mike Hommey <mh@glandium.org>
parents:
diff changeset
    27
  >     repository .hg/ directory.
149fc8a44184 bundle2: client side support for a part to import external bundles
Mike Hommey <mh@glandium.org>
parents:
diff changeset
    28
  > 
149fc8a44184 bundle2: client side support for a part to import external bundles
Mike Hommey <mh@glandium.org>
parents:
diff changeset
    29
  >     Each line of that bundle2maker file contain a description of the
149fc8a44184 bundle2: client side support for a part to import external bundles
Mike Hommey <mh@glandium.org>
parents:
diff changeset
    30
  >     part to add:
149fc8a44184 bundle2: client side support for a part to import external bundles
Mike Hommey <mh@glandium.org>
parents:
diff changeset
    31
  >       - changegroup common_revset heads_revset
149fc8a44184 bundle2: client side support for a part to import external bundles
Mike Hommey <mh@glandium.org>
parents:
diff changeset
    32
  >           Creates a changegroup part based, using common_revset and
29807
d4e026341e16 getchangegroup: take an 'outgoing' object as argument (API)
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 29672
diff changeset
    33
  >           heads_revset for outgoing
23029
149fc8a44184 bundle2: client side support for a part to import external bundles
Mike Hommey <mh@glandium.org>
parents:
diff changeset
    34
  >       - remote-changegroup url file
149fc8a44184 bundle2: client side support for a part to import external bundles
Mike Hommey <mh@glandium.org>
parents:
diff changeset
    35
  >           Creates a remote-changegroup part for a bundle at the given
149fc8a44184 bundle2: client side support for a part to import external bundles
Mike Hommey <mh@glandium.org>
parents:
diff changeset
    36
  >           url. Size and digest, as required by the client, are computed
149fc8a44184 bundle2: client side support for a part to import external bundles
Mike Hommey <mh@glandium.org>
parents:
diff changeset
    37
  >           from the given file.
149fc8a44184 bundle2: client side support for a part to import external bundles
Mike Hommey <mh@glandium.org>
parents:
diff changeset
    38
  >       - raw-remote-changegroup <python expression>
149fc8a44184 bundle2: client side support for a part to import external bundles
Mike Hommey <mh@glandium.org>
parents:
diff changeset
    39
  >           Creates a remote-changegroup part with the data given in the
33261
be49f3fdcd10 tests: capitalize Python when it's not used as a command name
Augie Fackler <augie@google.com>
parents: 32940
diff changeset
    40
  >           Python expression as parameters. The Python expression is
23029
149fc8a44184 bundle2: client side support for a part to import external bundles
Mike Hommey <mh@glandium.org>
parents:
diff changeset
    41
  >           evaluated with eval, and is expected to be a dict.
149fc8a44184 bundle2: client side support for a part to import external bundles
Mike Hommey <mh@glandium.org>
parents:
diff changeset
    42
  >     """
149fc8a44184 bundle2: client side support for a part to import external bundles
Mike Hommey <mh@glandium.org>
parents:
diff changeset
    43
  >     def newpart(name, data=''):
149fc8a44184 bundle2: client side support for a part to import external bundles
Mike Hommey <mh@glandium.org>
parents:
diff changeset
    44
  >         """wrapper around bundler.newpart adding an extra part making the
149fc8a44184 bundle2: client side support for a part to import external bundles
Mike Hommey <mh@glandium.org>
parents:
diff changeset
    45
  >         client output information about each processed part"""
24686
e0e28e910fa3 bundle2: rename format, parts and config to final names
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 23591
diff changeset
    46
  >         bundler.newpart('output', data=name)
23029
149fc8a44184 bundle2: client side support for a part to import external bundles
Mike Hommey <mh@glandium.org>
parents:
diff changeset
    47
  >         part = bundler.newpart(name, data=data)
149fc8a44184 bundle2: client side support for a part to import external bundles
Mike Hommey <mh@glandium.org>
parents:
diff changeset
    48
  >         return part
149fc8a44184 bundle2: client side support for a part to import external bundles
Mike Hommey <mh@glandium.org>
parents:
diff changeset
    49
  > 
31326
f28f2ac65c66 test-bundle2-remote-changegroup: directly use repo.vfs.join
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 29807
diff changeset
    50
  >     for line in open(repo.vfs.join('bundle2maker'), 'r'):
23029
149fc8a44184 bundle2: client side support for a part to import external bundles
Mike Hommey <mh@glandium.org>
parents:
diff changeset
    51
  >         line = line.strip()
149fc8a44184 bundle2: client side support for a part to import external bundles
Mike Hommey <mh@glandium.org>
parents:
diff changeset
    52
  >         try:
149fc8a44184 bundle2: client side support for a part to import external bundles
Mike Hommey <mh@glandium.org>
parents:
diff changeset
    53
  >             verb, args = line.split(None, 1)
149fc8a44184 bundle2: client side support for a part to import external bundles
Mike Hommey <mh@glandium.org>
parents:
diff changeset
    54
  >         except ValueError:
149fc8a44184 bundle2: client side support for a part to import external bundles
Mike Hommey <mh@glandium.org>
parents:
diff changeset
    55
  >             verb, args = line, ''
149fc8a44184 bundle2: client side support for a part to import external bundles
Mike Hommey <mh@glandium.org>
parents:
diff changeset
    56
  >         if verb == 'remote-changegroup':
149fc8a44184 bundle2: client side support for a part to import external bundles
Mike Hommey <mh@glandium.org>
parents:
diff changeset
    57
  >            url, file = args.split()
149fc8a44184 bundle2: client side support for a part to import external bundles
Mike Hommey <mh@glandium.org>
parents:
diff changeset
    58
  >            bundledata = open(file, 'rb').read()
149fc8a44184 bundle2: client side support for a part to import external bundles
Mike Hommey <mh@glandium.org>
parents:
diff changeset
    59
  >            digest = util.digester.preferred(b2caps['digests'])
149fc8a44184 bundle2: client side support for a part to import external bundles
Mike Hommey <mh@glandium.org>
parents:
diff changeset
    60
  >            d = util.digester([digest], bundledata)
24686
e0e28e910fa3 bundle2: rename format, parts and config to final names
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 23591
diff changeset
    61
  >            part = newpart('remote-changegroup')
23029
149fc8a44184 bundle2: client side support for a part to import external bundles
Mike Hommey <mh@glandium.org>
parents:
diff changeset
    62
  >            part.addparam('url', url)
149fc8a44184 bundle2: client side support for a part to import external bundles
Mike Hommey <mh@glandium.org>
parents:
diff changeset
    63
  >            part.addparam('size', str(len(bundledata)))
149fc8a44184 bundle2: client side support for a part to import external bundles
Mike Hommey <mh@glandium.org>
parents:
diff changeset
    64
  >            part.addparam('digests', digest)
149fc8a44184 bundle2: client side support for a part to import external bundles
Mike Hommey <mh@glandium.org>
parents:
diff changeset
    65
  >            part.addparam('digest:%s' % digest, d[digest])
149fc8a44184 bundle2: client side support for a part to import external bundles
Mike Hommey <mh@glandium.org>
parents:
diff changeset
    66
  >         elif verb == 'raw-remote-changegroup':
24686
e0e28e910fa3 bundle2: rename format, parts and config to final names
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 23591
diff changeset
    67
  >            part = newpart('remote-changegroup')
23029
149fc8a44184 bundle2: client side support for a part to import external bundles
Mike Hommey <mh@glandium.org>
parents:
diff changeset
    68
  >            for k, v in eval(args).items():
149fc8a44184 bundle2: client side support for a part to import external bundles
Mike Hommey <mh@glandium.org>
parents:
diff changeset
    69
  >                part.addparam(k, str(v))
149fc8a44184 bundle2: client side support for a part to import external bundles
Mike Hommey <mh@glandium.org>
parents:
diff changeset
    70
  >         elif verb == 'changegroup':
149fc8a44184 bundle2: client side support for a part to import external bundles
Mike Hommey <mh@glandium.org>
parents:
diff changeset
    71
  >             _common, heads = args.split()
37310
5da299dabdc1 tests: avoid repo.lookup() for converting revnum to nodeid
Martin von Zweigbergk <martinvonz@google.com>
parents: 36217
diff changeset
    72
  >             common.extend(repo[r].node() for r in repo.revs(_common))
5da299dabdc1 tests: avoid repo.lookup() for converting revnum to nodeid
Martin von Zweigbergk <martinvonz@google.com>
parents: 36217
diff changeset
    73
  >             heads = [repo[r].node() for r in repo.revs(heads)]
29807
d4e026341e16 getchangegroup: take an 'outgoing' object as argument (API)
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 29672
diff changeset
    74
  >             outgoing = discovery.outgoing(repo, common, heads)
34101
5ede882c249c changegroup: replace getchangegroup with makechangegroup
Durham Goode <durham@fb.com>
parents: 33286
diff changeset
    75
  >             cg = changegroup.makechangegroup(repo, outgoing, '01',
5ede882c249c changegroup: replace getchangegroup with makechangegroup
Durham Goode <durham@fb.com>
parents: 33286
diff changeset
    76
  >                                              'changegroup')
24686
e0e28e910fa3 bundle2: rename format, parts and config to final names
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 23591
diff changeset
    77
  >             newpart('changegroup', cg.getchunks())
23029
149fc8a44184 bundle2: client side support for a part to import external bundles
Mike Hommey <mh@glandium.org>
parents:
diff changeset
    78
  >         else:
149fc8a44184 bundle2: client side support for a part to import external bundles
Mike Hommey <mh@glandium.org>
parents:
diff changeset
    79
  >             raise Exception('unknown verb')
149fc8a44184 bundle2: client side support for a part to import external bundles
Mike Hommey <mh@glandium.org>
parents:
diff changeset
    80
  > 
149fc8a44184 bundle2: client side support for a part to import external bundles
Mike Hommey <mh@glandium.org>
parents:
diff changeset
    81
  > exchange.getbundle2partsmapping['changegroup'] = _getbundlechangegrouppart
149fc8a44184 bundle2: client side support for a part to import external bundles
Mike Hommey <mh@glandium.org>
parents:
diff changeset
    82
  > EOF
149fc8a44184 bundle2: client side support for a part to import external bundles
Mike Hommey <mh@glandium.org>
parents:
diff changeset
    83
149fc8a44184 bundle2: client side support for a part to import external bundles
Mike Hommey <mh@glandium.org>
parents:
diff changeset
    84
Start a simple HTTP server to serve bundles
149fc8a44184 bundle2: client side support for a part to import external bundles
Mike Hommey <mh@glandium.org>
parents:
diff changeset
    85
32940
75be14993fda cleanup: use $PYTHON to run python in many more tests
Augie Fackler <augie@google.com>
parents: 31326
diff changeset
    86
  $ $PYTHON "$TESTDIR/dumbhttp.py" -p $HGPORT --pid dumb.pid
23029
149fc8a44184 bundle2: client side support for a part to import external bundles
Mike Hommey <mh@glandium.org>
parents:
diff changeset
    87
  $ cat dumb.pid >> $DAEMON_PIDS
149fc8a44184 bundle2: client side support for a part to import external bundles
Mike Hommey <mh@glandium.org>
parents:
diff changeset
    88
149fc8a44184 bundle2: client side support for a part to import external bundles
Mike Hommey <mh@glandium.org>
parents:
diff changeset
    89
  $ cat >> $HGRCPATH << EOF
149fc8a44184 bundle2: client side support for a part to import external bundles
Mike Hommey <mh@glandium.org>
parents:
diff changeset
    90
  > [ui]
33286
2428e8ec0793 tests: clean up even more direct `python` calls with $PYTHON
Augie Fackler <augie@google.com>
parents: 33261
diff changeset
    91
  > ssh=$PYTHON "$TESTDIR/dummyssh"
23029
149fc8a44184 bundle2: client side support for a part to import external bundles
Mike Hommey <mh@glandium.org>
parents:
diff changeset
    92
  > logtemplate={rev}:{node|short} {phase} {author} {bookmarks} {desc|firstline}
149fc8a44184 bundle2: client side support for a part to import external bundles
Mike Hommey <mh@glandium.org>
parents:
diff changeset
    93
  > EOF
149fc8a44184 bundle2: client side support for a part to import external bundles
Mike Hommey <mh@glandium.org>
parents:
diff changeset
    94
149fc8a44184 bundle2: client side support for a part to import external bundles
Mike Hommey <mh@glandium.org>
parents:
diff changeset
    95
  $ hg init repo
149fc8a44184 bundle2: client side support for a part to import external bundles
Mike Hommey <mh@glandium.org>
parents:
diff changeset
    96
149fc8a44184 bundle2: client side support for a part to import external bundles
Mike Hommey <mh@glandium.org>
parents:
diff changeset
    97
  $ hg -R repo unbundle $TESTDIR/bundles/rebase.hg
149fc8a44184 bundle2: client side support for a part to import external bundles
Mike Hommey <mh@glandium.org>
parents:
diff changeset
    98
  adding changesets
149fc8a44184 bundle2: client side support for a part to import external bundles
Mike Hommey <mh@glandium.org>
parents:
diff changeset
    99
  adding manifests
149fc8a44184 bundle2: client side support for a part to import external bundles
Mike Hommey <mh@glandium.org>
parents:
diff changeset
   100
  adding file changes
149fc8a44184 bundle2: client side support for a part to import external bundles
Mike Hommey <mh@glandium.org>
parents:
diff changeset
   101
  added 8 changesets with 7 changes to 7 files (+2 heads)
34661
eb586ed5d8ce transaction-summary: show the range of new revisions upon pull/unbundle (BC)
Denis Laxalde <denis.laxalde@logilab.fr>
parents: 34101
diff changeset
   102
  new changesets cd010b8cd998:02de42196ebe
23029
149fc8a44184 bundle2: client side support for a part to import external bundles
Mike Hommey <mh@glandium.org>
parents:
diff changeset
   103
  (run 'hg heads' to see heads, 'hg merge' to merge)
149fc8a44184 bundle2: client side support for a part to import external bundles
Mike Hommey <mh@glandium.org>
parents:
diff changeset
   104
149fc8a44184 bundle2: client side support for a part to import external bundles
Mike Hommey <mh@glandium.org>
parents:
diff changeset
   105
  $ hg -R repo log -G
149fc8a44184 bundle2: client side support for a part to import external bundles
Mike Hommey <mh@glandium.org>
parents:
diff changeset
   106
  o  7:02de42196ebe draft Nicolas Dumazet <nicdumz.commits@gmail.com>  H
149fc8a44184 bundle2: client side support for a part to import external bundles
Mike Hommey <mh@glandium.org>
parents:
diff changeset
   107
  |
149fc8a44184 bundle2: client side support for a part to import external bundles
Mike Hommey <mh@glandium.org>
parents:
diff changeset
   108
  | o  6:eea13746799a draft Nicolas Dumazet <nicdumz.commits@gmail.com>  G
149fc8a44184 bundle2: client side support for a part to import external bundles
Mike Hommey <mh@glandium.org>
parents:
diff changeset
   109
  |/|
149fc8a44184 bundle2: client side support for a part to import external bundles
Mike Hommey <mh@glandium.org>
parents:
diff changeset
   110
  o |  5:24b6387c8c8c draft Nicolas Dumazet <nicdumz.commits@gmail.com>  F
149fc8a44184 bundle2: client side support for a part to import external bundles
Mike Hommey <mh@glandium.org>
parents:
diff changeset
   111
  | |
149fc8a44184 bundle2: client side support for a part to import external bundles
Mike Hommey <mh@glandium.org>
parents:
diff changeset
   112
  | o  4:9520eea781bc draft Nicolas Dumazet <nicdumz.commits@gmail.com>  E
149fc8a44184 bundle2: client side support for a part to import external bundles
Mike Hommey <mh@glandium.org>
parents:
diff changeset
   113
  |/
149fc8a44184 bundle2: client side support for a part to import external bundles
Mike Hommey <mh@glandium.org>
parents:
diff changeset
   114
  | o  3:32af7686d403 draft Nicolas Dumazet <nicdumz.commits@gmail.com>  D
149fc8a44184 bundle2: client side support for a part to import external bundles
Mike Hommey <mh@glandium.org>
parents:
diff changeset
   115
  | |
149fc8a44184 bundle2: client side support for a part to import external bundles
Mike Hommey <mh@glandium.org>
parents:
diff changeset
   116
  | o  2:5fddd98957c8 draft Nicolas Dumazet <nicdumz.commits@gmail.com>  C
149fc8a44184 bundle2: client side support for a part to import external bundles
Mike Hommey <mh@glandium.org>
parents:
diff changeset
   117
  | |
149fc8a44184 bundle2: client side support for a part to import external bundles
Mike Hommey <mh@glandium.org>
parents:
diff changeset
   118
  | o  1:42ccdea3bb16 draft Nicolas Dumazet <nicdumz.commits@gmail.com>  B
149fc8a44184 bundle2: client side support for a part to import external bundles
Mike Hommey <mh@glandium.org>
parents:
diff changeset
   119
  |/
149fc8a44184 bundle2: client side support for a part to import external bundles
Mike Hommey <mh@glandium.org>
parents:
diff changeset
   120
  o  0:cd010b8cd998 draft Nicolas Dumazet <nicdumz.commits@gmail.com>  A
149fc8a44184 bundle2: client side support for a part to import external bundles
Mike Hommey <mh@glandium.org>
parents:
diff changeset
   121
  
149fc8a44184 bundle2: client side support for a part to import external bundles
Mike Hommey <mh@glandium.org>
parents:
diff changeset
   122
  $ hg clone repo orig
149fc8a44184 bundle2: client side support for a part to import external bundles
Mike Hommey <mh@glandium.org>
parents:
diff changeset
   123
  updating to branch default
149fc8a44184 bundle2: client side support for a part to import external bundles
Mike Hommey <mh@glandium.org>
parents:
diff changeset
   124
  3 files updated, 0 files merged, 0 files removed, 0 files unresolved
149fc8a44184 bundle2: client side support for a part to import external bundles
Mike Hommey <mh@glandium.org>
parents:
diff changeset
   125
149fc8a44184 bundle2: client side support for a part to import external bundles
Mike Hommey <mh@glandium.org>
parents:
diff changeset
   126
  $ cat > repo/.hg/hgrc << EOF
149fc8a44184 bundle2: client side support for a part to import external bundles
Mike Hommey <mh@glandium.org>
parents:
diff changeset
   127
  > [extensions]
149fc8a44184 bundle2: client side support for a part to import external bundles
Mike Hommey <mh@glandium.org>
parents:
diff changeset
   128
  > bundle2=$TESTTMP/bundle2.py
149fc8a44184 bundle2: client side support for a part to import external bundles
Mike Hommey <mh@glandium.org>
parents:
diff changeset
   129
  > EOF
149fc8a44184 bundle2: client side support for a part to import external bundles
Mike Hommey <mh@glandium.org>
parents:
diff changeset
   130
149fc8a44184 bundle2: client side support for a part to import external bundles
Mike Hommey <mh@glandium.org>
parents:
diff changeset
   131
Test a pull with an remote-changegroup
149fc8a44184 bundle2: client side support for a part to import external bundles
Mike Hommey <mh@glandium.org>
parents:
diff changeset
   132
26773
ec7e0dbe56d5 test: enforce v1 type in 'test-bundle2-remote-changegroup.t'
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 25495
diff changeset
   133
  $ hg bundle -R repo --type v1 --base '0:4' -r '5:7' bundle.hg
23029
149fc8a44184 bundle2: client side support for a part to import external bundles
Mike Hommey <mh@glandium.org>
parents:
diff changeset
   134
  3 changesets found
149fc8a44184 bundle2: client side support for a part to import external bundles
Mike Hommey <mh@glandium.org>
parents:
diff changeset
   135
  $ cat > repo/.hg/bundle2maker << EOF
149fc8a44184 bundle2: client side support for a part to import external bundles
Mike Hommey <mh@glandium.org>
parents:
diff changeset
   136
  > remote-changegroup http://localhost:$HGPORT/bundle.hg bundle.hg
149fc8a44184 bundle2: client side support for a part to import external bundles
Mike Hommey <mh@glandium.org>
parents:
diff changeset
   137
  > EOF
149fc8a44184 bundle2: client side support for a part to import external bundles
Mike Hommey <mh@glandium.org>
parents:
diff changeset
   138
  $ hg clone orig clone -r 3 -r 4
149fc8a44184 bundle2: client side support for a part to import external bundles
Mike Hommey <mh@glandium.org>
parents:
diff changeset
   139
  adding changesets
149fc8a44184 bundle2: client side support for a part to import external bundles
Mike Hommey <mh@glandium.org>
parents:
diff changeset
   140
  adding manifests
149fc8a44184 bundle2: client side support for a part to import external bundles
Mike Hommey <mh@glandium.org>
parents:
diff changeset
   141
  adding file changes
149fc8a44184 bundle2: client side support for a part to import external bundles
Mike Hommey <mh@glandium.org>
parents:
diff changeset
   142
  added 5 changesets with 5 changes to 5 files (+1 heads)
34661
eb586ed5d8ce transaction-summary: show the range of new revisions upon pull/unbundle (BC)
Denis Laxalde <denis.laxalde@logilab.fr>
parents: 34101
diff changeset
   143
  new changesets cd010b8cd998:9520eea781bc
23029
149fc8a44184 bundle2: client side support for a part to import external bundles
Mike Hommey <mh@glandium.org>
parents:
diff changeset
   144
  updating to branch default
149fc8a44184 bundle2: client side support for a part to import external bundles
Mike Hommey <mh@glandium.org>
parents:
diff changeset
   145
  4 files updated, 0 files merged, 0 files removed, 0 files unresolved
149fc8a44184 bundle2: client side support for a part to import external bundles
Mike Hommey <mh@glandium.org>
parents:
diff changeset
   146
  $ hg pull -R clone ssh://user@dummy/repo
149fc8a44184 bundle2: client side support for a part to import external bundles
Mike Hommey <mh@glandium.org>
parents:
diff changeset
   147
  pulling from ssh://user@dummy/repo
149fc8a44184 bundle2: client side support for a part to import external bundles
Mike Hommey <mh@glandium.org>
parents:
diff changeset
   148
  searching for changes
24686
e0e28e910fa3 bundle2: rename format, parts and config to final names
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 23591
diff changeset
   149
  remote: remote-changegroup
23029
149fc8a44184 bundle2: client side support for a part to import external bundles
Mike Hommey <mh@glandium.org>
parents:
diff changeset
   150
  adding changesets
149fc8a44184 bundle2: client side support for a part to import external bundles
Mike Hommey <mh@glandium.org>
parents:
diff changeset
   151
  adding manifests
149fc8a44184 bundle2: client side support for a part to import external bundles
Mike Hommey <mh@glandium.org>
parents:
diff changeset
   152
  adding file changes
149fc8a44184 bundle2: client side support for a part to import external bundles
Mike Hommey <mh@glandium.org>
parents:
diff changeset
   153
  added 3 changesets with 2 changes to 2 files (+1 heads)
34661
eb586ed5d8ce transaction-summary: show the range of new revisions upon pull/unbundle (BC)
Denis Laxalde <denis.laxalde@logilab.fr>
parents: 34101
diff changeset
   154
  new changesets 24b6387c8c8c:02de42196ebe
23029
149fc8a44184 bundle2: client side support for a part to import external bundles
Mike Hommey <mh@glandium.org>
parents:
diff changeset
   155
  (run 'hg heads .' to see heads, 'hg merge' to merge)
149fc8a44184 bundle2: client side support for a part to import external bundles
Mike Hommey <mh@glandium.org>
parents:
diff changeset
   156
  $ hg -R clone log -G
149fc8a44184 bundle2: client side support for a part to import external bundles
Mike Hommey <mh@glandium.org>
parents:
diff changeset
   157
  o  7:02de42196ebe public Nicolas Dumazet <nicdumz.commits@gmail.com>  H
149fc8a44184 bundle2: client side support for a part to import external bundles
Mike Hommey <mh@glandium.org>
parents:
diff changeset
   158
  |
149fc8a44184 bundle2: client side support for a part to import external bundles
Mike Hommey <mh@glandium.org>
parents:
diff changeset
   159
  | o  6:eea13746799a public Nicolas Dumazet <nicdumz.commits@gmail.com>  G
149fc8a44184 bundle2: client side support for a part to import external bundles
Mike Hommey <mh@glandium.org>
parents:
diff changeset
   160
  |/|
149fc8a44184 bundle2: client side support for a part to import external bundles
Mike Hommey <mh@glandium.org>
parents:
diff changeset
   161
  o |  5:24b6387c8c8c public Nicolas Dumazet <nicdumz.commits@gmail.com>  F
149fc8a44184 bundle2: client side support for a part to import external bundles
Mike Hommey <mh@glandium.org>
parents:
diff changeset
   162
  | |
149fc8a44184 bundle2: client side support for a part to import external bundles
Mike Hommey <mh@glandium.org>
parents:
diff changeset
   163
  | o  4:9520eea781bc public Nicolas Dumazet <nicdumz.commits@gmail.com>  E
149fc8a44184 bundle2: client side support for a part to import external bundles
Mike Hommey <mh@glandium.org>
parents:
diff changeset
   164
  |/
149fc8a44184 bundle2: client side support for a part to import external bundles
Mike Hommey <mh@glandium.org>
parents:
diff changeset
   165
  | @  3:32af7686d403 public Nicolas Dumazet <nicdumz.commits@gmail.com>  D
149fc8a44184 bundle2: client side support for a part to import external bundles
Mike Hommey <mh@glandium.org>
parents:
diff changeset
   166
  | |
149fc8a44184 bundle2: client side support for a part to import external bundles
Mike Hommey <mh@glandium.org>
parents:
diff changeset
   167
  | o  2:5fddd98957c8 public Nicolas Dumazet <nicdumz.commits@gmail.com>  C
149fc8a44184 bundle2: client side support for a part to import external bundles
Mike Hommey <mh@glandium.org>
parents:
diff changeset
   168
  | |
149fc8a44184 bundle2: client side support for a part to import external bundles
Mike Hommey <mh@glandium.org>
parents:
diff changeset
   169
  | o  1:42ccdea3bb16 public Nicolas Dumazet <nicdumz.commits@gmail.com>  B
149fc8a44184 bundle2: client side support for a part to import external bundles
Mike Hommey <mh@glandium.org>
parents:
diff changeset
   170
  |/
149fc8a44184 bundle2: client side support for a part to import external bundles
Mike Hommey <mh@glandium.org>
parents:
diff changeset
   171
  o  0:cd010b8cd998 public Nicolas Dumazet <nicdumz.commits@gmail.com>  A
149fc8a44184 bundle2: client side support for a part to import external bundles
Mike Hommey <mh@glandium.org>
parents:
diff changeset
   172
  
149fc8a44184 bundle2: client side support for a part to import external bundles
Mike Hommey <mh@glandium.org>
parents:
diff changeset
   173
  $ rm -rf clone
149fc8a44184 bundle2: client side support for a part to import external bundles
Mike Hommey <mh@glandium.org>
parents:
diff changeset
   174
149fc8a44184 bundle2: client side support for a part to import external bundles
Mike Hommey <mh@glandium.org>
parents:
diff changeset
   175
Test a pull with an remote-changegroup and a following changegroup
149fc8a44184 bundle2: client side support for a part to import external bundles
Mike Hommey <mh@glandium.org>
parents:
diff changeset
   176
26773
ec7e0dbe56d5 test: enforce v1 type in 'test-bundle2-remote-changegroup.t'
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 25495
diff changeset
   177
  $ hg bundle -R repo --type v1 --base 2 -r '3:4' bundle2.hg
23029
149fc8a44184 bundle2: client side support for a part to import external bundles
Mike Hommey <mh@glandium.org>
parents:
diff changeset
   178
  2 changesets found
149fc8a44184 bundle2: client side support for a part to import external bundles
Mike Hommey <mh@glandium.org>
parents:
diff changeset
   179
  $ cat > repo/.hg/bundle2maker << EOF
149fc8a44184 bundle2: client side support for a part to import external bundles
Mike Hommey <mh@glandium.org>
parents:
diff changeset
   180
  > remote-changegroup http://localhost:$HGPORT/bundle2.hg bundle2.hg
149fc8a44184 bundle2: client side support for a part to import external bundles
Mike Hommey <mh@glandium.org>
parents:
diff changeset
   181
  > changegroup 0:4 5:7
149fc8a44184 bundle2: client side support for a part to import external bundles
Mike Hommey <mh@glandium.org>
parents:
diff changeset
   182
  > EOF
149fc8a44184 bundle2: client side support for a part to import external bundles
Mike Hommey <mh@glandium.org>
parents:
diff changeset
   183
  $ hg clone orig clone -r 2
149fc8a44184 bundle2: client side support for a part to import external bundles
Mike Hommey <mh@glandium.org>
parents:
diff changeset
   184
  adding changesets
149fc8a44184 bundle2: client side support for a part to import external bundles
Mike Hommey <mh@glandium.org>
parents:
diff changeset
   185
  adding manifests
149fc8a44184 bundle2: client side support for a part to import external bundles
Mike Hommey <mh@glandium.org>
parents:
diff changeset
   186
  adding file changes
149fc8a44184 bundle2: client side support for a part to import external bundles
Mike Hommey <mh@glandium.org>
parents:
diff changeset
   187
  added 3 changesets with 3 changes to 3 files
34661
eb586ed5d8ce transaction-summary: show the range of new revisions upon pull/unbundle (BC)
Denis Laxalde <denis.laxalde@logilab.fr>
parents: 34101
diff changeset
   188
  new changesets cd010b8cd998:5fddd98957c8
23029
149fc8a44184 bundle2: client side support for a part to import external bundles
Mike Hommey <mh@glandium.org>
parents:
diff changeset
   189
  updating to branch default
149fc8a44184 bundle2: client side support for a part to import external bundles
Mike Hommey <mh@glandium.org>
parents:
diff changeset
   190
  3 files updated, 0 files merged, 0 files removed, 0 files unresolved
149fc8a44184 bundle2: client side support for a part to import external bundles
Mike Hommey <mh@glandium.org>
parents:
diff changeset
   191
  $ hg pull -R clone ssh://user@dummy/repo
149fc8a44184 bundle2: client side support for a part to import external bundles
Mike Hommey <mh@glandium.org>
parents:
diff changeset
   192
  pulling from ssh://user@dummy/repo
149fc8a44184 bundle2: client side support for a part to import external bundles
Mike Hommey <mh@glandium.org>
parents:
diff changeset
   193
  searching for changes
24686
e0e28e910fa3 bundle2: rename format, parts and config to final names
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 23591
diff changeset
   194
  remote: remote-changegroup
23029
149fc8a44184 bundle2: client side support for a part to import external bundles
Mike Hommey <mh@glandium.org>
parents:
diff changeset
   195
  adding changesets
149fc8a44184 bundle2: client side support for a part to import external bundles
Mike Hommey <mh@glandium.org>
parents:
diff changeset
   196
  adding manifests
149fc8a44184 bundle2: client side support for a part to import external bundles
Mike Hommey <mh@glandium.org>
parents:
diff changeset
   197
  adding file changes
149fc8a44184 bundle2: client side support for a part to import external bundles
Mike Hommey <mh@glandium.org>
parents:
diff changeset
   198
  added 2 changesets with 2 changes to 2 files (+1 heads)
24686
e0e28e910fa3 bundle2: rename format, parts and config to final names
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 23591
diff changeset
   199
  remote: changegroup
23029
149fc8a44184 bundle2: client side support for a part to import external bundles
Mike Hommey <mh@glandium.org>
parents:
diff changeset
   200
  adding changesets
149fc8a44184 bundle2: client side support for a part to import external bundles
Mike Hommey <mh@glandium.org>
parents:
diff changeset
   201
  adding manifests
149fc8a44184 bundle2: client side support for a part to import external bundles
Mike Hommey <mh@glandium.org>
parents:
diff changeset
   202
  adding file changes
149fc8a44184 bundle2: client side support for a part to import external bundles
Mike Hommey <mh@glandium.org>
parents:
diff changeset
   203
  added 3 changesets with 2 changes to 2 files (+1 heads)
34661
eb586ed5d8ce transaction-summary: show the range of new revisions upon pull/unbundle (BC)
Denis Laxalde <denis.laxalde@logilab.fr>
parents: 34101
diff changeset
   204
  new changesets 32af7686d403:02de42196ebe
23029
149fc8a44184 bundle2: client side support for a part to import external bundles
Mike Hommey <mh@glandium.org>
parents:
diff changeset
   205
  (run 'hg heads' to see heads, 'hg merge' to merge)
149fc8a44184 bundle2: client side support for a part to import external bundles
Mike Hommey <mh@glandium.org>
parents:
diff changeset
   206
  $ hg -R clone log -G
149fc8a44184 bundle2: client side support for a part to import external bundles
Mike Hommey <mh@glandium.org>
parents:
diff changeset
   207
  o  7:02de42196ebe public Nicolas Dumazet <nicdumz.commits@gmail.com>  H
149fc8a44184 bundle2: client side support for a part to import external bundles
Mike Hommey <mh@glandium.org>
parents:
diff changeset
   208
  |
149fc8a44184 bundle2: client side support for a part to import external bundles
Mike Hommey <mh@glandium.org>
parents:
diff changeset
   209
  | o  6:eea13746799a public Nicolas Dumazet <nicdumz.commits@gmail.com>  G
149fc8a44184 bundle2: client side support for a part to import external bundles
Mike Hommey <mh@glandium.org>
parents:
diff changeset
   210
  |/|
149fc8a44184 bundle2: client side support for a part to import external bundles
Mike Hommey <mh@glandium.org>
parents:
diff changeset
   211
  o |  5:24b6387c8c8c public Nicolas Dumazet <nicdumz.commits@gmail.com>  F
149fc8a44184 bundle2: client side support for a part to import external bundles
Mike Hommey <mh@glandium.org>
parents:
diff changeset
   212
  | |
149fc8a44184 bundle2: client side support for a part to import external bundles
Mike Hommey <mh@glandium.org>
parents:
diff changeset
   213
  | o  4:9520eea781bc public Nicolas Dumazet <nicdumz.commits@gmail.com>  E
149fc8a44184 bundle2: client side support for a part to import external bundles
Mike Hommey <mh@glandium.org>
parents:
diff changeset
   214
  |/
149fc8a44184 bundle2: client side support for a part to import external bundles
Mike Hommey <mh@glandium.org>
parents:
diff changeset
   215
  | o  3:32af7686d403 public Nicolas Dumazet <nicdumz.commits@gmail.com>  D
149fc8a44184 bundle2: client side support for a part to import external bundles
Mike Hommey <mh@glandium.org>
parents:
diff changeset
   216
  | |
149fc8a44184 bundle2: client side support for a part to import external bundles
Mike Hommey <mh@glandium.org>
parents:
diff changeset
   217
  | @  2:5fddd98957c8 public Nicolas Dumazet <nicdumz.commits@gmail.com>  C
149fc8a44184 bundle2: client side support for a part to import external bundles
Mike Hommey <mh@glandium.org>
parents:
diff changeset
   218
  | |
149fc8a44184 bundle2: client side support for a part to import external bundles
Mike Hommey <mh@glandium.org>
parents:
diff changeset
   219
  | o  1:42ccdea3bb16 public Nicolas Dumazet <nicdumz.commits@gmail.com>  B
149fc8a44184 bundle2: client side support for a part to import external bundles
Mike Hommey <mh@glandium.org>
parents:
diff changeset
   220
  |/
149fc8a44184 bundle2: client side support for a part to import external bundles
Mike Hommey <mh@glandium.org>
parents:
diff changeset
   221
  o  0:cd010b8cd998 public Nicolas Dumazet <nicdumz.commits@gmail.com>  A
149fc8a44184 bundle2: client side support for a part to import external bundles
Mike Hommey <mh@glandium.org>
parents:
diff changeset
   222
  
149fc8a44184 bundle2: client side support for a part to import external bundles
Mike Hommey <mh@glandium.org>
parents:
diff changeset
   223
  $ rm -rf clone
149fc8a44184 bundle2: client side support for a part to import external bundles
Mike Hommey <mh@glandium.org>
parents:
diff changeset
   224
149fc8a44184 bundle2: client side support for a part to import external bundles
Mike Hommey <mh@glandium.org>
parents:
diff changeset
   225
Test a pull with a changegroup followed by an remote-changegroup
149fc8a44184 bundle2: client side support for a part to import external bundles
Mike Hommey <mh@glandium.org>
parents:
diff changeset
   226
26773
ec7e0dbe56d5 test: enforce v1 type in 'test-bundle2-remote-changegroup.t'
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 25495
diff changeset
   227
  $ hg bundle -R repo --type v1 --base '0:4' -r '5:7' bundle3.hg
23029
149fc8a44184 bundle2: client side support for a part to import external bundles
Mike Hommey <mh@glandium.org>
parents:
diff changeset
   228
  3 changesets found
149fc8a44184 bundle2: client side support for a part to import external bundles
Mike Hommey <mh@glandium.org>
parents:
diff changeset
   229
  $ cat > repo/.hg/bundle2maker << EOF
149fc8a44184 bundle2: client side support for a part to import external bundles
Mike Hommey <mh@glandium.org>
parents:
diff changeset
   230
  > changegroup 000000000000 :4
149fc8a44184 bundle2: client side support for a part to import external bundles
Mike Hommey <mh@glandium.org>
parents:
diff changeset
   231
  > remote-changegroup http://localhost:$HGPORT/bundle3.hg bundle3.hg
149fc8a44184 bundle2: client side support for a part to import external bundles
Mike Hommey <mh@glandium.org>
parents:
diff changeset
   232
  > EOF
149fc8a44184 bundle2: client side support for a part to import external bundles
Mike Hommey <mh@glandium.org>
parents:
diff changeset
   233
  $ hg clone orig clone -r 2
149fc8a44184 bundle2: client side support for a part to import external bundles
Mike Hommey <mh@glandium.org>
parents:
diff changeset
   234
  adding changesets
149fc8a44184 bundle2: client side support for a part to import external bundles
Mike Hommey <mh@glandium.org>
parents:
diff changeset
   235
  adding manifests
149fc8a44184 bundle2: client side support for a part to import external bundles
Mike Hommey <mh@glandium.org>
parents:
diff changeset
   236
  adding file changes
149fc8a44184 bundle2: client side support for a part to import external bundles
Mike Hommey <mh@glandium.org>
parents:
diff changeset
   237
  added 3 changesets with 3 changes to 3 files
34661
eb586ed5d8ce transaction-summary: show the range of new revisions upon pull/unbundle (BC)
Denis Laxalde <denis.laxalde@logilab.fr>
parents: 34101
diff changeset
   238
  new changesets cd010b8cd998:5fddd98957c8
23029
149fc8a44184 bundle2: client side support for a part to import external bundles
Mike Hommey <mh@glandium.org>
parents:
diff changeset
   239
  updating to branch default
149fc8a44184 bundle2: client side support for a part to import external bundles
Mike Hommey <mh@glandium.org>
parents:
diff changeset
   240
  3 files updated, 0 files merged, 0 files removed, 0 files unresolved
149fc8a44184 bundle2: client side support for a part to import external bundles
Mike Hommey <mh@glandium.org>
parents:
diff changeset
   241
  $ hg pull -R clone ssh://user@dummy/repo
149fc8a44184 bundle2: client side support for a part to import external bundles
Mike Hommey <mh@glandium.org>
parents:
diff changeset
   242
  pulling from ssh://user@dummy/repo
149fc8a44184 bundle2: client side support for a part to import external bundles
Mike Hommey <mh@glandium.org>
parents:
diff changeset
   243
  searching for changes
24686
e0e28e910fa3 bundle2: rename format, parts and config to final names
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 23591
diff changeset
   244
  remote: changegroup
23029
149fc8a44184 bundle2: client side support for a part to import external bundles
Mike Hommey <mh@glandium.org>
parents:
diff changeset
   245
  adding changesets
149fc8a44184 bundle2: client side support for a part to import external bundles
Mike Hommey <mh@glandium.org>
parents:
diff changeset
   246
  adding manifests
149fc8a44184 bundle2: client side support for a part to import external bundles
Mike Hommey <mh@glandium.org>
parents:
diff changeset
   247
  adding file changes
149fc8a44184 bundle2: client side support for a part to import external bundles
Mike Hommey <mh@glandium.org>
parents:
diff changeset
   248
  added 2 changesets with 2 changes to 2 files (+1 heads)
24686
e0e28e910fa3 bundle2: rename format, parts and config to final names
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 23591
diff changeset
   249
  remote: remote-changegroup
23029
149fc8a44184 bundle2: client side support for a part to import external bundles
Mike Hommey <mh@glandium.org>
parents:
diff changeset
   250
  adding changesets
149fc8a44184 bundle2: client side support for a part to import external bundles
Mike Hommey <mh@glandium.org>
parents:
diff changeset
   251
  adding manifests
149fc8a44184 bundle2: client side support for a part to import external bundles
Mike Hommey <mh@glandium.org>
parents:
diff changeset
   252
  adding file changes
149fc8a44184 bundle2: client side support for a part to import external bundles
Mike Hommey <mh@glandium.org>
parents:
diff changeset
   253
  added 3 changesets with 2 changes to 2 files (+1 heads)
34661
eb586ed5d8ce transaction-summary: show the range of new revisions upon pull/unbundle (BC)
Denis Laxalde <denis.laxalde@logilab.fr>
parents: 34101
diff changeset
   254
  new changesets 32af7686d403:02de42196ebe
23029
149fc8a44184 bundle2: client side support for a part to import external bundles
Mike Hommey <mh@glandium.org>
parents:
diff changeset
   255
  (run 'hg heads' to see heads, 'hg merge' to merge)
149fc8a44184 bundle2: client side support for a part to import external bundles
Mike Hommey <mh@glandium.org>
parents:
diff changeset
   256
  $ hg -R clone log -G
149fc8a44184 bundle2: client side support for a part to import external bundles
Mike Hommey <mh@glandium.org>
parents:
diff changeset
   257
  o  7:02de42196ebe public Nicolas Dumazet <nicdumz.commits@gmail.com>  H
149fc8a44184 bundle2: client side support for a part to import external bundles
Mike Hommey <mh@glandium.org>
parents:
diff changeset
   258
  |
149fc8a44184 bundle2: client side support for a part to import external bundles
Mike Hommey <mh@glandium.org>
parents:
diff changeset
   259
  | o  6:eea13746799a public Nicolas Dumazet <nicdumz.commits@gmail.com>  G
149fc8a44184 bundle2: client side support for a part to import external bundles
Mike Hommey <mh@glandium.org>
parents:
diff changeset
   260
  |/|
149fc8a44184 bundle2: client side support for a part to import external bundles
Mike Hommey <mh@glandium.org>
parents:
diff changeset
   261
  o |  5:24b6387c8c8c public Nicolas Dumazet <nicdumz.commits@gmail.com>  F
149fc8a44184 bundle2: client side support for a part to import external bundles
Mike Hommey <mh@glandium.org>
parents:
diff changeset
   262
  | |
149fc8a44184 bundle2: client side support for a part to import external bundles
Mike Hommey <mh@glandium.org>
parents:
diff changeset
   263
  | o  4:9520eea781bc public Nicolas Dumazet <nicdumz.commits@gmail.com>  E
149fc8a44184 bundle2: client side support for a part to import external bundles
Mike Hommey <mh@glandium.org>
parents:
diff changeset
   264
  |/
149fc8a44184 bundle2: client side support for a part to import external bundles
Mike Hommey <mh@glandium.org>
parents:
diff changeset
   265
  | o  3:32af7686d403 public Nicolas Dumazet <nicdumz.commits@gmail.com>  D
149fc8a44184 bundle2: client side support for a part to import external bundles
Mike Hommey <mh@glandium.org>
parents:
diff changeset
   266
  | |
149fc8a44184 bundle2: client side support for a part to import external bundles
Mike Hommey <mh@glandium.org>
parents:
diff changeset
   267
  | @  2:5fddd98957c8 public Nicolas Dumazet <nicdumz.commits@gmail.com>  C
149fc8a44184 bundle2: client side support for a part to import external bundles
Mike Hommey <mh@glandium.org>
parents:
diff changeset
   268
  | |
149fc8a44184 bundle2: client side support for a part to import external bundles
Mike Hommey <mh@glandium.org>
parents:
diff changeset
   269
  | o  1:42ccdea3bb16 public Nicolas Dumazet <nicdumz.commits@gmail.com>  B
149fc8a44184 bundle2: client side support for a part to import external bundles
Mike Hommey <mh@glandium.org>
parents:
diff changeset
   270
  |/
149fc8a44184 bundle2: client side support for a part to import external bundles
Mike Hommey <mh@glandium.org>
parents:
diff changeset
   271
  o  0:cd010b8cd998 public Nicolas Dumazet <nicdumz.commits@gmail.com>  A
149fc8a44184 bundle2: client side support for a part to import external bundles
Mike Hommey <mh@glandium.org>
parents:
diff changeset
   272
  
149fc8a44184 bundle2: client side support for a part to import external bundles
Mike Hommey <mh@glandium.org>
parents:
diff changeset
   273
  $ rm -rf clone
149fc8a44184 bundle2: client side support for a part to import external bundles
Mike Hommey <mh@glandium.org>
parents:
diff changeset
   274
149fc8a44184 bundle2: client side support for a part to import external bundles
Mike Hommey <mh@glandium.org>
parents:
diff changeset
   275
Test a pull with two remote-changegroups and a changegroup
149fc8a44184 bundle2: client side support for a part to import external bundles
Mike Hommey <mh@glandium.org>
parents:
diff changeset
   276
26773
ec7e0dbe56d5 test: enforce v1 type in 'test-bundle2-remote-changegroup.t'
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 25495
diff changeset
   277
  $ hg bundle -R repo --type v1 --base 2 -r '3:4' bundle4.hg
23029
149fc8a44184 bundle2: client side support for a part to import external bundles
Mike Hommey <mh@glandium.org>
parents:
diff changeset
   278
  2 changesets found
26773
ec7e0dbe56d5 test: enforce v1 type in 'test-bundle2-remote-changegroup.t'
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 25495
diff changeset
   279
  $ hg bundle -R repo --type v1 --base '3:4' -r '5:6' bundle5.hg
23029
149fc8a44184 bundle2: client side support for a part to import external bundles
Mike Hommey <mh@glandium.org>
parents:
diff changeset
   280
  2 changesets found
149fc8a44184 bundle2: client side support for a part to import external bundles
Mike Hommey <mh@glandium.org>
parents:
diff changeset
   281
  $ cat > repo/.hg/bundle2maker << EOF
149fc8a44184 bundle2: client side support for a part to import external bundles
Mike Hommey <mh@glandium.org>
parents:
diff changeset
   282
  > remote-changegroup http://localhost:$HGPORT/bundle4.hg bundle4.hg
149fc8a44184 bundle2: client side support for a part to import external bundles
Mike Hommey <mh@glandium.org>
parents:
diff changeset
   283
  > remote-changegroup http://localhost:$HGPORT/bundle5.hg bundle5.hg
149fc8a44184 bundle2: client side support for a part to import external bundles
Mike Hommey <mh@glandium.org>
parents:
diff changeset
   284
  > changegroup 0:6 7
149fc8a44184 bundle2: client side support for a part to import external bundles
Mike Hommey <mh@glandium.org>
parents:
diff changeset
   285
  > EOF
149fc8a44184 bundle2: client side support for a part to import external bundles
Mike Hommey <mh@glandium.org>
parents:
diff changeset
   286
  $ hg clone orig clone -r 2
149fc8a44184 bundle2: client side support for a part to import external bundles
Mike Hommey <mh@glandium.org>
parents:
diff changeset
   287
  adding changesets
149fc8a44184 bundle2: client side support for a part to import external bundles
Mike Hommey <mh@glandium.org>
parents:
diff changeset
   288
  adding manifests
149fc8a44184 bundle2: client side support for a part to import external bundles
Mike Hommey <mh@glandium.org>
parents:
diff changeset
   289
  adding file changes
149fc8a44184 bundle2: client side support for a part to import external bundles
Mike Hommey <mh@glandium.org>
parents:
diff changeset
   290
  added 3 changesets with 3 changes to 3 files
34661
eb586ed5d8ce transaction-summary: show the range of new revisions upon pull/unbundle (BC)
Denis Laxalde <denis.laxalde@logilab.fr>
parents: 34101
diff changeset
   291
  new changesets cd010b8cd998:5fddd98957c8
23029
149fc8a44184 bundle2: client side support for a part to import external bundles
Mike Hommey <mh@glandium.org>
parents:
diff changeset
   292
  updating to branch default
149fc8a44184 bundle2: client side support for a part to import external bundles
Mike Hommey <mh@glandium.org>
parents:
diff changeset
   293
  3 files updated, 0 files merged, 0 files removed, 0 files unresolved
149fc8a44184 bundle2: client side support for a part to import external bundles
Mike Hommey <mh@glandium.org>
parents:
diff changeset
   294
  $ hg pull -R clone ssh://user@dummy/repo
149fc8a44184 bundle2: client side support for a part to import external bundles
Mike Hommey <mh@glandium.org>
parents:
diff changeset
   295
  pulling from ssh://user@dummy/repo
149fc8a44184 bundle2: client side support for a part to import external bundles
Mike Hommey <mh@glandium.org>
parents:
diff changeset
   296
  searching for changes
24686
e0e28e910fa3 bundle2: rename format, parts and config to final names
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 23591
diff changeset
   297
  remote: remote-changegroup
23029
149fc8a44184 bundle2: client side support for a part to import external bundles
Mike Hommey <mh@glandium.org>
parents:
diff changeset
   298
  adding changesets
149fc8a44184 bundle2: client side support for a part to import external bundles
Mike Hommey <mh@glandium.org>
parents:
diff changeset
   299
  adding manifests
149fc8a44184 bundle2: client side support for a part to import external bundles
Mike Hommey <mh@glandium.org>
parents:
diff changeset
   300
  adding file changes
149fc8a44184 bundle2: client side support for a part to import external bundles
Mike Hommey <mh@glandium.org>
parents:
diff changeset
   301
  added 2 changesets with 2 changes to 2 files (+1 heads)
24686
e0e28e910fa3 bundle2: rename format, parts and config to final names
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 23591
diff changeset
   302
  remote: remote-changegroup
23029
149fc8a44184 bundle2: client side support for a part to import external bundles
Mike Hommey <mh@glandium.org>
parents:
diff changeset
   303
  adding changesets
149fc8a44184 bundle2: client side support for a part to import external bundles
Mike Hommey <mh@glandium.org>
parents:
diff changeset
   304
  adding manifests
149fc8a44184 bundle2: client side support for a part to import external bundles
Mike Hommey <mh@glandium.org>
parents:
diff changeset
   305
  adding file changes
149fc8a44184 bundle2: client side support for a part to import external bundles
Mike Hommey <mh@glandium.org>
parents:
diff changeset
   306
  added 2 changesets with 1 changes to 1 files
24686
e0e28e910fa3 bundle2: rename format, parts and config to final names
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 23591
diff changeset
   307
  remote: changegroup
23029
149fc8a44184 bundle2: client side support for a part to import external bundles
Mike Hommey <mh@glandium.org>
parents:
diff changeset
   308
  adding changesets
149fc8a44184 bundle2: client side support for a part to import external bundles
Mike Hommey <mh@glandium.org>
parents:
diff changeset
   309
  adding manifests
149fc8a44184 bundle2: client side support for a part to import external bundles
Mike Hommey <mh@glandium.org>
parents:
diff changeset
   310
  adding file changes
149fc8a44184 bundle2: client side support for a part to import external bundles
Mike Hommey <mh@glandium.org>
parents:
diff changeset
   311
  added 1 changesets with 1 changes to 1 files (+1 heads)
34661
eb586ed5d8ce transaction-summary: show the range of new revisions upon pull/unbundle (BC)
Denis Laxalde <denis.laxalde@logilab.fr>
parents: 34101
diff changeset
   312
  new changesets 32af7686d403:02de42196ebe
23029
149fc8a44184 bundle2: client side support for a part to import external bundles
Mike Hommey <mh@glandium.org>
parents:
diff changeset
   313
  (run 'hg heads' to see heads, 'hg merge' to merge)
149fc8a44184 bundle2: client side support for a part to import external bundles
Mike Hommey <mh@glandium.org>
parents:
diff changeset
   314
  $ hg -R clone log -G
149fc8a44184 bundle2: client side support for a part to import external bundles
Mike Hommey <mh@glandium.org>
parents:
diff changeset
   315
  o  7:02de42196ebe public Nicolas Dumazet <nicdumz.commits@gmail.com>  H
149fc8a44184 bundle2: client side support for a part to import external bundles
Mike Hommey <mh@glandium.org>
parents:
diff changeset
   316
  |
149fc8a44184 bundle2: client side support for a part to import external bundles
Mike Hommey <mh@glandium.org>
parents:
diff changeset
   317
  | o  6:eea13746799a public Nicolas Dumazet <nicdumz.commits@gmail.com>  G
149fc8a44184 bundle2: client side support for a part to import external bundles
Mike Hommey <mh@glandium.org>
parents:
diff changeset
   318
  |/|
149fc8a44184 bundle2: client side support for a part to import external bundles
Mike Hommey <mh@glandium.org>
parents:
diff changeset
   319
  o |  5:24b6387c8c8c public Nicolas Dumazet <nicdumz.commits@gmail.com>  F
149fc8a44184 bundle2: client side support for a part to import external bundles
Mike Hommey <mh@glandium.org>
parents:
diff changeset
   320
  | |
149fc8a44184 bundle2: client side support for a part to import external bundles
Mike Hommey <mh@glandium.org>
parents:
diff changeset
   321
  | o  4:9520eea781bc public Nicolas Dumazet <nicdumz.commits@gmail.com>  E
149fc8a44184 bundle2: client side support for a part to import external bundles
Mike Hommey <mh@glandium.org>
parents:
diff changeset
   322
  |/
149fc8a44184 bundle2: client side support for a part to import external bundles
Mike Hommey <mh@glandium.org>
parents:
diff changeset
   323
  | o  3:32af7686d403 public Nicolas Dumazet <nicdumz.commits@gmail.com>  D
149fc8a44184 bundle2: client side support for a part to import external bundles
Mike Hommey <mh@glandium.org>
parents:
diff changeset
   324
  | |
149fc8a44184 bundle2: client side support for a part to import external bundles
Mike Hommey <mh@glandium.org>
parents:
diff changeset
   325
  | @  2:5fddd98957c8 public Nicolas Dumazet <nicdumz.commits@gmail.com>  C
149fc8a44184 bundle2: client side support for a part to import external bundles
Mike Hommey <mh@glandium.org>
parents:
diff changeset
   326
  | |
149fc8a44184 bundle2: client side support for a part to import external bundles
Mike Hommey <mh@glandium.org>
parents:
diff changeset
   327
  | o  1:42ccdea3bb16 public Nicolas Dumazet <nicdumz.commits@gmail.com>  B
149fc8a44184 bundle2: client side support for a part to import external bundles
Mike Hommey <mh@glandium.org>
parents:
diff changeset
   328
  |/
149fc8a44184 bundle2: client side support for a part to import external bundles
Mike Hommey <mh@glandium.org>
parents:
diff changeset
   329
  o  0:cd010b8cd998 public Nicolas Dumazet <nicdumz.commits@gmail.com>  A
149fc8a44184 bundle2: client side support for a part to import external bundles
Mike Hommey <mh@glandium.org>
parents:
diff changeset
   330
  
149fc8a44184 bundle2: client side support for a part to import external bundles
Mike Hommey <mh@glandium.org>
parents:
diff changeset
   331
  $ rm -rf clone
149fc8a44184 bundle2: client side support for a part to import external bundles
Mike Hommey <mh@glandium.org>
parents:
diff changeset
   332
149fc8a44184 bundle2: client side support for a part to import external bundles
Mike Hommey <mh@glandium.org>
parents:
diff changeset
   333
Hash digest tests
149fc8a44184 bundle2: client side support for a part to import external bundles
Mike Hommey <mh@glandium.org>
parents:
diff changeset
   334
26773
ec7e0dbe56d5 test: enforce v1 type in 'test-bundle2-remote-changegroup.t'
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 25495
diff changeset
   335
  $ hg bundle -R repo --type v1 -a bundle6.hg
23029
149fc8a44184 bundle2: client side support for a part to import external bundles
Mike Hommey <mh@glandium.org>
parents:
diff changeset
   336
  8 changesets found
149fc8a44184 bundle2: client side support for a part to import external bundles
Mike Hommey <mh@glandium.org>
parents:
diff changeset
   337
149fc8a44184 bundle2: client side support for a part to import external bundles
Mike Hommey <mh@glandium.org>
parents:
diff changeset
   338
  $ cat > repo/.hg/bundle2maker << EOF
149fc8a44184 bundle2: client side support for a part to import external bundles
Mike Hommey <mh@glandium.org>
parents:
diff changeset
   339
  > raw-remote-changegroup {'url': 'http://localhost:$HGPORT/bundle6.hg', 'size': 1663, 'digests': 'sha1', 'digest:sha1': '2c880cfec23cff7d8f80c2f12958d1563cbdaba6'}
149fc8a44184 bundle2: client side support for a part to import external bundles
Mike Hommey <mh@glandium.org>
parents:
diff changeset
   340
  > EOF
149fc8a44184 bundle2: client side support for a part to import external bundles
Mike Hommey <mh@glandium.org>
parents:
diff changeset
   341
  $ hg clone ssh://user@dummy/repo clone
149fc8a44184 bundle2: client side support for a part to import external bundles
Mike Hommey <mh@glandium.org>
parents:
diff changeset
   342
  requesting all changes
24686
e0e28e910fa3 bundle2: rename format, parts and config to final names
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 23591
diff changeset
   343
  remote: remote-changegroup
23029
149fc8a44184 bundle2: client side support for a part to import external bundles
Mike Hommey <mh@glandium.org>
parents:
diff changeset
   344
  adding changesets
149fc8a44184 bundle2: client side support for a part to import external bundles
Mike Hommey <mh@glandium.org>
parents:
diff changeset
   345
  adding manifests
149fc8a44184 bundle2: client side support for a part to import external bundles
Mike Hommey <mh@glandium.org>
parents:
diff changeset
   346
  adding file changes
149fc8a44184 bundle2: client side support for a part to import external bundles
Mike Hommey <mh@glandium.org>
parents:
diff changeset
   347
  added 8 changesets with 7 changes to 7 files (+2 heads)
34661
eb586ed5d8ce transaction-summary: show the range of new revisions upon pull/unbundle (BC)
Denis Laxalde <denis.laxalde@logilab.fr>
parents: 34101
diff changeset
   348
  new changesets cd010b8cd998:02de42196ebe
23029
149fc8a44184 bundle2: client side support for a part to import external bundles
Mike Hommey <mh@glandium.org>
parents:
diff changeset
   349
  updating to branch default
149fc8a44184 bundle2: client side support for a part to import external bundles
Mike Hommey <mh@glandium.org>
parents:
diff changeset
   350
  3 files updated, 0 files merged, 0 files removed, 0 files unresolved
149fc8a44184 bundle2: client side support for a part to import external bundles
Mike Hommey <mh@glandium.org>
parents:
diff changeset
   351
  $ rm -rf clone
149fc8a44184 bundle2: client side support for a part to import external bundles
Mike Hommey <mh@glandium.org>
parents:
diff changeset
   352
149fc8a44184 bundle2: client side support for a part to import external bundles
Mike Hommey <mh@glandium.org>
parents:
diff changeset
   353
  $ cat > repo/.hg/bundle2maker << EOF
149fc8a44184 bundle2: client side support for a part to import external bundles
Mike Hommey <mh@glandium.org>
parents:
diff changeset
   354
  > raw-remote-changegroup {'url': 'http://localhost:$HGPORT/bundle6.hg', 'size': 1663, 'digests': 'md5', 'digest:md5': 'e22172c2907ef88794b7bea6642c2394'}
149fc8a44184 bundle2: client side support for a part to import external bundles
Mike Hommey <mh@glandium.org>
parents:
diff changeset
   355
  > EOF
149fc8a44184 bundle2: client side support for a part to import external bundles
Mike Hommey <mh@glandium.org>
parents:
diff changeset
   356
  $ hg clone ssh://user@dummy/repo clone
149fc8a44184 bundle2: client side support for a part to import external bundles
Mike Hommey <mh@glandium.org>
parents:
diff changeset
   357
  requesting all changes
24686
e0e28e910fa3 bundle2: rename format, parts and config to final names
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 23591
diff changeset
   358
  remote: remote-changegroup
23029
149fc8a44184 bundle2: client side support for a part to import external bundles
Mike Hommey <mh@glandium.org>
parents:
diff changeset
   359
  adding changesets
149fc8a44184 bundle2: client side support for a part to import external bundles
Mike Hommey <mh@glandium.org>
parents:
diff changeset
   360
  adding manifests
149fc8a44184 bundle2: client side support for a part to import external bundles
Mike Hommey <mh@glandium.org>
parents:
diff changeset
   361
  adding file changes
149fc8a44184 bundle2: client side support for a part to import external bundles
Mike Hommey <mh@glandium.org>
parents:
diff changeset
   362
  added 8 changesets with 7 changes to 7 files (+2 heads)
34661
eb586ed5d8ce transaction-summary: show the range of new revisions upon pull/unbundle (BC)
Denis Laxalde <denis.laxalde@logilab.fr>
parents: 34101
diff changeset
   363
  new changesets cd010b8cd998:02de42196ebe
23029
149fc8a44184 bundle2: client side support for a part to import external bundles
Mike Hommey <mh@glandium.org>
parents:
diff changeset
   364
  updating to branch default
149fc8a44184 bundle2: client side support for a part to import external bundles
Mike Hommey <mh@glandium.org>
parents:
diff changeset
   365
  3 files updated, 0 files merged, 0 files removed, 0 files unresolved
149fc8a44184 bundle2: client side support for a part to import external bundles
Mike Hommey <mh@glandium.org>
parents:
diff changeset
   366
  $ rm -rf clone
149fc8a44184 bundle2: client side support for a part to import external bundles
Mike Hommey <mh@glandium.org>
parents:
diff changeset
   367
149fc8a44184 bundle2: client side support for a part to import external bundles
Mike Hommey <mh@glandium.org>
parents:
diff changeset
   368
Hash digest mismatch throws an error
149fc8a44184 bundle2: client side support for a part to import external bundles
Mike Hommey <mh@glandium.org>
parents:
diff changeset
   369
149fc8a44184 bundle2: client side support for a part to import external bundles
Mike Hommey <mh@glandium.org>
parents:
diff changeset
   370
  $ cat > repo/.hg/bundle2maker << EOF
149fc8a44184 bundle2: client side support for a part to import external bundles
Mike Hommey <mh@glandium.org>
parents:
diff changeset
   371
  > raw-remote-changegroup {'url': 'http://localhost:$HGPORT/bundle6.hg', 'size': 1663, 'digests': 'sha1', 'digest:sha1': '0' * 40}
149fc8a44184 bundle2: client side support for a part to import external bundles
Mike Hommey <mh@glandium.org>
parents:
diff changeset
   372
  > EOF
149fc8a44184 bundle2: client side support for a part to import external bundles
Mike Hommey <mh@glandium.org>
parents:
diff changeset
   373
  $ hg clone ssh://user@dummy/repo clone
149fc8a44184 bundle2: client side support for a part to import external bundles
Mike Hommey <mh@glandium.org>
parents:
diff changeset
   374
  requesting all changes
24686
e0e28e910fa3 bundle2: rename format, parts and config to final names
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 23591
diff changeset
   375
  remote: remote-changegroup
23029
149fc8a44184 bundle2: client side support for a part to import external bundles
Mike Hommey <mh@glandium.org>
parents:
diff changeset
   376
  adding changesets
149fc8a44184 bundle2: client side support for a part to import external bundles
Mike Hommey <mh@glandium.org>
parents:
diff changeset
   377
  adding manifests
149fc8a44184 bundle2: client side support for a part to import external bundles
Mike Hommey <mh@glandium.org>
parents:
diff changeset
   378
  adding file changes
149fc8a44184 bundle2: client side support for a part to import external bundles
Mike Hommey <mh@glandium.org>
parents:
diff changeset
   379
  added 8 changesets with 7 changes to 7 files (+2 heads)
149fc8a44184 bundle2: client side support for a part to import external bundles
Mike Hommey <mh@glandium.org>
parents:
diff changeset
   380
  transaction abort!
149fc8a44184 bundle2: client side support for a part to import external bundles
Mike Hommey <mh@glandium.org>
parents:
diff changeset
   381
  rollback completed
149fc8a44184 bundle2: client side support for a part to import external bundles
Mike Hommey <mh@glandium.org>
parents:
diff changeset
   382
  abort: bundle at http://localhost:$HGPORT/bundle6.hg is corrupted:
149fc8a44184 bundle2: client side support for a part to import external bundles
Mike Hommey <mh@glandium.org>
parents:
diff changeset
   383
  sha1 mismatch: expected 0000000000000000000000000000000000000000, got 2c880cfec23cff7d8f80c2f12958d1563cbdaba6
149fc8a44184 bundle2: client side support for a part to import external bundles
Mike Hommey <mh@glandium.org>
parents:
diff changeset
   384
  [255]
149fc8a44184 bundle2: client side support for a part to import external bundles
Mike Hommey <mh@glandium.org>
parents:
diff changeset
   385
149fc8a44184 bundle2: client side support for a part to import external bundles
Mike Hommey <mh@glandium.org>
parents:
diff changeset
   386
Multiple hash digests can be given
149fc8a44184 bundle2: client side support for a part to import external bundles
Mike Hommey <mh@glandium.org>
parents:
diff changeset
   387
149fc8a44184 bundle2: client side support for a part to import external bundles
Mike Hommey <mh@glandium.org>
parents:
diff changeset
   388
  $ cat > repo/.hg/bundle2maker << EOF
149fc8a44184 bundle2: client side support for a part to import external bundles
Mike Hommey <mh@glandium.org>
parents:
diff changeset
   389
  > raw-remote-changegroup {'url': 'http://localhost:$HGPORT/bundle6.hg', 'size': 1663, 'digests': 'md5 sha1', 'digest:md5': 'e22172c2907ef88794b7bea6642c2394', 'digest:sha1': '2c880cfec23cff7d8f80c2f12958d1563cbdaba6'}
149fc8a44184 bundle2: client side support for a part to import external bundles
Mike Hommey <mh@glandium.org>
parents:
diff changeset
   390
  > EOF
149fc8a44184 bundle2: client side support for a part to import external bundles
Mike Hommey <mh@glandium.org>
parents:
diff changeset
   391
  $ hg clone ssh://user@dummy/repo clone
149fc8a44184 bundle2: client side support for a part to import external bundles
Mike Hommey <mh@glandium.org>
parents:
diff changeset
   392
  requesting all changes
24686
e0e28e910fa3 bundle2: rename format, parts and config to final names
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 23591
diff changeset
   393
  remote: remote-changegroup
23029
149fc8a44184 bundle2: client side support for a part to import external bundles
Mike Hommey <mh@glandium.org>
parents:
diff changeset
   394
  adding changesets
149fc8a44184 bundle2: client side support for a part to import external bundles
Mike Hommey <mh@glandium.org>
parents:
diff changeset
   395
  adding manifests
149fc8a44184 bundle2: client side support for a part to import external bundles
Mike Hommey <mh@glandium.org>
parents:
diff changeset
   396
  adding file changes
149fc8a44184 bundle2: client side support for a part to import external bundles
Mike Hommey <mh@glandium.org>
parents:
diff changeset
   397
  added 8 changesets with 7 changes to 7 files (+2 heads)
34661
eb586ed5d8ce transaction-summary: show the range of new revisions upon pull/unbundle (BC)
Denis Laxalde <denis.laxalde@logilab.fr>
parents: 34101
diff changeset
   398
  new changesets cd010b8cd998:02de42196ebe
23029
149fc8a44184 bundle2: client side support for a part to import external bundles
Mike Hommey <mh@glandium.org>
parents:
diff changeset
   399
  updating to branch default
149fc8a44184 bundle2: client side support for a part to import external bundles
Mike Hommey <mh@glandium.org>
parents:
diff changeset
   400
  3 files updated, 0 files merged, 0 files removed, 0 files unresolved
149fc8a44184 bundle2: client side support for a part to import external bundles
Mike Hommey <mh@glandium.org>
parents:
diff changeset
   401
  $ rm -rf clone
149fc8a44184 bundle2: client side support for a part to import external bundles
Mike Hommey <mh@glandium.org>
parents:
diff changeset
   402
149fc8a44184 bundle2: client side support for a part to import external bundles
Mike Hommey <mh@glandium.org>
parents:
diff changeset
   403
If either of the multiple hash digests mismatches, an error is thrown
149fc8a44184 bundle2: client side support for a part to import external bundles
Mike Hommey <mh@glandium.org>
parents:
diff changeset
   404
149fc8a44184 bundle2: client side support for a part to import external bundles
Mike Hommey <mh@glandium.org>
parents:
diff changeset
   405
  $ cat > repo/.hg/bundle2maker << EOF
149fc8a44184 bundle2: client side support for a part to import external bundles
Mike Hommey <mh@glandium.org>
parents:
diff changeset
   406
  > raw-remote-changegroup {'url': 'http://localhost:$HGPORT/bundle6.hg', 'size': 1663, 'digests': 'md5 sha1', 'digest:md5': '0' * 32, 'digest:sha1': '2c880cfec23cff7d8f80c2f12958d1563cbdaba6'}
149fc8a44184 bundle2: client side support for a part to import external bundles
Mike Hommey <mh@glandium.org>
parents:
diff changeset
   407
  > EOF
149fc8a44184 bundle2: client side support for a part to import external bundles
Mike Hommey <mh@glandium.org>
parents:
diff changeset
   408
  $ hg clone ssh://user@dummy/repo clone
149fc8a44184 bundle2: client side support for a part to import external bundles
Mike Hommey <mh@glandium.org>
parents:
diff changeset
   409
  requesting all changes
24686
e0e28e910fa3 bundle2: rename format, parts and config to final names
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 23591
diff changeset
   410
  remote: remote-changegroup
23029
149fc8a44184 bundle2: client side support for a part to import external bundles
Mike Hommey <mh@glandium.org>
parents:
diff changeset
   411
  adding changesets
149fc8a44184 bundle2: client side support for a part to import external bundles
Mike Hommey <mh@glandium.org>
parents:
diff changeset
   412
  adding manifests
149fc8a44184 bundle2: client side support for a part to import external bundles
Mike Hommey <mh@glandium.org>
parents:
diff changeset
   413
  adding file changes
149fc8a44184 bundle2: client side support for a part to import external bundles
Mike Hommey <mh@glandium.org>
parents:
diff changeset
   414
  added 8 changesets with 7 changes to 7 files (+2 heads)
149fc8a44184 bundle2: client side support for a part to import external bundles
Mike Hommey <mh@glandium.org>
parents:
diff changeset
   415
  transaction abort!
149fc8a44184 bundle2: client side support for a part to import external bundles
Mike Hommey <mh@glandium.org>
parents:
diff changeset
   416
  rollback completed
149fc8a44184 bundle2: client side support for a part to import external bundles
Mike Hommey <mh@glandium.org>
parents:
diff changeset
   417
  abort: bundle at http://localhost:$HGPORT/bundle6.hg is corrupted:
149fc8a44184 bundle2: client side support for a part to import external bundles
Mike Hommey <mh@glandium.org>
parents:
diff changeset
   418
  md5 mismatch: expected 00000000000000000000000000000000, got e22172c2907ef88794b7bea6642c2394
149fc8a44184 bundle2: client side support for a part to import external bundles
Mike Hommey <mh@glandium.org>
parents:
diff changeset
   419
  [255]
149fc8a44184 bundle2: client side support for a part to import external bundles
Mike Hommey <mh@glandium.org>
parents:
diff changeset
   420
149fc8a44184 bundle2: client side support for a part to import external bundles
Mike Hommey <mh@glandium.org>
parents:
diff changeset
   421
  $ cat > repo/.hg/bundle2maker << EOF
149fc8a44184 bundle2: client side support for a part to import external bundles
Mike Hommey <mh@glandium.org>
parents:
diff changeset
   422
  > raw-remote-changegroup {'url': 'http://localhost:$HGPORT/bundle6.hg', 'size': 1663, 'digests': 'md5 sha1', 'digest:md5': 'e22172c2907ef88794b7bea6642c2394', 'digest:sha1': '0' * 40}
149fc8a44184 bundle2: client side support for a part to import external bundles
Mike Hommey <mh@glandium.org>
parents:
diff changeset
   423
  > EOF
149fc8a44184 bundle2: client side support for a part to import external bundles
Mike Hommey <mh@glandium.org>
parents:
diff changeset
   424
  $ hg clone ssh://user@dummy/repo clone
149fc8a44184 bundle2: client side support for a part to import external bundles
Mike Hommey <mh@glandium.org>
parents:
diff changeset
   425
  requesting all changes
24686
e0e28e910fa3 bundle2: rename format, parts and config to final names
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 23591
diff changeset
   426
  remote: remote-changegroup
23029
149fc8a44184 bundle2: client side support for a part to import external bundles
Mike Hommey <mh@glandium.org>
parents:
diff changeset
   427
  adding changesets
149fc8a44184 bundle2: client side support for a part to import external bundles
Mike Hommey <mh@glandium.org>
parents:
diff changeset
   428
  adding manifests
149fc8a44184 bundle2: client side support for a part to import external bundles
Mike Hommey <mh@glandium.org>
parents:
diff changeset
   429
  adding file changes
149fc8a44184 bundle2: client side support for a part to import external bundles
Mike Hommey <mh@glandium.org>
parents:
diff changeset
   430
  added 8 changesets with 7 changes to 7 files (+2 heads)
149fc8a44184 bundle2: client side support for a part to import external bundles
Mike Hommey <mh@glandium.org>
parents:
diff changeset
   431
  transaction abort!
149fc8a44184 bundle2: client side support for a part to import external bundles
Mike Hommey <mh@glandium.org>
parents:
diff changeset
   432
  rollback completed
149fc8a44184 bundle2: client side support for a part to import external bundles
Mike Hommey <mh@glandium.org>
parents:
diff changeset
   433
  abort: bundle at http://localhost:$HGPORT/bundle6.hg is corrupted:
149fc8a44184 bundle2: client side support for a part to import external bundles
Mike Hommey <mh@glandium.org>
parents:
diff changeset
   434
  sha1 mismatch: expected 0000000000000000000000000000000000000000, got 2c880cfec23cff7d8f80c2f12958d1563cbdaba6
149fc8a44184 bundle2: client side support for a part to import external bundles
Mike Hommey <mh@glandium.org>
parents:
diff changeset
   435
  [255]
149fc8a44184 bundle2: client side support for a part to import external bundles
Mike Hommey <mh@glandium.org>
parents:
diff changeset
   436
149fc8a44184 bundle2: client side support for a part to import external bundles
Mike Hommey <mh@glandium.org>
parents:
diff changeset
   437
Corruption tests
149fc8a44184 bundle2: client side support for a part to import external bundles
Mike Hommey <mh@glandium.org>
parents:
diff changeset
   438
149fc8a44184 bundle2: client side support for a part to import external bundles
Mike Hommey <mh@glandium.org>
parents:
diff changeset
   439
  $ hg clone orig clone -r 2
149fc8a44184 bundle2: client side support for a part to import external bundles
Mike Hommey <mh@glandium.org>
parents:
diff changeset
   440
  adding changesets
149fc8a44184 bundle2: client side support for a part to import external bundles
Mike Hommey <mh@glandium.org>
parents:
diff changeset
   441
  adding manifests
149fc8a44184 bundle2: client side support for a part to import external bundles
Mike Hommey <mh@glandium.org>
parents:
diff changeset
   442
  adding file changes
149fc8a44184 bundle2: client side support for a part to import external bundles
Mike Hommey <mh@glandium.org>
parents:
diff changeset
   443
  added 3 changesets with 3 changes to 3 files
34661
eb586ed5d8ce transaction-summary: show the range of new revisions upon pull/unbundle (BC)
Denis Laxalde <denis.laxalde@logilab.fr>
parents: 34101
diff changeset
   444
  new changesets cd010b8cd998:5fddd98957c8
23029
149fc8a44184 bundle2: client side support for a part to import external bundles
Mike Hommey <mh@glandium.org>
parents:
diff changeset
   445
  updating to branch default
149fc8a44184 bundle2: client side support for a part to import external bundles
Mike Hommey <mh@glandium.org>
parents:
diff changeset
   446
  3 files updated, 0 files merged, 0 files removed, 0 files unresolved
149fc8a44184 bundle2: client side support for a part to import external bundles
Mike Hommey <mh@glandium.org>
parents:
diff changeset
   447
149fc8a44184 bundle2: client side support for a part to import external bundles
Mike Hommey <mh@glandium.org>
parents:
diff changeset
   448
  $ cat > repo/.hg/bundle2maker << EOF
149fc8a44184 bundle2: client side support for a part to import external bundles
Mike Hommey <mh@glandium.org>
parents:
diff changeset
   449
  > remote-changegroup http://localhost:$HGPORT/bundle4.hg bundle4.hg
149fc8a44184 bundle2: client side support for a part to import external bundles
Mike Hommey <mh@glandium.org>
parents:
diff changeset
   450
  > raw-remote-changegroup {'url': 'http://localhost:$HGPORT/bundle5.hg', 'size': 578, 'digests': 'sha1', 'digest:sha1': '0' * 40}
149fc8a44184 bundle2: client side support for a part to import external bundles
Mike Hommey <mh@glandium.org>
parents:
diff changeset
   451
  > changegroup 0:6 7
149fc8a44184 bundle2: client side support for a part to import external bundles
Mike Hommey <mh@glandium.org>
parents:
diff changeset
   452
  > EOF
149fc8a44184 bundle2: client side support for a part to import external bundles
Mike Hommey <mh@glandium.org>
parents:
diff changeset
   453
  $ hg pull -R clone ssh://user@dummy/repo
149fc8a44184 bundle2: client side support for a part to import external bundles
Mike Hommey <mh@glandium.org>
parents:
diff changeset
   454
  pulling from ssh://user@dummy/repo
149fc8a44184 bundle2: client side support for a part to import external bundles
Mike Hommey <mh@glandium.org>
parents:
diff changeset
   455
  searching for changes
24686
e0e28e910fa3 bundle2: rename format, parts and config to final names
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 23591
diff changeset
   456
  remote: remote-changegroup
23029
149fc8a44184 bundle2: client side support for a part to import external bundles
Mike Hommey <mh@glandium.org>
parents:
diff changeset
   457
  adding changesets
149fc8a44184 bundle2: client side support for a part to import external bundles
Mike Hommey <mh@glandium.org>
parents:
diff changeset
   458
  adding manifests
149fc8a44184 bundle2: client side support for a part to import external bundles
Mike Hommey <mh@glandium.org>
parents:
diff changeset
   459
  adding file changes
149fc8a44184 bundle2: client side support for a part to import external bundles
Mike Hommey <mh@glandium.org>
parents:
diff changeset
   460
  added 2 changesets with 2 changes to 2 files (+1 heads)
24686
e0e28e910fa3 bundle2: rename format, parts and config to final names
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 23591
diff changeset
   461
  remote: remote-changegroup
23029
149fc8a44184 bundle2: client side support for a part to import external bundles
Mike Hommey <mh@glandium.org>
parents:
diff changeset
   462
  adding changesets
149fc8a44184 bundle2: client side support for a part to import external bundles
Mike Hommey <mh@glandium.org>
parents:
diff changeset
   463
  adding manifests
149fc8a44184 bundle2: client side support for a part to import external bundles
Mike Hommey <mh@glandium.org>
parents:
diff changeset
   464
  adding file changes
149fc8a44184 bundle2: client side support for a part to import external bundles
Mike Hommey <mh@glandium.org>
parents:
diff changeset
   465
  added 2 changesets with 1 changes to 1 files
149fc8a44184 bundle2: client side support for a part to import external bundles
Mike Hommey <mh@glandium.org>
parents:
diff changeset
   466
  transaction abort!
149fc8a44184 bundle2: client side support for a part to import external bundles
Mike Hommey <mh@glandium.org>
parents:
diff changeset
   467
  rollback completed
149fc8a44184 bundle2: client side support for a part to import external bundles
Mike Hommey <mh@glandium.org>
parents:
diff changeset
   468
  abort: bundle at http://localhost:$HGPORT/bundle5.hg is corrupted:
149fc8a44184 bundle2: client side support for a part to import external bundles
Mike Hommey <mh@glandium.org>
parents:
diff changeset
   469
  sha1 mismatch: expected 0000000000000000000000000000000000000000, got f29485d6bfd37db99983cfc95ecb52f8ca396106
149fc8a44184 bundle2: client side support for a part to import external bundles
Mike Hommey <mh@glandium.org>
parents:
diff changeset
   470
  [255]
149fc8a44184 bundle2: client side support for a part to import external bundles
Mike Hommey <mh@glandium.org>
parents:
diff changeset
   471
149fc8a44184 bundle2: client side support for a part to import external bundles
Mike Hommey <mh@glandium.org>
parents:
diff changeset
   472
The entire transaction has been rolled back in the pull above
149fc8a44184 bundle2: client side support for a part to import external bundles
Mike Hommey <mh@glandium.org>
parents:
diff changeset
   473
149fc8a44184 bundle2: client side support for a part to import external bundles
Mike Hommey <mh@glandium.org>
parents:
diff changeset
   474
  $ hg -R clone log -G
149fc8a44184 bundle2: client side support for a part to import external bundles
Mike Hommey <mh@glandium.org>
parents:
diff changeset
   475
  @  2:5fddd98957c8 public Nicolas Dumazet <nicdumz.commits@gmail.com>  C
149fc8a44184 bundle2: client side support for a part to import external bundles
Mike Hommey <mh@glandium.org>
parents:
diff changeset
   476
  |
149fc8a44184 bundle2: client side support for a part to import external bundles
Mike Hommey <mh@glandium.org>
parents:
diff changeset
   477
  o  1:42ccdea3bb16 public Nicolas Dumazet <nicdumz.commits@gmail.com>  B
149fc8a44184 bundle2: client side support for a part to import external bundles
Mike Hommey <mh@glandium.org>
parents:
diff changeset
   478
  |
149fc8a44184 bundle2: client side support for a part to import external bundles
Mike Hommey <mh@glandium.org>
parents:
diff changeset
   479
  o  0:cd010b8cd998 public Nicolas Dumazet <nicdumz.commits@gmail.com>  A
149fc8a44184 bundle2: client side support for a part to import external bundles
Mike Hommey <mh@glandium.org>
parents:
diff changeset
   480
  
149fc8a44184 bundle2: client side support for a part to import external bundles
Mike Hommey <mh@glandium.org>
parents:
diff changeset
   481
149fc8a44184 bundle2: client side support for a part to import external bundles
Mike Hommey <mh@glandium.org>
parents:
diff changeset
   482
No params
149fc8a44184 bundle2: client side support for a part to import external bundles
Mike Hommey <mh@glandium.org>
parents:
diff changeset
   483
149fc8a44184 bundle2: client side support for a part to import external bundles
Mike Hommey <mh@glandium.org>
parents:
diff changeset
   484
  $ cat > repo/.hg/bundle2maker << EOF
149fc8a44184 bundle2: client side support for a part to import external bundles
Mike Hommey <mh@glandium.org>
parents:
diff changeset
   485
  > raw-remote-changegroup {}
149fc8a44184 bundle2: client side support for a part to import external bundles
Mike Hommey <mh@glandium.org>
parents:
diff changeset
   486
  > EOF
149fc8a44184 bundle2: client side support for a part to import external bundles
Mike Hommey <mh@glandium.org>
parents:
diff changeset
   487
  $ hg pull -R clone ssh://user@dummy/repo
149fc8a44184 bundle2: client side support for a part to import external bundles
Mike Hommey <mh@glandium.org>
parents:
diff changeset
   488
  pulling from ssh://user@dummy/repo
149fc8a44184 bundle2: client side support for a part to import external bundles
Mike Hommey <mh@glandium.org>
parents:
diff changeset
   489
  searching for changes
24686
e0e28e910fa3 bundle2: rename format, parts and config to final names
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 23591
diff changeset
   490
  remote: remote-changegroup
23029
149fc8a44184 bundle2: client side support for a part to import external bundles
Mike Hommey <mh@glandium.org>
parents:
diff changeset
   491
  abort: remote-changegroup: missing "url" param
149fc8a44184 bundle2: client side support for a part to import external bundles
Mike Hommey <mh@glandium.org>
parents:
diff changeset
   492
  [255]
149fc8a44184 bundle2: client side support for a part to import external bundles
Mike Hommey <mh@glandium.org>
parents:
diff changeset
   493
149fc8a44184 bundle2: client side support for a part to import external bundles
Mike Hommey <mh@glandium.org>
parents:
diff changeset
   494
Missing size
149fc8a44184 bundle2: client side support for a part to import external bundles
Mike Hommey <mh@glandium.org>
parents:
diff changeset
   495
149fc8a44184 bundle2: client side support for a part to import external bundles
Mike Hommey <mh@glandium.org>
parents:
diff changeset
   496
  $ cat > repo/.hg/bundle2maker << EOF
149fc8a44184 bundle2: client side support for a part to import external bundles
Mike Hommey <mh@glandium.org>
parents:
diff changeset
   497
  > raw-remote-changegroup {'url': 'http://localhost:$HGPORT/bundle4.hg'}
149fc8a44184 bundle2: client side support for a part to import external bundles
Mike Hommey <mh@glandium.org>
parents:
diff changeset
   498
  > EOF
149fc8a44184 bundle2: client side support for a part to import external bundles
Mike Hommey <mh@glandium.org>
parents:
diff changeset
   499
  $ hg pull -R clone ssh://user@dummy/repo
149fc8a44184 bundle2: client side support for a part to import external bundles
Mike Hommey <mh@glandium.org>
parents:
diff changeset
   500
  pulling from ssh://user@dummy/repo
149fc8a44184 bundle2: client side support for a part to import external bundles
Mike Hommey <mh@glandium.org>
parents:
diff changeset
   501
  searching for changes
24686
e0e28e910fa3 bundle2: rename format, parts and config to final names
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 23591
diff changeset
   502
  remote: remote-changegroup
23029
149fc8a44184 bundle2: client side support for a part to import external bundles
Mike Hommey <mh@glandium.org>
parents:
diff changeset
   503
  abort: remote-changegroup: missing "size" param
149fc8a44184 bundle2: client side support for a part to import external bundles
Mike Hommey <mh@glandium.org>
parents:
diff changeset
   504
  [255]
149fc8a44184 bundle2: client side support for a part to import external bundles
Mike Hommey <mh@glandium.org>
parents:
diff changeset
   505
149fc8a44184 bundle2: client side support for a part to import external bundles
Mike Hommey <mh@glandium.org>
parents:
diff changeset
   506
Invalid size
149fc8a44184 bundle2: client side support for a part to import external bundles
Mike Hommey <mh@glandium.org>
parents:
diff changeset
   507
149fc8a44184 bundle2: client side support for a part to import external bundles
Mike Hommey <mh@glandium.org>
parents:
diff changeset
   508
  $ cat > repo/.hg/bundle2maker << EOF
149fc8a44184 bundle2: client side support for a part to import external bundles
Mike Hommey <mh@glandium.org>
parents:
diff changeset
   509
  > raw-remote-changegroup {'url': 'http://localhost:$HGPORT/bundle4.hg', 'size': 'foo'}
149fc8a44184 bundle2: client side support for a part to import external bundles
Mike Hommey <mh@glandium.org>
parents:
diff changeset
   510
  > EOF
149fc8a44184 bundle2: client side support for a part to import external bundles
Mike Hommey <mh@glandium.org>
parents:
diff changeset
   511
  $ hg pull -R clone ssh://user@dummy/repo
149fc8a44184 bundle2: client side support for a part to import external bundles
Mike Hommey <mh@glandium.org>
parents:
diff changeset
   512
  pulling from ssh://user@dummy/repo
149fc8a44184 bundle2: client side support for a part to import external bundles
Mike Hommey <mh@glandium.org>
parents:
diff changeset
   513
  searching for changes
24686
e0e28e910fa3 bundle2: rename format, parts and config to final names
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 23591
diff changeset
   514
  remote: remote-changegroup
23029
149fc8a44184 bundle2: client side support for a part to import external bundles
Mike Hommey <mh@glandium.org>
parents:
diff changeset
   515
  abort: remote-changegroup: invalid value for param "size"
149fc8a44184 bundle2: client side support for a part to import external bundles
Mike Hommey <mh@glandium.org>
parents:
diff changeset
   516
  [255]
149fc8a44184 bundle2: client side support for a part to import external bundles
Mike Hommey <mh@glandium.org>
parents:
diff changeset
   517
149fc8a44184 bundle2: client side support for a part to import external bundles
Mike Hommey <mh@glandium.org>
parents:
diff changeset
   518
Size mismatch
149fc8a44184 bundle2: client side support for a part to import external bundles
Mike Hommey <mh@glandium.org>
parents:
diff changeset
   519
149fc8a44184 bundle2: client side support for a part to import external bundles
Mike Hommey <mh@glandium.org>
parents:
diff changeset
   520
  $ cat > repo/.hg/bundle2maker << EOF
149fc8a44184 bundle2: client side support for a part to import external bundles
Mike Hommey <mh@glandium.org>
parents:
diff changeset
   521
  > raw-remote-changegroup {'url': 'http://localhost:$HGPORT/bundle4.hg', 'size': 42}
149fc8a44184 bundle2: client side support for a part to import external bundles
Mike Hommey <mh@glandium.org>
parents:
diff changeset
   522
  > EOF
149fc8a44184 bundle2: client side support for a part to import external bundles
Mike Hommey <mh@glandium.org>
parents:
diff changeset
   523
  $ hg pull -R clone ssh://user@dummy/repo
149fc8a44184 bundle2: client side support for a part to import external bundles
Mike Hommey <mh@glandium.org>
parents:
diff changeset
   524
  pulling from ssh://user@dummy/repo
149fc8a44184 bundle2: client side support for a part to import external bundles
Mike Hommey <mh@glandium.org>
parents:
diff changeset
   525
  searching for changes
24686
e0e28e910fa3 bundle2: rename format, parts and config to final names
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 23591
diff changeset
   526
  remote: remote-changegroup
23029
149fc8a44184 bundle2: client side support for a part to import external bundles
Mike Hommey <mh@glandium.org>
parents:
diff changeset
   527
  adding changesets
149fc8a44184 bundle2: client side support for a part to import external bundles
Mike Hommey <mh@glandium.org>
parents:
diff changeset
   528
  adding manifests
149fc8a44184 bundle2: client side support for a part to import external bundles
Mike Hommey <mh@glandium.org>
parents:
diff changeset
   529
  adding file changes
149fc8a44184 bundle2: client side support for a part to import external bundles
Mike Hommey <mh@glandium.org>
parents:
diff changeset
   530
  added 2 changesets with 2 changes to 2 files (+1 heads)
149fc8a44184 bundle2: client side support for a part to import external bundles
Mike Hommey <mh@glandium.org>
parents:
diff changeset
   531
  transaction abort!
149fc8a44184 bundle2: client side support for a part to import external bundles
Mike Hommey <mh@glandium.org>
parents:
diff changeset
   532
  rollback completed
149fc8a44184 bundle2: client side support for a part to import external bundles
Mike Hommey <mh@glandium.org>
parents:
diff changeset
   533
  abort: bundle at http://localhost:$HGPORT/bundle4.hg is corrupted:
149fc8a44184 bundle2: client side support for a part to import external bundles
Mike Hommey <mh@glandium.org>
parents:
diff changeset
   534
  size mismatch: expected 42, got 581
149fc8a44184 bundle2: client side support for a part to import external bundles
Mike Hommey <mh@glandium.org>
parents:
diff changeset
   535
  [255]
149fc8a44184 bundle2: client side support for a part to import external bundles
Mike Hommey <mh@glandium.org>
parents:
diff changeset
   536
149fc8a44184 bundle2: client side support for a part to import external bundles
Mike Hommey <mh@glandium.org>
parents:
diff changeset
   537
Unknown digest
149fc8a44184 bundle2: client side support for a part to import external bundles
Mike Hommey <mh@glandium.org>
parents:
diff changeset
   538
149fc8a44184 bundle2: client side support for a part to import external bundles
Mike Hommey <mh@glandium.org>
parents:
diff changeset
   539
  $ cat > repo/.hg/bundle2maker << EOF
149fc8a44184 bundle2: client side support for a part to import external bundles
Mike Hommey <mh@glandium.org>
parents:
diff changeset
   540
  > raw-remote-changegroup {'url': 'http://localhost:$HGPORT/bundle4.hg', 'size': 581, 'digests': 'foo', 'digest:foo': 'bar'}
149fc8a44184 bundle2: client side support for a part to import external bundles
Mike Hommey <mh@glandium.org>
parents:
diff changeset
   541
  > EOF
149fc8a44184 bundle2: client side support for a part to import external bundles
Mike Hommey <mh@glandium.org>
parents:
diff changeset
   542
  $ hg pull -R clone ssh://user@dummy/repo
149fc8a44184 bundle2: client side support for a part to import external bundles
Mike Hommey <mh@glandium.org>
parents:
diff changeset
   543
  pulling from ssh://user@dummy/repo
149fc8a44184 bundle2: client side support for a part to import external bundles
Mike Hommey <mh@glandium.org>
parents:
diff changeset
   544
  searching for changes
24686
e0e28e910fa3 bundle2: rename format, parts and config to final names
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 23591
diff changeset
   545
  remote: remote-changegroup
e0e28e910fa3 bundle2: rename format, parts and config to final names
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 23591
diff changeset
   546
  abort: missing support for remote-changegroup - digest:foo
23029
149fc8a44184 bundle2: client side support for a part to import external bundles
Mike Hommey <mh@glandium.org>
parents:
diff changeset
   547
  [255]
149fc8a44184 bundle2: client side support for a part to import external bundles
Mike Hommey <mh@glandium.org>
parents:
diff changeset
   548
149fc8a44184 bundle2: client side support for a part to import external bundles
Mike Hommey <mh@glandium.org>
parents:
diff changeset
   549
Missing digest
149fc8a44184 bundle2: client side support for a part to import external bundles
Mike Hommey <mh@glandium.org>
parents:
diff changeset
   550
149fc8a44184 bundle2: client side support for a part to import external bundles
Mike Hommey <mh@glandium.org>
parents:
diff changeset
   551
  $ cat > repo/.hg/bundle2maker << EOF
149fc8a44184 bundle2: client side support for a part to import external bundles
Mike Hommey <mh@glandium.org>
parents:
diff changeset
   552
  > raw-remote-changegroup {'url': 'http://localhost:$HGPORT/bundle4.hg', 'size': 581, 'digests': 'sha1'}
149fc8a44184 bundle2: client side support for a part to import external bundles
Mike Hommey <mh@glandium.org>
parents:
diff changeset
   553
  > EOF
149fc8a44184 bundle2: client side support for a part to import external bundles
Mike Hommey <mh@glandium.org>
parents:
diff changeset
   554
  $ hg pull -R clone ssh://user@dummy/repo
149fc8a44184 bundle2: client side support for a part to import external bundles
Mike Hommey <mh@glandium.org>
parents:
diff changeset
   555
  pulling from ssh://user@dummy/repo
149fc8a44184 bundle2: client side support for a part to import external bundles
Mike Hommey <mh@glandium.org>
parents:
diff changeset
   556
  searching for changes
24686
e0e28e910fa3 bundle2: rename format, parts and config to final names
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 23591
diff changeset
   557
  remote: remote-changegroup
23029
149fc8a44184 bundle2: client side support for a part to import external bundles
Mike Hommey <mh@glandium.org>
parents:
diff changeset
   558
  abort: remote-changegroup: missing "digest:sha1" param
149fc8a44184 bundle2: client side support for a part to import external bundles
Mike Hommey <mh@glandium.org>
parents:
diff changeset
   559
  [255]
149fc8a44184 bundle2: client side support for a part to import external bundles
Mike Hommey <mh@glandium.org>
parents:
diff changeset
   560
149fc8a44184 bundle2: client side support for a part to import external bundles
Mike Hommey <mh@glandium.org>
parents:
diff changeset
   561
Not an HTTP url
149fc8a44184 bundle2: client side support for a part to import external bundles
Mike Hommey <mh@glandium.org>
parents:
diff changeset
   562
149fc8a44184 bundle2: client side support for a part to import external bundles
Mike Hommey <mh@glandium.org>
parents:
diff changeset
   563
  $ cat > repo/.hg/bundle2maker << EOF
149fc8a44184 bundle2: client side support for a part to import external bundles
Mike Hommey <mh@glandium.org>
parents:
diff changeset
   564
  > raw-remote-changegroup {'url': 'ssh://localhost:$HGPORT/bundle4.hg', 'size': 581}
149fc8a44184 bundle2: client side support for a part to import external bundles
Mike Hommey <mh@glandium.org>
parents:
diff changeset
   565
  > EOF
149fc8a44184 bundle2: client side support for a part to import external bundles
Mike Hommey <mh@glandium.org>
parents:
diff changeset
   566
  $ hg pull -R clone ssh://user@dummy/repo
149fc8a44184 bundle2: client side support for a part to import external bundles
Mike Hommey <mh@glandium.org>
parents:
diff changeset
   567
  pulling from ssh://user@dummy/repo
149fc8a44184 bundle2: client side support for a part to import external bundles
Mike Hommey <mh@glandium.org>
parents:
diff changeset
   568
  searching for changes
24686
e0e28e910fa3 bundle2: rename format, parts and config to final names
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 23591
diff changeset
   569
  remote: remote-changegroup
23029
149fc8a44184 bundle2: client side support for a part to import external bundles
Mike Hommey <mh@glandium.org>
parents:
diff changeset
   570
  abort: remote-changegroup does not support ssh urls
149fc8a44184 bundle2: client side support for a part to import external bundles
Mike Hommey <mh@glandium.org>
parents:
diff changeset
   571
  [255]
149fc8a44184 bundle2: client side support for a part to import external bundles
Mike Hommey <mh@glandium.org>
parents:
diff changeset
   572
149fc8a44184 bundle2: client side support for a part to import external bundles
Mike Hommey <mh@glandium.org>
parents:
diff changeset
   573
Not a bundle
149fc8a44184 bundle2: client side support for a part to import external bundles
Mike Hommey <mh@glandium.org>
parents:
diff changeset
   574
149fc8a44184 bundle2: client side support for a part to import external bundles
Mike Hommey <mh@glandium.org>
parents:
diff changeset
   575
  $ cat > notbundle.hg << EOF
149fc8a44184 bundle2: client side support for a part to import external bundles
Mike Hommey <mh@glandium.org>
parents:
diff changeset
   576
  > foo
149fc8a44184 bundle2: client side support for a part to import external bundles
Mike Hommey <mh@glandium.org>
parents:
diff changeset
   577
  > EOF
149fc8a44184 bundle2: client side support for a part to import external bundles
Mike Hommey <mh@glandium.org>
parents:
diff changeset
   578
  $ cat > repo/.hg/bundle2maker << EOF
149fc8a44184 bundle2: client side support for a part to import external bundles
Mike Hommey <mh@glandium.org>
parents:
diff changeset
   579
  > remote-changegroup http://localhost:$HGPORT/notbundle.hg notbundle.hg
149fc8a44184 bundle2: client side support for a part to import external bundles
Mike Hommey <mh@glandium.org>
parents:
diff changeset
   580
  > EOF
149fc8a44184 bundle2: client side support for a part to import external bundles
Mike Hommey <mh@glandium.org>
parents:
diff changeset
   581
  $ hg pull -R clone ssh://user@dummy/repo
149fc8a44184 bundle2: client side support for a part to import external bundles
Mike Hommey <mh@glandium.org>
parents:
diff changeset
   582
  pulling from ssh://user@dummy/repo
149fc8a44184 bundle2: client side support for a part to import external bundles
Mike Hommey <mh@glandium.org>
parents:
diff changeset
   583
  searching for changes
24686
e0e28e910fa3 bundle2: rename format, parts and config to final names
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 23591
diff changeset
   584
  remote: remote-changegroup
23029
149fc8a44184 bundle2: client side support for a part to import external bundles
Mike Hommey <mh@glandium.org>
parents:
diff changeset
   585
  abort: http://localhost:$HGPORT/notbundle.hg: not a Mercurial bundle
149fc8a44184 bundle2: client side support for a part to import external bundles
Mike Hommey <mh@glandium.org>
parents:
diff changeset
   586
  [255]
149fc8a44184 bundle2: client side support for a part to import external bundles
Mike Hommey <mh@glandium.org>
parents:
diff changeset
   587
149fc8a44184 bundle2: client side support for a part to import external bundles
Mike Hommey <mh@glandium.org>
parents:
diff changeset
   588
Not a bundle 1.0
149fc8a44184 bundle2: client side support for a part to import external bundles
Mike Hommey <mh@glandium.org>
parents:
diff changeset
   589
149fc8a44184 bundle2: client side support for a part to import external bundles
Mike Hommey <mh@glandium.org>
parents:
diff changeset
   590
  $ cat > notbundle10.hg << EOF
24686
e0e28e910fa3 bundle2: rename format, parts and config to final names
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 23591
diff changeset
   591
  > HG20
23029
149fc8a44184 bundle2: client side support for a part to import external bundles
Mike Hommey <mh@glandium.org>
parents:
diff changeset
   592
  > EOF
149fc8a44184 bundle2: client side support for a part to import external bundles
Mike Hommey <mh@glandium.org>
parents:
diff changeset
   593
  $ cat > repo/.hg/bundle2maker << EOF
149fc8a44184 bundle2: client side support for a part to import external bundles
Mike Hommey <mh@glandium.org>
parents:
diff changeset
   594
  > remote-changegroup http://localhost:$HGPORT/notbundle10.hg notbundle10.hg
149fc8a44184 bundle2: client side support for a part to import external bundles
Mike Hommey <mh@glandium.org>
parents:
diff changeset
   595
  > EOF
149fc8a44184 bundle2: client side support for a part to import external bundles
Mike Hommey <mh@glandium.org>
parents:
diff changeset
   596
  $ hg pull -R clone ssh://user@dummy/repo
149fc8a44184 bundle2: client side support for a part to import external bundles
Mike Hommey <mh@glandium.org>
parents:
diff changeset
   597
  pulling from ssh://user@dummy/repo
149fc8a44184 bundle2: client side support for a part to import external bundles
Mike Hommey <mh@glandium.org>
parents:
diff changeset
   598
  searching for changes
24686
e0e28e910fa3 bundle2: rename format, parts and config to final names
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 23591
diff changeset
   599
  remote: remote-changegroup
23029
149fc8a44184 bundle2: client side support for a part to import external bundles
Mike Hommey <mh@glandium.org>
parents:
diff changeset
   600
  abort: http://localhost:$HGPORT/notbundle10.hg: not a bundle version 1.0
149fc8a44184 bundle2: client side support for a part to import external bundles
Mike Hommey <mh@glandium.org>
parents:
diff changeset
   601
  [255]
149fc8a44184 bundle2: client side support for a part to import external bundles
Mike Hommey <mh@glandium.org>
parents:
diff changeset
   602
149fc8a44184 bundle2: client side support for a part to import external bundles
Mike Hommey <mh@glandium.org>
parents:
diff changeset
   603
  $ hg -R clone log -G
149fc8a44184 bundle2: client side support for a part to import external bundles
Mike Hommey <mh@glandium.org>
parents:
diff changeset
   604
  @  2:5fddd98957c8 public Nicolas Dumazet <nicdumz.commits@gmail.com>  C
149fc8a44184 bundle2: client side support for a part to import external bundles
Mike Hommey <mh@glandium.org>
parents:
diff changeset
   605
  |
149fc8a44184 bundle2: client side support for a part to import external bundles
Mike Hommey <mh@glandium.org>
parents:
diff changeset
   606
  o  1:42ccdea3bb16 public Nicolas Dumazet <nicdumz.commits@gmail.com>  B
149fc8a44184 bundle2: client side support for a part to import external bundles
Mike Hommey <mh@glandium.org>
parents:
diff changeset
   607
  |
149fc8a44184 bundle2: client side support for a part to import external bundles
Mike Hommey <mh@glandium.org>
parents:
diff changeset
   608
  o  0:cd010b8cd998 public Nicolas Dumazet <nicdumz.commits@gmail.com>  A
149fc8a44184 bundle2: client side support for a part to import external bundles
Mike Hommey <mh@glandium.org>
parents:
diff changeset
   609
  
149fc8a44184 bundle2: client side support for a part to import external bundles
Mike Hommey <mh@glandium.org>
parents:
diff changeset
   610
  $ rm -rf clone
149fc8a44184 bundle2: client side support for a part to import external bundles
Mike Hommey <mh@glandium.org>
parents:
diff changeset
   611
25474
8c14f87bd0ae tests: drop DAEMON_PIDS from killdaemons calls
Matt Mackall <mpm@selenic.com>
parents: 25472
diff changeset
   612
  $ killdaemons.py