tests/test-push.t
author Pierre-Yves David <pierre-yves.david@octobus.net>
Tue, 11 Mar 2025 02:29:42 +0100
branchstable
changeset 53042 cdd7bf612c7b
parent 53005 8c85d139ff64
permissions -rw-r--r--
bundle-spec: properly format boolean parameter (issue6960) This was breaking automatic clone bundle generation. This changeset fixes it and add a test to catch it in the future.
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
30279
a8d2071c3373 test: rename 'test-push-r.t' to 'test-push.t'
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 30278
diff changeset
     1
==================================
a8d2071c3373 test: rename 'test-push-r.t' to 'test-push.t'
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 30278
diff changeset
     2
Basic testing for the push command
a8d2071c3373 test: rename 'test-push-r.t' to 'test-push.t'
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 30278
diff changeset
     3
==================================
a8d2071c3373 test: rename 'test-push-r.t' to 'test-push.t'
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 30278
diff changeset
     4
a8d2071c3373 test: rename 'test-push-r.t' to 'test-push.t'
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 30278
diff changeset
     5
Testing of the '--rev' flag
a8d2071c3373 test: rename 'test-push-r.t' to 'test-push.t'
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 30278
diff changeset
     6
===========================
a8d2071c3373 test: rename 'test-push-r.t' to 'test-push.t'
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 30278
diff changeset
     7
a8d2071c3373 test: rename 'test-push-r.t' to 'test-push.t'
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 30278
diff changeset
     8
  $ hg init test-revflag
a8d2071c3373 test: rename 'test-push-r.t' to 'test-push.t'
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 30278
diff changeset
     9
  $ hg -R test-revflag unbundle "$TESTDIR/bundles/remote.hg"
14117
07708f4171f1 tests: create a bundle to bootstrap tests using a remote repository
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 12279
diff changeset
    10
  adding changesets
07708f4171f1 tests: create a bundle to bootstrap tests using a remote repository
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 12279
diff changeset
    11
  adding manifests
07708f4171f1 tests: create a bundle to bootstrap tests using a remote repository
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 12279
diff changeset
    12
  adding file changes
07708f4171f1 tests: create a bundle to bootstrap tests using a remote repository
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 12279
diff changeset
    13
  added 9 changesets with 7 changes to 4 files (+1 heads)
39480
89630d0b3e23 phase: report number of non-public changeset alongside the new range
Boris Feld <boris.feld@octobus.net>
parents: 37344
diff changeset
    14
  new changesets bfaf4b5cbf01:916f1afdef90 (9 drafts)
14117
07708f4171f1 tests: create a bundle to bootstrap tests using a remote repository
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 12279
diff changeset
    15
  (run 'hg heads' to see heads, 'hg merge' to merge)
1781
284fc722c342 add an optional argument to push only the specified revisions (push -r)
Benoit Boissinot <benoit.boissinot@ens-lyon.org>
parents:
diff changeset
    16
12279
28e2e3804f2e combine tests
Adrian Buehlmann <adrian@cadifra.com>
parents: 3853
diff changeset
    17
  $ for i in 0 1 2 3 4 5 6 7 8; do
28e2e3804f2e combine tests
Adrian Buehlmann <adrian@cadifra.com>
parents: 3853
diff changeset
    18
  >    echo
30279
a8d2071c3373 test: rename 'test-push-r.t' to 'test-push.t'
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 30278
diff changeset
    19
  >    hg init test-revflag-"$i"
a8d2071c3373 test: rename 'test-push-r.t' to 'test-push.t'
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 30278
diff changeset
    20
  >    hg -R test-revflag push -r "$i" test-revflag-"$i"
49825
2f2682f40ea0 tests: use the `--quiet` flag for verify when applicable
Rapha?l Gom?s <rgomes@octobus.net>
parents: 46119
diff changeset
    21
  >    hg -R test-revflag-"$i" verify -q
12279
28e2e3804f2e combine tests
Adrian Buehlmann <adrian@cadifra.com>
parents: 3853
diff changeset
    22
  > done
28e2e3804f2e combine tests
Adrian Buehlmann <adrian@cadifra.com>
parents: 3853
diff changeset
    23
  
30279
a8d2071c3373 test: rename 'test-push-r.t' to 'test-push.t'
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 30278
diff changeset
    24
  pushing to test-revflag-0
12279
28e2e3804f2e combine tests
Adrian Buehlmann <adrian@cadifra.com>
parents: 3853
diff changeset
    25
  searching for changes
28e2e3804f2e combine tests
Adrian Buehlmann <adrian@cadifra.com>
parents: 3853
diff changeset
    26
  adding changesets
28e2e3804f2e combine tests
Adrian Buehlmann <adrian@cadifra.com>
parents: 3853
diff changeset
    27
  adding manifests
28e2e3804f2e combine tests
Adrian Buehlmann <adrian@cadifra.com>
parents: 3853
diff changeset
    28
  adding file changes
28e2e3804f2e combine tests
Adrian Buehlmann <adrian@cadifra.com>
parents: 3853
diff changeset
    29
  added 1 changesets with 1 changes to 1 files
28e2e3804f2e combine tests
Adrian Buehlmann <adrian@cadifra.com>
parents: 3853
diff changeset
    30
  
30279
a8d2071c3373 test: rename 'test-push-r.t' to 'test-push.t'
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 30278
diff changeset
    31
  pushing to test-revflag-1
12279
28e2e3804f2e combine tests
Adrian Buehlmann <adrian@cadifra.com>
parents: 3853
diff changeset
    32
  searching for changes
28e2e3804f2e combine tests
Adrian Buehlmann <adrian@cadifra.com>
parents: 3853
diff changeset
    33
  adding changesets
28e2e3804f2e combine tests
Adrian Buehlmann <adrian@cadifra.com>
parents: 3853
diff changeset
    34
  adding manifests
28e2e3804f2e combine tests
Adrian Buehlmann <adrian@cadifra.com>
parents: 3853
diff changeset
    35
  adding file changes
28e2e3804f2e combine tests
Adrian Buehlmann <adrian@cadifra.com>
parents: 3853
diff changeset
    36
  added 2 changesets with 2 changes to 1 files
28e2e3804f2e combine tests
Adrian Buehlmann <adrian@cadifra.com>
parents: 3853
diff changeset
    37
  
30279
a8d2071c3373 test: rename 'test-push-r.t' to 'test-push.t'
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 30278
diff changeset
    38
  pushing to test-revflag-2
12279
28e2e3804f2e combine tests
Adrian Buehlmann <adrian@cadifra.com>
parents: 3853
diff changeset
    39
  searching for changes
28e2e3804f2e combine tests
Adrian Buehlmann <adrian@cadifra.com>
parents: 3853
diff changeset
    40
  adding changesets
28e2e3804f2e combine tests
Adrian Buehlmann <adrian@cadifra.com>
parents: 3853
diff changeset
    41
  adding manifests
28e2e3804f2e combine tests
Adrian Buehlmann <adrian@cadifra.com>
parents: 3853
diff changeset
    42
  adding file changes
