tests/test-push-race.t
author Martin von Zweigbergk <martinvonz@google.com>
Thu, 22 Jun 2017 15:59:07 -0700
changeset 33038 f0efd2bffe1e
parent 32892 a7851519ea02
child 33252 53b3a1968aa6
permissions -rw-r--r--
bundle: extract _processchangegroup() method The new method applies the changegroup and fills in op.records, sharing a little bit of code between the two callers. We'll add another caller soon.
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
32630
53f47cc085d8 test: add a file dedicated to push race between clients
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
     1
============================================================================================
53f47cc085d8 test: add a file dedicated to push race between clients
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
     2
Test cases where there are race condition between two clients pushing to the same repository
53f47cc085d8 test: add a file dedicated to push race between clients
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
     3
============================================================================================
53f47cc085d8 test: add a file dedicated to push race between clients
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
     4
53f47cc085d8 test: add a file dedicated to push race between clients
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
     5
This file tests cases where two clients push to a server at the same time. The
53f47cc085d8 test: add a file dedicated to push race between clients
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
     6
"raced" client is done preparing it push bundle when the "racing" client
53f47cc085d8 test: add a file dedicated to push race between clients
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
     7
perform its push. The "raced" client starts its actual push after the "racing"
53f47cc085d8 test: add a file dedicated to push race between clients
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
     8
client push is fully complete.
53f47cc085d8 test: add a file dedicated to push race between clients
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
     9
53f47cc085d8 test: add a file dedicated to push race between clients
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
    10
A set of extension and shell functions ensures this scheduling.
53f47cc085d8 test: add a file dedicated to push race between clients
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
    11
53f47cc085d8 test: add a file dedicated to push race between clients
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
    12
  $ cat >> delaypush.py << EOF
53f47cc085d8 test: add a file dedicated to push race between clients
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
    13
  > """small extension orchestrate push race
53f47cc085d8 test: add a file dedicated to push race between clients
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
    14
  > 
53f47cc085d8 test: add a file dedicated to push race between clients
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
    15
  > Client with the extensions will create a file when ready and get stuck until
53f47cc085d8 test: add a file dedicated to push race between clients
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
    16
  > a file is created."""
53f47cc085d8 test: add a file dedicated to push race between clients
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
    17
  > 
53f47cc085d8 test: add a file dedicated to push race between clients
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
    18
  > import atexit
53f47cc085d8 test: add a file dedicated to push race between clients
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
    19
  > import errno
53f47cc085d8 test: add a file dedicated to push race between clients
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
    20
  > import os
53f47cc085d8 test: add a file dedicated to push race between clients
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
    21
  > import time
53f47cc085d8 test: add a file dedicated to push race between clients
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
    22
  > 
53f47cc085d8 test: add a file dedicated to push race between clients
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
    23
  > from mercurial import (
53f47cc085d8 test: add a file dedicated to push race between clients
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
    24
  >     exchange,
53f47cc085d8 test: add a file dedicated to push race between clients
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
    25
  >     extensions,
53f47cc085d8 test: add a file dedicated to push race between clients
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
    26
  > )
53f47cc085d8 test: add a file dedicated to push race between clients
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
    27
  > 
53f47cc085d8 test: add a file dedicated to push race between clients
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
    28
  > def delaypush(orig, pushop):
53f47cc085d8 test: add a file dedicated to push race between clients
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
    29
  >     # notify we are done preparing
53f47cc085d8 test: add a file dedicated to push race between clients
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
    30
  >     readypath = pushop.repo.ui.config('delaypush', 'ready-path', None)
53f47cc085d8 test: add a file dedicated to push race between clients
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
    31
  >     if readypath is not None:
53f47cc085d8 test: add a file dedicated to push race between clients
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
    32
  >         with open(readypath, 'w') as r:
53f47cc085d8 test: add a file dedicated to push race between clients
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
    33
  >             r.write('foo')
53f47cc085d8 test: add a file dedicated to push race between clients
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
    34
  >         pushop.repo.ui.status('wrote ready: %s\n' % readypath)
53f47cc085d8 test: add a file dedicated to push race between clients
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
    35
  >     # now wait for the other process to be done
53f47cc085d8 test: add a file dedicated to push race between clients
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
    36
  >     watchpath = pushop.repo.ui.config('delaypush', 'release-path', None)
53f47cc085d8 test: add a file dedicated to push race between clients
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
    37
  >     if watchpath is not None:
53f47cc085d8 test: add a file dedicated to push race between clients
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
    38
  >         pushop.repo.ui.status('waiting on: %s\n' % watchpath)
53f47cc085d8 test: add a file dedicated to push race between clients
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
    39
  >         limit = 100
53f47cc085d8 test: add a file dedicated to push race between clients
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
    40
  >         while 0 < limit and not os.path.exists(watchpath):
53f47cc085d8 test: add a file dedicated to push race between clients
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
    41
  >             limit -= 1
53f47cc085d8 test: add a file dedicated to push race between clients
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
    42
  >             time.sleep(0.1)
53f47cc085d8 test: add a file dedicated to push race between clients
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
    43
  >         if limit <= 0:
53f47cc085d8 test: add a file dedicated to push race between clients
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
    44
  >             repo.ui.warn('exiting without watchfile: %s' % watchpath)
53f47cc085d8 test: add a file dedicated to push race between clients
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
    45
  >         else:
53f47cc085d8 test: add a file dedicated to push race between clients
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
    46
  >             # delete the file at the end of the push
53f47cc085d8 test: add a file dedicated to push race between clients
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
    47
  >             def delete():
53f47cc085d8 test: add a file dedicated to push race between clients
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
    48
  >                 try:
53f47cc085d8 test: add a file dedicated to push race between clients
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
    49
  >                     os.unlink(watchpath)
53f47cc085d8 test: add a file dedicated to push race between clients
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
    50
  >                 except OSError as exc:
53f47cc085d8 test: add a file dedicated to push race between clients
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
    51
  >                     if exc.errno != errno.ENOENT:
53f47cc085d8 test: add a file dedicated to push race between clients
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
    52
  >                         raise
53f47cc085d8 test: add a file dedicated to push race between clients
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
    53
  >             atexit.register(delete)
53f47cc085d8 test: add a file dedicated to push race between clients
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
    54
  >     return orig(pushop)
53f47cc085d8 test: add a file dedicated to push race between clients
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
    55
  > 
53f47cc085d8 test: add a file dedicated to push race between clients
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
    56
  > def uisetup(ui):
53f47cc085d8 test: add a file dedicated to push race between clients
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
    57
  >     extensions.wrapfunction(exchange, '_pushbundle2', delaypush)
53f47cc085d8 test: add a file dedicated to push race between clients
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
    58
  > EOF
53f47cc085d8 test: add a file dedicated to push race between clients
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
    59
53f47cc085d8 test: add a file dedicated to push race between clients
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
    60
  $ waiton () {
53f47cc085d8 test: add a file dedicated to push race between clients
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
    61
  >     # wait for a file to be created (then delete it)
53f47cc085d8 test: add a file dedicated to push race between clients
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
    62
  >     count=100
53f47cc085d8 test: add a file dedicated to push race between clients
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
    63
  >     while [ ! -f $1 ] ;
53f47cc085d8 test: add a file dedicated to push race between clients
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
    64
  >     do
53f47cc085d8 test: add a file dedicated to push race between clients
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
    65
  >         sleep 0.1;
53f47cc085d8 test: add a file dedicated to push race between clients
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
    66
  >         count=`expr $count - 1`;
53f47cc085d8 test: add a file dedicated to push race between clients
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
    67
  >         if [ $count -lt 0 ];
53f47cc085d8 test: add a file dedicated to push race between clients
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
    68
  >         then
53f47cc085d8 test: add a file dedicated to push race between clients
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
    69
  >              break
53f47cc085d8 test: add a file dedicated to push race between clients
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
    70
  >         fi;
53f47cc085d8 test: add a file dedicated to push race between clients
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
    71
  >     done
53f47cc085d8 test: add a file dedicated to push race between clients
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
    72
  >     [ -f $1 ] || echo "ready file still missing: $1"
53f47cc085d8 test: add a file dedicated to push race between clients
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
    73
  >     rm -f $1
53f47cc085d8 test: add a file dedicated to push race between clients
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
    74
  > }
53f47cc085d8 test: add a file dedicated to push race between clients
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
    75
53f47cc085d8 test: add a file dedicated to push race between clients
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
    76
  $ release () {
53f47cc085d8 test: add a file dedicated to push race between clients
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
    77
  >     # create a file and wait for it be deleted
53f47cc085d8 test: add a file dedicated to push race between clients
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
    78
  >     count=100
53f47cc085d8 test: add a file dedicated to push race between clients
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
    79
  >     touch $1
53f47cc085d8 test: add a file dedicated to push race between clients
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
    80
  >     while [ -f $1 ] ;
53f47cc085d8 test: add a file dedicated to push race between clients
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
    81
  >     do
53f47cc085d8 test: add a file dedicated to push race between clients
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
    82
  >         sleep 0.1;
53f47cc085d8 test: add a file dedicated to push race between clients
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
    83
  >         count=`expr $count - 1`;
53f47cc085d8 test: add a file dedicated to push race between clients
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
    84
  >         if [ $count -lt 0 ];
53f47cc085d8 test: add a file dedicated to push race between clients
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
    85
  >         then
53f47cc085d8 test: add a file dedicated to push race between clients
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
    86
  >              break
53f47cc085d8 test: add a file dedicated to push race between clients
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
    87
  >         fi;
53f47cc085d8 test: add a file dedicated to push race between clients
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
    88
  >     done
53f47cc085d8 test: add a file dedicated to push race between clients
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
    89
  >     [ ! -f $1 ] || echo "delay file still exist: $1"
53f47cc085d8 test: add a file dedicated to push race between clients
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
    90
  > }
53f47cc085d8 test: add a file dedicated to push race between clients
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
    91
53f47cc085d8 test: add a file dedicated to push race between clients
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
    92
  $ cat >> $HGRCPATH << EOF
53f47cc085d8 test: add a file dedicated to push race between clients
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
    93
  > [ui]
53f47cc085d8 test: add a file dedicated to push race between clients
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
    94
  > ssh = python "$TESTDIR/dummyssh"
53f47cc085d8 test: add a file dedicated to push race between clients
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
    95
  > # simplify output
53f47cc085d8 test: add a file dedicated to push race between clients
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
    96
  > logtemplate = {node|short} {desc} ({branch})
32669
6ac367b6ae8a test: add a push race case where obsoleted head is updated
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32638
diff changeset
    97
  > [phases]
6ac367b6ae8a test: add a push race case where obsoleted head is updated
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32638
diff changeset
    98
  > publish = no
6ac367b6ae8a test: add a push race case where obsoleted head is updated
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32638
diff changeset
    99
  > [experimental]
6ac367b6ae8a test: add a push race case where obsoleted head is updated
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32638
diff changeset
   100
  > evolution = all
32630
53f47cc085d8 test: add a file dedicated to push race between clients
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
   101
  > [alias]
53f47cc085d8 test: add a file dedicated to push race between clients
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
   102
  > graph = log -G --rev 'sort(all(), "topo")'
53f47cc085d8 test: add a file dedicated to push race between clients
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
   103
  > EOF
53f47cc085d8 test: add a file dedicated to push race between clients
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
   104
32709
16ada4cbb1a9 push: add a way to allow concurrent pushes on unrelated heads
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32670
diff changeset
   105
We tests multiple cases:
16ada4cbb1a9 push: add a way to allow concurrent pushes on unrelated heads
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32670
diff changeset
   106
* strict: no race detected,
16ada4cbb1a9 push: add a way to allow concurrent pushes on unrelated heads
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32670
diff changeset
   107
* unrelated: race on unrelated heads are allowed.
16ada4cbb1a9 push: add a way to allow concurrent pushes on unrelated heads
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32670
diff changeset
   108
16ada4cbb1a9 push: add a way to allow concurrent pushes on unrelated heads
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32670
diff changeset
   109
#testcases strict unrelated
16ada4cbb1a9 push: add a way to allow concurrent pushes on unrelated heads
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32670
diff changeset
   110
16ada4cbb1a9 push: add a way to allow concurrent pushes on unrelated heads
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32670
diff changeset
   111
#if unrelated
16ada4cbb1a9 push: add a way to allow concurrent pushes on unrelated heads
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32670
diff changeset
   112
16ada4cbb1a9 push: add a way to allow concurrent pushes on unrelated heads
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32670
diff changeset
   113
  $ cat >> $HGRCPATH << EOF
32892
a7851519ea02 check-concurrency: expose the feature as 'concurrent-push-mode'
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32709
diff changeset
   114
  > [server]
a7851519ea02 check-concurrency: expose the feature as 'concurrent-push-mode'
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32709
diff changeset
   115
  > concurrent-push-mode = check-related
32709
16ada4cbb1a9 push: add a way to allow concurrent pushes on unrelated heads
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32670
diff changeset
   116
  > EOF
16ada4cbb1a9 push: add a way to allow concurrent pushes on unrelated heads
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32670
diff changeset
   117
16ada4cbb1a9 push: add a way to allow concurrent pushes on unrelated heads
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32670
diff changeset
   118
#endif
16ada4cbb1a9 push: add a way to allow concurrent pushes on unrelated heads
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32670
diff changeset
   119
32630
53f47cc085d8 test: add a file dedicated to push race between clients
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
   120
Setup
53f47cc085d8 test: add a file dedicated to push race between clients
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
   121
-----
53f47cc085d8 test: add a file dedicated to push race between clients
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
   122
53f47cc085d8 test: add a file dedicated to push race between clients
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
   123
create a repo with one root
53f47cc085d8 test: add a file dedicated to push race between clients
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
   124
53f47cc085d8 test: add a file dedicated to push race between clients
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
   125
  $ hg init server
53f47cc085d8 test: add a file dedicated to push race between clients
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
   126
  $ cd server
53f47cc085d8 test: add a file dedicated to push race between clients
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
   127
  $ echo root > root
53f47cc085d8 test: add a file dedicated to push race between clients
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
   128
  $ hg ci -Am "C-ROOT"
53f47cc085d8 test: add a file dedicated to push race between clients
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
   129
  adding root
53f47cc085d8 test: add a file dedicated to push race between clients
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
   130
  $ cd ..
53f47cc085d8 test: add a file dedicated to push race between clients
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
   131
53f47cc085d8 test: add a file dedicated to push race between clients
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
   132
clone it in two clients
53f47cc085d8 test: add a file dedicated to push race between clients
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
   133
53f47cc085d8 test: add a file dedicated to push race between clients
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
   134
  $ hg clone ssh://user@dummy/server client-racy
53f47cc085d8 test: add a file dedicated to push race between clients
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
   135
  requesting all changes
53f47cc085d8 test: add a file dedicated to push race between clients
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
   136
  adding changesets
53f47cc085d8 test: add a file dedicated to push race between clients
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
   137
  adding manifests
53f47cc085d8 test: add a file dedicated to push race between clients
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
   138
  adding file changes
53f47cc085d8 test: add a file dedicated to push race between clients
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
   139
  added 1 changesets with 1 changes to 1 files
53f47cc085d8 test: add a file dedicated to push race between clients
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
   140
  updating to branch default
53f47cc085d8 test: add a file dedicated to push race between clients
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
   141
  1 files updated, 0 files merged, 0 files removed, 0 files unresolved
53f47cc085d8 test: add a file dedicated to push race between clients
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
   142
  $ hg clone ssh://user@dummy/server client-other
53f47cc085d8 test: add a file dedicated to push race between clients
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
   143
  requesting all changes
53f47cc085d8 test: add a file dedicated to push race between clients
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
   144
  adding changesets
53f47cc085d8 test: add a file dedicated to push race between clients
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
   145
  adding manifests
53f47cc085d8 test: add a file dedicated to push race between clients
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
   146
  adding file changes
53f47cc085d8 test: add a file dedicated to push race between clients
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
   147
  added 1 changesets with 1 changes to 1 files
53f47cc085d8 test: add a file dedicated to push race between clients
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
   148
  updating to branch default
53f47cc085d8 test: add a file dedicated to push race between clients
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
   149
  1 files updated, 0 files merged, 0 files removed, 0 files unresolved
53f47cc085d8 test: add a file dedicated to push race between clients
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
   150
53f47cc085d8 test: add a file dedicated to push race between clients
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
   151
setup one to allow race on push
53f47cc085d8 test: add a file dedicated to push race between clients
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
   152
53f47cc085d8 test: add a file dedicated to push race between clients
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
   153
  $ cat >> client-racy/.hg/hgrc << EOF
53f47cc085d8 test: add a file dedicated to push race between clients
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
   154
  > [extensions]
53f47cc085d8 test: add a file dedicated to push race between clients
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
   155
  > delaypush = $TESTTMP/delaypush.py
53f47cc085d8 test: add a file dedicated to push race between clients
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
   156
  > [delaypush]
53f47cc085d8 test: add a file dedicated to push race between clients
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
   157
  > ready-path = $TESTTMP/readyfile
53f47cc085d8 test: add a file dedicated to push race between clients
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
   158
  > release-path = $TESTTMP/watchfile
53f47cc085d8 test: add a file dedicated to push race between clients
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
   159
  > EOF
53f47cc085d8 test: add a file dedicated to push race between clients
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
   160
53f47cc085d8 test: add a file dedicated to push race between clients
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
   161
Simple race, both try to push to the server at the same time
53f47cc085d8 test: add a file dedicated to push race between clients
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
   162
------------------------------------------------------------
53f47cc085d8 test: add a file dedicated to push race between clients
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
   163
53f47cc085d8 test: add a file dedicated to push race between clients
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
   164
Both try to replace the same head
53f47cc085d8 test: add a file dedicated to push race between clients
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
   165
53f47cc085d8 test: add a file dedicated to push race between clients
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
   166
#  a
53f47cc085d8 test: add a file dedicated to push race between clients
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
   167
#  | b
53f47cc085d8 test: add a file dedicated to push race between clients
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
   168
#  |/
53f47cc085d8 test: add a file dedicated to push race between clients
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
   169
#  *
53f47cc085d8 test: add a file dedicated to push race between clients
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
   170
53f47cc085d8 test: add a file dedicated to push race between clients
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
   171
Creating changesets
53f47cc085d8 test: add a file dedicated to push race between clients
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
   172
53f47cc085d8 test: add a file dedicated to push race between clients
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
   173
  $ echo b > client-other/a
53f47cc085d8 test: add a file dedicated to push race between clients
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
   174
  $ hg -R client-other/ add client-other/a
53f47cc085d8 test: add a file dedicated to push race between clients
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
   175
  $ hg -R client-other/ commit -m "C-A"
53f47cc085d8 test: add a file dedicated to push race between clients
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
   176
  $ echo b > client-racy/b
53f47cc085d8 test: add a file dedicated to push race between clients
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
   177
  $ hg -R client-racy/ add client-racy/b
53f47cc085d8 test: add a file dedicated to push race between clients
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
   178
  $ hg -R client-racy/ commit -m "C-B"
53f47cc085d8 test: add a file dedicated to push race between clients
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
   179
53f47cc085d8 test: add a file dedicated to push race between clients
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
   180
Pushing
53f47cc085d8 test: add a file dedicated to push race between clients
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
   181
53f47cc085d8 test: add a file dedicated to push race between clients
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
   182
  $ hg -R client-racy push -r 'tip' > ./push-log 2>&1 &
53f47cc085d8 test: add a file dedicated to push race between clients
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
   183
53f47cc085d8 test: add a file dedicated to push race between clients
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
   184
  $ waiton $TESTTMP/readyfile
53f47cc085d8 test: add a file dedicated to push race between clients
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
   185
53f47cc085d8 test: add a file dedicated to push race between clients
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
   186
  $ hg -R client-other push -r 'tip'
53f47cc085d8 test: add a file dedicated to push race between clients
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
   187
  pushing to ssh://user@dummy/server
53f47cc085d8 test: add a file dedicated to push race between clients
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
   188
  searching for changes
53f47cc085d8 test: add a file dedicated to push race between clients
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
   189
  remote: adding changesets
53f47cc085d8 test: add a file dedicated to push race between clients
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
   190
  remote: adding manifests
53f47cc085d8 test: add a file dedicated to push race between clients
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
   191
  remote: adding file changes
53f47cc085d8 test: add a file dedicated to push race between clients
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
   192
  remote: added 1 changesets with 1 changes to 1 files
53f47cc085d8 test: add a file dedicated to push race between clients
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
   193
53f47cc085d8 test: add a file dedicated to push race between clients
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
   194
  $ release $TESTTMP/watchfile
53f47cc085d8 test: add a file dedicated to push race between clients
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
   195
53f47cc085d8 test: add a file dedicated to push race between clients
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
   196
Check the result of the push
53f47cc085d8 test: add a file dedicated to push race between clients
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
   197
53f47cc085d8 test: add a file dedicated to push race between clients
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
   198
  $ cat ./push-log
53f47cc085d8 test: add a file dedicated to push race between clients
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
   199
  pushing to ssh://user@dummy/server
53f47cc085d8 test: add a file dedicated to push race between clients
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
   200
  searching for changes
53f47cc085d8 test: add a file dedicated to push race between clients
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
   201
  wrote ready: $TESTTMP/readyfile
53f47cc085d8 test: add a file dedicated to push race between clients
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
   202
  waiting on: $TESTTMP/watchfile
53f47cc085d8 test: add a file dedicated to push race between clients
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
   203
  abort: push failed:
53f47cc085d8 test: add a file dedicated to push race between clients
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
   204
  'repository changed while pushing - please try again'
53f47cc085d8 test: add a file dedicated to push race between clients
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
   205
53f47cc085d8 test: add a file dedicated to push race between clients
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
   206
  $ hg -R server graph
53f47cc085d8 test: add a file dedicated to push race between clients
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
   207
  o  98217d5a1659 C-A (default)
53f47cc085d8 test: add a file dedicated to push race between clients
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
   208
  |
53f47cc085d8 test: add a file dedicated to push race between clients
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
   209
  @  842e2fac6304 C-ROOT (default)
53f47cc085d8 test: add a file dedicated to push race between clients
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
   210
  
32631
63afbc74a856 test: add a push race case where each client replaces a different head
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32630
diff changeset
   211
63afbc74a856 test: add a push race case where each client replaces a different head
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32630
diff changeset
   212
Pushing on two different heads
63afbc74a856 test: add a push race case where each client replaces a different head
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32630
diff changeset
   213
------------------------------
63afbc74a856 test: add a push race case where each client replaces a different head
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32630
diff changeset
   214
63afbc74a856 test: add a push race case where each client replaces a different head
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32630
diff changeset
   215
Both try to replace a different head
63afbc74a856 test: add a push race case where each client replaces a different head
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32630
diff changeset
   216
63afbc74a856 test: add a push race case where each client replaces a different head
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32630
diff changeset
   217
#  a b
63afbc74a856 test: add a push race case where each client replaces a different head
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32630
diff changeset
   218
#  | |
63afbc74a856 test: add a push race case where each client replaces a different head
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32630
diff changeset
   219
#  * *
63afbc74a856 test: add a push race case where each client replaces a different head
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32630
diff changeset
   220
#  |/
63afbc74a856 test: add a push race case where each client replaces a different head
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32630
diff changeset
   221
#  *
63afbc74a856 test: add a push race case where each client replaces a different head
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32630
diff changeset
   222
63afbc74a856 test: add a push race case where each client replaces a different head
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32630
diff changeset
   223
(resync-all)
63afbc74a856 test: add a push race case where each client replaces a different head
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32630
diff changeset
   224
63afbc74a856 test: add a push race case where each client replaces a different head
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32630
diff changeset
   225
  $ hg -R ./server pull ./client-racy
63afbc74a856 test: add a push race case where each client replaces a different head
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32630
diff changeset
   226
  pulling from ./client-racy
63afbc74a856 test: add a push race case where each client replaces a different head
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32630
diff changeset
   227
  searching for changes
63afbc74a856 test: add a push race case where each client replaces a different head
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32630
diff changeset
   228
  adding changesets
63afbc74a856 test: add a push race case where each client replaces a different head
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32630
diff changeset
   229
  adding manifests
63afbc74a856 test: add a push race case where each client replaces a different head
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32630
diff changeset
   230
  adding file changes
63afbc74a856 test: add a push race case where each client replaces a different head
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32630
diff changeset
   231
  added 1 changesets with 1 changes to 1 files (+1 heads)
63afbc74a856 test: add a push race case where each client replaces a different head
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32630
diff changeset
   232
  (run 'hg heads' to see heads, 'hg merge' to merge)
63afbc74a856 test: add a push race case where each client replaces a different head
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32630
diff changeset
   233
  $ hg -R ./client-other pull
63afbc74a856 test: add a push race case where each client replaces a different head
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32630
diff changeset
   234
  pulling from ssh://user@dummy/server
63afbc74a856 test: add a push race case where each client replaces a different head
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32630
diff changeset
   235
  searching for changes
63afbc74a856 test: add a push race case where each client replaces a different head
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32630
diff changeset
   236
  adding changesets
63afbc74a856 test: add a push race case where each client replaces a different head
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32630
diff changeset
   237
  adding manifests
63afbc74a856 test: add a push race case where each client replaces a different head
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32630
diff changeset
   238
  adding file changes
63afbc74a856 test: add a push race case where each client replaces a different head
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32630
diff changeset
   239
  added 1 changesets with 1 changes to 1 files (+1 heads)
63afbc74a856 test: add a push race case where each client replaces a different head
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32630
diff changeset
   240
  (run 'hg heads' to see heads, 'hg merge' to merge)
63afbc74a856 test: add a push race case where each client replaces a different head
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32630
diff changeset
   241
  $ hg -R ./client-racy pull
63afbc74a856 test: add a push race case where each client replaces a different head
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32630
diff changeset
   242
  pulling from ssh://user@dummy/server
63afbc74a856 test: add a push race case where each client replaces a different head
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32630
diff changeset
   243
  searching for changes
63afbc74a856 test: add a push race case where each client replaces a different head
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32630
diff changeset
   244
  adding changesets
63afbc74a856 test: add a push race case where each client replaces a different head
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32630
diff changeset
   245
  adding manifests
63afbc74a856 test: add a push race case where each client replaces a different head
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32630
diff changeset
   246
  adding file changes
63afbc74a856 test: add a push race case where each client replaces a different head
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32630
diff changeset
   247
  added 1 changesets with 1 changes to 1 files (+1 heads)
63afbc74a856 test: add a push race case where each client replaces a different head
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32630
diff changeset
   248
  (run 'hg heads' to see heads, 'hg merge' to merge)
63afbc74a856 test: add a push race case where each client replaces a different head
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32630
diff changeset
   249
63afbc74a856 test: add a push race case where each client replaces a different head
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32630
diff changeset
   250
  $ hg -R server graph
63afbc74a856 test: add a push race case where each client replaces a different head
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32630
diff changeset
   251
  o  a9149a1428e2 C-B (default)
63afbc74a856 test: add a push race case where each client replaces a different head
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32630
diff changeset
   252
  |
63afbc74a856 test: add a push race case where each client replaces a different head
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32630
diff changeset
   253
  | o  98217d5a1659 C-A (default)
63afbc74a856 test: add a push race case where each client replaces a different head
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32630
diff changeset
   254
  |/
63afbc74a856 test: add a push race case where each client replaces a different head
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32630
diff changeset
   255
  @  842e2fac6304 C-ROOT (default)
63afbc74a856 test: add a push race case where each client replaces a different head
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32630
diff changeset
   256
  
63afbc74a856 test: add a push race case where each client replaces a different head
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32630
diff changeset
   257
63afbc74a856 test: add a push race case where each client replaces a different head
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32630
diff changeset
   258
Creating changesets
63afbc74a856 test: add a push race case where each client replaces a different head
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32630
diff changeset
   259
63afbc74a856 test: add a push race case where each client replaces a different head
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32630
diff changeset
   260
  $ echo aa >> client-other/a
63afbc74a856 test: add a push race case where each client replaces a different head
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32630
diff changeset
   261
  $ hg -R client-other/ commit -m "C-C"
63afbc74a856 test: add a push race case where each client replaces a different head
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32630
diff changeset
   262
  $ echo bb >> client-racy/b
63afbc74a856 test: add a push race case where each client replaces a different head
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32630
diff changeset
   263
  $ hg -R client-racy/ commit -m "C-D"
63afbc74a856 test: add a push race case where each client replaces a different head
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32630
diff changeset
   264
63afbc74a856 test: add a push race case where each client replaces a different head
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32630
diff changeset
   265
Pushing
63afbc74a856 test: add a push race case where each client replaces a different head
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32630
diff changeset
   266
63afbc74a856 test: add a push race case where each client replaces a different head
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32630
diff changeset
   267
  $ hg -R client-racy push -r 'tip' > ./push-log 2>&1 &
63afbc74a856 test: add a push race case where each client replaces a different head
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32630
diff changeset
   268
63afbc74a856 test: add a push race case where each client replaces a different head
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32630
diff changeset
   269
  $ waiton $TESTTMP/readyfile
63afbc74a856 test: add a push race case where each client replaces a different head
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32630
diff changeset
   270
63afbc74a856 test: add a push race case where each client replaces a different head
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32630
diff changeset
   271
  $ hg -R client-other push -r 'tip'
63afbc74a856 test: add a push race case where each client replaces a different head
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32630
diff changeset
   272
  pushing to ssh://user@dummy/server
63afbc74a856 test: add a push race case where each client replaces a different head
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32630
diff changeset
   273
  searching for changes