28e2e3804f2e combine tests
Adrian Buehlmann <adrian@cadifra.com>
parents: 3853
diff changeset
    43
  added 3 changesets with 3 changes to 1 files
28e2e3804f2e combine tests
Adrian Buehlmann <adrian@cadifra.com>
parents: 3853
diff changeset
    44
  
30279
a8d2071c3373 test: rename 'test-push-r.t' to 'test-push.t'
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 30278
diff changeset
    45
  pushing to test-revflag-3
12279
28e2e3804f2e combine tests
Adrian Buehlmann <adrian@cadifra.com>
parents: 3853
diff changeset
    46
  searching for changes
28e2e3804f2e combine tests
Adrian Buehlmann <adrian@cadifra.com>
parents: 3853
diff changeset
    47
  adding changesets
28e2e3804f2e combine tests
Adrian Buehlmann <adrian@cadifra.com>
parents: 3853
diff changeset
    48
  adding manifests
28e2e3804f2e combine tests
Adrian Buehlmann <adrian@cadifra.com>
parents: 3853
diff changeset
    49
  adding file changes
28e2e3804f2e combine tests
Adrian Buehlmann <adrian@cadifra.com>
parents: 3853
diff changeset
    50
  added 4 changesets with 4 changes to 1 files
28e2e3804f2e combine tests
Adrian Buehlmann <adrian@cadifra.com>
parents: 3853
diff changeset
    51
  
30279
a8d2071c3373 test: rename 'test-push-r.t' to 'test-push.t'
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 30278
diff changeset
    52
  pushing to test-revflag-4
12279
28e2e3804f2e combine tests
Adrian Buehlmann <adrian@cadifra.com>
parents: 3853
diff changeset
    53
  searching for changes
28e2e3804f2e combine tests
Adrian Buehlmann <adrian@cadifra.com>
parents: 3853
diff changeset
    54
  adding changesets
28e2e3804f2e combine tests
Adrian Buehlmann <adrian@cadifra.com>
parents: 3853
diff changeset
    55
  adding manifests
28e2e3804f2e combine tests
Adrian Buehlmann <adrian@cadifra.com>
parents: 3853
diff changeset
    56
  adding file changes
28e2e3804f2e combine tests
Adrian Buehlmann <adrian@cadifra.com>
parents: 3853
diff changeset
    57
  added 2 changesets with 2 changes to 1 files
28e2e3804f2e combine tests
Adrian Buehlmann <adrian@cadifra.com>
parents: 3853
diff changeset
    58
  
30279
a8d2071c3373 test: rename 'test-push-r.t' to 'test-push.t'
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 30278
diff changeset
    59
  pushing to test-revflag-5
12279
28e2e3804f2e combine tests
Adrian Buehlmann <adrian@cadifra.com>
parents: 3853
diff changeset
    60
  searching for changes
28e2e3804f2e combine tests
Adrian Buehlmann <adrian@cadifra.com>
parents: 3853
diff changeset
    61
  adding changesets
28e2e3804f2e combine tests
Adrian Buehlmann <adrian@cadifra.com>
parents: 3853
diff changeset
    62
  adding manifests
28e2e3804f2e combine tests
Adrian Buehlmann <adrian@cadifra.com>
parents: 3853
diff changeset
    63
  adding file changes
28e2e3804f2e combine tests
Adrian Buehlmann <adrian@cadifra.com>
parents: 3853
diff changeset
    64
  added 3 changesets with 3 changes to 1 files
28e2e3804f2e combine tests
Adrian Buehlmann <adrian@cadifra.com>
parents: 3853
diff changeset
    65
  
30279
a8d2071c3373 test: rename 'test-push-r.t' to 'test-push.t'
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 30278
diff changeset
    66
  pushing to test-revflag-6
12279
28e2e3804f2e combine tests
Adrian Buehlmann <adrian@cadifra.com>
parents: 3853
diff changeset
    67
  searching for changes
28e2e3804f2e combine tests
Adrian Buehlmann <adrian@cadifra.com>
parents: 3853
diff changeset
    68
  adding changesets
28e2e3804f2e combine tests
Adrian Buehlmann <adrian@cadifra.com>
parents: 3853
diff changeset
    69
  adding manifests
28e2e3804f2e combine tests
Adrian Buehlmann <adrian@cadifra.com>
parents: 3853
diff changeset
    70
  adding file changes
28e2e3804f2e combine tests
Adrian Buehlmann <adrian@cadifra.com>
parents: 3853
diff changeset
    71
  added 4 changesets with 5 changes to 2 files
28e2e3804f2e combine tests
Adrian Buehlmann <adrian@cadifra.com>
parents: 3853
diff changeset
    72
  
30279
a8d2071c3373 test: rename 'test-push-r.t' to 'test-push.t'
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 30278
diff changeset
    73
  pushing to test-revflag-7
12279
28e2e3804f2e combine tests
Adrian Buehlmann <adrian@cadifra.com>
parents: 3853
diff changeset
    74
  searching for changes
28e2e3804f2e combine tests
Adrian Buehlmann <adrian@cadifra.com>
parents: 3853
diff changeset
    75
  adding changesets
28e2e3804f2e combine tests
Adrian Buehlmann <adrian@cadifra.com>
parents: 3853
diff changeset
    76
  adding manifests
28e2e3804f2e combine tests
Adrian Buehlmann <adrian@cadifra.com>
parents: 3853
diff changeset
    77
  adding file changes
28e2e3804f2e combine tests
Adrian Buehlmann <adrian@cadifra.com>
parents: 3853
diff changeset
    78
  added 5 changesets with 6 changes to 3 files
28e2e3804f2e combine tests
Adrian Buehlmann <adrian@cadifra.com>
parents: 3853
diff changeset
    79
  
30279
a8d2071c3373 test: rename 'test-push-r.t' to 'test-push.t'
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 30278
diff changeset
    80
  pushing to test-revflag-8
12279
28e2e3804f2e combine tests
Adrian Buehlmann <adrian@cadifra.com>
parents: 3853
diff changeset
    81
  searching for changes
28e2e3804f2e combine tests
Adrian Buehlmann <adrian@cadifra.com>
parents: 3853
diff changeset
    82
  adding changesets
28e2e3804f2e combine tests
Adrian Buehlmann <adrian@cadifra.com>
parents: 3853
diff changeset
    83
  adding manifests
28e2e3804f2e combine tests
Adrian Buehlmann <adrian@cadifra.com>
parents: 3853
diff changeset
    84
  adding file changes
28e2e3804f2e combine tests
Adrian Buehlmann <adrian@cadifra.com>
parents: 3853
diff changeset
    85
  added 5 changesets with 5 changes to 2 files
28e2e3804f2e combine tests
Adrian Buehlmann <adrian@cadifra.com>
parents: 3853
diff changeset
    86
30279
a8d2071c3373 test: rename 'test-push-r.t' to 'test-push.t'
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 30278
diff changeset
    87
  $ cd test-revflag-8
12279
28e2e3804f2e combine tests
Adrian Buehlmann <adrian@cadifra.com>
parents: 3853
diff changeset
    88