63afbc74a856 test: add a push race case where each client replaces a different head
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32630
diff changeset
   274
  remote: adding changesets
63afbc74a856 test: add a push race case where each client replaces a different head
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32630
diff changeset
   275
  remote: adding manifests
63afbc74a856 test: add a push race case where each client replaces a different head
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32630
diff changeset
   276
  remote: adding file changes
63afbc74a856 test: add a push race case where each client replaces a different head
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32630
diff changeset
   277
  remote: added 1 changesets with 1 changes to 1 files
63afbc74a856 test: add a push race case where each client replaces a different head
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32630
diff changeset
   278
63afbc74a856 test: add a push race case where each client replaces a different head
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32630
diff changeset
   279
  $ release $TESTTMP/watchfile
63afbc74a856 test: add a push race case where each client replaces a different head
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32630
diff changeset
   280
63afbc74a856 test: add a push race case where each client replaces a different head
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32630
diff changeset
   281
Check the result of the push
63afbc74a856 test: add a push race case where each client replaces a different head
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32630
diff changeset
   282
32709
16ada4cbb1a9 push: add a way to allow concurrent pushes on unrelated heads
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32670
diff changeset
   283
#if strict
32631
63afbc74a856 test: add a push race case where each client replaces a different head
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32630
diff changeset
   284
  $ cat ./push-log
63afbc74a856 test: add a push race case where each client replaces a different head
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32630
diff changeset
   285
  pushing to ssh://user@dummy/server
63afbc74a856 test: add a push race case where each client replaces a different head
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32630
diff changeset
   286
  searching for changes
63afbc74a856 test: add a push race case where each client replaces a different head
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32630
diff changeset
   287
  wrote ready: $TESTTMP/readyfile
63afbc74a856 test: add a push race case where each client replaces a different head
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32630
diff changeset
   288
  waiting on: $TESTTMP/watchfile
63afbc74a856 test: add a push race case where each client replaces a different head
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32630
diff changeset
   289
  abort: push failed:
63afbc74a856 test: add a push race case where each client replaces a different head
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32630
diff changeset
   290
  'repository changed while pushing - please try again'
63afbc74a856 test: add a push race case where each client replaces a different head
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32630
diff changeset
   291
63afbc74a856 test: add a push race case where each client replaces a different head
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32630
diff changeset
   292
  $ hg -R server graph
63afbc74a856 test: add a push race case where each client replaces a different head
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32630
diff changeset
   293
  o  51c544a58128 C-C (default)
63afbc74a856 test: add a push race case where each client replaces a different head
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32630
diff changeset
   294
  |
63afbc74a856 test: add a push race case where each client replaces a different head
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32630
diff changeset
   295
  o  98217d5a1659 C-A (default)
63afbc74a856 test: add a push race case where each client replaces a different head
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32630
diff changeset
   296
  |
63afbc74a856 test: add a push race case where each client replaces a different head
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32630
diff changeset
   297
  | o  a9149a1428e2 C-B (default)
63afbc74a856 test: add a push race case where each client replaces a different head
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32630
diff changeset
   298
  |/
63afbc74a856 test: add a push race case where each client replaces a different head
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32630
diff changeset
   299
  @  842e2fac6304 C-ROOT (default)
63afbc74a856 test: add a push race case where each client replaces a different head
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32630
diff changeset
   300
  
32709
16ada4cbb1a9 push: add a way to allow concurrent pushes on unrelated heads
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32670
diff changeset
   301
#endif
16ada4cbb1a9 push: add a way to allow concurrent pushes on unrelated heads
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32670
diff changeset
   302
#if unrelated
16ada4cbb1a9 push: add a way to allow concurrent pushes on unrelated heads
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32670
diff changeset
   303
16ada4cbb1a9 push: add a way to allow concurrent pushes on unrelated heads
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32670
diff changeset
   304
(The two heads are unrelated, push should be allowed)
16ada4cbb1a9 push: add a way to allow concurrent pushes on unrelated heads
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32670
diff changeset
   305
16ada4cbb1a9 push: add a way to allow concurrent pushes on unrelated heads
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32670
diff changeset
   306
  $ cat ./push-log
16ada4cbb1a9 push: add a way to allow concurrent pushes on unrelated heads
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32670
diff changeset
   307
  pushing to ssh://user@dummy/server
16ada4cbb1a9 push: add a way to allow concurrent pushes on unrelated heads
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32670
diff changeset
   308
  searching for changes
16ada4cbb1a9 push: add a way to allow concurrent pushes on unrelated heads
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32670
diff changeset
   309
  wrote ready: $TESTTMP/readyfile
16ada4cbb1a9 push: add a way to allow concurrent pushes on unrelated heads
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32670
diff changeset
   310
  waiting on: $TESTTMP/watchfile
16ada4cbb1a9 push: add a way to allow concurrent pushes on unrelated heads
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32670
diff changeset
   311
  remote: adding changesets
16ada4cbb1a9 push: add a way to allow concurrent pushes on unrelated heads
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32670
diff changeset
   312
  remote: adding manifests
16ada4cbb1a9 push: add a way to allow concurrent pushes on unrelated heads
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32670
diff changeset
   313
  remote: adding file changes
16ada4cbb1a9 push: add a way to allow concurrent pushes on unrelated heads
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32670
diff changeset
   314
  remote: added 1 changesets with 1 changes to 1 files
16ada4cbb1a9 push: add a way to allow concurrent pushes on unrelated heads
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32670
diff changeset
   315
16ada4cbb1a9 push: add a way to allow concurrent pushes on unrelated heads
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32670
diff changeset
   316
  $ hg -R server graph
16ada4cbb1a9 push: add a way to allow concurrent pushes on unrelated heads
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32670
diff changeset
   317
  o  59e76faf78bd C-D (default)
16ada4cbb1a9 push: add a way to allow concurrent pushes on unrelated heads
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32670
diff changeset
   318
  |
16ada4cbb1a9 push: add a way to allow concurrent pushes on unrelated heads
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32670
diff changeset
   319
  o  a9149a1428e2 C-B (default)
16ada4cbb1a9 push: add a way to allow concurrent pushes on unrelated heads
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32670
diff changeset
   320
  |
16ada4cbb1a9 push: add a way to allow concurrent pushes on unrelated heads
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32670
diff changeset
   321
  | o  51c544a58128 C-C (default)
16ada4cbb1a9 push: add a way to allow concurrent pushes on unrelated heads
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32670
diff changeset
   322
  | |
16ada4cbb1a9 push: add a way to allow concurrent pushes on unrelated heads
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32670
diff changeset
   323
  | o  98217d5a1659 C-A (default)
16ada4cbb1a9 push: add a way to allow concurrent pushes on unrelated heads
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32670
diff changeset
   324
  |/
16ada4cbb1a9 push: add a way to allow concurrent pushes on unrelated heads
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32670
diff changeset
   325
  @  842e2fac6304 C-ROOT (default)
16ada4cbb1a9 push: add a way to allow concurrent pushes on unrelated heads
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32670
diff changeset
   326
  
16ada4cbb1a9 push: add a way to allow concurrent pushes on unrelated heads
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32670
diff changeset
   327
#endif
16ada4cbb1a9 push: add a way to allow concurrent pushes on unrelated heads
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32670
diff changeset
   328
32632
090a6fe6e563 test: add a push race case where the racing client create a new head
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32631
diff changeset
   329
Pushing while someone creates a new head
090a6fe6e563 test: add a push race case where the racing client create a new head
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32631
diff changeset
   330
-----------------------------------------
090a6fe6e563 test: add a push race case where the racing client create a new head
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32631
diff changeset
   331
090a6fe6e563 test: add a push race case where the racing client create a new head
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32631
diff changeset
   332
Pushing a new changeset while someone creates a new branch.
090a6fe6e563 test: add a push race case where the racing client create a new head
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32631
diff changeset
   333
090a6fe6e563 test: add a push race case where the racing client create a new head
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32631
diff changeset
   334
#  a (raced)
090a6fe6e563 test: add a push race case where the racing client create a new head
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32631
diff changeset
   335
#  |
090a6fe6e563 test: add a push race case where the racing client create a new head
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32631
diff changeset
   336
#  * b
090a6fe6e563 test: add a push race case where the racing client create a new head
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32631
diff changeset
   337
#  |/
090a6fe6e563 test: add a push race case where the racing client create a new head
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32631
diff changeset
   338
#  *
090a6fe6e563 test: add a push race case where the racing client create a new head
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32631
diff changeset
   339
090a6fe6e563 test: add a push race case where the racing client create a new head
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32631
diff changeset
   340
(resync-all)
090a6fe6e563 test: add a push race case where the racing client create a new head
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32631
diff changeset
   341
32709
16ada4cbb1a9 push: add a way to allow concurrent pushes on unrelated heads
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32670
diff changeset
   342
#if strict
16ada4cbb1a9 push: add a way to allow concurrent pushes on unrelated heads
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32670
diff changeset
   343
32632
090a6fe6e563 test: add a push race case where the racing client create a new head
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32631
diff changeset
   344
  $ hg -R ./server pull ./client-racy
090a6fe6e563 test: add a push race case where the racing client create a new head
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32631
diff changeset
   345
  pulling from ./client-racy
090a6fe6e563 test: add a push race case where the racing client create a new head
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32631
diff changeset
   346
  searching for changes
090a6fe6e563 test: add a push race case where the racing client create a new head
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32631
diff changeset
   347
  adding changesets
090a6fe6e563 test: add a push race case where the racing client create a new head
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32631
diff changeset
   348
  adding manifests
090a6fe6e563 test: add a push race case where the racing client create a new head
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32631
diff changeset
   349
  adding file changes
090a6fe6e563 test: add a push race case where the racing client create a new head
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32631
diff changeset
   350
  added 1 changesets with 1 changes to 1 files
090a6fe6e563 test: add a push race case where the racing client create a new head
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32631
diff changeset
   351
  (run 'hg update' to get a working copy)
32709
16ada4cbb1a9 push: add a way to allow concurrent pushes on unrelated heads
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32670
diff changeset
   352
16ada4cbb1a9 push: add a way to allow concurrent pushes on unrelated heads
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32670
diff changeset
   353
#endif
16ada4cbb1a9 push: add a way to allow concurrent pushes on unrelated heads
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32670
diff changeset
   354
#if unrelated
16ada4cbb1a9 push: add a way to allow concurrent pushes on unrelated heads
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32670
diff changeset
   355
16ada4cbb1a9 push: add a way to allow concurrent pushes on unrelated heads
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32670
diff changeset
   356
  $ hg -R ./server pull ./client-racy
16ada4cbb1a9 push: add a way to allow concurrent pushes on unrelated heads
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32670
diff changeset
   357
  pulling from ./client-racy
16ada4cbb1a9 push: add a way to allow concurrent pushes on unrelated heads
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32670
diff changeset
   358
  searching for changes
16ada4cbb1a9 push: add a way to allow concurrent pushes on unrelated heads
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32670
diff changeset
   359
  no changes found
16ada4cbb1a9 push: add a way to allow concurrent pushes on unrelated heads
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32670
diff changeset
   360
16ada4cbb1a9 push: add a way to allow concurrent pushes on unrelated heads
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32670
diff changeset
   361
#endif
16ada4cbb1a9 push: add a way to allow concurrent pushes on unrelated heads
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32670
diff changeset
   362
32632
090a6fe6e563 test: add a push race case where the racing client create a new head
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32631
diff changeset
   363
  $ hg -R ./client-other pull
090a6fe6e563 test: add a push race case where the racing client create a new head
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32631
diff changeset
   364
  pulling from ssh://user@dummy/server
090a6fe6e563 test: add a push race case where the racing client create a new head
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32631
diff changeset
   365
  searching for changes
090a6fe6e563 test: add a push race case where the racing client create a new head
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32631
diff changeset
   366
  adding changesets
090a6fe6e563 test: add a push race case where the racing client create a new head
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32631
diff changeset
   367
  adding manifests
090a6fe6e563 test: add a push race case where the racing client create a new head
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32631
diff changeset
   368
  adding file changes
090a6fe6e563 test: add a push race case where the racing client create a new head
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32631
diff changeset
   369
  added 1 changesets with 1 changes to 1 files
090a6fe6e563 test: add a push race case where the racing client create a new head
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32631
diff changeset
   370
  (run 'hg update' to get a working copy)
090a6fe6e563 test: add a push race case where the racing client create a new head
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32631
diff changeset
   371
  $ hg -R ./client-racy pull
090a6fe6e563 test: add a push race case where the racing client create a new head
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32631
diff changeset
   372
  pulling from ssh://user@dummy/server
090a6fe6e563 test: add a push race case where the racing client create a new head
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32631
diff changeset
   373
  searching for changes
090a6fe6e563 test: add a push race case where the racing client create a new head
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32631
diff changeset
   374
  adding changesets
090a6fe6e563 test: add a push race case where the racing client create a new head
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32631
diff changeset
   375
  adding manifests
090a6fe6e563 test: add a push race case where the racing client create a new head
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32631
diff changeset
   376
  adding file changes
090a6fe6e563 test: add a push race case where the racing client create a new head
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32631
diff changeset
   377
  added 1 changesets with 1 changes to 1 files
090a6fe6e563 test: add a push race case where the racing client create a new head
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32631
diff changeset
   378
  (run 'hg update' to get a working copy)
090a6fe6e563 test: add a push race case where the racing client create a new head
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32631
diff changeset
   379
090a6fe6e563 test: add a push race case where the racing client create a new head
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32631
diff changeset
   380
  $ hg -R server graph
090a6fe6e563 test: add a push race case where the racing client create a new head
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32631
diff changeset
   381
  o  59e76faf78bd C-D (default)
090a6fe6e563 test: add a push race case where the racing client create a new head
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32631
diff changeset
   382
  |
090a6fe6e563 test: add a push race case where the racing client create a new head
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32631
diff changeset
   383
  o  a9149a1428e2 C-B (default)
090a6fe6e563 test: add a push race case where the racing client create a new head
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32631
diff changeset
   384
  |
090a6fe6e563 test: add a push race case where the racing client create a new head
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32631
diff changeset
   385
  | o  51c544a58128 C-C (default)
090a6fe6e563 test: add a push race case where the racing client create a new head
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32631
diff changeset
   386
  | |
090a6fe6e563 test: add a push race case where the racing client create a new head
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32631
diff changeset
   387
  | o  98217d5a1659 C-A (default)
090a6fe6e563 test: add a push race case where the racing client create a new head
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32631
diff changeset
   388
  |/
090a6fe6e563 test: add a push race case where the racing client create a new head
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32631
diff changeset
   389
  @  842e2fac6304 C-ROOT (default)
090a6fe6e563 test: add a push race case where the racing client create a new head
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32631
diff changeset
   390
  
090a6fe6e563 test: add a push race case where the racing client create a new head
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32631
diff changeset
   391
090a6fe6e563 test: add a push race case where the racing client create a new head
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32631
diff changeset
   392
Creating changesets
090a6fe6e563 test: add a push race case where the racing client create a new head
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32631
diff changeset
   393
090a6fe6e563 test: add a push race case where the racing client create a new head
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32631
diff changeset
   394
(new head)
090a6fe6e563 test: add a push race case where the racing client create a new head
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32631
diff changeset
   395
090a6fe6e563 test: add a push race case where the racing client create a new head
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32631
diff changeset
   396
  $ hg -R client-other/ up 'desc("C-A")'
090a6fe6e563 test: add a push race case where the racing client create a new head
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32631
diff changeset
   397
  1 files updated, 0 files merged, 0 files removed, 0 files unresolved
090a6fe6e563 test: add a push race case where the racing client create a new head
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32631
diff changeset
   398
  $ echo aaa >> client-other/a
090a6fe6e563 test: add a push race case where the racing client create a new head
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32631
diff changeset
   399
  $ hg -R client-other/ commit -m "C-E"
090a6fe6e563 test: add a push race case where the racing client create a new head
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32631
diff changeset
   400
  created new head
090a6fe6e563 test: add a push race case where the racing client create a new head
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32631
diff changeset
   401
090a6fe6e563 test: add a push race case where the racing client create a new head
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32631
diff changeset
   402
(children of existing head)
090a6fe6e563 test: add a push race case where the racing client create a new head
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32631
diff changeset
   403
090a6fe6e563 test: add a push race case where the racing client create a new head
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32631
diff changeset
   404
  $ hg -R client-racy/ up 'desc("C-C")'
090a6fe6e563 test: add a push race case where the racing client create a new head
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32631
diff changeset
   405
  1 files updated, 0 files merged, 1 files removed, 0 files unresolved
090a6fe6e563 test: add a push race case where the racing client create a new head
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32631
diff changeset
   406
  $ echo bbb >> client-racy/a
090a6fe6e563 test: add a push race case where the racing client create a new head
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32631
diff changeset
   407
  $ hg -R client-racy/ commit -m "C-F"
090a6fe6e563 test: add a push race case where the racing client create a new head
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32631
diff changeset
   408
090a6fe6e563 test: add a push race case where the racing client create a new head
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32631
diff changeset
   409
Pushing
090a6fe6e563 test: add a push race case where the racing client create a new head
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32631
diff changeset
   410
090a6fe6e563 test: add a push race case where the racing client create a new head
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32631
diff changeset
   411
  $ hg -R client-racy push -r 'tip' > ./push-log 2>&1 &
090a6fe6e563 test: add a push race case where the racing client create a new head
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32631
diff changeset
   412
090a6fe6e563 test: add a push race case where the racing client create a new head
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32631
diff changeset
   413
  $ waiton $TESTTMP/readyfile
090a6fe6e563 test: add a push race case where the racing client create a new head
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32631
diff changeset
   414
090a6fe6e563 test: add a push race case where the racing client create a new head
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32631
diff changeset
   415
  $ hg -R client-other push -fr 'tip'
090a6fe6e563 test: add a push race case where the racing client create a new head
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32631
diff changeset
   416
  pushing to ssh://user@dummy/server
090a6fe6e563 test: add a push race case where the racing client create a new head
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32631
diff changeset
   417
  searching for changes
090a6fe6e563 test: add a push race case where the racing client create a new head
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32631
diff changeset
   418
  remote: adding changesets
090a6fe6e563 test: add a push race case where the racing client create a new head
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32631
diff changeset
   419
  remote: adding manifests
090a6fe6e563 test: add a push race case where the racing client create a new head
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32631
diff changeset
   420
  remote: adding file changes
090a6fe6e563 test: add a push race case where the racing client create a new head
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32631
diff changeset
   421
  remote: added 1 changesets with 1 changes to 1 files (+1 heads)
090a6fe6e563 test: add a push race case where the racing client create a new head
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32631
diff changeset
   422
090a6fe6e563 test: add a push race case where the racing client create a new head
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32631
diff changeset
   423
  $ release $TESTTMP/watchfile
090a6fe6e563 test: add a push race case where the racing client create a new head
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32631
diff changeset
   424
090a6fe6e563 test: add a push race case where the racing client create a new head
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32631
diff changeset
   425
Check the result of the push
090a6fe6e563 test: add a push race case where the racing client create a new head
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32631
diff changeset
   426
32709
16ada4cbb1a9 push: add a way to allow concurrent pushes on unrelated heads
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32670
diff changeset
   427
#if strict
16ada4cbb1a9 push: add a way to allow concurrent pushes on unrelated heads
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32670
diff changeset
   428
32632
090a6fe6e563 test: add a push race case where the racing client create a new head
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32631
diff changeset
   429
  $ cat ./push-log
090a6fe6e563 test: add a push race case where the racing client create a new head
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32631
diff changeset
   430
  pushing to ssh://user@dummy/server
090a6fe6e563 test: add a push race case where the racing client create a new head
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32631
diff changeset
   431
  searching for changes
090a6fe6e563 test: add a push race case where the racing client create a new head
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32631
diff changeset
   432
  wrote ready: $TESTTMP/readyfile
090a6fe6e563 test: add a push race case where the racing client create a new head
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32631
diff changeset
   433
  waiting on: $TESTTMP/watchfile
090a6fe6e563 test: add a push race case where the racing client create a new head
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32631
diff changeset
   434
  abort: push failed:
090a6fe6e563 test: add a push race case where the racing client create a new head
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32631
diff changeset
   435
  'repository changed while pushing - please try again'
090a6fe6e563 test: add a push race case where the racing client create a new head
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32631
diff changeset
   436
090a6fe6e563 test: add a push race case where the racing client create a new head
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32631
diff changeset
   437
  $ hg -R server graph
090a6fe6e563 test: add a push race case where the racing client create a new head
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32631
diff changeset
   438
  o  d603e2c0cdd7 C-E (default)
090a6fe6e563 test: add a push race case where the racing client create a new head
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32631
diff changeset
   439
  |
090a6fe6e563 test: add a push race case where the racing client create a new head
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32631
diff changeset
   440
  | o  51c544a58128 C-C (default)
090a6fe6e563 test: add a push race case where the racing client create a new head
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32631
diff changeset
   441
  |/
090a6fe6e563 test: add a push race case where the racing client create a new head
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32631
diff changeset
   442
  o  98217d5a1659 C-A (default)
090a6fe6e563 test: add a push race case where the racing client create a new head
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32631
diff changeset
   443
  |
090a6fe6e563 test: add a push race case where the racing client create a new head
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32631
diff changeset
   444
  | o  59e76faf78bd C-D (default)
090a6fe6e563 test: add a push race case where the racing client create a new head
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32631
diff changeset
   445
  | |
090a6fe6e563 test: add a push race case where the racing client create a new head
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32631
diff changeset
   446
  | o  a9149a1428e2 C-B (default)
090a6fe6e563 test: add a push race case where the racing client create a new head
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32631
diff changeset
   447
  |/
090a6fe6e563 test: add a push race case where the racing client create a new head
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32631
diff changeset
   448
  @  842e2fac6304 C-ROOT (default)
090a6fe6e563 test: add a push race case where the racing client create a new head
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32631
diff changeset
   449
  
32633
b01bfa5abbfe test: add a push race case where raced push created a new named branch
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32632
diff changeset
   450
32709
16ada4cbb1a9 push: add a way to allow concurrent pushes on unrelated heads
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32670
diff changeset
   451
#endif
16ada4cbb1a9 push: add a way to allow concurrent pushes on unrelated heads
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32670
diff changeset
   452
16ada4cbb1a9 push: add a way to allow concurrent pushes on unrelated heads
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32670
diff changeset
   453
#if unrelated
16ada4cbb1a9 push: add a way to allow concurrent pushes on unrelated heads
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32670
diff changeset
   454
16ada4cbb1a9 push: add a way to allow concurrent pushes on unrelated heads
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32670
diff changeset
   455
(The racing new head do not affect existing heads, push should go through)
16ada4cbb1a9 push: add a way to allow concurrent pushes on unrelated heads
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32670
diff changeset
   456
16ada4cbb1a9 push: add a way to allow concurrent pushes on unrelated heads
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32670
diff changeset
   457
  $ cat ./push-log
16ada4cbb1a9 push: add a way to allow concurrent pushes on unrelated heads
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32670
diff changeset
   458
  pushing to ssh://user@dummy/server
16ada4cbb1a9 push: add a way to allow concurrent pushes on unrelated heads
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32670
diff changeset
   459
  searching for changes
16ada4cbb1a9 push: add a way to allow concurrent pushes on unrelated heads
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32670
diff changeset
   460
  wrote ready: $TESTTMP/readyfile
16ada4cbb1a9 push: add a way to allow concurrent pushes on unrelated heads
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32670
diff changeset
   461
  waiting on: $TESTTMP/watchfile
16ada4cbb1a9 push: add a way to allow concurrent pushes on unrelated heads
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32670
diff changeset
   462
  remote: adding changesets
16ada4cbb1a9 push: add a way to allow concurrent pushes on unrelated heads
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32670
diff changeset
   463
  remote: adding manifests
16ada4cbb1a9 push: add a way to allow concurrent pushes on unrelated heads
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32670
diff changeset
   464
  remote: adding file changes
16ada4cbb1a9 push: add a way to allow concurrent pushes on unrelated heads
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32670
diff changeset
   465
  remote: added 1 changesets with 1 changes to 1 files
16ada4cbb1a9 push: add a way to allow concurrent pushes on unrelated heads
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32670
diff changeset
   466
16ada4cbb1a9 push: add a way to allow concurrent pushes on unrelated heads
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32670
diff changeset
   467
  $ hg -R server graph
16ada4cbb1a9 push: add a way to allow concurrent pushes on unrelated heads
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32670
diff changeset
   468
  o  d9e379a8c432 C-F (default)
16ada4cbb1a9 push: add a way to allow concurrent pushes on unrelated heads
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32670
diff changeset
   469
  |
16ada4cbb1a9 push: add a way to allow concurrent pushes on unrelated heads
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32670
diff changeset
   470
  o  51c544a58128 C-C (default)
16ada4cbb1a9 push: add a way to allow concurrent pushes on unrelated heads
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32670
diff changeset
   471
  |
16ada4cbb1a9 push: add a way to allow concurrent pushes on unrelated heads
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32670
diff changeset
   472
  | o  d603e2c0cdd7 C-E (default)
16ada4cbb1a9 push: add a way to allow concurrent pushes on unrelated heads
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32670
diff changeset
   473
  |/
16ada4cbb1a9 push: add a way to allow concurrent pushes on unrelated heads
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32670
diff changeset
   474
  o  98217d5a1659 C-A (default)
16ada4cbb1a9 push: add a way to allow concurrent pushes on unrelated heads
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32670
diff changeset
   475
  |
16ada4cbb1a9 push: add a way to allow concurrent pushes on unrelated heads
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32670
diff changeset
   476
  | o  59e76faf78bd C-D (default)
16ada4cbb1a9 push: add a way to allow concurrent pushes on unrelated heads
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32670
diff changeset
   477
  | |
16ada4cbb1a9 push: add a way to allow concurrent pushes on unrelated heads
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32670
diff changeset
   478
  | o  a9149a1428e2 C-B (default)
16ada4cbb1a9 push: add a way to allow concurrent pushes on unrelated heads
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32670
diff changeset
   479
  |/
16ada4cbb1a9 push: add a way to allow concurrent pushes on unrelated heads
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32670
diff changeset
   480
  @  842e2fac6304 C-ROOT (default)
16ada4cbb1a9 push: add a way to allow concurrent pushes on unrelated heads
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32670
diff changeset
   481
  
16ada4cbb1a9 push: add a way to allow concurrent pushes on unrelated heads
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32670
diff changeset
   482
#endif
16ada4cbb1a9 push: add a way to allow concurrent pushes on unrelated heads
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32670
diff changeset
   483
32633
b01bfa5abbfe test: add a push race case where raced push created a new named branch
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32632
diff changeset
   484
Pushing touching different named branch (same topo): new branch raced
b01bfa5abbfe test: add a push race case where raced push created a new named branch
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32632
diff changeset
   485
---------------------------------------------------------------------
b01bfa5abbfe test: add a push race case where raced push created a new named branch
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32632
diff changeset
   486
b01bfa5abbfe test: add a push race case where raced push created a new named branch
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32632
diff changeset
   487
Pushing two children on the same head, one is a different named branch
b01bfa5abbfe test: add a push race case where raced push created a new named branch
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32632
diff changeset
   488
b01bfa5abbfe test: add a push race case where raced push created a new named branch
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32632
diff changeset
   489
#  a (raced, branch-a)
b01bfa5abbfe test: add a push race case where raced push created a new named branch
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32632
diff changeset
   490
#  |
b01bfa5abbfe test: add a push race case where raced push created a new named branch
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32632
diff changeset
   491
#  | b (default branch)
b01bfa5abbfe test: add a push race case where raced push created a new named branch
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32632
diff changeset
   492
#  |/
b01bfa5abbfe test: add a push race case where raced push created a new named branch
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32632
diff changeset
   493
#  *
b01bfa5abbfe test: add a push race case where raced push created a new named branch
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32632
diff changeset
   494
b01bfa5abbfe test: add a push race case where raced push created a new named branch
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32632
diff changeset
   495
(resync-all)
b01bfa5abbfe test: add a push race case where raced push created a new named branch
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32632
diff changeset
   496
32709
16ada4cbb1a9 push: add a way to allow concurrent pushes on unrelated heads
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32670
diff changeset
   497
#if strict
16ada4cbb1a9 push: add a way to allow concurrent pushes on unrelated heads
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32670
diff changeset
   498
32633
b01bfa5abbfe test: add a push race case where raced push created a new named branch
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32632
diff changeset
   499
  $ hg -R ./server pull ./client-racy
b01bfa5abbfe test: add a push race case where raced push created a new named branch
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32632
diff changeset
   500
  pulling from ./client-racy
b01bfa5abbfe test: add a push race case where raced push created a new named branch
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32632
diff changeset
   501
  searching for changes
b01bfa5abbfe test: add a push race case where raced push created a new named branch
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32632
diff changeset
   502
  adding changesets
b01bfa5abbfe test: add a push race case where raced push created a new named branch
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32632
diff changeset
   503
  adding manifests
b01bfa5abbfe test: add a push race case where raced push created a new named branch
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32632
diff changeset
   504
  adding file changes
b01bfa5abbfe test: add a push race case where raced push created a new named branch
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32632
diff changeset
   505
  added 1 changesets with 1 changes to 1 files
b01bfa5abbfe test: add a push race case where raced push created a new named branch
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32632
diff changeset
   506
  (run 'hg update' to get a working copy)
32709
16ada4cbb1a9 push: add a way to allow concurrent pushes on unrelated heads
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32670
diff changeset
   507
16ada4cbb1a9 push: add a way to allow concurrent pushes on unrelated heads
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32670
diff changeset
   508