30279
a8d2071c3373 test: rename 'test-push-r.t' to 'test-push.t'
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 30278
diff changeset
    89
  $ hg pull ../test-revflag-7
a8d2071c3373 test: rename 'test-push-r.t' to 'test-push.t'
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 30278
diff changeset
    90
  pulling from ../test-revflag-7
12279
28e2e3804f2e combine tests
Adrian Buehlmann <adrian@cadifra.com>
parents: 3853
diff changeset
    91
  searching for changes
28e2e3804f2e combine tests
Adrian Buehlmann <adrian@cadifra.com>
parents: 3853
diff changeset
    92
  adding changesets
28e2e3804f2e combine tests
Adrian Buehlmann <adrian@cadifra.com>
parents: 3853
diff changeset
    93
  adding manifests
28e2e3804f2e combine tests
Adrian Buehlmann <adrian@cadifra.com>
parents: 3853
diff changeset
    94
  adding file changes
28e2e3804f2e combine tests
Adrian Buehlmann <adrian@cadifra.com>
parents: 3853
diff changeset
    95
  added 4 changesets with 2 changes to 3 files (+1 heads)
34661
eb586ed5d8ce transaction-summary: show the range of new revisions upon pull/unbundle (BC)
Denis Laxalde <denis.laxalde@logilab.fr>
parents: 33660
diff changeset
    96
  new changesets c70afb1ee985:faa2e4234c7a
12279
28e2e3804f2e combine tests
Adrian Buehlmann <adrian@cadifra.com>
parents: 3853
diff changeset
    97
  (run 'hg heads' to see heads, 'hg merge' to merge)
28e2e3804f2e combine tests
Adrian Buehlmann <adrian@cadifra.com>
parents: 3853
diff changeset
    98
49825
2f2682f40ea0 tests: use the `--quiet` flag for verify when applicable
Rapha?l Gom?s <rgomes@octobus.net>
parents: 46119
diff changeset
    99
  $ hg verify -q
12279
28e2e3804f2e combine tests
Adrian Buehlmann <adrian@cadifra.com>
parents: 3853
diff changeset
   100
16913
f2719b387380 tests: add missing trailing 'cd ..'
Mads Kiilerich <mads@kiilerich.com>
parents: 16350
diff changeset
   101
  $ cd ..
30280
0269ab4f4371 tests: merge 'test-push-validation.t' into 'test-push.t'
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 30279
diff changeset
   102
0269ab4f4371 tests: merge 'test-push-validation.t' into 'test-push.t'
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 30279
diff changeset
   103
Test server side validation during push
0269ab4f4371 tests: merge 'test-push-validation.t' into 'test-push.t'
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 30279
diff changeset
   104
=======================================
0269ab4f4371 tests: merge 'test-push-validation.t' into 'test-push.t'
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 30279
diff changeset
   105
0269ab4f4371 tests: merge 'test-push-validation.t' into 'test-push.t'
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 30279
diff changeset
   106
  $ hg init test-validation
0269ab4f4371 tests: merge 'test-push-validation.t' into 'test-push.t'
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 30279
diff changeset
   107
  $ cd test-validation
0269ab4f4371 tests: merge 'test-push-validation.t' into 'test-push.t'
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 30279
diff changeset
   108
0269ab4f4371 tests: merge 'test-push-validation.t' into 'test-push.t'
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 30279
diff changeset
   109
  $ cat > .hg/hgrc <<EOF
0269ab4f4371 tests: merge 'test-push-validation.t' into 'test-push.t'
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 30279
diff changeset
   110
  > [server]
0269ab4f4371 tests: merge 'test-push-validation.t' into 'test-push.t'
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 30279
diff changeset
   111
  > validate=1
0269ab4f4371 tests: merge 'test-push-validation.t' into 'test-push.t'
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 30279
diff changeset
   112
  > EOF
0269ab4f4371 tests: merge 'test-push-validation.t' into 'test-push.t'
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 30279
diff changeset
   113
0269ab4f4371 tests: merge 'test-push-validation.t' into 'test-push.t'
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 30279
diff changeset
   114
  $ echo alpha > alpha
0269ab4f4371 tests: merge 'test-push-validation.t' into 'test-push.t'
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 30279
diff changeset
   115
  $ echo beta > beta
0269ab4f4371 tests: merge 'test-push-validation.t' into 'test-push.t'
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 30279
diff changeset
   116
  $ hg addr
0269ab4f4371 tests: merge 'test-push-validation.t' into 'test-push.t'
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 30279
diff changeset
   117
  adding alpha
0269ab4f4371 tests: merge 'test-push-validation.t' into 'test-push.t'
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 30279
diff changeset
   118
  adding beta
0269ab4f4371 tests: merge 'test-push-validation.t' into 'test-push.t'
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 30279
diff changeset
   119
  $ hg ci -m 1
0269ab4f4371 tests: merge 'test-push-validation.t' into 'test-push.t'
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 30279
diff changeset
   120
0269ab4f4371 tests: merge 'test-push-validation.t' into 'test-push.t'
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 30279
diff changeset
   121
  $ cd ..
0269ab4f4371 tests: merge 'test-push-validation.t' into 'test-push.t'
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 30279
diff changeset
   122
  $ hg clone test-validation test-validation-clone
0269ab4f4371 tests: merge 'test-push-validation.t' into 'test-push.t'
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 30279
diff changeset
   123
  updating to branch default
0269ab4f4371 tests: merge 'test-push-validation.t' into 'test-push.t'
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 30279
diff changeset
   124
  2 files updated, 0 files merged, 0 files removed, 0 files unresolved
0269ab4f4371 tests: merge 'test-push-validation.t' into 'test-push.t'
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 30279
diff changeset
   125
37344
e1942c196f66 tests: skip filelog damage tests when not using revlogs
Gregory Szorc <gregory.szorc@gmail.com>
parents: 35393
diff changeset
   126
30280
0269ab4f4371 tests: merge 'test-push-validation.t' into 'test-push.t'
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 30279
diff changeset
   127
Test spurious filelog entries:
0269ab4f4371 tests: merge 'test-push-validation.t' into 'test-push.t'
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 30279
diff changeset
   128
0269ab4f4371 tests: merge 'test-push-validation.t' into 'test-push.t'
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 30279
diff changeset
   129
  $ cd test-validation-clone
0269ab4f4371 tests: merge 'test-push-validation.t' into 'test-push.t'
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 30279
diff changeset
   130
  $ echo blah >> beta
0269ab4f4371 tests: merge 'test-push-validation.t' into 'test-push.t'
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 30279
diff changeset
   131
  $ cp .hg/store/data/beta.i tmp1
0269ab4f4371 tests: merge 'test-push-validation.t' into 'test-push.t'
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 30279
diff changeset
   132
  $ hg ci -m 2
0269ab4f4371 tests: merge 'test-push-validation.t' into 'test-push.t'
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 30279
diff changeset
   133
  $ cp .hg/store/data/beta.i tmp2
0269ab4f4371 tests: merge 'test-push-validation.t' into 'test-push.t'
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 30279
diff changeset
   134
  $ hg -q rollback
0269ab4f4371 tests: merge 'test-push-validation.t' into 'test-push.t'
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 30279
diff changeset
   135
  $ mv tmp2 .hg/store/data/beta.i
0269ab4f4371 tests: merge 'test-push-validation.t' into 'test-push.t'
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 30279
diff changeset
   136
  $ echo blah >> beta
0269ab4f4371 tests: merge 'test-push-validation.t' into 'test-push.t'
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 30279
diff changeset
   137
  $ hg ci -m '2 (corrupt)'
0269ab4f4371 tests: merge 'test-push-validation.t' into 'test-push.t'
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 30279
diff changeset
   138
0269ab4f4371 tests: merge 'test-push-validation.t' into 'test-push.t'
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 30279
diff changeset
   139
Expected to fail:
0269ab4f4371 tests: merge 'test-push-validation.t' into 'test-push.t'
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 30279
diff changeset
   140
49825
2f2682f40ea0 tests: use the `--quiet` flag for verify when applicable
Rapha?l Gom?s <rgomes@octobus.net>
parents: 46119
diff changeset
   141
  $ hg verify -q
30280
0269ab4f4371 tests: merge 'test-push-validation.t' into 'test-push.t'
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 30279
diff changeset
   142
   beta@1: dddc47b3ba30 not in manifests
49826
c84844cd523a verify: also check dirstate
Rapha?l Gom?s <rgomes@octobus.net>
parents: 49825
diff changeset
   143
  not checking dirstate because of previous errors
30280
0269ab4f4371 tests: merge 'test-push-validation.t' into 'test-push.t'
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 30279
diff changeset
   144
  1 integrity errors encountered!
0269ab4f4371 tests: merge 'test-push-validation.t' into 'test-push.t'
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 30279
diff changeset
   145
  (first damaged changeset appears to be 1)
0269ab4f4371 tests: merge 'test-push-validation.t' into 'test-push.t'
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 30279
diff changeset
   146
  [1]
0269ab4f4371 tests: merge 'test-push-validation.t' into 'test-push.t'
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 30279
diff changeset
   147
0269ab4f4371 tests: merge 'test-push-validation.t' into 'test-push.t'
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 30279
diff changeset
   148
  $ hg push
35393
4441705b7111 tests: remove (glob) annotations that were only for '\' matches
Matt Harbison <matt_harbison@yahoo.com>
parents: 34661
diff changeset
   149
  pushing to $TESTTMP/test-validation
30280
0269ab4f4371 tests: merge 'test-push-validation.t' into 'test-push.t'
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 30279
diff changeset
   150
  searching for changes
0269ab4f4371 tests: merge 'test-push-validation.t' into 'test-push.t'
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 30279
diff changeset
   151
  adding changesets
0269ab4f4371 tests: merge 'test-push-validation.t' into 'test-push.t'
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 30279
diff changeset
   152
  adding manifests
0269ab4f4371 tests: merge 'test-push-validation.t' into 'test-push.t'
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 30279
diff changeset
   153
  adding file changes
0269ab4f4371 tests: merge 'test-push-validation.t' into 'test-push.t'
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 30279
diff changeset
   154
  transaction abort!
0269ab4f4371 tests: merge 'test-push-validation.t' into 'test-push.t'
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 30279
diff changeset
   155
  rollback completed
0269ab4f4371 tests: merge 'test-push-validation.t' into 'test-push.t'
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 30279
diff changeset
   156
  abort: received spurious file revlog entry
0269ab4f4371 tests: merge 'test-push-validation.t' into 'test-push.t'
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 30279
diff changeset
   157
  [255]
0269ab4f4371 tests: merge 'test-push-validation.t' into 'test-push.t'
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 30279
diff changeset
   158
0269ab4f4371 tests: merge 'test-push-validation.t' into 'test-push.t'
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 30279
diff changeset
   159
  $ hg -q rollback
0269ab4f4371 tests: merge 'test-push-validation.t' into 'test-push.t'
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 30279
diff changeset
   160
  $ mv tmp1 .hg/store/data/beta.i
0269ab4f4371 tests: merge 'test-push-validation.t' into 'test-push.t'
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 30279
diff changeset
   161
  $ echo beta > beta
0269ab4f4371 tests: merge 'test-push-validation.t' into 'test-push.t'
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 30279
diff changeset
   162
0269ab4f4371 tests: merge 'test-push-validation.t' into 'test-push.t'
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 30279
diff changeset
   163
Test missing filelog entries:
0269ab4f4371 tests: merge 'test-push-validation.t' into 'test-push.t'
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 30279
diff changeset
   164
0269ab4f4371 tests: merge 'test-push-validation.t' into 'test-push.t'
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 30279
diff changeset
   165
  $ cp .hg/store/data/beta.i tmp
0269ab4f4371 tests: merge 'test-push-validation.t' into 'test-push.t'
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 30279
diff changeset
   166
  $ echo blah >> beta
0269ab4f4371 tests: merge 'test-push-validation.t' into 'test-push.t'
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 30279
diff changeset
   167
  $ hg ci -m '2 (corrupt)'
0269ab4f4371 tests: merge 'test-push-validation.t' into 'test-push.t'
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 30279
diff changeset
   168
  $ mv tmp .hg/store/data/beta.i
0269ab4f4371 tests: merge 'test-push-validation.t' into 'test-push.t'
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 30279
diff changeset
   169
0269ab4f4371 tests: merge 'test-push-validation.t' into 'test-push.t'
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 30279
diff changeset
   170
Expected to fail:
0269ab4f4371 tests: merge 'test-push-validation.t' into 'test-push.t'
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 30279
diff changeset
   171
49825
2f2682f40ea0 tests: use the `--quiet` flag for verify when applicable
Rapha?l Gom?s <rgomes@octobus.net>
parents: 46119
diff changeset
   172
  $ hg verify -q
30280
0269ab4f4371 tests: merge 'test-push-validation.t' into 'test-push.t'
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 30279
diff changeset
   173
   beta@1: manifest refers to unknown revision dddc47b3ba30
49826
c84844cd523a verify: also check dirstate
Rapha?l Gom?s <rgomes@octobus.net>
parents: 49825
diff changeset
   174
  not checking dirstate because of previous errors
30280
0269ab4f4371 tests: merge 'test-push-validation.t' into 'test-push.t'
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 30279
diff changeset
   175
  1 integrity errors encountered!
0269ab4f4371 tests: merge 'test-push-validation.t' into 'test-push.t'
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 30279
diff changeset
   176
  (first damaged changeset appears to be 1)
0269ab4f4371 tests: merge 'test-push-validation.t' into 'test-push.t'
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 30279
diff changeset
   177
  [1]
0269ab4f4371 tests: merge 'test-push-validation.t' into 'test-push.t'
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 30279
diff changeset
   178
0269ab4f4371 tests: merge 'test-push-validation.t' into 'test-push.t'
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 30279
diff changeset
   179
  $ hg push
35393
4441705b7111 tests: remove (glob) annotations that were only for '\' matches
Matt Harbison <matt_harbison@yahoo.com>
parents: 34661
diff changeset
   180
  pushing to $TESTTMP/test-validation