#endif
16ada4cbb1a9 push: add a way to allow concurrent pushes on unrelated heads
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32670
diff changeset
   509
#if unrelated
16ada4cbb1a9 push: add a way to allow concurrent pushes on unrelated heads
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32670
diff changeset
   510
16ada4cbb1a9 push: add a way to allow concurrent pushes on unrelated heads
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32670
diff changeset
   511
  $ hg -R ./server pull ./client-racy
16ada4cbb1a9 push: add a way to allow concurrent pushes on unrelated heads
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32670
diff changeset
   512
  pulling from ./client-racy
16ada4cbb1a9 push: add a way to allow concurrent pushes on unrelated heads
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32670
diff changeset
   513
  searching for changes
16ada4cbb1a9 push: add a way to allow concurrent pushes on unrelated heads
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32670
diff changeset
   514
  no changes found
16ada4cbb1a9 push: add a way to allow concurrent pushes on unrelated heads
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32670
diff changeset
   515
16ada4cbb1a9 push: add a way to allow concurrent pushes on unrelated heads
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32670
diff changeset
   516
#endif
16ada4cbb1a9 push: add a way to allow concurrent pushes on unrelated heads
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32670
diff changeset
   517
32633
b01bfa5abbfe test: add a push race case where raced push created a new named branch
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32632
diff changeset
   518
  $ hg -R ./client-other pull
b01bfa5abbfe test: add a push race case where raced push created a new named branch
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32632
diff changeset
   519
  pulling from ssh://user@dummy/server
b01bfa5abbfe test: add a push race case where raced push created a new named branch
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32632
diff changeset
   520
  searching for changes
b01bfa5abbfe test: add a push race case where raced push created a new named branch
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32632
diff changeset
   521
  adding changesets
b01bfa5abbfe test: add a push race case where raced push created a new named branch
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32632
diff changeset
   522
  adding manifests
b01bfa5abbfe test: add a push race case where raced push created a new named branch
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32632
diff changeset
   523
  adding file changes
b01bfa5abbfe test: add a push race case where raced push created a new named branch
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32632
diff changeset
   524
  added 1 changesets with 1 changes to 1 files
b01bfa5abbfe test: add a push race case where raced push created a new named branch
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32632
diff changeset
   525
  (run 'hg update' to get a working copy)
b01bfa5abbfe test: add a push race case where raced push created a new named branch
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32632
diff changeset
   526
  $ hg -R ./client-racy pull
b01bfa5abbfe test: add a push race case where raced push created a new named branch
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32632
diff changeset
   527
  pulling from ssh://user@dummy/server
b01bfa5abbfe test: add a push race case where raced push created a new named branch
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32632
diff changeset
   528
  searching for changes
b01bfa5abbfe test: add a push race case where raced push created a new named branch
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32632
diff changeset
   529
  adding changesets
b01bfa5abbfe test: add a push race case where raced push created a new named branch
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32632
diff changeset
   530
  adding manifests
b01bfa5abbfe test: add a push race case where raced push created a new named branch
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32632
diff changeset
   531
  adding file changes
b01bfa5abbfe test: add a push race case where raced push created a new named branch
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32632
diff changeset
   532
  added 1 changesets with 1 changes to 1 files (+1 heads)
b01bfa5abbfe test: add a push race case where raced push created a new named branch
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32632
diff changeset
   533
  (run 'hg heads .' to see heads, 'hg merge' to merge)
b01bfa5abbfe test: add a push race case where raced push created a new named branch
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32632
diff changeset
   534
b01bfa5abbfe test: add a push race case where raced push created a new named branch
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32632
diff changeset
   535
  $ hg -R server graph
b01bfa5abbfe test: add a push race case where raced push created a new named branch
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32632
diff changeset
   536
  o  d9e379a8c432 C-F (default)
b01bfa5abbfe test: add a push race case where raced push created a new named branch
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32632
diff changeset
   537
  |
b01bfa5abbfe test: add a push race case where raced push created a new named branch
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32632
diff changeset
   538
  o  51c544a58128 C-C (default)
b01bfa5abbfe test: add a push race case where raced push created a new named branch
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32632
diff changeset
   539
  |
b01bfa5abbfe test: add a push race case where raced push created a new named branch
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32632
diff changeset
   540
  | o  d603e2c0cdd7 C-E (default)
b01bfa5abbfe test: add a push race case where raced push created a new named branch
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32632
diff changeset
   541
  |/
b01bfa5abbfe test: add a push race case where raced push created a new named branch
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32632
diff changeset
   542
  o  98217d5a1659 C-A (default)
b01bfa5abbfe test: add a push race case where raced push created a new named branch
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32632
diff changeset
   543
  |
b01bfa5abbfe test: add a push race case where raced push created a new named branch
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32632
diff changeset
   544
  | o  59e76faf78bd C-D (default)
b01bfa5abbfe test: add a push race case where raced push created a new named branch
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32632
diff changeset
   545
  | |
b01bfa5abbfe test: add a push race case where raced push created a new named branch
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32632
diff changeset
   546
  | o  a9149a1428e2 C-B (default)
b01bfa5abbfe test: add a push race case where raced push created a new named branch
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32632
diff changeset
   547
  |/
b01bfa5abbfe test: add a push race case where raced push created a new named branch
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32632
diff changeset
   548
  @  842e2fac6304 C-ROOT (default)
b01bfa5abbfe test: add a push race case where raced push created a new named branch
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32632
diff changeset
   549
  
b01bfa5abbfe test: add a push race case where raced push created a new named branch
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32632
diff changeset
   550
b01bfa5abbfe test: add a push race case where raced push created a new named branch
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32632
diff changeset
   551
Creating changesets
b01bfa5abbfe test: add a push race case where raced push created a new named branch
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32632
diff changeset
   552
b01bfa5abbfe test: add a push race case where raced push created a new named branch
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32632
diff changeset
   553
(update existing head)
b01bfa5abbfe test: add a push race case where raced push created a new named branch
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32632
diff changeset
   554
b01bfa5abbfe test: add a push race case where raced push created a new named branch
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32632
diff changeset
   555
  $ hg -R client-other/ up 'desc("C-F")'
b01bfa5abbfe test: add a push race case where raced push created a new named branch
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32632
diff changeset
   556
  1 files updated, 0 files merged, 0 files removed, 0 files unresolved
b01bfa5abbfe test: add a push race case where raced push created a new named branch
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32632
diff changeset
   557
  $ echo aaa >> client-other/a
b01bfa5abbfe test: add a push race case where raced push created a new named branch
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32632
diff changeset
   558
  $ hg -R client-other/ commit -m "C-G"
b01bfa5abbfe test: add a push race case where raced push created a new named branch
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32632
diff changeset
   559
b01bfa5abbfe test: add a push race case where raced push created a new named branch
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32632
diff changeset
   560
(new named branch from that existing head)
b01bfa5abbfe test: add a push race case where raced push created a new named branch
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32632
diff changeset
   561
b01bfa5abbfe test: add a push race case where raced push created a new named branch
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32632
diff changeset
   562
  $ hg -R client-racy/ up 'desc("C-F")'
b01bfa5abbfe test: add a push race case where raced push created a new named branch
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32632
diff changeset
   563
  0 files updated, 0 files merged, 0 files removed, 0 files unresolved
b01bfa5abbfe test: add a push race case where raced push created a new named branch
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32632
diff changeset
   564
  $ echo bbb >> client-racy/a
b01bfa5abbfe test: add a push race case where raced push created a new named branch
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32632
diff changeset
   565
  $ hg -R client-racy/ branch my-first-test-branch
b01bfa5abbfe test: add a push race case where raced push created a new named branch
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32632
diff changeset
   566
  marked working directory as branch my-first-test-branch
b01bfa5abbfe test: add a push race case where raced push created a new named branch
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32632
diff changeset
   567
  (branches are permanent and global, did you want a bookmark?)
b01bfa5abbfe test: add a push race case where raced push created a new named branch
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32632
diff changeset
   568
  $ hg -R client-racy/ commit -m "C-H"
b01bfa5abbfe test: add a push race case where raced push created a new named branch
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32632
diff changeset
   569
b01bfa5abbfe test: add a push race case where raced push created a new named branch
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32632
diff changeset
   570
Pushing
b01bfa5abbfe test: add a push race case where raced push created a new named branch
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32632
diff changeset
   571
b01bfa5abbfe test: add a push race case where raced push created a new named branch
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32632
diff changeset
   572
  $ hg -R client-racy push -r 'tip' --new-branch > ./push-log 2>&1 &
b01bfa5abbfe test: add a push race case where raced push created a new named branch
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32632
diff changeset
   573
b01bfa5abbfe test: add a push race case where raced push created a new named branch
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32632
diff changeset
   574
  $ waiton $TESTTMP/readyfile
b01bfa5abbfe test: add a push race case where raced push created a new named branch
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32632
diff changeset
   575
b01bfa5abbfe test: add a push race case where raced push created a new named branch
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32632
diff changeset
   576
  $ hg -R client-other push -fr 'tip'
b01bfa5abbfe test: add a push race case where raced push created a new named branch
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32632
diff changeset
   577
  pushing to ssh://user@dummy/server
b01bfa5abbfe test: add a push race case where raced push created a new named branch
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32632
diff changeset
   578
  searching for changes
b01bfa5abbfe test: add a push race case where raced push created a new named branch
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32632
diff changeset
   579
  remote: adding changesets
b01bfa5abbfe test: add a push race case where raced push created a new named branch
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32632
diff changeset
   580
  remote: adding manifests
b01bfa5abbfe test: add a push race case where raced push created a new named branch
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32632
diff changeset
   581
  remote: adding file changes
b01bfa5abbfe test: add a push race case where raced push created a new named branch
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32632
diff changeset
   582
  remote: added 1 changesets with 1 changes to 1 files
b01bfa5abbfe test: add a push race case where raced push created a new named branch
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32632
diff changeset
   583
b01bfa5abbfe test: add a push race case where raced push created a new named branch
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32632
diff changeset
   584
  $ release $TESTTMP/watchfile
b01bfa5abbfe test: add a push race case where raced push created a new named branch
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32632
diff changeset
   585
b01bfa5abbfe test: add a push race case where raced push created a new named branch
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32632
diff changeset
   586
Check the result of the push
b01bfa5abbfe test: add a push race case where raced push created a new named branch
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32632
diff changeset
   587
32709
16ada4cbb1a9 push: add a way to allow concurrent pushes on unrelated heads
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32670
diff changeset
   588
#if strict
32633
b01bfa5abbfe test: add a push race case where raced push created a new named branch
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32632
diff changeset
   589
  $ cat ./push-log
b01bfa5abbfe test: add a push race case where raced push created a new named branch
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32632
diff changeset
   590
  pushing to ssh://user@dummy/server
b01bfa5abbfe test: add a push race case where raced push created a new named branch
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32632
diff changeset
   591
  searching for changes
b01bfa5abbfe test: add a push race case where raced push created a new named branch
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32632
diff changeset
   592
  wrote ready: $TESTTMP/readyfile
b01bfa5abbfe test: add a push race case where raced push created a new named branch
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32632
diff changeset
   593
  waiting on: $TESTTMP/watchfile
b01bfa5abbfe test: add a push race case where raced push created a new named branch
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32632
diff changeset
   594
  abort: push failed:
b01bfa5abbfe test: add a push race case where raced push created a new named branch
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32632
diff changeset
   595
  'repository changed while pushing - please try again'
b01bfa5abbfe test: add a push race case where raced push created a new named branch
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32632
diff changeset
   596
b01bfa5abbfe test: add a push race case where raced push created a new named branch
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32632
diff changeset
   597
  $ hg -R server graph
b01bfa5abbfe test: add a push race case where raced push created a new named branch
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32632
diff changeset
   598
  o  75d69cba5402 C-G (default)
b01bfa5abbfe test: add a push race case where raced push created a new named branch
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32632
diff changeset
   599
  |
b01bfa5abbfe test: add a push race case where raced push created a new named branch
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32632
diff changeset
   600
  o  d9e379a8c432 C-F (default)
b01bfa5abbfe test: add a push race case where raced push created a new named branch
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32632
diff changeset
   601
  |
b01bfa5abbfe test: add a push race case where raced push created a new named branch
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32632
diff changeset
   602
  o  51c544a58128 C-C (default)
b01bfa5abbfe test: add a push race case where raced push created a new named branch
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32632
diff changeset
   603
  |
b01bfa5abbfe test: add a push race case where raced push created a new named branch
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32632
diff changeset
   604
  | o  d603e2c0cdd7 C-E (default)
b01bfa5abbfe test: add a push race case where raced push created a new named branch
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32632
diff changeset
   605
  |/
b01bfa5abbfe test: add a push race case where raced push created a new named branch
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32632
diff changeset
   606
  o  98217d5a1659 C-A (default)
b01bfa5abbfe test: add a push race case where raced push created a new named branch
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32632
diff changeset
   607
  |
b01bfa5abbfe test: add a push race case where raced push created a new named branch
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32632
diff changeset
   608
  | o  59e76faf78bd C-D (default)
b01bfa5abbfe test: add a push race case where raced push created a new named branch
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32632
diff changeset
   609
  | |
b01bfa5abbfe test: add a push race case where raced push created a new named branch
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32632
diff changeset
   610
  | o  a9149a1428e2 C-B (default)
b01bfa5abbfe test: add a push race case where raced push created a new named branch
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32632
diff changeset
   611
  |/
b01bfa5abbfe test: add a push race case where raced push created a new named branch
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32632
diff changeset
   612
  @  842e2fac6304 C-ROOT (default)
b01bfa5abbfe test: add a push race case where raced push created a new named branch
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32632
diff changeset
   613
  
32709
16ada4cbb1a9 push: add a way to allow concurrent pushes on unrelated heads
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32670
diff changeset
   614
#endif
16ada4cbb1a9 push: add a way to allow concurrent pushes on unrelated heads
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32670
diff changeset
   615
#if unrelated
16ada4cbb1a9 push: add a way to allow concurrent pushes on unrelated heads
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32670
diff changeset
   616
16ada4cbb1a9 push: add a way to allow concurrent pushes on unrelated heads
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32670
diff changeset
   617
(unrelated named branches are unrelated)
16ada4cbb1a9 push: add a way to allow concurrent pushes on unrelated heads
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32670
diff changeset
   618
16ada4cbb1a9 push: add a way to allow concurrent pushes on unrelated heads
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32670
diff changeset
   619
  $ cat ./push-log
16ada4cbb1a9 push: add a way to allow concurrent pushes on unrelated heads
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32670
diff changeset
   620
  pushing to ssh://user@dummy/server
16ada4cbb1a9 push: add a way to allow concurrent pushes on unrelated heads
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32670
diff changeset
   621
  searching for changes
16ada4cbb1a9 push: add a way to allow concurrent pushes on unrelated heads
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32670
diff changeset
   622
  wrote ready: $TESTTMP/readyfile
16ada4cbb1a9 push: add a way to allow concurrent pushes on unrelated heads
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32670
diff changeset
   623
  waiting on: $TESTTMP/watchfile
16ada4cbb1a9 push: add a way to allow concurrent pushes on unrelated heads
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32670
diff changeset
   624
  remote: adding changesets
16ada4cbb1a9 push: add a way to allow concurrent pushes on unrelated heads
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32670
diff changeset
   625
  remote: adding manifests
16ada4cbb1a9 push: add a way to allow concurrent pushes on unrelated heads
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32670
diff changeset
   626
  remote: adding file changes
16ada4cbb1a9 push: add a way to allow concurrent pushes on unrelated heads
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32670
diff changeset
   627
  remote: added 1 changesets with 1 changes to 1 files (+1 heads)
16ada4cbb1a9 push: add a way to allow concurrent pushes on unrelated heads
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32670
diff changeset
   628
16ada4cbb1a9 push: add a way to allow concurrent pushes on unrelated heads
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32670
diff changeset
   629
  $ hg -R server graph
16ada4cbb1a9 push: add a way to allow concurrent pushes on unrelated heads
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32670
diff changeset
   630
  o  833be552cfe6 C-H (my-first-test-branch)
16ada4cbb1a9 push: add a way to allow concurrent pushes on unrelated heads
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32670
diff changeset
   631
  |
16ada4cbb1a9 push: add a way to allow concurrent pushes on unrelated heads
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32670
diff changeset
   632
  | o  75d69cba5402 C-G (default)
16ada4cbb1a9 push: add a way to allow concurrent pushes on unrelated heads
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32670
diff changeset
   633
  |/
16ada4cbb1a9 push: add a way to allow concurrent pushes on unrelated heads
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32670
diff changeset
   634
  o  d9e379a8c432 C-F (default)
16ada4cbb1a9 push: add a way to allow concurrent pushes on unrelated heads
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32670
diff changeset
   635
  |
16ada4cbb1a9 push: add a way to allow concurrent pushes on unrelated heads
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32670
diff changeset
   636
  o  51c544a58128 C-C (default)
16ada4cbb1a9 push: add a way to allow concurrent pushes on unrelated heads
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32670
diff changeset
   637
  |
16ada4cbb1a9 push: add a way to allow concurrent pushes on unrelated heads
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32670
diff changeset
   638
  | o  d603e2c0cdd7 C-E (default)
16ada4cbb1a9 push: add a way to allow concurrent pushes on unrelated heads
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32670
diff changeset
   639
  |/
16ada4cbb1a9 push: add a way to allow concurrent pushes on unrelated heads
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32670
diff changeset
   640
  o  98217d5a1659 C-A (default)
16ada4cbb1a9 push: add a way to allow concurrent pushes on unrelated heads
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32670
diff changeset
   641
  |
16ada4cbb1a9 push: add a way to allow concurrent pushes on unrelated heads
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32670
diff changeset
   642
  | o  59e76faf78bd C-D (default)
16ada4cbb1a9 push: add a way to allow concurrent pushes on unrelated heads
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32670
diff changeset
   643
  | |
16ada4cbb1a9 push: add a way to allow concurrent pushes on unrelated heads
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32670
diff changeset
   644
  | o  a9149a1428e2 C-B (default)
16ada4cbb1a9 push: add a way to allow concurrent pushes on unrelated heads
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32670
diff changeset
   645
  |/
16ada4cbb1a9 push: add a way to allow concurrent pushes on unrelated heads
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32670
diff changeset
   646
  @  842e2fac6304 C-ROOT (default)
16ada4cbb1a9 push: add a way to allow concurrent pushes on unrelated heads
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32670
diff changeset
   647
  
16ada4cbb1a9 push: add a way to allow concurrent pushes on unrelated heads
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32670
diff changeset
   648
#endif
16ada4cbb1a9 push: add a way to allow concurrent pushes on unrelated heads
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32670
diff changeset
   649
16ada4cbb1a9 push: add a way to allow concurrent pushes on unrelated heads
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32670
diff changeset
   650
The racing new head do not affect existing heads, push should go through
32634
8d10e21e3b57 test: add a push race case where racing push create a new named branch
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32633
diff changeset
   651
8d10e21e3b57 test: add a push race case where racing push create a new named branch
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32633
diff changeset
   652
pushing touching different named branch (same topo): old branch raced
8d10e21e3b57 test: add a push race case where racing push create a new named branch
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32633
diff changeset
   653
---------------------------------------------------------------------
8d10e21e3b57 test: add a push race case where racing push create a new named branch
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32633
diff changeset
   654
8d10e21e3b57 test: add a push race case where racing push create a new named branch
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32633
diff changeset
   655
Pushing two children on the same head, one is a different named branch
8d10e21e3b57 test: add a push race case where racing push create a new named branch
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32633
diff changeset
   656
8d10e21e3b57 test: add a push race case where racing push create a new named branch
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32633
diff changeset
   657
#  a (raced, default-branch)
8d10e21e3b57 test: add a push race case where racing push create a new named branch
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32633
diff changeset
   658
#  |
8d10e21e3b57 test: add a push race case where racing push create a new named branch
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32633
diff changeset
   659
#  | b (new branch)
8d10e21e3b57 test: add a push race case where racing push create a new named branch
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32633
diff changeset
   660
#  |/
8d10e21e3b57 test: add a push race case where racing push create a new named branch
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32633
diff changeset
   661
#  * (default-branch)
8d10e21e3b57 test: add a push race case where racing push create a new named branch
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32633
diff changeset
   662
8d10e21e3b57 test: add a push race case where racing push create a new named branch
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32633
diff changeset
   663
(resync-all)
8d10e21e3b57 test: add a push race case where racing push create a new named branch
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32633
diff changeset
   664
32709
16ada4cbb1a9 push: add a way to allow concurrent pushes on unrelated heads
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32670
diff changeset
   665
#if strict
16ada4cbb1a9 push: add a way to allow concurrent pushes on unrelated heads
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32670
diff changeset
   666
32634
8d10e21e3b57 test: add a push race case where racing push create a new named branch
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32633
diff changeset
   667
  $ hg -R ./server pull ./client-racy
8d10e21e3b57 test: add a push race case where racing push create a new named branch
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32633
diff changeset
   668
  pulling from ./client-racy
8d10e21e3b57 test: add a push race case where racing push create a new named branch
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32633
diff changeset
   669
  searching for changes
8d10e21e3b57 test: add a push race case where racing push create a new named branch
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32633
diff changeset
   670
  adding changesets
8d10e21e3b57 test: add a push race case where racing push create a new named branch
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32633
diff changeset
   671
  adding manifests
8d10e21e3b57 test: add a push race case where racing push create a new named branch
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32633
diff changeset
   672
  adding file changes
8d10e21e3b57 test: add a push race case where racing push create a new named branch
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32633
diff changeset
   673
  added 1 changesets with 1 changes to 1 files (+1 heads)
8d10e21e3b57 test: add a push race case where racing push create a new named branch
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32633
diff changeset
   674
  (run 'hg heads .' to see heads, 'hg merge' to merge)
32709
16ada4cbb1a9 push: add a way to allow concurrent pushes on unrelated heads
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32670
diff changeset
   675
16ada4cbb1a9 push: add a way to allow concurrent pushes on unrelated heads
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32670
diff changeset
   676
#endif
16ada4cbb1a9 push: add a way to allow concurrent pushes on unrelated heads
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32670
diff changeset
   677
#if unrelated
16ada4cbb1a9 push: add a way to allow concurrent pushes on unrelated heads
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32670
diff changeset
   678
16ada4cbb1a9 push: add a way to allow concurrent pushes on unrelated heads
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32670
diff changeset
   679
  $ hg -R ./server pull ./client-racy
16ada4cbb1a9 push: add a way to allow concurrent pushes on unrelated heads
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32670
diff changeset
   680
  pulling from ./client-racy
16ada4cbb1a9 push: add a way to allow concurrent pushes on unrelated heads
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32670
diff changeset
   681
  searching for changes
16ada4cbb1a9 push: add a way to allow concurrent pushes on unrelated heads
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32670
diff changeset
   682
  no changes found
16ada4cbb1a9 push: add a way to allow concurrent pushes on unrelated heads
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32670
diff changeset
   683
16ada4cbb1a9 push: add a way to allow concurrent pushes on unrelated heads
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32670
diff changeset
   684
#endif
16ada4cbb1a9 push: add a way to allow concurrent pushes on unrelated heads
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32670
diff changeset
   685
32634
8d10e21e3b57 test: add a push race case where racing push create a new named branch
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32633
diff changeset
   686
  $ hg -R ./client-other pull
8d10e21e3b57 test: add a push race case where racing push create a new named branch
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32633
diff changeset
   687
  pulling from ssh://user@dummy/server
8d10e21e3b57 test: add a push race case where racing push create a new named branch
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32633
diff changeset
   688
  searching for changes
8d10e21e3b57 test: add a push race case where racing push create a new named branch
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32633
diff changeset
   689
  adding changesets
8d10e21e3b57 test: add a push race case where racing push create a new named branch
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32633
diff changeset
   690
  adding manifests
8d10e21e3b57 test: add a push race case where racing push create a new named branch
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32633
diff changeset
   691
  adding file changes
8d10e21e3b57 test: add a push race case where racing push create a new named branch
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32633
diff changeset
   692
  added 1 changesets with 1 changes to 1 files (+1 heads)
8d10e21e3b57 test: add a push race case where racing push create a new named branch
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32633
diff changeset
   693
  (run 'hg heads .' to see heads, 'hg merge' to merge)
8d10e21e3b57 test: add a push race case where racing push create a new named branch
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32633
diff changeset
   694
  $ hg -R ./client-racy pull
8d10e21e3b57 test: add a push race case where racing push create a new named branch
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32633
diff changeset
   695
  pulling from ssh://user@dummy/server
8d10e21e3b57 test: add a push race case where racing push create a new named branch
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32633
diff changeset
   696
  searching for changes
8d10e21e3b57 test: add a push race case where racing push create a new named branch
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32633
diff changeset
   697
  adding changesets
8d10e21e3b57 test: add a push race case where racing push create a new named branch
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32633
diff changeset
   698
  adding manifests
8d10e21e3b57 test: add a push race case where racing push create a new named branch
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32633
diff changeset
   699
  adding file changes
8d10e21e3b57 test: add a push race case where racing push create a new named branch
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32633
diff changeset
   700
  added 1 changesets with 1 changes to 1 files (+1 heads)
8d10e21e3b57 test: add a push race case where racing push create a new named branch
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32633
diff changeset
   701
  (run 'hg heads' to see heads)
8d10e21e3b57 test: add a push race case where racing push create a new named branch
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32633
diff changeset
   702
8d10e21e3b57 test: add a push race case where racing push create a new named branch
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32633
diff changeset
   703
  $ hg -R server graph
8d10e21e3b57 test: add a push race case where racing push create a new named branch
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32633
diff changeset
   704
  o  833be552cfe6 C-H (my-first-test-branch)
8d10e21e3b57 test: add a push race case where racing push create a new named branch
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32633
diff changeset
   705
  |
8d10e21e3b57 test: add a push race case where racing push create a new named branch
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32633
diff changeset
   706
  | o  75d69cba5402 C-G (default)
8d10e21e3b57 test: add a push race case where racing push create a new named branch
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32633
diff changeset
   707
  |/
8d10e21e3b57 test: add a push race case where racing push create a new named branch
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32633
diff changeset
   708
  o  d9e379a8c432 C-F (default)
8d10e21e3b57 test: add a push race case where racing push create a new named branch
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32633
diff changeset
   709
  |
8d10e21e3b57 test: add a push race case where racing push create a new named branch
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32633
diff changeset
   710
  o  51c544a58128 C-C (default)
8d10e21e3b57 test: add a push race case where racing push create a new named branch
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32633
diff changeset
   711
  |
8d10e21e3b57 test: add a push race case where racing push create a new named branch
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32633
diff changeset
   712
  | o  d603e2c0cdd7 C-E (default)
8d10e21e3b57 test: add a push race case where racing push create a new named branch
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32633
diff changeset
   713
  |/
8d10e21e3b57 test: add a push race case where racing push create a new named branch
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32633
diff changeset
   714
  o  98217d5a1659 C-A (default)
8d10e21e3b57 test: add a push race case where racing push create a new named branch
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32633
diff changeset
   715
  |
8d10e21e3b57 test: add a push race case where racing push create a new named branch
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32633
diff changeset
   716
  | o  59e76faf78bd C-D (default)
8d10e21e3b57 test: add a push race case where racing push create a new named branch
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32633
diff changeset
   717
  | |
8d10e21e3b57 test: add a push race case where racing push create a new named branch
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32633
diff changeset
   718
  | o  a9149a1428e2 C-B (default)
8d10e21e3b57 test: add a push race case where racing push create a new named branch
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32633
diff changeset
   719
  |/
8d10e21e3b57 test: add a push race case where racing push create a new named branch
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32633
diff changeset
   720
  @  842e2fac6304 C-ROOT (default)
8d10e21e3b57 test: add a push race case where racing push create a new named branch
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32633
diff changeset
   721
  
8d10e21e3b57 test: add a push race case where racing push create a new named branch
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32633
diff changeset
   722
8d10e21e3b57 test: add a push race case where racing push create a new named branch
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32633
diff changeset
   723
Creating changesets
8d10e21e3b57 test: add a push race case where racing push create a new named branch
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32633
diff changeset
   724
8d10e21e3b57 test: add a push race case where racing push create a new named branch
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32633
diff changeset
   725
(new named branch from one head)
8d10e21e3b57 test: add a push race case where racing push create a new named branch
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32633
diff changeset
   726
8d10e21e3b57 test: add a push race case where racing push create a new named branch
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32633
diff changeset
   727
  $ hg -R client-other/ up 'desc("C-G")'
8d10e21e3b57 test: add a push race case where racing push create a new named branch
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32633
diff changeset
   728
  0 files updated, 0 files merged, 0 files removed, 0 files unresolved
8d10e21e3b57 test: add a push race case where racing push create a new named branch
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32633
diff changeset
   729
  $ echo aaa >> client-other/a
8d10e21e3b57 test: add a push race case where racing push create a new named branch
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32633
diff changeset
   730
  $ hg -R client-other/ branch my-second-test-branch
8d10e21e3b57 test: add a push race case where racing push create a new named branch
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32633
diff changeset
   731
  marked working directory as branch my-second-test-branch
8d10e21e3b57 test: add a push race case where racing push create a new named branch
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32633
diff changeset
   732
  $ hg -R client-other/ commit -m "C-I"
8d10e21e3b57 test: add a push race case where racing push create a new named branch
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32633
diff changeset
   733
8d10e21e3b57 test: add a push race case where racing push create a new named branch
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32633
diff changeset
   734