30280
0269ab4f4371 tests: merge 'test-push-validation.t' into 'test-push.t'
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 30279
diff changeset
   181
  searching for changes
0269ab4f4371 tests: merge 'test-push-validation.t' into 'test-push.t'
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 30279
diff changeset
   182
  adding changesets
0269ab4f4371 tests: merge 'test-push-validation.t' into 'test-push.t'
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 30279
diff changeset
   183
  adding manifests
0269ab4f4371 tests: merge 'test-push-validation.t' into 'test-push.t'
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 30279
diff changeset
   184
  adding file changes
0269ab4f4371 tests: merge 'test-push-validation.t' into 'test-push.t'
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 30279
diff changeset
   185
  transaction abort!
0269ab4f4371 tests: merge 'test-push-validation.t' into 'test-push.t'
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 30279
diff changeset
   186
  rollback completed
0269ab4f4371 tests: merge 'test-push-validation.t' into 'test-push.t'
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 30279
diff changeset
   187
  abort: missing file data for beta:dddc47b3ba30e54484720ce0f4f768a0f4b6efb9 - run hg verify
0269ab4f4371 tests: merge 'test-push-validation.t' into 'test-push.t'
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 30279
diff changeset
   188
  [255]
0269ab4f4371 tests: merge 'test-push-validation.t' into 'test-push.t'
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 30279
diff changeset
   189
0269ab4f4371 tests: merge 'test-push-validation.t' into 'test-push.t'
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 30279
diff changeset
   190
  $ cd ..
30281
e58acb4fc510 tests: merge 'test-push-hook-lock.t' into 'test-push.t'
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 30280
diff changeset
   191
e58acb4fc510 tests: merge 'test-push-hook-lock.t' into 'test-push.t'
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 30280
diff changeset
   192
Test push hook locking
e58acb4fc510 tests: merge 'test-push-hook-lock.t' into 'test-push.t'
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 30280
diff changeset
   193
=====================
e58acb4fc510 tests: merge 'test-push-hook-lock.t' into 'test-push.t'
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 30280
diff changeset
   194
e58acb4fc510 tests: merge 'test-push-hook-lock.t' into 'test-push.t'
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 30280
diff changeset
   195
  $ hg init 1
e58acb4fc510 tests: merge 'test-push-hook-lock.t' into 'test-push.t'
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 30280
diff changeset
   196
e58acb4fc510 tests: merge 'test-push-hook-lock.t' into 'test-push.t'
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 30280
diff changeset
   197
  $ echo '[ui]' >> 1/.hg/hgrc
e58acb4fc510 tests: merge 'test-push-hook-lock.t' into 'test-push.t'
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 30280
diff changeset
   198
  $ echo 'timeout = 10' >> 1/.hg/hgrc
e58acb4fc510 tests: merge 'test-push-hook-lock.t' into 'test-push.t'
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 30280
diff changeset
   199
e58acb4fc510 tests: merge 'test-push-hook-lock.t' into 'test-push.t'
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 30280
diff changeset
   200
  $ echo foo > 1/foo
e58acb4fc510 tests: merge 'test-push-hook-lock.t' into 'test-push.t'
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 30280
diff changeset
   201
  $ hg --cwd 1 ci -A -m foo
e58acb4fc510 tests: merge 'test-push-hook-lock.t' into 'test-push.t'
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 30280
diff changeset
   202
  adding foo
e58acb4fc510 tests: merge 'test-push-hook-lock.t' into 'test-push.t'
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 30280
diff changeset
   203
e58acb4fc510 tests: merge 'test-push-hook-lock.t' into 'test-push.t'
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 30280
diff changeset
   204
  $ hg clone 1 2
e58acb4fc510 tests: merge 'test-push-hook-lock.t' into 'test-push.t'
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 30280
diff changeset
   205
  updating to branch default
e58acb4fc510 tests: merge 'test-push-hook-lock.t' into 'test-push.t'
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 30280
diff changeset
   206
  1 files updated, 0 files merged, 0 files removed, 0 files unresolved
e58acb4fc510 tests: merge 'test-push-hook-lock.t' into 'test-push.t'
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 30280
diff changeset
   207
e58acb4fc510 tests: merge 'test-push-hook-lock.t' into 'test-push.t'
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 30280
diff changeset
   208
  $ hg clone 2 3
e58acb4fc510 tests: merge 'test-push-hook-lock.t' into 'test-push.t'
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 30280
diff changeset
   209
  updating to branch default
e58acb4fc510 tests: merge 'test-push-hook-lock.t' into 'test-push.t'
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 30280
diff changeset
   210
  1 files updated, 0 files merged, 0 files removed, 0 files unresolved
e58acb4fc510 tests: merge 'test-push-hook-lock.t' into 'test-push.t'
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 30280
diff changeset
   211
e58acb4fc510 tests: merge 'test-push-hook-lock.t' into 'test-push.t'
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 30280
diff changeset
   212
  $ cat <<EOF > $TESTTMP/debuglocks-pretxn-hook.sh
e58acb4fc510 tests: merge 'test-push-hook-lock.t' into 'test-push.t'
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 30280
diff changeset
   213
  > hg debuglocks
e58acb4fc510 tests: merge 'test-push-hook-lock.t' into 'test-push.t'
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 30280
diff changeset
   214
  > true
e58acb4fc510 tests: merge 'test-push-hook-lock.t' into 'test-push.t'
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 30280
diff changeset
   215
  > EOF
e58acb4fc510 tests: merge 'test-push-hook-lock.t' into 'test-push.t'
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 30280
diff changeset
   216
  $ echo '[hooks]' >> 2/.hg/hgrc
e58acb4fc510 tests: merge 'test-push-hook-lock.t' into 'test-push.t'
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 30280
diff changeset
   217
  $ echo "pretxnchangegroup.a = sh $TESTTMP/debuglocks-pretxn-hook.sh" >> 2/.hg/hgrc
e58acb4fc510 tests: merge 'test-push-hook-lock.t' into 'test-push.t'
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 30280
diff changeset
   218
  $ echo 'changegroup.push = hg push -qf ../1' >> 2/.hg/hgrc
e58acb4fc510 tests: merge 'test-push-hook-lock.t' into 'test-push.t'
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 30280
diff changeset
   219
e58acb4fc510 tests: merge 'test-push-hook-lock.t' into 'test-push.t'
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 30280
diff changeset
   220
  $ echo bar >> 3/foo
e58acb4fc510 tests: merge 'test-push-hook-lock.t' into 'test-push.t'
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 30280
diff changeset
   221
  $ hg --cwd 3 ci -m bar
e58acb4fc510 tests: merge 'test-push-hook-lock.t' into 'test-push.t'
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 30280
diff changeset
   222
e58acb4fc510 tests: merge 'test-push-hook-lock.t' into 'test-push.t'
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 30280
diff changeset
   223
  $ hg --cwd 3 push ../2 --config devel.legacy.exchange=bundle1
e58acb4fc510 tests: merge 'test-push-hook-lock.t' into 'test-push.t'
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 30280
diff changeset
   224
  pushing to ../2
e58acb4fc510 tests: merge 'test-push-hook-lock.t' into 'test-push.t'
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 30280
diff changeset
   225
  searching for changes
e58acb4fc510 tests: merge 'test-push-hook-lock.t' into 'test-push.t'
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 30280
diff changeset
   226
  adding changesets
e58acb4fc510 tests: merge 'test-push-hook-lock.t' into 'test-push.t'
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 30280
diff changeset
   227
  adding manifests
e58acb4fc510 tests: merge 'test-push-hook-lock.t' into 'test-push.t'
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 30280
diff changeset
   228
  adding file changes
e58acb4fc510 tests: merge 'test-push-hook-lock.t' into 'test-push.t'
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 30280
diff changeset
   229
  lock:  user *, process * (*s) (glob)
e58acb4fc510 tests: merge 'test-push-hook-lock.t' into 'test-push.t'
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 30280
diff changeset
   230
  wlock: free
42897
d7304434390f changegroup: move message about added changes to transaction summary
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 39489
diff changeset
   231
  added 1 changesets with 1 changes to 1 files
30281
e58acb4fc510 tests: merge 'test-push-hook-lock.t' into 'test-push.t'
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 30280
diff changeset
   232
e58acb4fc510 tests: merge 'test-push-hook-lock.t' into 'test-push.t'
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 30280
diff changeset
   233
  $ hg --cwd 1 --config extensions.strip= strip tip -q
e58acb4fc510 tests: merge 'test-push-hook-lock.t' into 'test-push.t'
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 30280
diff changeset
   234
  $ hg --cwd 2 --config extensions.strip= strip tip -q
e58acb4fc510 tests: merge 'test-push-hook-lock.t' into 'test-push.t'
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 30280
diff changeset
   235
  $ hg --cwd 3 push ../2 # bundle2+
e58acb4fc510 tests: merge 'test-push-hook-lock.t' into 'test-push.t'
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 30280
diff changeset
   236
  pushing to ../2
e58acb4fc510 tests: merge 'test-push-hook-lock.t' into 'test-push.t'
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 30280
diff changeset
   237
  searching for changes
e58acb4fc510 tests: merge 'test-push-hook-lock.t' into 'test-push.t'
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 30280
diff changeset
   238
  adding changesets
e58acb4fc510 tests: merge 'test-push-hook-lock.t' into 'test-push.t'
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 30280
diff changeset
   239
  adding manifests
e58acb4fc510 tests: merge 'test-push-hook-lock.t' into 'test-push.t'
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 30280
diff changeset
   240
  adding file changes
e58acb4fc510 tests: merge 'test-push-hook-lock.t' into 'test-push.t'
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 30280
diff changeset
   241
  lock:  user *, process * (*s) (glob)
e58acb4fc510 tests: merge 'test-push-hook-lock.t' into 'test-push.t'
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 30280
diff changeset
   242
  wlock: user *, process * (*s) (glob)
42897
d7304434390f changegroup: move message about added changes to transaction summary
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 39489
diff changeset
   243
  added 1 changesets with 1 changes to 1 files
30281
e58acb4fc510 tests: merge 'test-push-hook-lock.t' into 'test-push.t'
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 30280
diff changeset
   244
33138
78fc540c53e1 pushrace: avoid crash on bare push when using concurrent push mode
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 30281
diff changeset
   245
Test bare push with multiple race checking options
78fc540c53e1 pushrace: avoid crash on bare push when using concurrent push mode
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 30281
diff changeset
   246
--------------------------------------------------
78fc540c53e1 pushrace: avoid crash on bare push when using concurrent push mode
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 30281
diff changeset
   247
78fc540c53e1 pushrace: avoid crash on bare push when using concurrent push mode
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 30281
diff changeset
   248
  $ hg init test-bare-push-no-concurrency
78fc540c53e1 pushrace: avoid crash on bare push when using concurrent push mode
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 30281
diff changeset
   249
  $ hg init test-bare-push-unrelated-concurrency
78fc540c53e1 pushrace: avoid crash on bare push when using concurrent push mode
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 30281
diff changeset
   250
  $ hg -R test-revflag push -r 0 test-bare-push-no-concurrency --config server.concurrent-push-mode=strict
78fc540c53e1 pushrace: avoid crash on bare push when using concurrent push mode
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 30281
diff changeset
   251
  pushing to test-bare-push-no-concurrency
78fc540c53e1 pushrace: avoid crash on bare push when using concurrent push mode
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 30281
diff changeset
   252
  searching for changes
78fc540c53e1 pushrace: avoid crash on bare push when using concurrent push mode
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 30281
diff changeset
   253
  adding changesets
78fc540c53e1 pushrace: avoid crash on bare push when using concurrent push mode
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 30281
diff changeset
   254
  adding manifests
78fc540c53e1 pushrace: avoid crash on bare push when using concurrent push mode
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 30281
diff changeset
   255
  adding file changes
78fc540c53e1 pushrace: avoid crash on bare push when using concurrent push mode
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 30281
diff changeset
   256
  added 1 changesets with 1 changes to 1 files
78fc540c53e1 pushrace: avoid crash on bare push when using concurrent push mode
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 30281
diff changeset
   257
  $ hg -R test-revflag push -r 0 test-bare-push-unrelated-concurrency --config server.concurrent-push-mode=check-related
78fc540c53e1 pushrace: avoid crash on bare push when using concurrent push mode
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 30281
diff changeset
   258
  pushing to test-bare-push-unrelated-concurrency
78fc540c53e1 pushrace: avoid crash on bare push when using concurrent push mode
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 30281
diff changeset
   259
  searching for changes
78fc540c53e1 pushrace: avoid crash on bare push when using concurrent push mode
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 30281
diff changeset
   260
  adding changesets
78fc540c53e1 pushrace: avoid crash on bare push when using concurrent push mode
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 30281
diff changeset
   261
  adding manifests
78fc540c53e1 pushrace: avoid crash on bare push when using concurrent push mode
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 30281
diff changeset
   262
  adding file changes
78fc540c53e1 pushrace: avoid crash on bare push when using concurrent push mode
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 30281
diff changeset
   263
  added 1 changesets with 1 changes to 1 files
33655
48d520fdf880 push: add tests for unsafe ssh url (SEC)
Sean Farley <sean@farley.io>
parents: 33138
diff changeset
   264
48d520fdf880 push: add tests for unsafe ssh url (SEC)
Sean Farley <sean@farley.io>
parents: 33138
diff changeset
   265
SEC: check for unsafe ssh url
48d520fdf880 push: add tests for unsafe ssh url (SEC)
Sean Farley <sean@farley.io>
parents: 33138
diff changeset
   266
33660
3fee7f7d2da0 ssh: unban the use of pipe character in user@host:port string
Yuya Nishihara <yuya@tcha.org>
parents: 33655
diff changeset
   267
  $ cat >> $HGRCPATH << EOF
3fee7f7d2da0 ssh: unban the use of pipe character in user@host:port string
Yuya Nishihara <yuya@tcha.org>
parents: 33655
diff changeset
   268
  > [ui]