(children "updating" that same head)
8d10e21e3b57 test: add a push race case where racing push create a new named branch
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32633
diff changeset
   735
8d10e21e3b57 test: add a push race case where racing push create a new named branch
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32633
diff changeset
   736
  $ hg -R client-racy/ up 'desc("C-G")'
8d10e21e3b57 test: add a push race case where racing push create a new named branch
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32633
diff changeset
   737
  1 files updated, 0 files merged, 0 files removed, 0 files unresolved
8d10e21e3b57 test: add a push race case where racing push create a new named branch
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32633
diff changeset
   738
  $ echo bbb >> client-racy/a
8d10e21e3b57 test: add a push race case where racing push create a new named branch
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32633
diff changeset
   739
  $ hg -R client-racy/ commit -m "C-J"
8d10e21e3b57 test: add a push race case where racing push create a new named branch
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32633
diff changeset
   740
8d10e21e3b57 test: add a push race case where racing push create a new named branch
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32633
diff changeset
   741
Pushing
8d10e21e3b57 test: add a push race case where racing push create a new named branch
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32633
diff changeset
   742
8d10e21e3b57 test: add a push race case where racing push create a new named branch
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32633
diff changeset
   743
  $ hg -R client-racy push -r 'tip' > ./push-log 2>&1 &
8d10e21e3b57 test: add a push race case where racing push create a new named branch
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32633
diff changeset
   744
8d10e21e3b57 test: add a push race case where racing push create a new named branch
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32633
diff changeset
   745
  $ waiton $TESTTMP/readyfile
8d10e21e3b57 test: add a push race case where racing push create a new named branch
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32633
diff changeset
   746
8d10e21e3b57 test: add a push race case where racing push create a new named branch
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32633
diff changeset
   747
  $ hg -R client-other push -fr 'tip' --new-branch
8d10e21e3b57 test: add a push race case where racing push create a new named branch
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32633
diff changeset
   748
  pushing to ssh://user@dummy/server
8d10e21e3b57 test: add a push race case where racing push create a new named branch
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32633
diff changeset
   749
  searching for changes
8d10e21e3b57 test: add a push race case where racing push create a new named branch
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32633
diff changeset
   750
  remote: adding changesets
8d10e21e3b57 test: add a push race case where racing push create a new named branch
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32633
diff changeset
   751
  remote: adding manifests
8d10e21e3b57 test: add a push race case where racing push create a new named branch
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32633
diff changeset
   752
  remote: adding file changes
8d10e21e3b57 test: add a push race case where racing push create a new named branch
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32633
diff changeset
   753
  remote: added 1 changesets with 1 changes to 1 files
8d10e21e3b57 test: add a push race case where racing push create a new named branch
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32633
diff changeset
   754
8d10e21e3b57 test: add a push race case where racing push create a new named branch
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32633
diff changeset
   755
  $ release $TESTTMP/watchfile
8d10e21e3b57 test: add a push race case where racing push create a new named branch
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32633
diff changeset
   756
8d10e21e3b57 test: add a push race case where racing push create a new named branch
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32633
diff changeset
   757
Check the result of the push
8d10e21e3b57 test: add a push race case where racing push create a new named branch
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32633
diff changeset
   758
32709
16ada4cbb1a9 push: add a way to allow concurrent pushes on unrelated heads
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32670
diff changeset
   759
#if strict
16ada4cbb1a9 push: add a way to allow concurrent pushes on unrelated heads
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32670
diff changeset
   760
32634
8d10e21e3b57 test: add a push race case where racing push create a new named branch
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32633
diff changeset
   761
  $ cat ./push-log
8d10e21e3b57 test: add a push race case where racing push create a new named branch
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32633
diff changeset
   762
  pushing to ssh://user@dummy/server
8d10e21e3b57 test: add a push race case where racing push create a new named branch
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32633
diff changeset
   763
  searching for changes
8d10e21e3b57 test: add a push race case where racing push create a new named branch
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32633
diff changeset
   764
  wrote ready: $TESTTMP/readyfile
8d10e21e3b57 test: add a push race case where racing push create a new named branch
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32633
diff changeset
   765
  waiting on: $TESTTMP/watchfile
8d10e21e3b57 test: add a push race case where racing push create a new named branch
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32633
diff changeset
   766
  abort: push failed:
8d10e21e3b57 test: add a push race case where racing push create a new named branch
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32633
diff changeset
   767
  'repository changed while pushing - please try again'
8d10e21e3b57 test: add a push race case where racing push create a new named branch
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32633
diff changeset
   768
8d10e21e3b57 test: add a push race case where racing push create a new named branch
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32633
diff changeset
   769
  $ hg -R server graph
8d10e21e3b57 test: add a push race case where racing push create a new named branch
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32633
diff changeset
   770
  o  b35ed749f288 C-I (my-second-test-branch)
8d10e21e3b57 test: add a push race case where racing push create a new named branch
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32633
diff changeset
   771
  |
8d10e21e3b57 test: add a push race case where racing push create a new named branch
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32633
diff changeset
   772
  o  75d69cba5402 C-G (default)
8d10e21e3b57 test: add a push race case where racing push create a new named branch
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32633
diff changeset
   773
  |
8d10e21e3b57 test: add a push race case where racing push create a new named branch
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32633
diff changeset
   774
  | o  833be552cfe6 C-H (my-first-test-branch)
8d10e21e3b57 test: add a push race case where racing push create a new named branch
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32633
diff changeset
   775
  |/
8d10e21e3b57 test: add a push race case where racing push create a new named branch
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32633
diff changeset
   776
  o  d9e379a8c432 C-F (default)
8d10e21e3b57 test: add a push race case where racing push create a new named branch
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32633
diff changeset
   777
  |
8d10e21e3b57 test: add a push race case where racing push create a new named branch
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32633
diff changeset
   778
  o  51c544a58128 C-C (default)
8d10e21e3b57 test: add a push race case where racing push create a new named branch
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32633
diff changeset
   779
  |
8d10e21e3b57 test: add a push race case where racing push create a new named branch
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32633
diff changeset
   780
  | o  d603e2c0cdd7 C-E (default)
8d10e21e3b57 test: add a push race case where racing push create a new named branch
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32633
diff changeset
   781
  |/
8d10e21e3b57 test: add a push race case where racing push create a new named branch
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32633
diff changeset
   782
  o  98217d5a1659 C-A (default)
8d10e21e3b57 test: add a push race case where racing push create a new named branch
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32633
diff changeset
   783
  |
8d10e21e3b57 test: add a push race case where racing push create a new named branch
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32633
diff changeset
   784
  | o  59e76faf78bd C-D (default)
8d10e21e3b57 test: add a push race case where racing push create a new named branch
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32633
diff changeset
   785
  | |
8d10e21e3b57 test: add a push race case where racing push create a new named branch
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32633
diff changeset
   786
  | o  a9149a1428e2 C-B (default)
8d10e21e3b57 test: add a push race case where racing push create a new named branch
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32633
diff changeset
   787
  |/
8d10e21e3b57 test: add a push race case where racing push create a new named branch
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32633
diff changeset
   788
  @  842e2fac6304 C-ROOT (default)
8d10e21e3b57 test: add a push race case where racing push create a new named branch
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32633
diff changeset
   789
  
32635
32c80d07952b test: add a push race case where racing push touches multiple heads
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32634
diff changeset
   790
32709
16ada4cbb1a9 push: add a way to allow concurrent pushes on unrelated heads
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32670
diff changeset
   791
#endif
16ada4cbb1a9 push: add a way to allow concurrent pushes on unrelated heads
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32670
diff changeset
   792
16ada4cbb1a9 push: add a way to allow concurrent pushes on unrelated heads
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32670
diff changeset
   793
#if unrelated
16ada4cbb1a9 push: add a way to allow concurrent pushes on unrelated heads
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32670
diff changeset
   794
16ada4cbb1a9 push: add a way to allow concurrent pushes on unrelated heads
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32670
diff changeset
   795
(unrelated named branches are unrelated)
16ada4cbb1a9 push: add a way to allow concurrent pushes on unrelated heads
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32670
diff changeset
   796
16ada4cbb1a9 push: add a way to allow concurrent pushes on unrelated heads
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32670
diff changeset
   797
  $ cat ./push-log
16ada4cbb1a9 push: add a way to allow concurrent pushes on unrelated heads
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32670
diff changeset
   798
  pushing to ssh://user@dummy/server
16ada4cbb1a9 push: add a way to allow concurrent pushes on unrelated heads
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32670
diff changeset
   799
  searching for changes
16ada4cbb1a9 push: add a way to allow concurrent pushes on unrelated heads
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32670
diff changeset
   800
  wrote ready: $TESTTMP/readyfile
16ada4cbb1a9 push: add a way to allow concurrent pushes on unrelated heads
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32670
diff changeset
   801
  waiting on: $TESTTMP/watchfile
16ada4cbb1a9 push: add a way to allow concurrent pushes on unrelated heads
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32670
diff changeset
   802
  remote: adding changesets
16ada4cbb1a9 push: add a way to allow concurrent pushes on unrelated heads
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32670
diff changeset
   803
  remote: adding manifests
16ada4cbb1a9 push: add a way to allow concurrent pushes on unrelated heads
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32670
diff changeset
   804
  remote: adding file changes
16ada4cbb1a9 push: add a way to allow concurrent pushes on unrelated heads
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32670
diff changeset
   805
  remote: added 1 changesets with 1 changes to 1 files (+1 heads)
16ada4cbb1a9 push: add a way to allow concurrent pushes on unrelated heads
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32670
diff changeset
   806
16ada4cbb1a9 push: add a way to allow concurrent pushes on unrelated heads
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32670
diff changeset
   807
  $ hg -R server graph
16ada4cbb1a9 push: add a way to allow concurrent pushes on unrelated heads
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32670
diff changeset
   808
  o  89420bf00fae C-J (default)
16ada4cbb1a9 push: add a way to allow concurrent pushes on unrelated heads
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32670
diff changeset
   809
  |
16ada4cbb1a9 push: add a way to allow concurrent pushes on unrelated heads
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32670
diff changeset
   810
  | o  b35ed749f288 C-I (my-second-test-branch)
16ada4cbb1a9 push: add a way to allow concurrent pushes on unrelated heads
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32670
diff changeset
   811
  |/
16ada4cbb1a9 push: add a way to allow concurrent pushes on unrelated heads
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32670
diff changeset
   812
  o  75d69cba5402 C-G (default)
16ada4cbb1a9 push: add a way to allow concurrent pushes on unrelated heads
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32670
diff changeset
   813
  |
16ada4cbb1a9 push: add a way to allow concurrent pushes on unrelated heads
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32670
diff changeset
   814
  | o  833be552cfe6 C-H (my-first-test-branch)
16ada4cbb1a9 push: add a way to allow concurrent pushes on unrelated heads
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32670
diff changeset
   815
  |/
16ada4cbb1a9 push: add a way to allow concurrent pushes on unrelated heads
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32670
diff changeset
   816
  o  d9e379a8c432 C-F (default)
16ada4cbb1a9 push: add a way to allow concurrent pushes on unrelated heads
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32670
diff changeset
   817
  |
16ada4cbb1a9 push: add a way to allow concurrent pushes on unrelated heads
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32670
diff changeset
   818
  o  51c544a58128 C-C (default)
16ada4cbb1a9 push: add a way to allow concurrent pushes on unrelated heads
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32670
diff changeset
   819
  |
16ada4cbb1a9 push: add a way to allow concurrent pushes on unrelated heads
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32670
diff changeset
   820
  | o  d603e2c0cdd7 C-E (default)
16ada4cbb1a9 push: add a way to allow concurrent pushes on unrelated heads
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32670
diff changeset
   821
  |/
16ada4cbb1a9 push: add a way to allow concurrent pushes on unrelated heads
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32670
diff changeset
   822
  o  98217d5a1659 C-A (default)
16ada4cbb1a9 push: add a way to allow concurrent pushes on unrelated heads
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32670
diff changeset
   823
  |
16ada4cbb1a9 push: add a way to allow concurrent pushes on unrelated heads
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32670
diff changeset
   824
  | o  59e76faf78bd C-D (default)
16ada4cbb1a9 push: add a way to allow concurrent pushes on unrelated heads
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32670
diff changeset
   825
  | |
16ada4cbb1a9 push: add a way to allow concurrent pushes on unrelated heads
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32670
diff changeset
   826
  | o  a9149a1428e2 C-B (default)
16ada4cbb1a9 push: add a way to allow concurrent pushes on unrelated heads
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32670
diff changeset
   827
  |/
16ada4cbb1a9 push: add a way to allow concurrent pushes on unrelated heads
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32670
diff changeset
   828
  @  842e2fac6304 C-ROOT (default)
16ada4cbb1a9 push: add a way to allow concurrent pushes on unrelated heads
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32670
diff changeset
   829
  
16ada4cbb1a9 push: add a way to allow concurrent pushes on unrelated heads
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32670
diff changeset
   830
16ada4cbb1a9 push: add a way to allow concurrent pushes on unrelated heads
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32670
diff changeset
   831
#endif
16ada4cbb1a9 push: add a way to allow concurrent pushes on unrelated heads
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32670
diff changeset
   832
32635
32c80d07952b test: add a push race case where racing push touches multiple heads
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32634
diff changeset
   833
pushing racing push touch multiple heads
32c80d07952b test: add a push race case where racing push touches multiple heads
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32634
diff changeset
   834
----------------------------------------
32c80d07952b test: add a push race case where racing push touches multiple heads
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32634
diff changeset
   835
32c80d07952b test: add a push race case where racing push touches multiple heads
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32634
diff changeset
   836
There are multiple heads, but the racing push touch all of them
32c80d07952b test: add a push race case where racing push touches multiple heads
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32634
diff changeset
   837
32c80d07952b test: add a push race case where racing push touches multiple heads
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32634
diff changeset
   838
#  a (raced)
32c80d07952b test: add a push race case where racing push touches multiple heads
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32634
diff changeset
   839
#  | b
32c80d07952b test: add a push race case where racing push touches multiple heads
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32634
diff changeset
   840
#  |/|
32c80d07952b test: add a push race case where racing push touches multiple heads
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32634
diff changeset
   841
#  * *
32c80d07952b test: add a push race case where racing push touches multiple heads
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32634
diff changeset
   842
#  |/
32c80d07952b test: add a push race case where racing push touches multiple heads
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32634
diff changeset
   843
#  *
32c80d07952b test: add a push race case where racing push touches multiple heads
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32634
diff changeset
   844
32c80d07952b test: add a push race case where racing push touches multiple heads
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32634
diff changeset
   845
(resync-all)
32c80d07952b test: add a push race case where racing push touches multiple heads
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32634
diff changeset
   846
32709
16ada4cbb1a9 push: add a way to allow concurrent pushes on unrelated heads
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32670
diff changeset
   847
#if strict
16ada4cbb1a9 push: add a way to allow concurrent pushes on unrelated heads
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32670
diff changeset
   848
32635
32c80d07952b test: add a push race case where racing push touches multiple heads
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32634
diff changeset
   849
  $ hg -R ./server pull ./client-racy
32c80d07952b test: add a push race case where racing push touches multiple heads
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32634
diff changeset
   850
  pulling from ./client-racy
32c80d07952b test: add a push race case where racing push touches multiple heads
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32634
diff changeset
   851
  searching for changes
32c80d07952b test: add a push race case where racing push touches multiple heads
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32634
diff changeset
   852
  adding changesets
32c80d07952b test: add a push race case where racing push touches multiple heads
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32634
diff changeset
   853
  adding manifests
32c80d07952b test: add a push race case where racing push touches multiple heads
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32634
diff changeset
   854
  adding file changes
32c80d07952b test: add a push race case where racing push touches multiple heads
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32634
diff changeset
   855
  added 1 changesets with 1 changes to 1 files (+1 heads)
32c80d07952b test: add a push race case where racing push touches multiple heads
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32634
diff changeset
   856
  (run 'hg heads .' to see heads, 'hg merge' to merge)
32709
16ada4cbb1a9 push: add a way to allow concurrent pushes on unrelated heads
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32670
diff changeset
   857
16ada4cbb1a9 push: add a way to allow concurrent pushes on unrelated heads
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32670
diff changeset
   858
#endif
16ada4cbb1a9 push: add a way to allow concurrent pushes on unrelated heads
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32670
diff changeset
   859
16ada4cbb1a9 push: add a way to allow concurrent pushes on unrelated heads
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32670
diff changeset
   860
#if unrelated
16ada4cbb1a9 push: add a way to allow concurrent pushes on unrelated heads
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32670
diff changeset
   861
16ada4cbb1a9 push: add a way to allow concurrent pushes on unrelated heads
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32670
diff changeset
   862
  $ hg -R ./server pull ./client-racy
16ada4cbb1a9 push: add a way to allow concurrent pushes on unrelated heads
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32670
diff changeset
   863
  pulling from ./client-racy
16ada4cbb1a9 push: add a way to allow concurrent pushes on unrelated heads
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32670
diff changeset
   864
  searching for changes
16ada4cbb1a9 push: add a way to allow concurrent pushes on unrelated heads
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32670
diff changeset
   865
  no changes found
16ada4cbb1a9 push: add a way to allow concurrent pushes on unrelated heads
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32670
diff changeset
   866
16ada4cbb1a9 push: add a way to allow concurrent pushes on unrelated heads
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32670
diff changeset
   867
#endif
16ada4cbb1a9 push: add a way to allow concurrent pushes on unrelated heads
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32670
diff changeset
   868
32635
32c80d07952b test: add a push race case where racing push touches multiple heads
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32634
diff changeset
   869
  $ hg -R ./client-other pull
32c80d07952b test: add a push race case where racing push touches multiple heads
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32634
diff changeset
   870
  pulling from ssh://user@dummy/server
32c80d07952b test: add a push race case where racing push touches multiple heads
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32634
diff changeset
   871
  searching for changes
32c80d07952b test: add a push race case where racing push touches multiple heads
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32634
diff changeset
   872
  adding changesets
32c80d07952b test: add a push race case where racing push touches multiple heads
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32634
diff changeset
   873
  adding manifests
32c80d07952b test: add a push race case where racing push touches multiple heads
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32634
diff changeset
   874
  adding file changes
32c80d07952b test: add a push race case where racing push touches multiple heads
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32634
diff changeset
   875
  added 1 changesets with 1 changes to 1 files (+1 heads)
32c80d07952b test: add a push race case where racing push touches multiple heads
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32634
diff changeset
   876
  (run 'hg heads' to see heads)
32c80d07952b test: add a push race case where racing push touches multiple heads
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32634
diff changeset
   877
  $ hg -R ./client-racy pull
32c80d07952b test: add a push race case where racing push touches multiple heads
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32634
diff changeset
   878
  pulling from ssh://user@dummy/server
32c80d07952b test: add a push race case where racing push touches multiple heads
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32634
diff changeset
   879
  searching for changes
32c80d07952b test: add a push race case where racing push touches multiple heads
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32634
diff changeset
   880
  adding changesets
32c80d07952b test: add a push race case where racing push touches multiple heads
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32634
diff changeset
   881
  adding manifests
32c80d07952b test: add a push race case where racing push touches multiple heads
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32634
diff changeset
   882
  adding file changes
32c80d07952b test: add a push race case where racing push touches multiple heads
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32634
diff changeset
   883
  added 1 changesets with 1 changes to 1 files (+1 heads)
32c80d07952b test: add a push race case where racing push touches multiple heads
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32634
diff changeset
   884
  (run 'hg heads .' to see heads, 'hg merge' to merge)
32c80d07952b test: add a push race case where racing push touches multiple heads
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32634
diff changeset
   885
32c80d07952b test: add a push race case where racing push touches multiple heads
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32634
diff changeset
   886
  $ hg -R server graph
32c80d07952b test: add a push race case where racing push touches multiple heads
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32634
diff changeset
   887
  o  89420bf00fae C-J (default)
32c80d07952b test: add a push race case where racing push touches multiple heads
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32634
diff changeset
   888
  |
32c80d07952b test: add a push race case where racing push touches multiple heads
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32634
diff changeset
   889
  | o  b35ed749f288 C-I (my-second-test-branch)
32c80d07952b test: add a push race case where racing push touches multiple heads
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32634
diff changeset
   890
  |/
32c80d07952b test: add a push race case where racing push touches multiple heads
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32634
diff changeset
   891
  o  75d69cba5402 C-G (default)
32c80d07952b test: add a push race case where racing push touches multiple heads
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32634
diff changeset
   892
  |
32c80d07952b test: add a push race case where racing push touches multiple heads
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32634
diff changeset
   893
  | o  833be552cfe6 C-H (my-first-test-branch)
32c80d07952b test: add a push race case where racing push touches multiple heads
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32634
diff changeset
   894
  |/
32c80d07952b test: add a push race case where racing push touches multiple heads
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32634
diff changeset
   895
  o  d9e379a8c432 C-F (default)
32c80d07952b test: add a push race case where racing push touches multiple heads
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32634
diff changeset
   896
  |
32c80d07952b test: add a push race case where racing push touches multiple heads
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32634
diff changeset
   897
  o  51c544a58128 C-C (default)
32c80d07952b test: add a push race case where racing push touches multiple heads
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32634
diff changeset
   898
  |
32c80d07952b test: add a push race case where racing push touches multiple heads
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32634
diff changeset
   899
  | o  d603e2c0cdd7 C-E (default)
32c80d07952b test: add a push race case where racing push touches multiple heads
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32634
diff changeset
   900
  |/
32c80d07952b test: add a push race case where racing push touches multiple heads
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32634
diff changeset
   901
  o  98217d5a1659 C-A (default)
32c80d07952b test: add a push race case where racing push touches multiple heads
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32634
diff changeset
   902
  |
32c80d07952b test: add a push race case where racing push touches multiple heads
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32634
diff changeset
   903
  | o  59e76faf78bd C-D (default)
32c80d07952b test: add a push race case where racing push touches multiple heads
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32634
diff changeset
   904
  | |
32c80d07952b test: add a push race case where racing push touches multiple heads
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32634
diff changeset
   905
  | o  a9149a1428e2 C-B (default)
32c80d07952b test: add a push race case where racing push touches multiple heads
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32634
diff changeset
   906
  |/
32c80d07952b test: add a push race case where racing push touches multiple heads
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32634
diff changeset
   907
  @  842e2fac6304 C-ROOT (default)
32c80d07952b test: add a push race case where racing push touches multiple heads
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32634
diff changeset
   908
  
32c80d07952b test: add a push race case where racing push touches multiple heads
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32634
diff changeset
   909
32c80d07952b test: add a push race case where racing push touches multiple heads
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32634
diff changeset
   910
Creating changesets
32c80d07952b test: add a push race case where racing push touches multiple heads
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32634
diff changeset
   911
32c80d07952b test: add a push race case where racing push touches multiple heads
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32634
diff changeset
   912
(merges heads)
32c80d07952b test: add a push race case where racing push touches multiple heads
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32634
diff changeset
   913
32c80d07952b test: add a push race case where racing push touches multiple heads
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32634
diff changeset
   914
  $ hg -R client-other/ up 'desc("C-E")'
32c80d07952b test: add a push race case where racing push touches multiple heads
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32634
diff changeset
   915
  1 files updated, 0 files merged, 0 files removed, 0 files unresolved
32c80d07952b test: add a push race case where racing push touches multiple heads
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32634
diff changeset
   916
  $ hg -R client-other/ merge 'desc("C-D")'
32c80d07952b test: add a push race case where racing push touches multiple heads
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32634
diff changeset
   917
  1 files updated, 0 files merged, 0 files removed, 0 files unresolved