3fee7f7d2da0 ssh: unban the use of pipe character in user@host:port string
Yuya Nishihara <yuya@tcha.org>
parents: 33655
diff changeset
   269
  > ssh = sh -c "read l; read l; read l"
3fee7f7d2da0 ssh: unban the use of pipe character in user@host:port string
Yuya Nishihara <yuya@tcha.org>
parents: 33655
diff changeset
   270
  > EOF
3fee7f7d2da0 ssh: unban the use of pipe character in user@host:port string
Yuya Nishihara <yuya@tcha.org>
parents: 33655
diff changeset
   271
33655
48d520fdf880 push: add tests for unsafe ssh url (SEC)
Sean Farley <sean@farley.io>
parents: 33138
diff changeset
   272
  $ hg -R test-revflag push 'ssh://-oProxyCommand=touch${IFS}owned/path'
48d520fdf880 push: add tests for unsafe ssh url (SEC)
Sean Farley <sean@farley.io>
parents: 33138
diff changeset
   273
  pushing to ssh://-oProxyCommand%3Dtouch%24%7BIFS%7Downed/path
48d520fdf880 push: add tests for unsafe ssh url (SEC)
Sean Farley <sean@farley.io>
parents: 33138
diff changeset
   274
  abort: potentially unsafe url: 'ssh://-oProxyCommand=touch${IFS}owned/path'
48d520fdf880 push: add tests for unsafe ssh url (SEC)
Sean Farley <sean@farley.io>
parents: 33138
diff changeset
   275
  [255]
48d520fdf880 push: add tests for unsafe ssh url (SEC)
Sean Farley <sean@farley.io>
parents: 33138
diff changeset
   276
  $ hg -R test-revflag push 'ssh://%2DoProxyCommand=touch${IFS}owned/path'
48d520fdf880 push: add tests for unsafe ssh url (SEC)
Sean Farley <sean@farley.io>
parents: 33138
diff changeset
   277
  pushing to ssh://-oProxyCommand%3Dtouch%24%7BIFS%7Downed/path
48d520fdf880 push: add tests for unsafe ssh url (SEC)
Sean Farley <sean@farley.io>
parents: 33138
diff changeset
   278
  abort: potentially unsafe url: 'ssh://-oProxyCommand=touch${IFS}owned/path'
48d520fdf880 push: add tests for unsafe ssh url (SEC)
Sean Farley <sean@farley.io>
parents: 33138
diff changeset
   279
  [255]
33660
3fee7f7d2da0 ssh: unban the use of pipe character in user@host:port string
Yuya Nishihara <yuya@tcha.org>
parents: 33655
diff changeset
   280
  $ hg -R test-revflag push 'ssh://fakehost|touch${IFS}owned/path'
3fee7f7d2da0 ssh: unban the use of pipe character in user@host:port string
Yuya Nishihara <yuya@tcha.org>
parents: 33655
diff changeset
   281
  pushing to ssh://fakehost%7Ctouch%24%7BIFS%7Downed/path
45906
95c4cca641f6 errors: remove trailing "!" from some error messages for consistency
Martin von Zweigbergk <martinvonz@google.com>
parents: 45827
diff changeset
   282
  abort: no suitable response from remote hg
33655
48d520fdf880 push: add tests for unsafe ssh url (SEC)
Sean Farley <sean@farley.io>
parents: 33138
diff changeset
   283
  [255]
33660
3fee7f7d2da0 ssh: unban the use of pipe character in user@host:port string
Yuya Nishihara <yuya@tcha.org>
parents: 33655
diff changeset
   284
  $ hg -R test-revflag push 'ssh://fakehost%7Ctouch%20owned/path'
3fee7f7d2da0 ssh: unban the use of pipe character in user@host:port string
Yuya Nishihara <yuya@tcha.org>
parents: 33655
diff changeset
   285
  pushing to ssh://fakehost%7Ctouch%20owned/path
45906
95c4cca641f6 errors: remove trailing "!" from some error messages for consistency
Martin von Zweigbergk <martinvonz@google.com>
parents: 45827
diff changeset
   286
  abort: no suitable response from remote hg
33655
48d520fdf880 push: add tests for unsafe ssh url (SEC)
Sean Farley <sean@farley.io>
parents: 33138
diff changeset
   287
  [255]
33660
3fee7f7d2da0 ssh: unban the use of pipe character in user@host:port string
Yuya Nishihara <yuya@tcha.org>
parents: 33655
diff changeset
   288
3fee7f7d2da0 ssh: unban the use of pipe character in user@host:port string
Yuya Nishihara <yuya@tcha.org>
parents: 33655
diff changeset
   289
  $ [ ! -f owned ] || echo 'you got owned'
43163
5617b748aad8 push: support config option to require revs be specified when running push
Kyle Lippincott <spectral@google.com>
parents: 42897
diff changeset
   290
5617b748aad8 push: support config option to require revs be specified when running push
Kyle Lippincott <spectral@google.com>
parents: 42897
diff changeset
   291
Test `commands.push.require-revs`
5617b748aad8 push: support config option to require revs be specified when running push
Kyle Lippincott <spectral@google.com>
parents: 42897
diff changeset
   292
---------------------------------
5617b748aad8 push: support config option to require revs be specified when running push
Kyle Lippincott <spectral@google.com>
parents: 42897
diff changeset
   293
5617b748aad8 push: support config option to require revs be specified when running push
Kyle Lippincott <spectral@google.com>
parents: 42897
diff changeset
   294
  $ hg clone -q test-revflag test-require-revs-source
5617b748aad8 push: support config option to require revs be specified when running push
Kyle Lippincott <spectral@google.com>
parents: 42897
diff changeset
   295
  $ hg init test-require-revs-dest
5617b748aad8 push: support config option to require revs be specified when running push
Kyle Lippincott <spectral@google.com>
parents: 42897
diff changeset
   296
  $ cd test-require-revs-source
5617b748aad8 push: support config option to require revs be specified when running push
Kyle Lippincott <spectral@google.com>
parents: 42897
diff changeset
   297
  $ cat >> .hg/hgrc << EOF
5617b748aad8 push: support config option to require revs be specified when running push
Kyle Lippincott <spectral@google.com>
parents: 42897
diff changeset
   298
  > [paths]
5617b748aad8 push: support config option to require revs be specified when running push
Kyle Lippincott <spectral@google.com>
parents: 42897
diff changeset
   299
  > default = ../test-require-revs-dest
5617b748aad8 push: support config option to require revs be specified when running push
Kyle Lippincott <spectral@google.com>
parents: 42897
diff changeset
   300
  > [commands]
5617b748aad8 push: support config option to require revs be specified when running push
Kyle Lippincott <spectral@google.com>
parents: 42897
diff changeset
   301
  > push.require-revs=1
5617b748aad8 push: support config option to require revs be specified when running push
Kyle Lippincott <spectral@google.com>
parents: 42897
diff changeset
   302
  > EOF
5617b748aad8 push: support config option to require revs be specified when running push
Kyle Lippincott <spectral@google.com>
parents: 42897
diff changeset
   303
  $ hg push