32c80d07952b test: add a push race case where racing push touches multiple heads
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32634
diff changeset
   918
  (branch merge, don't forget to commit)
32c80d07952b test: add a push race case where racing push touches multiple heads
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32634
diff changeset
   919
  $ hg -R client-other/ commit -m "C-K"
32c80d07952b test: add a push race case where racing push touches multiple heads
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32634
diff changeset
   920
32c80d07952b test: add a push race case where racing push touches multiple heads
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32634
diff changeset
   921
(update one head)
32c80d07952b test: add a push race case where racing push touches multiple heads
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32634
diff changeset
   922
32c80d07952b test: add a push race case where racing push touches multiple heads
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32634
diff changeset
   923
  $ hg -R client-racy/ up 'desc("C-D")'
32c80d07952b test: add a push race case where racing push touches multiple heads
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32634
diff changeset
   924
  1 files updated, 0 files merged, 1 files removed, 0 files unresolved
32c80d07952b test: add a push race case where racing push touches multiple heads
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32634
diff changeset
   925
  $ echo bbb >> client-racy/b
32c80d07952b test: add a push race case where racing push touches multiple heads
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32634
diff changeset
   926
  $ hg -R client-racy/ commit -m "C-L"
32c80d07952b test: add a push race case where racing push touches multiple heads
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32634
diff changeset
   927
32c80d07952b test: add a push race case where racing push touches multiple heads
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32634
diff changeset
   928
Pushing
32c80d07952b test: add a push race case where racing push touches multiple heads
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32634
diff changeset
   929
32c80d07952b test: add a push race case where racing push touches multiple heads
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32634
diff changeset
   930
  $ hg -R client-racy push -r 'tip' > ./push-log 2>&1 &
32c80d07952b test: add a push race case where racing push touches multiple heads
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32634
diff changeset
   931
32c80d07952b test: add a push race case where racing push touches multiple heads
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32634
diff changeset
   932
  $ waiton $TESTTMP/readyfile
32c80d07952b test: add a push race case where racing push touches multiple heads
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32634
diff changeset
   933
32c80d07952b test: add a push race case where racing push touches multiple heads
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32634
diff changeset
   934
  $ hg -R client-other push -fr 'tip' --new-branch
32c80d07952b test: add a push race case where racing push touches multiple heads
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32634
diff changeset
   935
  pushing to ssh://user@dummy/server
32c80d07952b test: add a push race case where racing push touches multiple heads
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32634
diff changeset
   936
  searching for changes
32c80d07952b test: add a push race case where racing push touches multiple heads
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32634
diff changeset
   937
  remote: adding changesets
32c80d07952b test: add a push race case where racing push touches multiple heads
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32634
diff changeset
   938
  remote: adding manifests
32c80d07952b test: add a push race case where racing push touches multiple heads
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32634
diff changeset
   939
  remote: adding file changes
32c80d07952b test: add a push race case where racing push touches multiple heads
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32634
diff changeset
   940
  remote: added 1 changesets with 0 changes to 0 files (-1 heads)
32c80d07952b test: add a push race case where racing push touches multiple heads
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32634
diff changeset
   941
32c80d07952b test: add a push race case where racing push touches multiple heads
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32634
diff changeset
   942
  $ release $TESTTMP/watchfile
32c80d07952b test: add a push race case where racing push touches multiple heads
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32634
diff changeset
   943
32c80d07952b test: add a push race case where racing push touches multiple heads
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32634
diff changeset
   944
Check the result of the push
32c80d07952b test: add a push race case where racing push touches multiple heads
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32634
diff changeset
   945
32c80d07952b test: add a push race case where racing push touches multiple heads
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32634
diff changeset
   946
  $ cat ./push-log
32c80d07952b test: add a push race case where racing push touches multiple heads
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32634
diff changeset
   947
  pushing to ssh://user@dummy/server
32c80d07952b test: add a push race case where racing push touches multiple heads
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32634
diff changeset
   948
  searching for changes
32c80d07952b test: add a push race case where racing push touches multiple heads
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32634
diff changeset
   949
  wrote ready: $TESTTMP/readyfile
32c80d07952b test: add a push race case where racing push touches multiple heads
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32634
diff changeset
   950
  waiting on: $TESTTMP/watchfile
32c80d07952b test: add a push race case where racing push touches multiple heads
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32634
diff changeset
   951
  abort: push failed:
32c80d07952b test: add a push race case where racing push touches multiple heads
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32634
diff changeset
   952
  'repository changed while pushing - please try again'
32c80d07952b test: add a push race case where racing push touches multiple heads
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32634
diff changeset
   953
32c80d07952b test: add a push race case where racing push touches multiple heads
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32634
diff changeset
   954
  $ hg -R server graph
32c80d07952b test: add a push race case where racing push touches multiple heads
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32634
diff changeset
   955
  o    be705100c623 C-K (default)
32c80d07952b test: add a push race case where racing push touches multiple heads
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32634
diff changeset
   956
  |\
32c80d07952b test: add a push race case where racing push touches multiple heads
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32634
diff changeset
   957
  | o  d603e2c0cdd7 C-E (default)
32c80d07952b test: add a push race case where racing push touches multiple heads
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32634
diff changeset
   958
  | |
32c80d07952b test: add a push race case where racing push touches multiple heads
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32634
diff changeset
   959
  o |  59e76faf78bd C-D (default)
32c80d07952b test: add a push race case where racing push touches multiple heads
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32634
diff changeset
   960
  | |
32c80d07952b test: add a push race case where racing push touches multiple heads
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32634
diff changeset
   961
  | | o  89420bf00fae C-J (default)
32c80d07952b test: add a push race case where racing push touches multiple heads
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32634
diff changeset
   962
  | | |
32c80d07952b test: add a push race case where racing push touches multiple heads
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32634
diff changeset
   963
  | | | o  b35ed749f288 C-I (my-second-test-branch)
32c80d07952b test: add a push race case where racing push touches multiple heads
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32634
diff changeset
   964
  | | |/
32c80d07952b test: add a push race case where racing push touches multiple heads
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32634
diff changeset
   965
  | | o  75d69cba5402 C-G (default)
32c80d07952b test: add a push race case where racing push touches multiple heads
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32634
diff changeset
   966
  | | |
32c80d07952b test: add a push race case where racing push touches multiple heads
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32634
diff changeset
   967
  | | | o  833be552cfe6 C-H (my-first-test-branch)
32c80d07952b test: add a push race case where racing push touches multiple heads
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32634
diff changeset
   968
  | | |/
32c80d07952b test: add a push race case where racing push touches multiple heads
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32634
diff changeset
   969
  | | o  d9e379a8c432 C-F (default)
32c80d07952b test: add a push race case where racing push touches multiple heads
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32634
diff changeset
   970
  | | |
32c80d07952b test: add a push race case where racing push touches multiple heads
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32634
diff changeset
   971
  | | o  51c544a58128 C-C (default)
32c80d07952b test: add a push race case where racing push touches multiple heads
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32634
diff changeset
   972
  | |/
32c80d07952b test: add a push race case where racing push touches multiple heads
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32634
diff changeset
   973
  o |  a9149a1428e2 C-B (default)
32c80d07952b test: add a push race case where racing push touches multiple heads
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32634
diff changeset
   974
  | |
32c80d07952b test: add a push race case where racing push touches multiple heads
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32634
diff changeset
   975
  | o  98217d5a1659 C-A (default)
32c80d07952b test: add a push race case where racing push touches multiple heads
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32634
diff changeset
   976
  |/
32c80d07952b test: add a push race case where racing push touches multiple heads
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32634
diff changeset
   977
  @  842e2fac6304 C-ROOT (default)
32c80d07952b test: add a push race case where racing push touches multiple heads
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32634
diff changeset
   978
  
32636
da5cf8cc5aad test: add a push race case where the raced push touch multiple heads
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32635
diff changeset
   979
da5cf8cc5aad test: add a push race case where the raced push touch multiple heads
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32635
diff changeset
   980
pushing raced push touch multiple heads
da5cf8cc5aad test: add a push race case where the raced push touch multiple heads
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32635
diff changeset
   981
---------------------------------------
da5cf8cc5aad test: add a push race case where the raced push touch multiple heads
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32635
diff changeset
   982
da5cf8cc5aad test: add a push race case where the raced push touch multiple heads
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32635
diff changeset
   983
There are multiple heads, the raced push touch all of them
da5cf8cc5aad test: add a push race case where the raced push touch multiple heads
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32635
diff changeset
   984
da5cf8cc5aad test: add a push race case where the raced push touch multiple heads
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32635
diff changeset
   985
#  b
da5cf8cc5aad test: add a push race case where the raced push touch multiple heads
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32635
diff changeset
   986
#  | a (raced)
da5cf8cc5aad test: add a push race case where the raced push touch multiple heads
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32635
diff changeset
   987
#  |/|
da5cf8cc5aad test: add a push race case where the raced push touch multiple heads
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32635
diff changeset
   988
#  * *
da5cf8cc5aad test: add a push race case where the raced push touch multiple heads
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32635
diff changeset
   989
#  |/
da5cf8cc5aad test: add a push race case where the raced push touch multiple heads
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32635
diff changeset
   990
#  *
da5cf8cc5aad test: add a push race case where the raced push touch multiple heads
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32635
diff changeset
   991
da5cf8cc5aad test: add a push race case where the raced push touch multiple heads
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32635
diff changeset
   992
(resync-all)
da5cf8cc5aad test: add a push race case where the raced push touch multiple heads
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32635
diff changeset
   993
da5cf8cc5aad test: add a push race case where the raced push touch multiple heads
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32635
diff changeset
   994
  $ hg -R ./server pull ./client-racy
da5cf8cc5aad test: add a push race case where the raced push touch multiple heads
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32635
diff changeset
   995
  pulling from ./client-racy
da5cf8cc5aad test: add a push race case where the raced push touch multiple heads
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32635
diff changeset
   996
  searching for changes
da5cf8cc5aad test: add a push race case where the raced push touch multiple heads
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32635
diff changeset
   997
  adding changesets
da5cf8cc5aad test: add a push race case where the raced push touch multiple heads
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32635
diff changeset
   998
  adding manifests
da5cf8cc5aad test: add a push race case where the raced push touch multiple heads
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32635
diff changeset
   999
  adding file changes
da5cf8cc5aad test: add a push race case where the raced push touch multiple heads
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32635
diff changeset
  1000
  added 1 changesets with 1 changes to 1 files (+1 heads)
da5cf8cc5aad test: add a push race case where the raced push touch multiple heads
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32635
diff changeset
  1001
  (run 'hg heads .' to see heads, 'hg merge' to merge)
da5cf8cc5aad test: add a push race case where the raced push touch multiple heads
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32635
diff changeset
  1002
  $ hg -R ./client-other pull
da5cf8cc5aad test: add a push race case where the raced push touch multiple heads
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32635
diff changeset
  1003
  pulling from ssh://user@dummy/server
da5cf8cc5aad test: add a push race case where the raced push touch multiple heads
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32635
diff changeset
  1004
  searching for changes
da5cf8cc5aad test: add a push race case where the raced push touch multiple heads
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32635
diff changeset
  1005
  adding changesets
da5cf8cc5aad test: add a push race case where the raced push touch multiple heads
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32635
diff changeset
  1006
  adding manifests
da5cf8cc5aad test: add a push race case where the raced push touch multiple heads
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32635
diff changeset
  1007
  adding file changes
da5cf8cc5aad test: add a push race case where the raced push touch multiple heads
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32635
diff changeset
  1008
  added 1 changesets with 1 changes to 1 files (+1 heads)
da5cf8cc5aad test: add a push race case where the raced push touch multiple heads
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32635
diff changeset
  1009
  (run 'hg heads .' to see heads, 'hg merge' to merge)
da5cf8cc5aad test: add a push race case where the raced push touch multiple heads
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32635
diff changeset
  1010
  $ hg -R ./client-racy pull
da5cf8cc5aad test: add a push race case where the raced push touch multiple heads
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32635
diff changeset
  1011
  pulling from ssh://user@dummy/server
da5cf8cc5aad test: add a push race case where the raced push touch multiple heads
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32635
diff changeset
  1012
  searching for changes
da5cf8cc5aad test: add a push race case where the raced push touch multiple heads
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32635
diff changeset
  1013
  adding changesets
da5cf8cc5aad test: add a push race case where the raced push touch multiple heads
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32635
diff changeset
  1014
  adding manifests
da5cf8cc5aad test: add a push race case where the raced push touch multiple heads
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32635
diff changeset
  1015
  adding file changes
da5cf8cc5aad test: add a push race case where the raced push touch multiple heads
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32635
diff changeset
  1016
  added 1 changesets with 0 changes to 0 files
da5cf8cc5aad test: add a push race case where the raced push touch multiple heads
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32635
diff changeset
  1017
  (run 'hg update' to get a working copy)
da5cf8cc5aad test: add a push race case where the raced push touch multiple heads
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32635
diff changeset
  1018
da5cf8cc5aad test: add a push race case where the raced push touch multiple heads
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32635
diff changeset
  1019
  $ hg -R server graph
da5cf8cc5aad test: add a push race case where the raced push touch multiple heads
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32635
diff changeset
  1020
  o  cac2cead0ff0 C-L (default)
da5cf8cc5aad test: add a push race case where the raced push touch multiple heads
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32635
diff changeset
  1021
  |
da5cf8cc5aad test: add a push race case where the raced push touch multiple heads
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32635
diff changeset
  1022
  | o  be705100c623 C-K (default)
da5cf8cc5aad test: add a push race case where the raced push touch multiple heads
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32635
diff changeset
  1023
  |/|
da5cf8cc5aad test: add a push race case where the raced push touch multiple heads
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32635
diff changeset
  1024
  | o  d603e2c0cdd7 C-E (default)
da5cf8cc5aad test: add a push race case where the raced push touch multiple heads
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32635
diff changeset
  1025
  | |
da5cf8cc5aad test: add a push race case where the raced push touch multiple heads
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32635
diff changeset
  1026
  o |  59e76faf78bd C-D (default)
da5cf8cc5aad test: add a push race case where the raced push touch multiple heads
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32635
diff changeset
  1027
  | |
da5cf8cc5aad test: add a push race case where the raced push touch multiple heads
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32635
diff changeset
  1028
  | | o  89420bf00fae C-J (default)
da5cf8cc5aad test: add a push race case where the raced push touch multiple heads
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32635
diff changeset
  1029
  | | |
da5cf8cc5aad test: add a push race case where the raced push touch multiple heads
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32635
diff changeset
  1030
  | | | o  b35ed749f288 C-I (my-second-test-branch)
da5cf8cc5aad test: add a push race case where the raced push touch multiple heads
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32635
diff changeset
  1031
  | | |/
da5cf8cc5aad test: add a push race case where the raced push touch multiple heads
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32635
diff changeset
  1032
  | | o  75d69cba5402 C-G (default)
da5cf8cc5aad test: add a push race case where the raced push touch multiple heads
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32635
diff changeset
  1033
  | | |
da5cf8cc5aad test: add a push race case where the raced push touch multiple heads
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32635
diff changeset
  1034
  | | | o  833be552cfe6 C-H (my-first-test-branch)
da5cf8cc5aad test: add a push race case where the raced push touch multiple heads
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32635
diff changeset
  1035
  | | |/
da5cf8cc5aad test: add a push race case where the raced push touch multiple heads
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32635
diff changeset
  1036
  | | o  d9e379a8c432 C-F (default)
da5cf8cc5aad test: add a push race case where the raced push touch multiple heads
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32635
diff changeset
  1037
  | | |
da5cf8cc5aad test: add a push race case where the raced push touch multiple heads
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32635
diff changeset
  1038
  | | o  51c544a58128 C-C (default)
da5cf8cc5aad test: add a push race case where the raced push touch multiple heads
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32635
diff changeset
  1039
  | |/
da5cf8cc5aad test: add a push race case where the raced push touch multiple heads
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32635
diff changeset
  1040
  o |  a9149a1428e2 C-B (default)
da5cf8cc5aad test: add a push race case where the raced push touch multiple heads
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32635
diff changeset
  1041
  | |
da5cf8cc5aad test: add a push race case where the raced push touch multiple heads
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32635
diff changeset
  1042
  | o  98217d5a1659 C-A (default)
da5cf8cc5aad test: add a push race case where the raced push touch multiple heads
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32635
diff changeset
  1043
  |/
da5cf8cc5aad test: add a push race case where the raced push touch multiple heads
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32635
diff changeset
  1044
  @  842e2fac6304 C-ROOT (default)
da5cf8cc5aad test: add a push race case where the raced push touch multiple heads
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32635
diff changeset
  1045
  
da5cf8cc5aad test: add a push race case where the raced push touch multiple heads
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32635
diff changeset
  1046
da5cf8cc5aad test: add a push race case where the raced push touch multiple heads
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32635
diff changeset
  1047
Creating changesets
da5cf8cc5aad test: add a push race case where the raced push touch multiple heads
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32635
diff changeset
  1048
da5cf8cc5aad test: add a push race case where the raced push touch multiple heads
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32635
diff changeset
  1049
(update existing head)
da5cf8cc5aad test: add a push race case where the raced push touch multiple heads
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32635
diff changeset
  1050
da5cf8cc5aad test: add a push race case where the raced push touch multiple heads
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32635
diff changeset
  1051
  $ echo aaa >> client-other/a
da5cf8cc5aad test: add a push race case where the raced push touch multiple heads
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32635
diff changeset
  1052
  $ hg -R client-other/ commit -m "C-M"
da5cf8cc5aad test: add a push race case where the raced push touch multiple heads
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32635
diff changeset
  1053
da5cf8cc5aad test: add a push race case where the raced push touch multiple heads
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32635
diff changeset
  1054
(merge heads)
da5cf8cc5aad test: add a push race case where the raced push touch multiple heads
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32635
diff changeset
  1055
da5cf8cc5aad test: add a push race case where the raced push touch multiple heads
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32635
diff changeset
  1056
  $ hg -R client-racy/ merge 'desc("C-K")'
da5cf8cc5aad test: add a push race case where the raced push touch multiple heads
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32635
diff changeset
  1057
  1 files updated, 0 files merged, 0 files removed, 0 files unresolved
da5cf8cc5aad test: add a push race case where the raced push touch multiple heads
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32635
diff changeset
  1058
  (branch merge, don't forget to commit)
da5cf8cc5aad test: add a push race case where the raced push touch multiple heads
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32635
diff changeset
  1059
  $ hg -R client-racy/ commit -m "C-N"
da5cf8cc5aad test: add a push race case where the raced push touch multiple heads
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32635
diff changeset
  1060
da5cf8cc5aad test: add a push race case where the raced push touch multiple heads
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32635
diff changeset
  1061
Pushing
da5cf8cc5aad test: add a push race case where the raced push touch multiple heads
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32635
diff changeset
  1062
da5cf8cc5aad test: add a push race case where the raced push touch multiple heads
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32635
diff changeset
  1063
  $ hg -R client-racy push -r 'tip' > ./push-log 2>&1 &
da5cf8cc5aad test: add a push race case where the raced push touch multiple heads
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32635
diff changeset
  1064
da5cf8cc5aad test: add a push race case where the raced push touch multiple heads
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32635
diff changeset
  1065
  $ waiton $TESTTMP/readyfile
da5cf8cc5aad test: add a push race case where the raced push touch multiple heads
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32635
diff changeset
  1066
da5cf8cc5aad test: add a push race case where the raced push touch multiple heads
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32635
diff changeset
  1067
  $ hg -R client-other push -fr 'tip' --new-branch
da5cf8cc5aad test: add a push race case where the raced push touch multiple heads
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32635
diff changeset
  1068
  pushing to ssh://user@dummy/server
da5cf8cc5aad test: add a push race case where the raced push touch multiple heads
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32635
diff changeset
  1069
  searching for changes
da5cf8cc5aad test: add a push race case where the raced push touch multiple heads
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32635
diff changeset
  1070
  remote: adding changesets
da5cf8cc5aad test: add a push race case where the raced push touch multiple heads
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32635
diff changeset
  1071
  remote: adding manifests
da5cf8cc5aad test: add a push race case where the raced push touch multiple heads
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32635
diff changeset
  1072
  remote: adding file changes
da5cf8cc5aad test: add a push race case where the raced push touch multiple heads
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32635
diff changeset
  1073
  remote: added 1 changesets with 1 changes to 1 files
da5cf8cc5aad test: add a push race case where the raced push touch multiple heads
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32635
diff changeset
  1074
da5cf8cc5aad test: add a push race case where the raced push touch multiple heads
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32635
diff changeset
  1075
  $ release $TESTTMP/watchfile
da5cf8cc5aad test: add a push race case where the raced push touch multiple heads
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32635
diff changeset
  1076
da5cf8cc5aad test: add a push race case where the raced push touch multiple heads
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32635
diff changeset
  1077
Check the result of the push
da5cf8cc5aad test: add a push race case where the raced push touch multiple heads
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32635
diff changeset
  1078
da5cf8cc5aad test: add a push race case where the raced push touch multiple heads
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32635
diff changeset
  1079
  $ cat ./push-log
da5cf8cc5aad test: add a push race case where the raced push touch multiple heads
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32635
diff changeset
  1080
  pushing to ssh://user@dummy/server
da5cf8cc5aad test: add a push race case where the raced push touch multiple heads
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32635
diff changeset
  1081
  searching for changes
da5cf8cc5aad test: add a push race case where the raced push touch multiple heads
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32635
diff changeset
  1082
  wrote ready: $TESTTMP/readyfile
da5cf8cc5aad test: add a push race case where the raced push touch multiple heads
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32635
diff changeset
  1083
  waiting on: $TESTTMP/watchfile
da5cf8cc5aad test: add a push race case where the raced push touch multiple heads
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32635
diff changeset
  1084
  abort: push failed:
da5cf8cc5aad test: add a push race case where the raced push touch multiple heads
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32635
diff changeset
  1085
  'repository changed while pushing - please try again'
da5cf8cc5aad test: add a push race case where the raced push touch multiple heads
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32635
diff changeset
  1086
da5cf8cc5aad test: add a push race case where the raced push touch multiple heads
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32635
diff changeset
  1087
  $ hg -R server graph
da5cf8cc5aad test: add a push race case where the raced push touch multiple heads
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32635
diff changeset
  1088
  o  6fd3090135df C-M (default)
da5cf8cc5aad test: add a push race case where the raced push touch multiple heads
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32635
diff changeset
  1089
  |
da5cf8cc5aad test: add a push race case where the raced push touch multiple heads
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32635
diff changeset
  1090
  o    be705100c623 C-K (default)
da5cf8cc5aad test: add a push race case where the raced push touch multiple heads
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32635
diff changeset
  1091
  |\
da5cf8cc5aad test: add a push race case where the raced push touch multiple heads
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32635
diff changeset
  1092
  | o  d603e2c0cdd7 C-E (default)
da5cf8cc5aad test: add a push race case where the raced push touch multiple heads
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32635
diff changeset
  1093
  | |
da5cf8cc5aad test: add a push race case where the raced push touch multiple heads
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32635
diff changeset
  1094
  +---o  cac2cead0ff0 C-L (default)
da5cf8cc5aad test: add a push race case where the raced push touch multiple heads
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32635
diff changeset
  1095
  | |
da5cf8cc5aad test: add a push race case where the raced push touch multiple heads
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32635
diff changeset
  1096
  o |  59e76faf78bd C-D (default)
da5cf8cc5aad test: add a push race case where the raced push touch multiple heads
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32635
diff changeset
  1097
  | |
da5cf8cc5aad test: add a push race case where the raced push touch multiple heads
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32635
diff changeset
  1098
  | | o  89420bf00fae C-J (default)
da5cf8cc5aad test: add a push race case where the raced push touch multiple heads
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32635
diff changeset
  1099
  | | |
da5cf8cc5aad test: add a push race case where the raced push touch multiple heads
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32635
diff changeset
  1100
  | | | o  b35ed749f288 C-I (my-second-test-branch)
da5cf8cc5aad test: add a push race case where the raced push touch multiple heads
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32635
diff changeset
  1101
  | | |/
da5cf8cc5aad test: add a push race case where the raced push touch multiple heads
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32635
diff changeset
  1102
  | | o  75d69cba5402 C-G (default)
da5cf8cc5aad test: add a push race case where the raced push touch multiple heads
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32635
diff changeset
  1103
  | | |
da5cf8cc5aad test: add a push race case where the raced push touch multiple heads
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32635
diff changeset
  1104
  | | | o  833be552cfe6 C-H (my-first-test-branch)
da5cf8cc5aad test: add a push race case where the raced push touch multiple heads
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32635
diff changeset
  1105
  | | |/
da5cf8cc5aad test: add a push race case where the raced push touch multiple heads
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32635
diff changeset
  1106
  | | o  d9e379a8c432 C-F (default)
da5cf8cc5aad test: add a push race case where the raced push touch multiple heads
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32635
diff changeset
  1107
  | | |
da5cf8cc5aad test: add a push race case where the raced push touch multiple heads
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32635
diff changeset
  1108
  | | o  51c544a58128 C-C (default)
da5cf8cc5aad test: add a push race case where the raced push touch multiple heads
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32635
diff changeset
  1109
  | |/
da5cf8cc5aad test: add a push race case where the raced push touch multiple heads
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32635
diff changeset
  1110
  o |  a9149a1428e2 C-B (default)
da5cf8cc5aad test: add a push race case where the raced push touch multiple heads
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32635
diff changeset
  1111
  | |
da5cf8cc5aad test: add a push race case where the raced push touch multiple heads
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32635
diff changeset
  1112
  | o  98217d5a1659 C-A (default)
da5cf8cc5aad test: add a push race case where the raced push touch multiple heads
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32635
diff changeset
  1113
  |/
da5cf8cc5aad test: add a push race case where the raced push touch multiple heads
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32635
diff changeset
  1114
  @  842e2fac6304 C-ROOT (default)
da5cf8cc5aad test: add a push race case where the raced push touch multiple heads
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32635
diff changeset
  1115
  
32637
9234d2cb24a5 test: add a push race case where non-contiguous branch head are created
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32636
diff changeset
  1116
9234d2cb24a5 test: add a push race case where non-contiguous branch head are created
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32636
diff changeset
  1117
racing commit push a new head behind another named branch
9234d2cb24a5 test: add a push race case where non-contiguous branch head are created
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32636
diff changeset
  1118
---------------------------------------------------------
9234d2cb24a5 test: add a push race case where non-contiguous branch head are created
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32636
diff changeset
  1119
9234d2cb24a5 test: add a push race case where non-contiguous branch head are created
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32636
diff changeset
  1120
non-continuous branch are valid case, we tests for them.
9234d2cb24a5 test: add a push race case where non-contiguous branch head are created
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32636
diff changeset
  1121
9234d2cb24a5 test: add a push race case where non-contiguous branch head are created
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32636
diff changeset
  1122
#  b (branch default)
9234d2cb24a5 test: add a push race case where non-contiguous branch head are created
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32636
diff changeset
  1123
#  |
9234d2cb24a5 test: add a push race case where non-contiguous branch head are created
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32636
diff changeset
  1124
#  o (branch foo)
9234d2cb24a5 test: add a push race case where non-contiguous branch head are created
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32636
diff changeset
  1125
#  |
9234d2cb24a5 test: add a push race case where non-contiguous branch head are created
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32636
diff changeset
  1126
#  | a (raced, branch default)
9234d2cb24a5 test: add a push race case where non-contiguous branch head are created
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32636
diff changeset
  1127
#  |/
9234d2cb24a5 test: add a push race case where non-contiguous branch head are created
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32636
diff changeset
  1128
#  * (branch foo)
9234d2cb24a5 test: add a push race case where non-contiguous branch head are created
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32636
diff changeset
  1129
#  |
9234d2cb24a5 test: add a push race case where non-contiguous branch head are created
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32636
diff changeset
  1130
#  * (branch default)
9234d2cb24a5 test: add a push race case where non-contiguous branch head are created
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32636
diff changeset
  1131
9234d2cb24a5 test: add a push race case where non-contiguous branch head are created
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32636
diff changeset
  1132
(resync-all + other branch)
9234d2cb24a5 test: add a push race case where non-contiguous branch head are created
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32636
diff changeset
  1133
9234d2cb24a5 test: add a push race case where non-contiguous branch head are created
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32636
diff changeset
  1134
  $ hg -R ./server pull ./client-racy
9234d2cb24a5 test: add a push race case where non-contiguous branch head are created
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32636
diff changeset
  1135
  pulling from ./client-racy
9234d2cb24a5 test: add a push race case where non-contiguous branch head are created
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32636
diff changeset
  1136
  searching for changes
9234d2cb24a5 test: add a push race case where non-contiguous branch head are created
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32636
diff changeset
  1137
  adding changesets
9234d2cb24a5 test: add a push race case where non-contiguous branch head are created
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32636
diff changeset
  1138
  adding manifests
9234d2cb24a5 test: add a push race case where non-contiguous branch head are created
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32636
diff changeset
  1139
  adding file changes
9234d2cb24a5 test: add a push race case where non-contiguous branch head are created
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32636
diff changeset
  1140
  added 1 changesets with 0 changes to 0 files
9234d2cb24a5 test: add a push race case where non-contiguous branch head are created
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32636
diff changeset
  1141
  (run 'hg update' to get a working copy)
9234d2cb24a5 test: add a push race case where non-contiguous branch head are created
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32636
diff changeset
  1142
9234d2cb24a5 test: add a push race case where non-contiguous branch head are created
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32636
diff changeset
  1143
(creates named branch on head)
9234d2cb24a5 test: add a push race case where non-contiguous branch head are created
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32636
diff changeset
  1144
9234d2cb24a5 test: add a push race case where non-contiguous branch head are created
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32636
diff changeset
  1145
  $ hg -R ./server/ up 'desc("C-N")'
9234d2cb24a5 test: add a push race case where non-contiguous branch head are created
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32636
diff changeset
  1146
  2 files updated, 0 files merged, 0 files removed, 0 files unresolved
9234d2cb24a5 test: add a push race case where non-contiguous branch head are created
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32636
diff changeset
  1147
  $ hg -R ./server/ branch other
9234d2cb24a5 test: add a push race case where non-contiguous branch head are created
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32636
diff changeset
  1148
  marked working directory as branch other
9234d2cb24a5 test: add a push race case where non-contiguous branch head are created
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32636
diff changeset
  1149
  $ hg -R ./server/ ci -m "C-Z"
9234d2cb24a5 test: add a push race case where non-contiguous branch head are created
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32636
diff changeset
  1150
  $ hg -R ./server/ up null
9234d2cb24a5 test: add a push race case where non-contiguous branch head are created
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32636
diff changeset
  1151
  0 files updated, 0 files merged, 3 files removed, 0 files unresolved
9234d2cb24a5 test: add a push race case where non-contiguous branch head are created
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32636
diff changeset
  1152
9234d2cb24a5 test: add a push race case where non-contiguous branch head are created
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32636
diff changeset
  1153
(sync client)
9234d2cb24a5 test: add a push race case where non-contiguous branch head are created
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32636
diff changeset
  1154
9234d2cb24a5 test: add a push race case where non-contiguous branch head are created
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32636
diff changeset
  1155
  $ hg -R ./client-other pull
9234d2cb24a5 test: add a push race case where non-contiguous branch head are created
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32636
diff changeset
  1156
  pulling from ssh://user@dummy/server
9234d2cb24a5 test: add a push race case where non-contiguous branch head are created
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32636
diff changeset
  1157
  searching for changes
9234d2cb24a5 test: add a push race case where non-contiguous branch head are created
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32636
diff changeset
  1158
  adding changesets
9234d2cb24a5 test: add a push race case where non-contiguous branch head are created
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32636
diff changeset
  1159
  adding manifests
9234d2cb24a5 test: add a push race case where non-contiguous branch head are created
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32636
diff changeset
  1160
  adding file changes
9234d2cb24a5 test: add a push race case where non-contiguous branch head are created
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32636
diff changeset
  1161
  added 2 changesets with 0 changes to 0 files
9234d2cb24a5 test: add a push race case where non-contiguous branch head are created
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32636
diff changeset
  1162
  (run 'hg update' to get a working copy)
9234d2cb24a5 test: add a push race case where non-contiguous branch head are created
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32636
diff changeset
  1163
  $ hg -R ./client-racy pull
9234d2cb24a5 test: add a push race case where non-contiguous branch head are created
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32636
diff changeset
  1164
  pulling from ssh://user@dummy/server
9234d2cb24a5 test: add a push race case where non-contiguous branch head are created
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32636
diff changeset
  1165
  searching for changes
9234d2cb24a5 test: add a push race case where non-contiguous branch head are created
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32636
diff changeset
  1166
  adding changesets
9234d2cb24a5 test: add a push race case where non-contiguous branch head are created
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32636
diff changeset
  1167
  adding manifests
9234d2cb24a5 test: add a push race case where non-contiguous branch head are created
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32636
diff changeset
  1168
  adding file changes
9234d2cb24a5 test: add a push race case where non-contiguous branch head are created
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32636
diff changeset
  1169
  added 2 changesets with 1 changes to 1 files (+1 heads)
9234d2cb24a5 test: add a push race case where non-contiguous branch head are created
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32636
diff changeset
  1170
  (run 'hg heads .' to see heads, 'hg merge' to merge)
9234d2cb24a5 test: add a push race case where non-contiguous branch head are created
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32636
diff changeset
  1171
9234d2cb24a5 test: add a push race case where non-contiguous branch head are created
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32636
diff changeset
  1172
  $ hg -R server graph
9234d2cb24a5 test: add a push race case where non-contiguous branch head are created
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32636
diff changeset
  1173
  o  55a6f1c01b48 C-Z (other)
9234d2cb24a5 test: add a push race case where non-contiguous branch head are created
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32636
diff changeset
  1174
  |
9234d2cb24a5 test: add a push race case where non-contiguous branch head are created
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32636
diff changeset
  1175
  o    866a66e18630 C-N (default)
9234d2cb24a5 test: add a push race case where non-contiguous branch head are created
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32636
diff changeset
  1176
  |\
9234d2cb24a5 test: add a push race case where non-contiguous branch head are created
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32636
diff changeset
  1177
  +---o  6fd3090135df C-M (default)
9234d2cb24a5 test: add a push race case where non-contiguous branch head are created
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32636
diff changeset
  1178
  | |
9234d2cb24a5 test: add a push race case where non-contiguous branch head are created
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32636
diff changeset
  1179
  | o  cac2cead0ff0 C-L (default)
9234d2cb24a5 test: add a push race case where non-contiguous branch head are created
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32636
diff changeset
  1180
  | |
9234d2cb24a5 test: add a push race case where non-contiguous branch head are created
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32636
diff changeset
  1181
  o |  be705100c623 C-K (default)
9234d2cb24a5 test: add a push race case where non-contiguous branch head are created
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32636
diff changeset
  1182
  |\|
9234d2cb24a5 test: add a push race case where non-contiguous branch head are created
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32636
diff changeset
  1183
  o |  d603e2c0cdd7 C-E (default)
9234d2cb24a5 test: add a push race case where non-contiguous branch head are created
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32636
diff changeset
  1184
  | |
9234d2cb24a5 test: add a push race case where non-contiguous branch head are created
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32636
diff changeset
  1185
  | o  59e76faf78bd C-D (default)
9234d2cb24a5 test: add a push race case where non-contiguous branch head are created
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32636
diff changeset
  1186
  | |
9234d2cb24a5 test: add a push race case where non-contiguous branch head are created
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32636
diff changeset
  1187
  | | o  89420bf00fae C-J (default)
9234d2cb24a5 test: add a push race case where non-contiguous branch head are created
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32636
diff changeset
  1188
  | | |
9234d2cb24a5 test: add a push race case where non-contiguous branch head are created
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32636
diff changeset
  1189
  | | | o  b35ed749f288 C-I (my-second-test-branch)
9234d2cb24a5 test: add a push race case where non-contiguous branch head are created
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32636
diff changeset
  1190
  | | |/
9234d2cb24a5 test: add a push race case where non-contiguous branch head are created
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32636
diff changeset
  1191
  | | o  75d69cba5402 C-G (default)
9234d2cb24a5 test: add a push race case where non-contiguous branch head are created
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32636
diff changeset
  1192
  | | |
9234d2cb24a5 test: add a push race case where non-contiguous branch head are created
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32636
diff changeset
  1193
  | | | o  833be552cfe6 C-H (my-first-test-branch)
9234d2cb24a5 test: add a push race case where non-contiguous branch head are created
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32636
diff changeset
  1194
  | | |/
9234d2cb24a5 test: add a push race case where non-contiguous branch head are created
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32636
diff changeset
  1195
  | | o  d9e379a8c432 C-F (default)
9234d2cb24a5 test: add a push race case where non-contiguous branch head are created
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32636
diff changeset
  1196
  | | |
9234d2cb24a5 test: add a push race case where non-contiguous branch head are created
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32636
diff changeset
  1197
  +---o  51c544a58128 C-C (default)
9234d2cb24a5 test: add a push race case where non-contiguous branch head are created
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32636
diff changeset
  1198
  | |
9234d2cb24a5 test: add a push race case where non-contiguous branch head are created
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32636
diff changeset
  1199
  | o  a9149a1428e2 C-B (default)
9234d2cb24a5 test: add a push race case where non-contiguous branch head are created
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32636
diff changeset
  1200
  | |
9234d2cb24a5 test: add a push race case where non-contiguous branch head are created
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32636
diff changeset
  1201
  o |  98217d5a1659 C-A (default)
9234d2cb24a5 test: add a push race case where non-contiguous branch head are created
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32636
diff changeset
  1202
  |/
9234d2cb24a5 test: add a push race case where non-contiguous branch head are created
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32636
diff changeset
  1203
  o  842e2fac6304 C-ROOT (default)
9234d2cb24a5 test: add a push race case where non-contiguous branch head are created
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32636
diff changeset
  1204
  
9234d2cb24a5 test: add a push race case where non-contiguous branch head are created
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32636
diff changeset
  1205
9234d2cb24a5 test: add a push race case where non-contiguous branch head are created
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32636
diff changeset
  1206
Creating changesets
9234d2cb24a5 test: add a push race case where non-contiguous branch head are created
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32636
diff changeset
  1207
9234d2cb24a5 test: add a push race case where non-contiguous branch head are created
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32636
diff changeset
  1208
(update default head through another named branch one)
9234d2cb24a5 test: add a push race case where non-contiguous branch head are created
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32636
diff changeset
  1209
9234d2cb24a5 test: add a push race case where non-contiguous branch head are created
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32636
diff changeset
  1210
  $ hg -R client-other/ up 'desc("C-Z")'
9234d2cb24a5 test: add a push race case where non-contiguous branch head are created
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32636
diff changeset
  1211
  2 files updated, 0 files merged, 0 files removed, 0 files unresolved
9234d2cb24a5 test: add a push race case where non-contiguous branch head are created
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32636
diff changeset
  1212
  $ echo aaa >> client-other/a
9234d2cb24a5 test: add a push race case where non-contiguous branch head are created
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32636
diff changeset
  1213
  $ hg -R client-other/ commit -m "C-O"
9234d2cb24a5 test: add a push race case where non-contiguous branch head are created
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32636
diff changeset
  1214
  $ echo aaa >> client-other/a
9234d2cb24a5 test: add a push race case where non-contiguous branch head are created
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32636
diff changeset
  1215
  $ hg -R client-other/ branch --force default
9234d2cb24a5 test: add a push race case where non-contiguous branch head are created
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32636
diff changeset
  1216
  marked working directory as branch default
9234d2cb24a5 test: add a push race case where non-contiguous branch head are created
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32636
diff changeset
  1217
  $ hg -R client-other/ commit -m "C-P"
9234d2cb24a5 test: add a push race case where non-contiguous branch head are created
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32636
diff changeset
  1218
  created new head
9234d2cb24a5 test: add a push race case where non-contiguous branch head are created
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32636
diff changeset
  1219
9234d2cb24a5 test: add a push race case where non-contiguous branch head are created
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32636
diff changeset
  1220
(update default head)
9234d2cb24a5 test: add a push race case where non-contiguous branch head are created
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32636
diff changeset
  1221
9234d2cb24a5 test: add a push race case where non-contiguous branch head are created
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32636
diff changeset
  1222
  $ hg -R client-racy/ up 'desc("C-Z")'
9234d2cb24a5 test: add a push race case where non-contiguous branch head are created
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32636
diff changeset
  1223
  0 files updated, 0 files merged, 0 files removed, 0 files unresolved
9234d2cb24a5 test: add a push race case where non-contiguous branch head are created
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32636
diff changeset
  1224
  $ echo bbb >> client-other/a
9234d2cb24a5 test: add a push race case where non-contiguous branch head are created
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32636
diff changeset
  1225
  $ hg -R client-racy/ branch --force default
9234d2cb24a5 test: add a push race case where non-contiguous branch head are created
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32636
diff changeset
  1226
  marked working directory as branch default
9234d2cb24a5 test: add a push race case where non-contiguous branch head are created
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32636
diff changeset
  1227
  $ hg -R client-racy/ commit -m "C-Q"
9234d2cb24a5 test: add a push race case where non-contiguous branch head are created
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32636
diff changeset
  1228
  created new head
9234d2cb24a5 test: add a push race case where non-contiguous branch head are created
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32636
diff changeset
  1229
9234d2cb24a5 test: add a push race case where non-contiguous branch head are created
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32636
diff changeset
  1230
Pushing
9234d2cb24a5 test: add a push race case where non-contiguous branch head are created
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32636
diff changeset
  1231
9234d2cb24a5 test: add a push race case where non-contiguous branch head are created
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32636
diff changeset
  1232
  $ hg -R client-racy push -r 'tip' > ./push-log 2>&1 &
9234d2cb24a5 test: add a push race case where non-contiguous branch head are created
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32636
diff changeset
  1233
9234d2cb24a5 test: add a push race case where non-contiguous branch head are created
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32636
diff changeset
  1234
  $ waiton $TESTTMP/readyfile
9234d2cb24a5 test: add a push race case where non-contiguous branch head are created
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32636
diff changeset
  1235
9234d2cb24a5 test: add a push race case where non-contiguous branch head are created
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32636
diff changeset
  1236
  $ hg -R client-other push -fr 'tip' --new-branch
9234d2cb24a5 test: add a push race case where non-contiguous branch head are created
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32636
diff changeset
  1237
  pushing to ssh://user@dummy/server
9234d2cb24a5 test: add a push race case where non-contiguous branch head are created
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32636
diff changeset
  1238
  searching for changes
9234d2cb24a5 test: add a push race case where non-contiguous branch head are created
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32636
diff changeset
  1239
  remote: adding changesets
9234d2cb24a5 test: add a push race case where non-contiguous branch head are created
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32636
diff changeset
  1240
  remote: adding manifests
9234d2cb24a5 test: add a push race case where non-contiguous branch head are created
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32636
diff changeset
  1241
  remote: adding file changes
9234d2cb24a5 test: add a push race case where non-contiguous branch head are created
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32636
diff changeset
  1242
  remote: added 2 changesets with 1 changes to 1 files
9234d2cb24a5 test: add a push race case where non-contiguous branch head are created
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32636
diff changeset
  1243
9234d2cb24a5 test: add a push race case where non-contiguous branch head are created
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32636
diff changeset
  1244
  $ release $TESTTMP/watchfile
9234d2cb24a5 test: add a push race case where non-contiguous branch head are created
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32636
diff changeset
  1245
9234d2cb24a5 test: add a push race case where non-contiguous branch head are created
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32636
diff changeset
  1246
Check the result of the push
9234d2cb24a5 test: add a push race case where non-contiguous branch head are created
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32636
diff changeset
  1247
9234d2cb24a5 test: add a push race case where non-contiguous branch head are created
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32636
diff changeset
  1248
  $ cat ./push-log
9234d2cb24a5 test: add a push race case where non-contiguous branch head are created
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32636
diff changeset
  1249
  pushing to ssh://user@dummy/server
9234d2cb24a5 test: add a push race case where non-contiguous branch head are created
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32636
diff changeset
  1250
  searching for changes
9234d2cb24a5 test: add a push race case where non-contiguous branch head are created
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32636
diff changeset
  1251
  wrote ready: $TESTTMP/readyfile
9234d2cb24a5 test: add a push race case where non-contiguous branch head are created
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32636
diff changeset
  1252
  waiting on: $TESTTMP/watchfile
9234d2cb24a5 test: add a push race case where non-contiguous branch head are created
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32636
diff changeset
  1253
  abort: push failed:
9234d2cb24a5 test: add a push race case where non-contiguous branch head are created
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32636
diff changeset
  1254
  'repository changed while pushing - please try again'
9234d2cb24a5 test: add a push race case where non-contiguous branch head are created
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32636
diff changeset
  1255
9234d2cb24a5 test: add a push race case where non-contiguous branch head are created
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32636
diff changeset
  1256
  $ hg -R server graph
9234d2cb24a5 test: add a push race case where non-contiguous branch head are created
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32636
diff changeset
  1257
  o  1b58ee3f79e5 C-P (default)
9234d2cb24a5 test: add a push race case where non-contiguous branch head are created
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32636
diff changeset
  1258
  |
9234d2cb24a5 test: add a push race case where non-contiguous branch head are created
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32636
diff changeset
  1259
  o  d0a85b2252a9 C-O (other)
9234d2cb24a5 test: add a push race case where non-contiguous branch head are created
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32636
diff changeset
  1260
  |
9234d2cb24a5 test: add a push race case where non-contiguous branch head are created
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32636
diff changeset
  1261
  o  55a6f1c01b48 C-Z (other)
9234d2cb24a5 test: add a push race case where non-contiguous branch head are created
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32636
diff changeset
  1262
  |
9234d2cb24a5 test: add a push race case where non-contiguous branch head are created
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32636
diff changeset
  1263
  o    866a66e18630 C-N (default)
9234d2cb24a5 test: add a push race case where non-contiguous branch head are created
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32636
diff changeset
  1264
  |\
9234d2cb24a5 test: add a push race case where non-contiguous branch head are created
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32636
diff changeset
  1265
  +---o  6fd3090135df C-M (default)
9234d2cb24a5 test: add a push race case where non-contiguous branch head are created
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32636
diff changeset
  1266
  | |
9234d2cb24a5 test: add a push race case where non-contiguous branch head are created
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32636
diff changeset
  1267
  | o  cac2cead0ff0 C-L (default)
9234d2cb24a5 test: add a push race case where non-contiguous branch head are created
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32636
diff changeset
  1268
  | |
9234d2cb24a5 test: add a push race case where non-contiguous branch head are created
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32636
diff changeset
  1269
  o |  be705100c623 C-K (default)
9234d2cb24a5 test: add a push race case where non-contiguous branch head are created
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32636
diff changeset
  1270
  |\|
9234d2cb24a5 test: add a push race case where non-contiguous branch head are created
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32636
diff changeset
  1271
  o |  d603e2c0cdd7 C-E (default)
9234d2cb24a5 test: add a push race case where non-contiguous branch head are created
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32636
diff changeset
  1272
  | |
9234d2cb24a5 test: add a push race case where non-contiguous branch head are created
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32636
diff changeset
  1273
  | o  59e76faf78bd C-D (default)
9234d2cb24a5 test: add a push race case where non-contiguous branch head are created
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32636
diff changeset
  1274
  | |
9234d2cb24a5 test: add a push race case where non-contiguous branch head are created
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32636
diff changeset
  1275
  | | o  89420bf00fae C-J (default)
9234d2cb24a5 test: add a push race case where non-contiguous branch head are created
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32636
diff changeset
  1276
  | | |
9234d2cb24a5 test: add a push race case where non-contiguous branch head are created
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32636
diff changeset
  1277
  | | | o  b35ed749f288 C-I (my-second-test-branch)
9234d2cb24a5 test: add a push race case where non-contiguous branch head are created
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32636
diff changeset
  1278
  | | |/
9234d2cb24a5 test: add a push race case where non-contiguous branch head are created
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32636
diff changeset
  1279
  | | o  75d69cba5402 C-G (default)
9234d2cb24a5 test: add a push race case where non-contiguous branch head are created
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32636
diff changeset
  1280
  | | |
9234d2cb24a5 test: add a push race case where non-contiguous branch head are created
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32636
diff changeset
  1281
  | | | o  833be552cfe6 C-H (my-first-test-branch)
9234d2cb24a5 test: add a push race case where non-contiguous branch head are created
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32636
diff changeset
  1282
  | | |/
9234d2cb24a5 test: add a push race case where non-contiguous branch head are created
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32636
diff changeset
  1283
  | | o  d9e379a8c432 C-F (default)
9234d2cb24a5 test: add a push race case where non-contiguous branch head are created
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32636
diff changeset
  1284
  | | |
9234d2cb24a5 test: add a push race case where non-contiguous branch head are created
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32636
diff changeset
  1285
  +---o  51c544a58128 C-C (default)
9234d2cb24a5 test: add a push race case where non-contiguous branch head are created
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32636
diff changeset
  1286
  | |
9234d2cb24a5 test: add a push race case where non-contiguous branch head are created
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32636
diff changeset
  1287
  | o  a9149a1428e2 C-B (default)
9234d2cb24a5 test: add a push race case where non-contiguous branch head are created
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32636
diff changeset
  1288
  | |
9234d2cb24a5 test: add a push race case where non-contiguous branch head are created
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32636
diff changeset
  1289
  o |  98217d5a1659 C-A (default)
9234d2cb24a5 test: add a push race case where non-contiguous branch head are created
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32636
diff changeset
  1290
  |/
9234d2cb24a5 test: add a push race case where non-contiguous branch head are created
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32636
diff changeset
  1291
  o  842e2fac6304 C-ROOT (default)
9234d2cb24a5 test: add a push race case where non-contiguous branch head are created
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32636
diff changeset
  1292
  
32638
4f6645ec6bb2 test: add the mirror push race case for non-contiguous branch head
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32637
diff changeset
  1293
4f6645ec6bb2 test: add the mirror push race case for non-contiguous branch head
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32637
diff changeset
  1294
raced commit push a new head behind another named branch
4f6645ec6bb2 test: add the mirror push race case for non-contiguous branch head
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32637
diff changeset
  1295
---------------------------------------------------------
4f6645ec6bb2 test: add the mirror push race case for non-contiguous branch head
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32637
diff changeset
  1296
4f6645ec6bb2 test: add the mirror push race case for non-contiguous branch head
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32637
diff changeset
  1297
non-continuous branch are valid case, we tests for them.
4f6645ec6bb2 test: add the mirror push race case for non-contiguous branch head
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32637
diff changeset
  1298
4f6645ec6bb2 test: add the mirror push race case for non-contiguous branch head
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32637
diff changeset
  1299
#  b (raced branch default)
4f6645ec6bb2 test: add the mirror push race case for non-contiguous branch head
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32637
diff changeset
  1300
#  |
4f6645ec6bb2 test: add the mirror push race case for non-contiguous branch head
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32637
diff changeset
  1301
#  o (branch foo)
4f6645ec6bb2 test: add the mirror push race case for non-contiguous branch head
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32637
diff changeset
  1302
#  |
4f6645ec6bb2 test: add the mirror push race case for non-contiguous branch head
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32637
diff changeset
  1303
#  | a (branch default)
4f6645ec6bb2 test: add the mirror push race case for non-contiguous branch head
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32637
diff changeset
  1304
#  |/
4f6645ec6bb2 test: add the mirror push race case for non-contiguous branch head
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32637
diff changeset
  1305
#  * (branch foo)
4f6645ec6bb2 test: add the mirror push race case for non-contiguous branch head
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32637
diff changeset
  1306
#  |
4f6645ec6bb2 test: add the mirror push race case for non-contiguous branch head
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32637
diff changeset
  1307
#  * (branch default)
4f6645ec6bb2 test: add the mirror push race case for non-contiguous branch head
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32637
diff changeset
  1308
4f6645ec6bb2 test: add the mirror push race case for non-contiguous branch head
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32637
diff changeset
  1309
(resync-all)
4f6645ec6bb2 test: add the mirror push race case for non-contiguous branch head
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32637
diff changeset
  1310
4f6645ec6bb2 test: add the mirror push race case for non-contiguous branch head
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32637
diff changeset
  1311
  $ hg -R ./server pull ./client-racy
4f6645ec6bb2 test: add the mirror push race case for non-contiguous branch head
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32637
diff changeset
  1312
  pulling from ./client-racy
4f6645ec6bb2 test: add the mirror push race case for non-contiguous branch head
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32637
diff changeset
  1313
  searching for changes
4f6645ec6bb2 test: add the mirror push race case for non-contiguous branch head
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32637
diff changeset
  1314
  adding changesets
4f6645ec6bb2 test: add the mirror push race case for non-contiguous branch head
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32637
diff changeset
  1315
  adding manifests
4f6645ec6bb2 test: add the mirror push race case for non-contiguous branch head
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32637
diff changeset
  1316
  adding file changes
4f6645ec6bb2 test: add the mirror push race case for non-contiguous branch head
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32637
diff changeset
  1317
  added 1 changesets with 0 changes to 0 files (+1 heads)
4f6645ec6bb2 test: add the mirror push race case for non-contiguous branch head
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32637
diff changeset
  1318
  (run 'hg heads .' to see heads, 'hg merge' to merge)
4f6645ec6bb2 test: add the mirror push race case for non-contiguous branch head
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32637
diff changeset
  1319
  $ hg -R ./client-other pull
4f6645ec6bb2 test: add the mirror push race case for non-contiguous branch head
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32637
diff changeset
  1320
  pulling from ssh://user@dummy/server
4f6645ec6bb2 test: add the mirror push race case for non-contiguous branch head
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32637
diff changeset
  1321
  searching for changes
4f6645ec6bb2 test: add the mirror push race case for non-contiguous branch head
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32637
diff changeset
  1322
  adding changesets
4f6645ec6bb2 test: add the mirror push race case for non-contiguous branch head
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32637
diff changeset
  1323
  adding manifests
4f6645ec6bb2 test: add the mirror push race case for non-contiguous branch head
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32637
diff changeset
  1324
  adding file changes
4f6645ec6bb2 test: add the mirror push race case for non-contiguous branch head
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32637
diff changeset
  1325
  added 1 changesets with 0 changes to 0 files (+1 heads)
4f6645ec6bb2 test: add the mirror push race case for non-contiguous branch head
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32637
diff changeset
  1326
  (run 'hg heads .' to see heads, 'hg merge' to merge)
4f6645ec6bb2 test: add the mirror push race case for non-contiguous branch head
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32637
diff changeset
  1327
  $ hg -R ./client-racy pull
4f6645ec6bb2 test: add the mirror push race case for non-contiguous branch head
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32637
diff changeset
  1328
  pulling from ssh://user@dummy/server
4f6645ec6bb2 test: add the mirror push race case for non-contiguous branch head
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32637
diff changeset
  1329
  searching for changes
4f6645ec6bb2 test: add the mirror push race case for non-contiguous branch head
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32637
diff changeset
  1330
  adding changesets
4f6645ec6bb2 test: add the mirror push race case for non-contiguous branch head
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32637
diff changeset
  1331
  adding manifests
4f6645ec6bb2 test: add the mirror push race case for non-contiguous branch head
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32637
diff changeset
  1332
  adding file changes
4f6645ec6bb2 test: add the mirror push race case for non-contiguous branch head
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32637
diff changeset
  1333
  added 2 changesets with 1 changes to 1 files (+1 heads)
4f6645ec6bb2 test: add the mirror push race case for non-contiguous branch head
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32637
diff changeset
  1334
  (run 'hg heads .' to see heads, 'hg merge' to merge)
4f6645ec6bb2 test: add the mirror push race case for non-contiguous branch head
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32637
diff changeset
  1335
4f6645ec6bb2 test: add the mirror push race case for non-contiguous branch head
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32637
diff changeset
  1336
  $ hg -R server graph
4f6645ec6bb2 test: add the mirror push race case for non-contiguous branch head
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32637
diff changeset
  1337
  o  b0ee3d6f51bc C-Q (default)
4f6645ec6bb2 test: add the mirror push race case for non-contiguous branch head
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32637
diff changeset
  1338
  |
4f6645ec6bb2 test: add the mirror push race case for non-contiguous branch head
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32637
diff changeset
  1339
  | o  1b58ee3f79e5 C-P (default)
4f6645ec6bb2 test: add the mirror push race case for non-contiguous branch head
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32637
diff changeset
  1340
  | |
4f6645ec6bb2 test: add the mirror push race case for non-contiguous branch head
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32637
diff changeset
  1341
  | o  d0a85b2252a9 C-O (other)
4f6645ec6bb2 test: add the mirror push race case for non-contiguous branch head
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32637
diff changeset
  1342
  |/
4f6645ec6bb2 test: add the mirror push race case for non-contiguous branch head
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32637
diff changeset
  1343
  o  55a6f1c01b48 C-Z (other)
4f6645ec6bb2 test: add the mirror push race case for non-contiguous branch head
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32637
diff changeset
  1344
  |
4f6645ec6bb2 test: add the mirror push race case for non-contiguous branch head
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32637
diff changeset
  1345
  o    866a66e18630 C-N (default)
4f6645ec6bb2 test: add the mirror push race case for non-contiguous branch head
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32637
diff changeset
  1346
  |\
4f6645ec6bb2 test: add the mirror push race case for non-contiguous branch head
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32637
diff changeset
  1347
  +---o  6fd3090135df C-M (default)
4f6645ec6bb2 test: add the mirror push race case for non-contiguous branch head
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32637
diff changeset
  1348
  | |
4f6645ec6bb2 test: add the mirror push race case for non-contiguous branch head
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32637
diff changeset
  1349
  | o  cac2cead0ff0 C-L (default)
4f6645ec6bb2 test: add the mirror push race case for non-contiguous branch head
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32637
diff changeset
  1350
  | |
4f6645ec6bb2 test: add the mirror push race case for non-contiguous branch head
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32637
diff changeset
  1351
  o |  be705100c623 C-K (default)
4f6645ec6bb2 test: add the mirror push race case for non-contiguous branch head
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32637
diff changeset
  1352
  |\|
4f6645ec6bb2 test: add the mirror push race case for non-contiguous branch head
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32637
diff changeset
  1353
  o |  d603e2c0cdd7 C-E (default)
4f6645ec6bb2 test: add the mirror push race case for non-contiguous branch head
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32637
diff changeset
  1354
  | |
4f6645ec6bb2 test: add the mirror push race case for non-contiguous branch head
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32637
diff changeset
  1355
  | o  59e76faf78bd C-D (default)
4f6645ec6bb2 test: add the mirror push race case for non-contiguous branch head
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32637
diff changeset
  1356
  | |
4f6645ec6bb2 test: add the mirror push race case for non-contiguous branch head
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32637
diff changeset
  1357
  | | o  89420bf00fae C-J (default)
4f6645ec6bb2 test: add the mirror push race case for non-contiguous branch head
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32637
diff changeset
  1358
  | | |
4f6645ec6bb2 test: add the mirror push race case for non-contiguous branch head
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32637
diff changeset
  1359
  | | | o  b35ed749f288 C-I (my-second-test-branch)
4f6645ec6bb2 test: add the mirror push race case for non-contiguous branch head
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32637
diff changeset
  1360
  | | |/
4f6645ec6bb2 test: add the mirror push race case for non-contiguous branch head
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32637
diff changeset
  1361
  | | o  75d69cba5402 C-G (default)
4f6645ec6bb2 test: add the mirror push race case for non-contiguous branch head
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32637
diff changeset
  1362
  | | |
4f6645ec6bb2 test: add the mirror push race case for non-contiguous branch head
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32637
diff changeset
  1363
  | | | o  833be552cfe6 C-H (my-first-test-branch)
4f6645ec6bb2 test: add the mirror push race case for non-contiguous branch head
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32637
diff changeset
  1364
  | | |/
4f6645ec6bb2 test: add the mirror push race case for non-contiguous branch head
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32637
diff changeset
  1365
  | | o  d9e379a8c432 C-F (default)
4f6645ec6bb2 test: add the mirror push race case for non-contiguous branch head
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32637
diff changeset
  1366
  | | |
4f6645ec6bb2 test: add the mirror push race case for non-contiguous branch head
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32637
diff changeset
  1367
  +---o  51c544a58128 C-C (default)
4f6645ec6bb2 test: add the mirror push race case for non-contiguous branch head
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32637
diff changeset
  1368
  | |
4f6645ec6bb2 test: add the mirror push race case for non-contiguous branch head
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32637
diff changeset
  1369
  | o  a9149a1428e2 C-B (default)
4f6645ec6bb2 test: add the mirror push race case for non-contiguous branch head
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32637
diff changeset
  1370
  | |
4f6645ec6bb2 test: add the mirror push race case for non-contiguous branch head
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32637
diff changeset
  1371
  o |  98217d5a1659 C-A (default)
4f6645ec6bb2 test: add the mirror push race case for non-contiguous branch head
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32637
diff changeset
  1372
  |/
4f6645ec6bb2 test: add the mirror push race case for non-contiguous branch head
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32637
diff changeset
  1373
  o  842e2fac6304 C-ROOT (default)
4f6645ec6bb2 test: add the mirror push race case for non-contiguous branch head
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32637
diff changeset
  1374
  
4f6645ec6bb2 test: add the mirror push race case for non-contiguous branch head
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32637
diff changeset
  1375
4f6645ec6bb2 test: add the mirror push race case for non-contiguous branch head
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32637
diff changeset
  1376
Creating changesets
4f6645ec6bb2 test: add the mirror push race case for non-contiguous branch head
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32637
diff changeset
  1377
4f6645ec6bb2 test: add the mirror push race case for non-contiguous branch head
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32637
diff changeset
  1378
(update 'other' named branch head)
4f6645ec6bb2 test: add the mirror push race case for non-contiguous branch head
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32637
diff changeset
  1379
4f6645ec6bb2 test: add the mirror push race case for non-contiguous branch head
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32637
diff changeset
  1380
  $ hg -R client-other/ up 'desc("C-P")'
4f6645ec6bb2 test: add the mirror push race case for non-contiguous branch head
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32637
diff changeset
  1381
  0 files updated, 0 files merged, 0 files removed, 0 files unresolved
4f6645ec6bb2 test: add the mirror push race case for non-contiguous branch head
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32637
diff changeset
  1382
  $ echo aaa >> client-other/a
4f6645ec6bb2 test: add the mirror push race case for non-contiguous branch head
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32637
diff changeset
  1383
  $ hg -R client-other/ branch --force other
4f6645ec6bb2 test: add the mirror push race case for non-contiguous branch head
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32637
diff changeset
  1384
  marked working directory as branch other
4f6645ec6bb2 test: add the mirror push race case for non-contiguous branch head
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32637
diff changeset
  1385
  $ hg -R client-other/ commit -m "C-R"
4f6645ec6bb2 test: add the mirror push race case for non-contiguous branch head
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32637
diff changeset
  1386
  created new head
4f6645ec6bb2 test: add the mirror push race case for non-contiguous branch head
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32637
diff changeset
  1387
4f6645ec6bb2 test: add the mirror push race case for non-contiguous branch head
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32637
diff changeset
  1388
(update 'other named brnach through a 'default' changeset')
4f6645ec6bb2 test: add the mirror push race case for non-contiguous branch head
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32637
diff changeset
  1389
4f6645ec6bb2 test: add the mirror push race case for non-contiguous branch head
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32637
diff changeset
  1390
  $ hg -R client-racy/ up 'desc("C-P")'
4f6645ec6bb2 test: add the mirror push race case for non-contiguous branch head
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32637
diff changeset
  1391
  1 files updated, 0 files merged, 0 files removed, 0 files unresolved
4f6645ec6bb2 test: add the mirror push race case for non-contiguous branch head
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32637
diff changeset
  1392
  $ echo bbb >> client-racy/a
4f6645ec6bb2 test: add the mirror push race case for non-contiguous branch head
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32637
diff changeset
  1393
  $ hg -R client-racy/ commit -m "C-S"
4f6645ec6bb2 test: add the mirror push race case for non-contiguous branch head
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32637
diff changeset
  1394
  $ echo bbb >> client-racy/a
4f6645ec6bb2 test: add the mirror push race case for non-contiguous branch head
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32637
diff changeset
  1395
  $ hg -R client-racy/ branch --force other
4f6645ec6bb2 test: add the mirror push race case for non-contiguous branch head
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32637
diff changeset
  1396
  marked working directory as branch other
4f6645ec6bb2 test: add the mirror push race case for non-contiguous branch head
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32637
diff changeset
  1397
  $ hg -R client-racy/ commit -m "C-T"
4f6645ec6bb2 test: add the mirror push race case for non-contiguous branch head
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32637
diff changeset
  1398
  created new head
4f6645ec6bb2 test: add the mirror push race case for non-contiguous branch head
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32637
diff changeset
  1399
4f6645ec6bb2 test: add the mirror push race case for non-contiguous branch head
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32637
diff changeset
  1400
Pushing
4f6645ec6bb2 test: add the mirror push race case for non-contiguous branch head
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32637
diff changeset
  1401
4f6645ec6bb2 test: add the mirror push race case for non-contiguous branch head
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32637
diff changeset
  1402
  $ hg -R client-racy push -r 'tip' > ./push-log 2>&1 &
4f6645ec6bb2 test: add the mirror push race case for non-contiguous branch head
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32637
diff changeset
  1403
4f6645ec6bb2 test: add the mirror push race case for non-contiguous branch head
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32637
diff changeset
  1404
  $ waiton $TESTTMP/readyfile
4f6645ec6bb2 test: add the mirror push race case for non-contiguous branch head
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32637
diff changeset
  1405
4f6645ec6bb2 test: add the mirror push race case for non-contiguous branch head
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32637
diff changeset
  1406
  $ hg -R client-other push -fr 'tip' --new-branch
4f6645ec6bb2 test: add the mirror push race case for non-contiguous branch head
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32637
diff changeset
  1407
  pushing to ssh://user@dummy/server
4f6645ec6bb2 test: add the mirror push race case for non-contiguous branch head
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32637
diff changeset
  1408
  searching for changes
4f6645ec6bb2 test: add the mirror push race case for non-contiguous branch head
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32637
diff changeset
  1409
  remote: adding changesets
4f6645ec6bb2 test: add the mirror push race case for non-contiguous branch head
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32637
diff changeset
  1410
  remote: adding manifests
4f6645ec6bb2 test: add the mirror push race case for non-contiguous branch head
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32637
diff changeset
  1411
  remote: adding file changes
4f6645ec6bb2 test: add the mirror push race case for non-contiguous branch head
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32637
diff changeset
  1412
  remote: added 1 changesets with 1 changes to 1 files
4f6645ec6bb2 test: add the mirror push race case for non-contiguous branch head
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32637
diff changeset
  1413
4f6645ec6bb2 test: add the mirror push race case for non-contiguous branch head
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32637
diff changeset
  1414
  $ release $TESTTMP/watchfile
4f6645ec6bb2 test: add the mirror push race case for non-contiguous branch head
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32637
diff changeset
  1415
4f6645ec6bb2 test: add the mirror push race case for non-contiguous branch head
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32637
diff changeset
  1416
Check the result of the push
4f6645ec6bb2 test: add the mirror push race case for non-contiguous branch head
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32637
diff changeset
  1417
4f6645ec6bb2 test: add the mirror push race case for non-contiguous branch head
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32637
diff changeset
  1418
  $ cat ./push-log
4f6645ec6bb2 test: add the mirror push race case for non-contiguous branch head
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32637
diff changeset
  1419
  pushing to ssh://user@dummy/server
4f6645ec6bb2 test: add the mirror push race case for non-contiguous branch head
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32637
diff changeset
  1420
  searching for changes
4f6645ec6bb2 test: add the mirror push race case for non-contiguous branch head
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32637
diff changeset
  1421
  wrote ready: $TESTTMP/readyfile
4f6645ec6bb2 test: add the mirror push race case for non-contiguous branch head
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32637
diff changeset
  1422
  waiting on: $TESTTMP/watchfile
4f6645ec6bb2 test: add the mirror push race case for non-contiguous branch head
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32637
diff changeset
  1423
  abort: push failed:
4f6645ec6bb2 test: add the mirror push race case for non-contiguous branch head
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32637
diff changeset
  1424
  'repository changed while pushing - please try again'
4f6645ec6bb2 test: add the mirror push race case for non-contiguous branch head
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32637
diff changeset
  1425
4f6645ec6bb2 test: add the mirror push race case for non-contiguous branch head
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32637
diff changeset
  1426
  $ hg -R server graph
4f6645ec6bb2 test: add the mirror push race case for non-contiguous branch head
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32637
diff changeset
  1427
  o  de7b9e2ba3f6 C-R (other)
4f6645ec6bb2 test: add the mirror push race case for non-contiguous branch head
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32637
diff changeset
  1428
  |
4f6645ec6bb2 test: add the mirror push race case for non-contiguous branch head
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32637
diff changeset
  1429
  o  1b58ee3f79e5 C-P (default)
4f6645ec6bb2 test: add the mirror push race case for non-contiguous branch head
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32637
diff changeset
  1430
  |
4f6645ec6bb2 test: add the mirror push race case for non-contiguous branch head
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32637
diff changeset
  1431
  o  d0a85b2252a9 C-O (other)
4f6645ec6bb2 test: add the mirror push race case for non-contiguous branch head
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32637
diff changeset
  1432
  |
4f6645ec6bb2 test: add the mirror push race case for non-contiguous branch head
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32637
diff changeset
  1433
  | o  b0ee3d6f51bc C-Q (default)
4f6645ec6bb2 test: add the mirror push race case for non-contiguous branch head
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32637
diff changeset
  1434
  |/
4f6645ec6bb2 test: add the mirror push race case for non-contiguous branch head
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32637
diff changeset
  1435
  o  55a6f1c01b48 C-Z (other)
4f6645ec6bb2 test: add the mirror push race case for non-contiguous branch head
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32637
diff changeset
  1436
  |
4f6645ec6bb2 test: add the mirror push race case for non-contiguous branch head
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32637
diff changeset
  1437
  o    866a66e18630 C-N (default)
4f6645ec6bb2 test: add the mirror push race case for non-contiguous branch head
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32637
diff changeset
  1438
  |\
4f6645ec6bb2 test: add the mirror push race case for non-contiguous branch head
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32637
diff changeset
  1439
  +---o  6fd3090135df C-M (default)
4f6645ec6bb2 test: add the mirror push race case for non-contiguous branch head
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32637
diff changeset
  1440
  | |
4f6645ec6bb2 test: add the mirror push race case for non-contiguous branch head
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32637
diff changeset
  1441
  | o  cac2cead0ff0 C-L (default)
4f6645ec6bb2 test: add the mirror push race case for non-contiguous branch head
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32637
diff changeset
  1442
  | |
4f6645ec6bb2 test: add the mirror push race case for non-contiguous branch head
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32637
diff changeset
  1443
  o |  be705100c623 C-K (default)
4f6645ec6bb2 test: add the mirror push race case for non-contiguous branch head
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32637
diff changeset
  1444
  |\|
4f6645ec6bb2 test: add the mirror push race case for non-contiguous branch head
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32637
diff changeset
  1445
  o |  d603e2c0cdd7 C-E (default)
4f6645ec6bb2 test: add the mirror push race case for non-contiguous branch head
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32637
diff changeset
  1446
  | |
4f6645ec6bb2 test: add the mirror push race case for non-contiguous branch head
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32637
diff changeset
  1447
  | o  59e76faf78bd C-D (default)
4f6645ec6bb2 test: add the mirror push race case for non-contiguous branch head
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32637
diff changeset
  1448
  | |
4f6645ec6bb2 test: add the mirror push race case for non-contiguous branch head
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32637
diff changeset
  1449
  | | o  89420bf00fae C-J (default)
4f6645ec6bb2 test: add the mirror push race case for non-contiguous branch head
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32637
diff changeset
  1450
  | | |
4f6645ec6bb2 test: add the mirror push race case for non-contiguous branch head
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32637
diff changeset
  1451
  | | | o  b35ed749f288 C-I (my-second-test-branch)
4f6645ec6bb2 test: add the mirror push race case for non-contiguous branch head
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32637
diff changeset
  1452
  | | |/
4f6645ec6bb2 test: add the mirror push race case for non-contiguous branch head
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32637
diff changeset
  1453
  | | o  75d69cba5402 C-G (default)
4f6645ec6bb2 test: add the mirror push race case for non-contiguous branch head
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32637
diff changeset
  1454
  | | |
4f6645ec6bb2 test: add the mirror push race case for non-contiguous branch head
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32637
diff changeset
  1455
  | | | o  833be552cfe6 C-H (my-first-test-branch)
4f6645ec6bb2 test: add the mirror push race case for non-contiguous branch head
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32637
diff changeset
  1456
  | | |/
4f6645ec6bb2 test: add the mirror push race case for non-contiguous branch head
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32637
diff changeset
  1457
  | | o  d9e379a8c432 C-F (default)
4f6645ec6bb2 test: add the mirror push race case for non-contiguous branch head
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32637
diff changeset
  1458
  | | |
4f6645ec6bb2 test: add the mirror push race case for non-contiguous branch head
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32637
diff changeset
  1459
  +---o  51c544a58128 C-C (default)
4f6645ec6bb2 test: add the mirror push race case for non-contiguous branch head
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32637
diff changeset
  1460
  | |
4f6645ec6bb2 test: add the mirror push race case for non-contiguous branch head
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32637
diff changeset
  1461
  | o  a9149a1428e2 C-B (default)
4f6645ec6bb2 test: add the mirror push race case for non-contiguous branch head
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32637
diff changeset
  1462
  | |
4f6645ec6bb2 test: add the mirror push race case for non-contiguous branch head
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32637
diff changeset
  1463
  o |  98217d5a1659 C-A (default)
4f6645ec6bb2 test: add the mirror push race case for non-contiguous branch head
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32637
diff changeset
  1464
  |/
4f6645ec6bb2 test: add the mirror push race case for non-contiguous branch head
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32637
diff changeset
  1465
  o  842e2fac6304 C-ROOT (default)
4f6645ec6bb2 test: add the mirror push race case for non-contiguous branch head
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32637
diff changeset
  1466
  
32669
6ac367b6ae8a test: add a push race case where obsoleted head is updated
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32638
diff changeset
  1467
6ac367b6ae8a test: add a push race case where obsoleted head is updated
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32638
diff changeset
  1468
raced commit push a new head obsoleting the one touched by the racing push
6ac367b6ae8a test: add a push race case where obsoleted head is updated
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32638
diff changeset
  1469
--------------------------------------------------------------------------
6ac367b6ae8a test: add a push race case where obsoleted head is updated
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32638
diff changeset
  1470
6ac367b6ae8a test: add a push race case where obsoleted head is updated
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32638
diff changeset
  1471
#  b (racing)
6ac367b6ae8a test: add a push race case where obsoleted head is updated
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32638
diff changeset
  1472
#  |
6ac367b6ae8a test: add a push race case where obsoleted head is updated
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32638
diff changeset
  1473
#  ø⇠◔ a (raced)
6ac367b6ae8a test: add a push race case where obsoleted head is updated
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32638
diff changeset
  1474
#  |/
6ac367b6ae8a test: add a push race case where obsoleted head is updated
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32638
diff changeset
  1475
#  *
6ac367b6ae8a test: add a push race case where obsoleted head is updated
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32638
diff changeset
  1476
6ac367b6ae8a test: add a push race case where obsoleted head is updated
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32638
diff changeset
  1477
(resync-all)
6ac367b6ae8a test: add a push race case where obsoleted head is updated
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32638
diff changeset
  1478
6ac367b6ae8a test: add a push race case where obsoleted head is updated
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32638
diff changeset
  1479
  $ hg -R ./server pull ./client-racy
6ac367b6ae8a test: add a push race case where obsoleted head is updated
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32638
diff changeset
  1480
  pulling from ./client-racy
6ac367b6ae8a test: add a push race case where obsoleted head is updated
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32638
diff changeset
  1481
  searching for changes
6ac367b6ae8a test: add a push race case where obsoleted head is updated
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32638
diff changeset
  1482
  adding changesets
6ac367b6ae8a test: add a push race case where obsoleted head is updated
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32638
diff changeset
  1483
  adding manifests
6ac367b6ae8a test: add a push race case where obsoleted head is updated
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32638
diff changeset
  1484
  adding file changes
6ac367b6ae8a test: add a push race case where obsoleted head is updated
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32638
diff changeset
  1485
  added 2 changesets with 2 changes to 1 files (+1 heads)
6ac367b6ae8a test: add a push race case where obsoleted head is updated
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32638
diff changeset
  1486
  (run 'hg heads .' to see heads, 'hg merge' to merge)
6ac367b6ae8a test: add a push race case where obsoleted head is updated
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32638
diff changeset
  1487
  $ hg -R ./client-other pull
6ac367b6ae8a test: add a push race case where obsoleted head is updated
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32638
diff changeset
  1488
  pulling from ssh://user@dummy/server
6ac367b6ae8a test: add a push race case where obsoleted head is updated
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32638
diff changeset
  1489
  searching for changes
6ac367b6ae8a test: add a push race case where obsoleted head is updated
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32638
diff changeset
  1490
  adding changesets
6ac367b6ae8a test: add a push race case where obsoleted head is updated
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32638
diff changeset
  1491
  adding manifests
6ac367b6ae8a test: add a push race case where obsoleted head is updated
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32638
diff changeset
  1492
  adding file changes
6ac367b6ae8a test: add a push race case where obsoleted head is updated
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32638
diff changeset
  1493
  added 2 changesets with 2 changes to 1 files (+1 heads)
6ac367b6ae8a test: add a push race case where obsoleted head is updated
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32638
diff changeset
  1494
  (run 'hg heads' to see heads, 'hg merge' to merge)
6ac367b6ae8a test: add a push race case where obsoleted head is updated
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32638
diff changeset
  1495
  $ hg -R ./client-racy pull
6ac367b6ae8a test: add a push race case where obsoleted head is updated
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32638
diff changeset
  1496
  pulling from ssh://user@dummy/server
6ac367b6ae8a test: add a push race case where obsoleted head is updated
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32638
diff changeset
  1497
  searching for changes
6ac367b6ae8a test: add a push race case where obsoleted head is updated
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32638
diff changeset
  1498
  adding changesets
6ac367b6ae8a test: add a push race case where obsoleted head is updated
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32638
diff changeset
  1499
  adding manifests
6ac367b6ae8a test: add a push race case where obsoleted head is updated
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32638
diff changeset
  1500
  adding file changes
6ac367b6ae8a test: add a push race case where obsoleted head is updated
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32638
diff changeset
  1501
  added 1 changesets with 1 changes to 1 files (+1 heads)
6ac367b6ae8a test: add a push race case where obsoleted head is updated
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32638
diff changeset
  1502
  (run 'hg heads' to see heads, 'hg merge' to merge)
6ac367b6ae8a test: add a push race case where obsoleted head is updated
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32638
diff changeset
  1503
6ac367b6ae8a test: add a push race case where obsoleted head is updated
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32638
diff changeset
  1504
  $ hg -R server graph
6ac367b6ae8a test: add a push race case where obsoleted head is updated
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32638
diff changeset
  1505
  o  3d57ed3c1091 C-T (other)
6ac367b6ae8a test: add a push race case where obsoleted head is updated
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32638
diff changeset
  1506
  |
6ac367b6ae8a test: add a push race case where obsoleted head is updated
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32638
diff changeset
  1507
  o  2efd43f7b5ba C-S (default)
6ac367b6ae8a test: add a push race case where obsoleted head is updated
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32638
diff changeset
  1508
  |
6ac367b6ae8a test: add a push race case where obsoleted head is updated
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32638
diff changeset
  1509
  | o  de7b9e2ba3f6 C-R (other)
6ac367b6ae8a test: add a push race case where obsoleted head is updated
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32638
diff changeset
  1510
  |/
6ac367b6ae8a test: add a push race case where obsoleted head is updated
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32638
diff changeset
  1511
  o  1b58ee3f79e5 C-P (default)
6ac367b6ae8a test: add a push race case where obsoleted head is updated
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32638
diff changeset
  1512
  |
6ac367b6ae8a test: add a push race case where obsoleted head is updated
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32638
diff changeset
  1513
  o  d0a85b2252a9 C-O (other)
6ac367b6ae8a test: add a push race case where obsoleted head is updated
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32638
diff changeset
  1514
  |
6ac367b6ae8a test: add a push race case where obsoleted head is updated
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32638
diff changeset
  1515
  | o  b0ee3d6f51bc C-Q (default)
6ac367b6ae8a test: add a push race case where obsoleted head is updated
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32638
diff changeset
  1516
  |/
6ac367b6ae8a test: add a push race case where obsoleted head is updated
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32638
diff changeset
  1517
  o  55a6f1c01b48 C-Z (other)
6ac367b6ae8a test: add a push race case where obsoleted head is updated
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32638
diff changeset
  1518
  |
6ac367b6ae8a test: add a push race case where obsoleted head is updated
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32638
diff changeset
  1519
  o    866a66e18630 C-N (default)
6ac367b6ae8a test: add a push race case where obsoleted head is updated
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32638
diff changeset
  1520
  |\
6ac367b6ae8a test: add a push race case where obsoleted head is updated
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32638
diff changeset
  1521
  +---o  6fd3090135df C-M (default)
6ac367b6ae8a test: add a push race case where obsoleted head is updated
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32638
diff changeset
  1522
  | |
6ac367b6ae8a test: add a push race case where obsoleted head is updated
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32638
diff changeset
  1523
  | o  cac2cead0ff0 C-L (default)
6ac367b6ae8a test: add a push race case where obsoleted head is updated
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32638
diff changeset
  1524
  | |
6ac367b6ae8a test: add a push race case where obsoleted head is updated
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32638
diff changeset
  1525
  o |  be705100c623 C-K (default)
6ac367b6ae8a test: add a push race case where obsoleted head is updated
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32638
diff changeset
  1526
  |\|
6ac367b6ae8a test: add a push race case where obsoleted head is updated
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32638
diff changeset
  1527
  o |  d603e2c0cdd7 C-E (default)
6ac367b6ae8a test: add a push race case where obsoleted head is updated
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32638
diff changeset
  1528
  | |
6ac367b6ae8a test: add a push race case where obsoleted head is updated
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32638
diff changeset
  1529
  | o  59e76faf78bd C-D (default)
6ac367b6ae8a test: add a push race case where obsoleted head is updated
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32638
diff changeset
  1530
  | |
6ac367b6ae8a test: add a push race case where obsoleted head is updated
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32638
diff changeset
  1531
  | | o  89420bf00fae C-J (default)
6ac367b6ae8a test: add a push race case where obsoleted head is updated
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32638
diff changeset
  1532
  | | |
6ac367b6ae8a test: add a push race case where obsoleted head is updated
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32638
diff changeset
  1533
  | | | o  b35ed749f288 C-I (my-second-test-branch)
6ac367b6ae8a test: add a push race case where obsoleted head is updated
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32638
diff changeset
  1534
  | | |/
6ac367b6ae8a test: add a push race case where obsoleted head is updated
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32638
diff changeset
  1535
  | | o  75d69cba5402 C-G (default)
6ac367b6ae8a test: add a push race case where obsoleted head is updated
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32638
diff changeset
  1536
  | | |
6ac367b6ae8a test: add a push race case where obsoleted head is updated
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32638
diff changeset
  1537
  | | | o  833be552cfe6 C-H (my-first-test-branch)
6ac367b6ae8a test: add a push race case where obsoleted head is updated
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32638
diff changeset
  1538
  | | |/
6ac367b6ae8a test: add a push race case where obsoleted head is updated
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32638
diff changeset
  1539
  | | o  d9e379a8c432 C-F (default)
6ac367b6ae8a test: add a push race case where obsoleted head is updated
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32638
diff changeset
  1540
  | | |
6ac367b6ae8a test: add a push race case where obsoleted head is updated
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32638
diff changeset
  1541
  +---o  51c544a58128 C-C (default)
6ac367b6ae8a test: add a push race case where obsoleted head is updated
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32638
diff changeset
  1542
  | |
6ac367b6ae8a test: add a push race case where obsoleted head is updated
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32638
diff changeset
  1543
  | o  a9149a1428e2 C-B (default)
6ac367b6ae8a test: add a push race case where obsoleted head is updated
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32638
diff changeset
  1544
  | |
6ac367b6ae8a test: add a push race case where obsoleted head is updated
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32638
diff changeset
  1545
  o |  98217d5a1659 C-A (default)
6ac367b6ae8a test: add a push race case where obsoleted head is updated
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32638
diff changeset
  1546
  |/
6ac367b6ae8a test: add a push race case where obsoleted head is updated
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32638
diff changeset
  1547
  o  842e2fac6304 C-ROOT (default)
6ac367b6ae8a test: add a push race case where obsoleted head is updated
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32638
diff changeset
  1548
  
6ac367b6ae8a test: add a push race case where obsoleted head is updated
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32638
diff changeset
  1549
6ac367b6ae8a test: add a push race case where obsoleted head is updated
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32638
diff changeset
  1550
Creating changesets and markers
6ac367b6ae8a test: add a push race case where obsoleted head is updated
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32638
diff changeset
  1551
6ac367b6ae8a test: add a push race case where obsoleted head is updated
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32638
diff changeset
  1552
(continue existing head)
6ac367b6ae8a test: add a push race case where obsoleted head is updated
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32638
diff changeset
  1553
6ac367b6ae8a test: add a push race case where obsoleted head is updated
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32638
diff changeset
  1554
  $ hg -R client-other/ up 'desc("C-Q")'
6ac367b6ae8a test: add a push race case where obsoleted head is updated
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32638
diff changeset
  1555
  1 files updated, 0 files merged, 0 files removed, 0 files unresolved
6ac367b6ae8a test: add a push race case where obsoleted head is updated
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32638
diff changeset
  1556
  $ echo aaa >> client-other/a
6ac367b6ae8a test: add a push race case where obsoleted head is updated
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32638
diff changeset
  1557
  $ hg -R client-other/ commit -m "C-U"
6ac367b6ae8a test: add a push race case where obsoleted head is updated
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32638
diff changeset
  1558
6ac367b6ae8a test: add a push race case where obsoleted head is updated
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32638
diff changeset
  1559
(new topo branch obsoleting that same head)
6ac367b6ae8a test: add a push race case where obsoleted head is updated
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32638
diff changeset
  1560
6ac367b6ae8a test: add a push race case where obsoleted head is updated
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32638
diff changeset
  1561
  $ hg -R client-racy/ up 'desc("C-Z")'
6ac367b6ae8a test: add a push race case where obsoleted head is updated
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32638
diff changeset
  1562
  1 files updated, 0 files merged, 0 files removed, 0 files unresolved
6ac367b6ae8a test: add a push race case where obsoleted head is updated
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32638
diff changeset
  1563
  $ echo bbb >> client-racy/a
6ac367b6ae8a test: add a push race case where obsoleted head is updated
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32638
diff changeset
  1564
  $ hg -R client-racy/ branch --force default
6ac367b6ae8a test: add a push race case where obsoleted head is updated
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32638
diff changeset
  1565
  marked working directory as branch default
6ac367b6ae8a test: add a push race case where obsoleted head is updated
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32638
diff changeset
  1566
  $ hg -R client-racy/ commit -m "C-V"
6ac367b6ae8a test: add a push race case where obsoleted head is updated
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32638
diff changeset
  1567
  created new head
6ac367b6ae8a test: add a push race case where obsoleted head is updated
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32638
diff changeset
  1568
  $ ID_Q=`hg -R client-racy log -T '{node}\n' -r 'desc("C-Q")'`
6ac367b6ae8a test: add a push race case where obsoleted head is updated
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32638
diff changeset
  1569
  $ ID_V=`hg -R client-racy log -T '{node}\n' -r 'desc("C-V")'`
6ac367b6ae8a test: add a push race case where obsoleted head is updated
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32638
diff changeset
  1570
  $ hg -R client-racy debugobsolete $ID_Q $ID_V
6ac367b6ae8a test: add a push race case where obsoleted head is updated
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32638
diff changeset
  1571
6ac367b6ae8a test: add a push race case where obsoleted head is updated
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32638
diff changeset
  1572
Pushing
6ac367b6ae8a test: add a push race case where obsoleted head is updated
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32638
diff changeset
  1573
6ac367b6ae8a test: add a push race case where obsoleted head is updated
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32638
diff changeset
  1574
  $ hg -R client-racy push -r 'tip' > ./push-log 2>&1 &
6ac367b6ae8a test: add a push race case where obsoleted head is updated
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32638
diff changeset
  1575
6ac367b6ae8a test: add a push race case where obsoleted head is updated
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32638
diff changeset
  1576
  $ waiton $TESTTMP/readyfile
6ac367b6ae8a test: add a push race case where obsoleted head is updated
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32638
diff changeset
  1577
6ac367b6ae8a test: add a push race case where obsoleted head is updated
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32638
diff changeset
  1578
  $ hg -R client-other push -fr 'tip' --new-branch
6ac367b6ae8a test: add a push race case where obsoleted head is updated
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32638
diff changeset
  1579
  pushing to ssh://user@dummy/server
6ac367b6ae8a test: add a push race case where obsoleted head is updated
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32638
diff changeset
  1580
  searching for changes
6ac367b6ae8a test: add a push race case where obsoleted head is updated
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32638
diff changeset
  1581
  remote: adding changesets
6ac367b6ae8a test: add a push race case where obsoleted head is updated
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32638
diff changeset
  1582
  remote: adding manifests
6ac367b6ae8a test: add a push race case where obsoleted head is updated
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32638
diff changeset
  1583
  remote: adding file changes
6ac367b6ae8a test: add a push race case where obsoleted head is updated
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32638
diff changeset
  1584
  remote: added 1 changesets with 0 changes to 0 files
6ac367b6ae8a test: add a push race case where obsoleted head is updated
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32638
diff changeset
  1585
6ac367b6ae8a test: add a push race case where obsoleted head is updated
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32638
diff changeset
  1586
  $ release $TESTTMP/watchfile
6ac367b6ae8a test: add a push race case where obsoleted head is updated
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32638
diff changeset
  1587
6ac367b6ae8a test: add a push race case where obsoleted head is updated
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32638
diff changeset
  1588
Check the result of the push
6ac367b6ae8a test: add a push race case where obsoleted head is updated
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32638
diff changeset
  1589
6ac367b6ae8a test: add a push race case where obsoleted head is updated
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32638
diff changeset
  1590
  $ cat ./push-log
6ac367b6ae8a test: add a push race case where obsoleted head is updated
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32638
diff changeset
  1591
  pushing to ssh://user@dummy/server
6ac367b6ae8a test: add a push race case where obsoleted head is updated
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32638
diff changeset
  1592
  searching for changes
6ac367b6ae8a test: add a push race case where obsoleted head is updated
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32638
diff changeset
  1593
  wrote ready: $TESTTMP/readyfile
6ac367b6ae8a test: add a push race case where obsoleted head is updated
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32638
diff changeset
  1594
  waiting on: $TESTTMP/watchfile
6ac367b6ae8a test: add a push race case where obsoleted head is updated
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32638
diff changeset
  1595
  abort: push failed:
6ac367b6ae8a test: add a push race case where obsoleted head is updated
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32638
diff changeset
  1596
  'repository changed while pushing - please try again'
6ac367b6ae8a test: add a push race case where obsoleted head is updated
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32638
diff changeset
  1597
6ac367b6ae8a test: add a push race case where obsoleted head is updated
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32638
diff changeset
  1598
  $ hg -R server debugobsolete
6ac367b6ae8a test: add a push race case where obsoleted head is updated
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32638
diff changeset
  1599
  $ hg -R server graph
6ac367b6ae8a test: add a push race case where obsoleted head is updated
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32638
diff changeset
  1600
  o  a98a47d8b85b C-U (default)
6ac367b6ae8a test: add a push race case where obsoleted head is updated
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32638
diff changeset
  1601
  |
6ac367b6ae8a test: add a push race case where obsoleted head is updated
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32638
diff changeset
  1602
  o  b0ee3d6f51bc C-Q (default)
6ac367b6ae8a test: add a push race case where obsoleted head is updated
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32638
diff changeset
  1603
  |
6ac367b6ae8a test: add a push race case where obsoleted head is updated
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32638
diff changeset
  1604
  | o  3d57ed3c1091 C-T (other)
6ac367b6ae8a test: add a push race case where obsoleted head is updated
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32638
diff changeset
  1605
  | |
6ac367b6ae8a test: add a push race case where obsoleted head is updated
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32638
diff changeset
  1606
  | o  2efd43f7b5ba C-S (default)
6ac367b6ae8a test: add a push race case where obsoleted head is updated
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32638
diff changeset
  1607
  | |
6ac367b6ae8a test: add a push race case where obsoleted head is updated
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32638
diff changeset
  1608
  | | o  de7b9e2ba3f6 C-R (other)
6ac367b6ae8a test: add a push race case where obsoleted head is updated
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32638
diff changeset
  1609
  | |/
6ac367b6ae8a test: add a push race case where obsoleted head is updated
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32638
diff changeset
  1610
  | o  1b58ee3f79e5 C-P (default)
6ac367b6ae8a test: add a push race case where obsoleted head is updated
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32638
diff changeset
  1611
  | |
6ac367b6ae8a test: add a push race case where obsoleted head is updated
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32638
diff changeset
  1612
  | o  d0a85b2252a9 C-O (other)
6ac367b6ae8a test: add a push race case where obsoleted head is updated
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32638
diff changeset
  1613
  |/
6ac367b6ae8a test: add a push race case where obsoleted head is updated
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32638
diff changeset
  1614
  o  55a6f1c01b48 C-Z (other)
6ac367b6ae8a test: add a push race case where obsoleted head is updated
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32638
diff changeset
  1615
  |
6ac367b6ae8a test: add a push race case where obsoleted head is updated
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32638
diff changeset
  1616
  o    866a66e18630 C-N (default)
6ac367b6ae8a test: add a push race case where obsoleted head is updated
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32638
diff changeset
  1617
  |\
6ac367b6ae8a test: add a push race case where obsoleted head is updated
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32638
diff changeset
  1618
  +---o  6fd3090135df C-M (default)
6ac367b6ae8a test: add a push race case where obsoleted head is updated
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32638
diff changeset
  1619
  | |
6ac367b6ae8a test: add a push race case where obsoleted head is updated
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32638
diff changeset
  1620
  | o  cac2cead0ff0 C-L (default)
6ac367b6ae8a test: add a push race case where obsoleted head is updated
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32638
diff changeset
  1621
  | |
6ac367b6ae8a test: add a push race case where obsoleted head is updated
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32638
diff changeset
  1622
  o |  be705100c623 C-K (default)
6ac367b6ae8a test: add a push race case where obsoleted head is updated
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32638
diff changeset
  1623
  |\|
6ac367b6ae8a test: add a push race case where obsoleted head is updated
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32638
diff changeset
  1624
  o |  d603e2c0cdd7 C-E (default)
6ac367b6ae8a test: add a push race case where obsoleted head is updated
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32638
diff changeset
  1625
  | |
6ac367b6ae8a test: add a push race case where obsoleted head is updated
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32638
diff changeset
  1626
  | o  59e76faf78bd C-D (default)
6ac367b6ae8a test: add a push race case where obsoleted head is updated
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32638
diff changeset
  1627
  | |
6ac367b6ae8a test: add a push race case where obsoleted head is updated
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32638
diff changeset
  1628
  | | o  89420bf00fae C-J (default)
6ac367b6ae8a test: add a push race case where obsoleted head is updated
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32638
diff changeset
  1629
  | | |
6ac367b6ae8a test: add a push race case where obsoleted head is updated
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32638
diff changeset
  1630
  | | | o  b35ed749f288 C-I (my-second-test-branch)
6ac367b6ae8a test: add a push race case where obsoleted head is updated
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32638
diff changeset
  1631
  | | |/
6ac367b6ae8a test: add a push race case where obsoleted head is updated
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32638
diff changeset
  1632
  | | o  75d69cba5402 C-G (default)
6ac367b6ae8a test: add a push race case where obsoleted head is updated
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32638
diff changeset
  1633
  | | |
6ac367b6ae8a test: add a push race case where obsoleted head is updated
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32638
diff changeset
  1634
  | | | o  833be552cfe6 C-H (my-first-test-branch)
6ac367b6ae8a test: add a push race case where obsoleted head is updated
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32638
diff changeset
  1635
  | | |/
6ac367b6ae8a test: add a push race case where obsoleted head is updated
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32638
diff changeset
  1636
  | | o  d9e379a8c432 C-F (default)
6ac367b6ae8a test: add a push race case where obsoleted head is updated
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32638
diff changeset
  1637
  | | |
6ac367b6ae8a test: add a push race case where obsoleted head is updated
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32638
diff changeset
  1638
  +---o  51c544a58128 C-C (default)
6ac367b6ae8a test: add a push race case where obsoleted head is updated
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32638
diff changeset
  1639
  | |
6ac367b6ae8a test: add a push race case where obsoleted head is updated
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32638
diff changeset
  1640
  | o  a9149a1428e2 C-B (default)
6ac367b6ae8a test: add a push race case where obsoleted head is updated
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32638
diff changeset
  1641
  | |
6ac367b6ae8a test: add a push race case where obsoleted head is updated
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32638
diff changeset
  1642
  o |  98217d5a1659 C-A (default)
6ac367b6ae8a test: add a push race case where obsoleted head is updated
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32638
diff changeset
  1643
  |/
6ac367b6ae8a test: add a push race case where obsoleted head is updated
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32638
diff changeset
  1644
  o  842e2fac6304 C-ROOT (default)
6ac367b6ae8a test: add a push race case where obsoleted head is updated
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32638
diff changeset
  1645
  
32670
41b8cfe85383 test: add a push race case where the updated head is obsoleted
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32669
diff changeset
  1646
41b8cfe85383 test: add a push race case where the updated head is obsoleted
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32669
diff changeset
  1647
racing commit push a new head obsoleting the one touched by the raced push
41b8cfe85383 test: add a push race case where the updated head is obsoleted
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32669
diff changeset
  1648
--------------------------------------------------------------------------
41b8cfe85383 test: add a push race case where the updated head is obsoleted
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32669
diff changeset
  1649
41b8cfe85383 test: add a push race case where the updated head is obsoleted
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32669
diff changeset
  1650
(mirror test case of the previous one
41b8cfe85383 test: add a push race case where the updated head is obsoleted
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32669
diff changeset
  1651
41b8cfe85383 test: add a push race case where the updated head is obsoleted
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32669
diff changeset
  1652
#  a (raced branch default)
41b8cfe85383 test: add a push race case where the updated head is obsoleted
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32669
diff changeset
  1653
#  |
41b8cfe85383 test: add a push race case where the updated head is obsoleted
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32669
diff changeset
  1654
#  ø⇠◔ b (racing)
41b8cfe85383 test: add a push race case where the updated head is obsoleted
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32669
diff changeset
  1655
#  |/
41b8cfe85383 test: add a push race case where the updated head is obsoleted
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32669
diff changeset
  1656
#  *
41b8cfe85383 test: add a push race case where the updated head is obsoleted
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32669
diff changeset
  1657
41b8cfe85383 test: add a push race case where the updated head is obsoleted
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32669
diff changeset
  1658
(resync-all)
41b8cfe85383 test: add a push race case where the updated head is obsoleted
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32669
diff changeset
  1659
41b8cfe85383 test: add a push race case where the updated head is obsoleted
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32669
diff changeset
  1660
  $ hg -R ./server pull ./client-racy
41b8cfe85383 test: add a push race case where the updated head is obsoleted
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32669
diff changeset
  1661
  pulling from ./client-racy
41b8cfe85383 test: add a push race case where the updated head is obsoleted
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32669
diff changeset
  1662
  searching for changes
41b8cfe85383 test: add a push race case where the updated head is obsoleted
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32669
diff changeset
  1663
  adding changesets
41b8cfe85383 test: add a push race case where the updated head is obsoleted
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32669
diff changeset
  1664
  adding manifests
41b8cfe85383 test: add a push race case where the updated head is obsoleted
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32669
diff changeset
  1665
  adding file changes
41b8cfe85383 test: add a push race case where the updated head is obsoleted
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32669
diff changeset
  1666
  added 1 changesets with 1 changes to 1 files (+1 heads)
41b8cfe85383 test: add a push race case where the updated head is obsoleted
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32669
diff changeset
  1667
  1 new obsolescence markers
41b8cfe85383 test: add a push race case where the updated head is obsoleted
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32669
diff changeset
  1668
  (run 'hg heads .' to see heads, 'hg merge' to merge)
41b8cfe85383 test: add a push race case where the updated head is obsoleted
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32669
diff changeset
  1669
  $ hg -R ./client-other pull
41b8cfe85383 test: add a push race case where the updated head is obsoleted
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32669
diff changeset
  1670
  pulling from ssh://user@dummy/server
41b8cfe85383 test: add a push race case where the updated head is obsoleted
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32669
diff changeset
  1671
  searching for changes
41b8cfe85383 test: add a push race case where the updated head is obsoleted
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32669
diff changeset
  1672
  adding changesets
41b8cfe85383 test: add a push race case where the updated head is obsoleted
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32669
diff changeset
  1673
  adding manifests
41b8cfe85383 test: add a push race case where the updated head is obsoleted
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32669
diff changeset
  1674
  adding file changes
41b8cfe85383 test: add a push race case where the updated head is obsoleted
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32669
diff changeset
  1675
  added 1 changesets with 1 changes to 1 files (+1 heads)
41b8cfe85383 test: add a push race case where the updated head is obsoleted
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32669
diff changeset
  1676
  1 new obsolescence markers
41b8cfe85383 test: add a push race case where the updated head is obsoleted
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32669
diff changeset
  1677
  (run 'hg heads .' to see heads, 'hg merge' to merge)
41b8cfe85383 test: add a push race case where the updated head is obsoleted
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32669
diff changeset
  1678
  $ hg -R ./client-racy pull
41b8cfe85383 test: add a push race case where the updated head is obsoleted
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32669
diff changeset
  1679
  pulling from ssh://user@dummy/server
41b8cfe85383 test: add a push race case where the updated head is obsoleted
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32669
diff changeset
  1680
  searching for changes
41b8cfe85383 test: add a push race case where the updated head is obsoleted
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32669
diff changeset
  1681
  adding changesets
41b8cfe85383 test: add a push race case where the updated head is obsoleted
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32669
diff changeset
  1682
  adding manifests
41b8cfe85383 test: add a push race case where the updated head is obsoleted
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32669
diff changeset
  1683
  adding file changes
41b8cfe85383 test: add a push race case where the updated head is obsoleted
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32669
diff changeset
  1684
  added 1 changesets with 0 changes to 0 files
41b8cfe85383 test: add a push race case where the updated head is obsoleted
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32669
diff changeset
  1685
  (run 'hg update' to get a working copy)
41b8cfe85383 test: add a push race case where the updated head is obsoleted
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32669
diff changeset
  1686
41b8cfe85383 test: add a push race case where the updated head is obsoleted
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32669
diff changeset
  1687
  $ hg -R server debugobsolete
41b8cfe85383 test: add a push race case where the updated head is obsoleted
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32669
diff changeset
  1688
  b0ee3d6f51bc4c0ca6d4f2907708027a6c376233 720c5163ecf64dcc6216bee2d62bf3edb1882499 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
41b8cfe85383 test: add a push race case where the updated head is obsoleted
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32669
diff changeset
  1689
  $ hg -R server graph
41b8cfe85383 test: add a push race case where the updated head is obsoleted
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32669
diff changeset
  1690
  o  720c5163ecf6 C-V (default)
41b8cfe85383 test: add a push race case where the updated head is obsoleted
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32669
diff changeset
  1691
  |
41b8cfe85383 test: add a push race case where the updated head is obsoleted
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32669
diff changeset
  1692
  | o  a98a47d8b85b C-U (default)
41b8cfe85383 test: add a push race case where the updated head is obsoleted
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32669
diff changeset
  1693
  | |
41b8cfe85383 test: add a push race case where the updated head is obsoleted
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32669
diff changeset
  1694
  | x  b0ee3d6f51bc C-Q (default)
41b8cfe85383 test: add a push race case where the updated head is obsoleted
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32669
diff changeset
  1695
  |/
41b8cfe85383 test: add a push race case where the updated head is obsoleted
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32669
diff changeset
  1696
  | o  3d57ed3c1091 C-T (other)
41b8cfe85383 test: add a push race case where the updated head is obsoleted
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32669
diff changeset
  1697
  | |
41b8cfe85383 test: add a push race case where the updated head is obsoleted
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32669
diff changeset
  1698
  | o  2efd43f7b5ba C-S (default)
41b8cfe85383 test: add a push race case where the updated head is obsoleted
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32669
diff changeset
  1699
  | |
41b8cfe85383 test: add a push race case where the updated head is obsoleted
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32669
diff changeset
  1700
  | | o  de7b9e2ba3f6 C-R (other)
41b8cfe85383 test: add a push race case where the updated head is obsoleted
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32669
diff changeset
  1701
  | |/
41b8cfe85383 test: add a push race case where the updated head is obsoleted
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32669
diff changeset
  1702
  | o  1b58ee3f79e5 C-P (default)
41b8cfe85383 test: add a push race case where the updated head is obsoleted
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32669
diff changeset
  1703
  | |
41b8cfe85383 test: add a push race case where the updated head is obsoleted
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32669
diff changeset
  1704
  | o  d0a85b2252a9 C-O (other)
41b8cfe85383 test: add a push race case where the updated head is obsoleted
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32669
diff changeset
  1705
  |/
41b8cfe85383 test: add a push race case where the updated head is obsoleted
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32669
diff changeset
  1706
  o  55a6f1c01b48 C-Z (other)
41b8cfe85383 test: add a push race case where the updated head is obsoleted
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32669
diff changeset
  1707
  |
41b8cfe85383 test: add a push race case where the updated head is obsoleted
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32669
diff changeset
  1708
  o    866a66e18630 C-N (default)
41b8cfe85383 test: add a push race case where the updated head is obsoleted
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32669
diff changeset
  1709
  |\
41b8cfe85383 test: add a push race case where the updated head is obsoleted
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32669
diff changeset
  1710
  +---o  6fd3090135df C-M (default)
41b8cfe85383 test: add a push race case where the updated head is obsoleted
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32669
diff changeset
  1711
  | |
41b8cfe85383 test: add a push race case where the updated head is obsoleted
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32669
diff changeset
  1712
  | o  cac2cead0ff0 C-L (default)
41b8cfe85383 test: add a push race case where the updated head is obsoleted
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32669
diff changeset
  1713
  | |
41b8cfe85383 test: add a push race case where the updated head is obsoleted
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32669
diff changeset
  1714
  o |  be705100c623 C-K (default)
41b8cfe85383 test: add a push race case where the updated head is obsoleted
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32669
diff changeset
  1715
  |\|
41b8cfe85383 test: add a push race case where the updated head is obsoleted
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32669
diff changeset
  1716
  o |  d603e2c0cdd7 C-E (default)
41b8cfe85383 test: add a push race case where the updated head is obsoleted
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32669
diff changeset
  1717
  | |
41b8cfe85383 test: add a push race case where the updated head is obsoleted
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32669
diff changeset
  1718
  | o  59e76faf78bd C-D (default)
41b8cfe85383 test: add a push race case where the updated head is obsoleted
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32669
diff changeset
  1719
  | |
41b8cfe85383 test: add a push race case where the updated head is obsoleted
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32669
diff changeset
  1720
  | | o  89420bf00fae C-J (default)
41b8cfe85383 test: add a push race case where the updated head is obsoleted
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32669
diff changeset
  1721
  | | |
41b8cfe85383 test: add a push race case where the updated head is obsoleted
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32669
diff changeset
  1722
  | | | o  b35ed749f288 C-I (my-second-test-branch)
41b8cfe85383 test: add a push race case where the updated head is obsoleted
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32669
diff changeset
  1723
  | | |/
41b8cfe85383 test: add a push race case where the updated head is obsoleted
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32669
diff changeset
  1724
  | | o  75d69cba5402 C-G (default)
41b8cfe85383 test: add a push race case where the updated head is obsoleted
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32669
diff changeset
  1725
  | | |
41b8cfe85383 test: add a push race case where the updated head is obsoleted
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32669
diff changeset
  1726
  | | | o  833be552cfe6 C-H (my-first-test-branch)
41b8cfe85383 test: add a push race case where the updated head is obsoleted
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32669
diff changeset
  1727
  | | |/
41b8cfe85383 test: add a push race case where the updated head is obsoleted
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32669
diff changeset
  1728
  | | o  d9e379a8c432 C-F (default)
41b8cfe85383 test: add a push race case where the updated head is obsoleted
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32669
diff changeset
  1729
  | | |
41b8cfe85383 test: add a push race case where the updated head is obsoleted
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32669
diff changeset
  1730
  +---o  51c544a58128 C-C (default)
41b8cfe85383 test: add a push race case where the updated head is obsoleted
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32669
diff changeset
  1731
  | |
41b8cfe85383 test: add a push race case where the updated head is obsoleted
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32669
diff changeset
  1732
  | o  a9149a1428e2 C-B (default)
41b8cfe85383 test: add a push race case where the updated head is obsoleted
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32669
diff changeset
  1733
  | |
41b8cfe85383 test: add a push race case where the updated head is obsoleted
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32669
diff changeset
  1734
  o |  98217d5a1659 C-A (default)
41b8cfe85383 test: add a push race case where the updated head is obsoleted
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32669
diff changeset
  1735
  |/
41b8cfe85383 test: add a push race case where the updated head is obsoleted
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32669
diff changeset
  1736
  o  842e2fac6304 C-ROOT (default)
41b8cfe85383 test: add a push race case where the updated head is obsoleted
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32669
diff changeset
  1737
  
41b8cfe85383 test: add a push race case where the updated head is obsoleted
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32669
diff changeset
  1738
41b8cfe85383 test: add a push race case where the updated head is obsoleted
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32669
diff changeset
  1739
Creating changesets and markers
41b8cfe85383 test: add a push race case where the updated head is obsoleted
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32669
diff changeset
  1740
41b8cfe85383 test: add a push race case where the updated head is obsoleted
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32669
diff changeset
  1741
(new topo branch obsoleting that same head)
41b8cfe85383 test: add a push race case where the updated head is obsoleted
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32669
diff changeset
  1742
41b8cfe85383 test: add a push race case where the updated head is obsoleted
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32669
diff changeset
  1743
  $ hg -R client-other/ up 'desc("C-Q")'
41b8cfe85383 test: add a push race case where the updated head is obsoleted
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32669
diff changeset
  1744
  1 files updated, 0 files merged, 0 files removed, 0 files unresolved
41b8cfe85383 test: add a push race case where the updated head is obsoleted
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32669
diff changeset
  1745
  $ echo bbb >> client-other/a
41b8cfe85383 test: add a push race case where the updated head is obsoleted
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32669
diff changeset
  1746
  $ hg -R client-other/ branch --force default
41b8cfe85383 test: add a push race case where the updated head is obsoleted
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32669
diff changeset
  1747
  marked working directory as branch default
41b8cfe85383 test: add a push race case where the updated head is obsoleted
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32669
diff changeset
  1748
  $ hg -R client-other/ commit -m "C-W"
41b8cfe85383 test: add a push race case where the updated head is obsoleted
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32669
diff changeset
  1749
  created new head
41b8cfe85383 test: add a push race case where the updated head is obsoleted
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32669
diff changeset
  1750
  $ ID_V=`hg -R client-other log -T '{node}\n' -r 'desc("C-V")'`
41b8cfe85383 test: add a push race case where the updated head is obsoleted
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32669
diff changeset
  1751
  $ ID_W=`hg -R client-other log -T '{node}\n' -r 'desc("C-W")'`
41b8cfe85383 test: add a push race case where the updated head is obsoleted
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32669
diff changeset
  1752
  $ hg -R client-other debugobsolete $ID_V $ID_W
41b8cfe85383 test: add a push race case where the updated head is obsoleted
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32669
diff changeset
  1753
41b8cfe85383 test: add a push race case where the updated head is obsoleted
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32669
diff changeset
  1754
(continue the same head)
41b8cfe85383 test: add a push race case where the updated head is obsoleted
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32669
diff changeset
  1755
41b8cfe85383 test: add a push race case where the updated head is obsoleted
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32669
diff changeset
  1756
  $ echo aaa >> client-racy/a
41b8cfe85383 test: add a push race case where the updated head is obsoleted
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32669
diff changeset
  1757
  $ hg -R client-racy/ commit -m "C-X"
41b8cfe85383 test: add a push race case where the updated head is obsoleted
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32669
diff changeset
  1758
41b8cfe85383 test: add a push race case where the updated head is obsoleted
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32669
diff changeset
  1759
Pushing
41b8cfe85383 test: add a push race case where the updated head is obsoleted
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32669
diff changeset
  1760
41b8cfe85383 test: add a push race case where the updated head is obsoleted
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32669
diff changeset
  1761
  $ hg -R client-racy push -r 'tip' > ./push-log 2>&1 &
41b8cfe85383 test: add a push race case where the updated head is obsoleted
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32669
diff changeset
  1762
41b8cfe85383 test: add a push race case where the updated head is obsoleted
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32669
diff changeset
  1763
  $ waiton $TESTTMP/readyfile
41b8cfe85383 test: add a push race case where the updated head is obsoleted
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32669
diff changeset
  1764
41b8cfe85383 test: add a push race case where the updated head is obsoleted
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32669
diff changeset
  1765
  $ hg -R client-other push -fr 'tip' --new-branch
41b8cfe85383 test: add a push race case where the updated head is obsoleted
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32669
diff changeset
  1766
  pushing to ssh://user@dummy/server
41b8cfe85383 test: add a push race case where the updated head is obsoleted
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32669
diff changeset
  1767
  searching for changes
41b8cfe85383 test: add a push race case where the updated head is obsoleted
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32669
diff changeset
  1768
  remote: adding changesets
41b8cfe85383 test: add a push race case where the updated head is obsoleted
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32669
diff changeset
  1769
  remote: adding manifests
41b8cfe85383 test: add a push race case where the updated head is obsoleted
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32669
diff changeset
  1770
  remote: adding file changes
41b8cfe85383 test: add a push race case where the updated head is obsoleted
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32669
diff changeset
  1771
  remote: added 1 changesets with 0 changes to 1 files (+1 heads)
41b8cfe85383 test: add a push race case where the updated head is obsoleted
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32669
diff changeset
  1772
  remote: 1 new obsolescence markers
41b8cfe85383 test: add a push race case where the updated head is obsoleted
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32669
diff changeset
  1773
41b8cfe85383 test: add a push race case where the updated head is obsoleted
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32669
diff changeset
  1774
  $ release $TESTTMP/watchfile
41b8cfe85383 test: add a push race case where the updated head is obsoleted
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32669
diff changeset
  1775
41b8cfe85383 test: add a push race case where the updated head is obsoleted
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32669
diff changeset
  1776
Check the result of the push
41b8cfe85383 test: add a push race case where the updated head is obsoleted
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32669
diff changeset
  1777
41b8cfe85383 test: add a push race case where the updated head is obsoleted
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32669
diff changeset
  1778
  $ cat ./push-log
41b8cfe85383 test: add a push race case where the updated head is obsoleted
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32669
diff changeset
  1779
  pushing to ssh://user@dummy/server
41b8cfe85383 test: add a push race case where the updated head is obsoleted
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32669
diff changeset
  1780
  searching for changes
41b8cfe85383 test: add a push race case where the updated head is obsoleted
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32669
diff changeset
  1781
  wrote ready: $TESTTMP/readyfile
41b8cfe85383 test: add a push race case where the updated head is obsoleted
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32669
diff changeset
  1782
  waiting on: $TESTTMP/watchfile
41b8cfe85383 test: add a push race case where the updated head is obsoleted
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32669
diff changeset
  1783
  abort: push failed:
41b8cfe85383 test: add a push race case where the updated head is obsoleted
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32669
diff changeset
  1784
  'repository changed while pushing - please try again'
41b8cfe85383 test: add a push race case where the updated head is obsoleted
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32669
diff changeset
  1785
41b8cfe85383 test: add a push race case where the updated head is obsoleted
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32669
diff changeset
  1786
  $ hg -R server debugobsolete
41b8cfe85383 test: add a push race case where the updated head is obsoleted
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32669
diff changeset
  1787
  b0ee3d6f51bc4c0ca6d4f2907708027a6c376233 720c5163ecf64dcc6216bee2d62bf3edb1882499 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
41b8cfe85383 test: add a push race case where the updated head is obsoleted
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32669
diff changeset
  1788
  720c5163ecf64dcc6216bee2d62bf3edb1882499 39bc0598afe90ab18da460bafecc0fa953b77596 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
41b8cfe85383 test: add a push race case where the updated head is obsoleted
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32669
diff changeset
  1789
  $ hg -R server graph --hidden
41b8cfe85383 test: add a push race case where the updated head is obsoleted
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32669
diff changeset
  1790
  o  39bc0598afe9 C-W (default)
41b8cfe85383 test: add a push race case where the updated head is obsoleted
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32669
diff changeset
  1791
  |
41b8cfe85383 test: add a push race case where the updated head is obsoleted
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32669
diff changeset
  1792
  | o  a98a47d8b85b C-U (default)
41b8cfe85383 test: add a push race case where the updated head is obsoleted
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32669
diff changeset
  1793
  |/
41b8cfe85383 test: add a push race case where the updated head is obsoleted
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32669
diff changeset
  1794
  x  b0ee3d6f51bc C-Q (default)
41b8cfe85383 test: add a push race case where the updated head is obsoleted
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32669
diff changeset
  1795
  |
41b8cfe85383 test: add a push race case where the updated head is obsoleted
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32669
diff changeset
  1796
  | o  3d57ed3c1091 C-T (other)
41b8cfe85383 test: add a push race case where the updated head is obsoleted
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32669
diff changeset
  1797
  | |
41b8cfe85383 test: add a push race case where the updated head is obsoleted
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32669
diff changeset
  1798
  | o  2efd43f7b5ba C-S (default)
41b8cfe85383 test: add a push race case where the updated head is obsoleted
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32669
diff changeset
  1799
  | |
41b8cfe85383 test: add a push race case where the updated head is obsoleted
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32669
diff changeset
  1800
  | | o  de7b9e2ba3f6 C-R (other)
41b8cfe85383 test: add a push race case where the updated head is obsoleted
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32669
diff changeset
  1801
  | |/
41b8cfe85383 test: add a push race case where the updated head is obsoleted
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32669
diff changeset
  1802
  | o  1b58ee3f79e5 C-P (default)
41b8cfe85383 test: add a push race case where the updated head is obsoleted
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32669
diff changeset
  1803
  | |
41b8cfe85383 test: add a push race case where the updated head is obsoleted
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32669
diff changeset
  1804
  | o  d0a85b2252a9 C-O (other)
41b8cfe85383 test: add a push race case where the updated head is obsoleted
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32669
diff changeset
  1805
  |/
41b8cfe85383 test: add a push race case where the updated head is obsoleted
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32669
diff changeset
  1806
  | x  720c5163ecf6 C-V (default)
41b8cfe85383 test: add a push race case where the updated head is obsoleted
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32669
diff changeset
  1807
  |/
41b8cfe85383 test: add a push race case where the updated head is obsoleted
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32669
diff changeset
  1808
  o  55a6f1c01b48 C-Z (other)
41b8cfe85383 test: add a push race case where the updated head is obsoleted
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32669
diff changeset
  1809
  |
41b8cfe85383 test: add a push race case where the updated head is obsoleted
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32669
diff changeset
  1810
  o    866a66e18630 C-N (default)
41b8cfe85383 test: add a push race case where the updated head is obsoleted
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32669
diff changeset
  1811
  |\
41b8cfe85383 test: add a push race case where the updated head is obsoleted
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32669
diff changeset
  1812
  +---o  6fd3090135df C-M (default)
41b8cfe85383 test: add a push race case where the updated head is obsoleted
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32669
diff changeset
  1813
  | |
41b8cfe85383 test: add a push race case where the updated head is obsoleted
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32669
diff changeset
  1814
  | o  cac2cead0ff0 C-L (default)
41b8cfe85383 test: add a push race case where the updated head is obsoleted
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32669
diff changeset
  1815
  | |
41b8cfe85383 test: add a push race case where the updated head is obsoleted
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32669
diff changeset
  1816
  o |  be705100c623 C-K (default)
41b8cfe85383 test: add a push race case where the updated head is obsoleted
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32669
diff changeset
  1817
  |\|
41b8cfe85383 test: add a push race case where the updated head is obsoleted
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32669
diff changeset
  1818
  o |  d603e2c0cdd7 C-E (default)
41b8cfe85383 test: add a push race case where the updated head is obsoleted
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32669
diff changeset
  1819
  | |
41b8cfe85383 test: add a push race case where the updated head is obsoleted
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32669
diff changeset
  1820
  | o  59e76faf78bd C-D (default)
41b8cfe85383 test: add a push race case where the updated head is obsoleted
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32669
diff changeset
  1821
  | |
41b8cfe85383 test: add a push race case where the updated head is obsoleted
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32669
diff changeset
  1822
  | | o  89420bf00fae C-J (default)
41b8cfe85383 test: add a push race case where the updated head is obsoleted
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32669
diff changeset
  1823
  | | |
41b8cfe85383 test: add a push race case where the updated head is obsoleted
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32669
diff changeset
  1824
  | | | o  b35ed749f288 C-I (my-second-test-branch)
41b8cfe85383 test: add a push race case where the updated head is obsoleted
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32669
diff changeset
  1825
  | | |/
41b8cfe85383 test: add a push race case where the updated head is obsoleted
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32669
diff changeset
  1826
  | | o  75d69cba5402 C-G (default)
41b8cfe85383 test: add a push race case where the updated head is obsoleted
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32669
diff changeset
  1827
  | | |
41b8cfe85383 test: add a push race case where the updated head is obsoleted
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32669
diff changeset
  1828
  | | | o  833be552cfe6 C-H (my-first-test-branch)
41b8cfe85383 test: add a push race case where the updated head is obsoleted
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32669
diff changeset
  1829
  | | |/
41b8cfe85383 test: add a push race case where the updated head is obsoleted
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32669
diff changeset
  1830
  | | o  d9e379a8c432 C-F (default)
41b8cfe85383 test: add a push race case where the updated head is obsoleted
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32669
diff changeset
  1831
  | | |
41b8cfe85383 test: add a push race case where the updated head is obsoleted
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32669
diff changeset
  1832
  +---o  51c544a58128 C-C (default)
41b8cfe85383 test: add a push race case where the updated head is obsoleted
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32669
diff changeset
  1833
  | |
41b8cfe85383 test: add a push race case where the updated head is obsoleted
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32669
diff changeset
  1834
  | o  a9149a1428e2 C-B (default)
41b8cfe85383 test: add a push race case where the updated head is obsoleted
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32669
diff changeset
  1835
  | |
41b8cfe85383 test: add a push race case where the updated head is obsoleted
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32669
diff changeset
  1836
  o |  98217d5a1659 C-A (default)
41b8cfe85383 test: add a push race case where the updated head is obsoleted
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32669
diff changeset
  1837
  |/
41b8cfe85383 test: add a push race case where the updated head is obsoleted
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32669
diff changeset
  1838
  o  842e2fac6304 C-ROOT (default)
41b8cfe85383 test: add a push race case where the updated head is obsoleted
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32669
diff changeset
  1839