5617b748aad8 push: support config option to require revs be specified when running push
Kyle Lippincott <spectral@google.com>
parents: 42897
diff changeset
   304
  pushing to $TESTTMP/test-require-revs-dest
5617b748aad8 push: support config option to require revs be specified when running push
Kyle Lippincott <spectral@google.com>
parents: 42897
diff changeset
   305
  abort: no revisions specified to push
5617b748aad8 push: support config option to require revs be specified when running push
Kyle Lippincott <spectral@google.com>
parents: 42897
diff changeset
   306
  (did you mean "hg push -r ."?)
45827
8d72e29ad1e0 errors: introduce InputError and use it from commands and cmdutil
Martin von Zweigbergk <martinvonz@google.com>
parents: 43163
diff changeset
   307
  [10]
43163
5617b748aad8 push: support config option to require revs be specified when running push
Kyle Lippincott <spectral@google.com>
parents: 42897
diff changeset
   308
  $ hg push -r 0
5617b748aad8 push: support config option to require revs be specified when running push
Kyle Lippincott <spectral@google.com>
parents: 42897
diff changeset
   309
  pushing to $TESTTMP/test-require-revs-dest
5617b748aad8 push: support config option to require revs be specified when running push
Kyle Lippincott <spectral@google.com>
parents: 42897
diff changeset
   310
  searching for changes
5617b748aad8 push: support config option to require revs be specified when running push
Kyle Lippincott <spectral@google.com>
parents: 42897
diff changeset
   311
  adding changesets
5617b748aad8 push: support config option to require revs be specified when running push
Kyle Lippincott <spectral@google.com>
parents: 42897
diff changeset
   312
  adding manifests
5617b748aad8 push: support config option to require revs be specified when running push
Kyle Lippincott <spectral@google.com>
parents: 42897
diff changeset
   313
  adding file changes
5617b748aad8 push: support config option to require revs be specified when running push
Kyle Lippincott <spectral@google.com>
parents: 42897
diff changeset
   314
  added 1 changesets with 1 changes to 1 files
5617b748aad8 push: support config option to require revs be specified when running push
Kyle Lippincott <spectral@google.com>
parents: 42897
diff changeset
   315
  $ hg bookmark -r 0 push-this-bookmark
5617b748aad8 push: support config option to require revs be specified when running push
Kyle Lippincott <spectral@google.com>
parents: 42897
diff changeset
   316
(test that -B (bookmark) works for specifying "revs")
5617b748aad8 push: support config option to require revs be specified when running push
Kyle Lippincott <spectral@google.com>
parents: 42897
diff changeset
   317
  $ hg push -B push-this-bookmark
5617b748aad8 push: support config option to require revs be specified when running push
Kyle Lippincott <spectral@google.com>
parents: 42897
diff changeset
   318
  pushing to $TESTTMP/test-require-revs-dest
5617b748aad8 push: support config option to require revs be specified when running push
Kyle Lippincott <spectral@google.com>
parents: 42897
diff changeset
   319
  searching for changes
5617b748aad8 push: support config option to require revs be specified when running push
Kyle Lippincott <spectral@google.com>
parents: 42897
diff changeset
   320
  no changes found
5617b748aad8 push: support config option to require revs be specified when running push
Kyle Lippincott <spectral@google.com>
parents: 42897
diff changeset
   321
  exporting bookmark push-this-bookmark
5617b748aad8 push: support config option to require revs be specified when running push
Kyle Lippincott <spectral@google.com>
parents: 42897
diff changeset
   322
  [1]
5617b748aad8 push: support config option to require revs be specified when running push
Kyle Lippincott <spectral@google.com>
parents: 42897
diff changeset
   323
(test that -b (branch)  works for specifying "revs")
5617b748aad8 push: support config option to require revs be specified when running push
Kyle Lippincott <spectral@google.com>
parents: 42897
diff changeset
   324
  $ hg push -b default
5617b748aad8 push: support config option to require revs be specified when running push
Kyle Lippincott <spectral@google.com>
parents: 42897
diff changeset
   325
  pushing to $TESTTMP/test-require-revs-dest
5617b748aad8 push: support config option to require revs be specified when running push
Kyle Lippincott <spectral@google.com>
parents: 42897
diff changeset
   326
  searching for changes
45908
122f0b59f5f0 errors: remove trailing "!" in messages about creating new heads on push
Martin von Zweigbergk <martinvonz@google.com>
parents: 45906
diff changeset
   327
  abort: push creates new remote head [0-9a-f]+ (re)
43163
5617b748aad8 push: support config option to require revs be specified when running push
Kyle Lippincott <spectral@google.com>
parents: 42897
diff changeset
   328
  (merge or see 'hg help push' for details about pushing new heads)
46119
9261f6c1d39b errors: raise StateError when push fails because it creates new heads
Martin von Zweigbergk <martinvonz@google.com>
parents: 45908
diff changeset
   329
  [20]
43163
5617b748aad8 push: support config option to require revs be specified when running push
Kyle Lippincott <spectral@google.com>
parents: 42897
diff changeset
   330
(demonstrate that even though we don't have anything to exchange, we're still
5617b748aad8 push: support config option to require revs be specified when running push
Kyle Lippincott <spectral@google.com>
parents: 42897
diff changeset
   331
showing the error)
5617b748aad8 push: support config option to require revs be specified when running push
Kyle Lippincott <spectral@google.com>
parents: 42897
diff changeset
   332
  $ hg push
5617b748aad8 push: support config option to require revs be specified when running push
Kyle Lippincott <spectral@google.com>
parents: 42897
diff changeset
   333
  pushing to $TESTTMP/test-require-revs-dest
5617b748aad8 push: support config option to require revs be specified when running push
Kyle Lippincott <spectral@google.com>
parents: 42897
diff changeset
   334
  abort: no revisions specified to push
5617b748aad8 push: support config option to require revs be specified when running push
Kyle Lippincott <spectral@google.com>
parents: 42897
diff changeset
   335
  (did you mean "hg push -r ."?)
45827
8d72e29ad1e0 errors: introduce InputError and use it from commands and cmdutil
Martin von Zweigbergk <martinvonz@google.com>
parents: 43163
diff changeset
   336
  [10]
43163
5617b748aad8 push: support config option to require revs be specified when running push
Kyle Lippincott <spectral@google.com>
parents: 42897
diff changeset
   337
  $ hg push --config paths.default:pushrev=0
5617b748aad8 push: support config option to require revs be specified when running push
Kyle Lippincott <spectral@google.com>
parents: 42897
diff changeset
   338
  pushing to $TESTTMP/test-require-revs-dest
5617b748aad8 push: support config option to require revs be specified when running push
Kyle Lippincott <spectral@google.com>
parents: 42897
diff changeset
   339
  searching for changes
5617b748aad8 push: support config option to require revs be specified when running push
Kyle Lippincott <spectral@google.com>
parents: 42897
diff changeset
   340
  no changes found
5617b748aad8 push: support config option to require revs be specified when running push
Kyle Lippincott <spectral@google.com>
parents: 42897
diff changeset
   341
  [1]