Mercurial > hg
annotate tests/test-push-race.t @ 32634:8d10e21e3b57
test: add a push race case where racing push create a new named branch
This is the mirror case from the previos one. We check case where the raced
push update a head while the racing push create a new named branch as a
children of that updated head.
author | Pierre-Yves David <pierre-yves.david@octobus.net> |
---|---|
date | Sat, 27 May 2017 22:26:35 +0200 |
parents | b01bfa5abbfe |
children | 32c80d07952b |
rev | line source |
---|---|
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}) |
53f47cc085d8
test: add a file dedicated to push race between clients
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff
changeset
|
97 > [alias] |
53f47cc085d8
test: add a file dedicated to push race between clients
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff
changeset
|
98 > 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
|
99 > EOF |
53f47cc085d8
test: add a file dedicated to push race between clients
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff
changeset
|
100 |
53f47cc085d8
test: add a file dedicated to push race between clients
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff
changeset
|
101 Setup |
53f47cc085d8
test: add a file dedicated to push race between clients
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff
changeset
|
102 ----- |
53f47cc085d8
test: add a file dedicated to push race between clients
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff
changeset
|
103 |
53f47cc085d8
test: add a file dedicated to push race between clients
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff
changeset
|
104 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
|
105 |
53f47cc085d8
test: add a file dedicated to push race between clients
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff
changeset
|
106 $ 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
|
107 $ cd server |
53f47cc085d8
test: add a file dedicated to push race between clients
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff
changeset
|
108 $ 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
|
109 $ 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
|
110 adding root |
53f47cc085d8
test: add a file dedicated to push race between clients
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff
changeset
|
111 $ cd .. |
53f47cc085d8
test: add a file dedicated to push race between clients
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff
changeset
|
112 |
53f47cc085d8
test: add a file dedicated to push race between clients
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff
changeset
|
113 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
|
114 |
53f47cc085d8
test: add a file dedicated to push race between clients
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff
changeset
|
115 $ 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
|
116 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
|
117 adding changesets |
53f47cc085d8
test: add a file dedicated to push race between clients
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff
changeset
|
118 adding manifests |
53f47cc085d8
test: add a file dedicated to push race between clients
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff
changeset
|
119 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
|
120 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
|
121 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
|
122 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
|
123 $ 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
|
124 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
|
125 adding changesets |
53f47cc085d8
test: add a file dedicated to push race between clients
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff
changeset
|
126 adding manifests |
53f47cc085d8
test: add a file dedicated to push race between clients
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff
changeset
|
127 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
|
128 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
|
129 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
|
130 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
|
131 |
53f47cc085d8
test: add a file dedicated to push race between clients
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff
changeset
|
132 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
|
133 |
53f47cc085d8
test: add a file dedicated to push race between clients
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff
changeset
|
134 $ 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
|
135 > [extensions] |
53f47cc085d8
test: add a file dedicated to push race between clients
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff
changeset
|
136 > 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
|
137 > [delaypush] |
53f47cc085d8
test: add a file dedicated to push race between clients
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff
changeset
|
138 > 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
|
139 > 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
|
140 > EOF |
53f47cc085d8
test: add a file dedicated to push race between clients
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff
changeset
|
141 |
53f47cc085d8
test: add a file dedicated to push race between clients
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff
changeset
|
142 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
|
143 ------------------------------------------------------------ |
53f47cc085d8
test: add a file dedicated to push race between clients
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff
changeset
|
144 |
53f47cc085d8
test: add a file dedicated to push race between clients
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff
changeset
|
145 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
|
146 |
53f47cc085d8
test: add a file dedicated to push race between clients
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff
changeset
|
147 # a |
53f47cc085d8
test: add a file dedicated to push race between clients
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff
changeset
|
148 # | b |
53f47cc085d8
test: add a file dedicated to push race between clients
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff
changeset
|
149 # |/ |
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 |
53f47cc085d8
test: add a file dedicated to push race between clients
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff
changeset
|
152 Creating changesets |
53f47cc085d8
test: add a file dedicated to push race between clients
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff
changeset
|
153 |
53f47cc085d8
test: add a file dedicated to push race between clients
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff
changeset
|
154 $ 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
|
155 $ 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
|
156 $ 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
|
157 $ 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
|
158 $ 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
|
159 $ 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
|
160 |
53f47cc085d8
test: add a file dedicated to push race between clients
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff
changeset
|
161 Pushing |
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 $ 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
|
164 |
53f47cc085d8
test: add a file dedicated to push race between clients
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff
changeset
|
165 $ 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
|
166 |
53f47cc085d8
test: add a file dedicated to push race between clients
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff
changeset
|
167 $ 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
|
168 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
|
169 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
|
170 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
|
171 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
|
172 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
|
173 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
|
174 |
53f47cc085d8
test: add a file dedicated to push race between clients
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff
changeset
|
175 $ 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
|
176 |
53f47cc085d8
test: add a file dedicated to push race between clients
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff
changeset
|
177 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
|
178 |
53f47cc085d8
test: add a file dedicated to push race between clients
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff
changeset
|
179 $ 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
|
180 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
|
181 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
|
182 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
|
183 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
|
184 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
|
185 '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
|
186 |
53f47cc085d8
test: add a file dedicated to push race between clients
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff
changeset
|
187 $ 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
|
188 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
|
189 | |
53f47cc085d8
test: add a file dedicated to push race between clients
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff
changeset
|
190 @ 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
|
191 |
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
|
192 |
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
|
193 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
|
194 ------------------------------ |
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
|
195 |
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
|
196 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
|
197 |
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
|
198 # 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
|
199 # | | |
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
|
200 # * * |
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
|
201 # |/ |
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
|
202 # * |
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
|
203 |
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
|
204 (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
|
205 |
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
|
206 $ 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
|
207 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
|
208 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
|
209 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
|
210 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
|
211 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
|
212 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
|
213 (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
|
214 $ 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
|
215 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
|
216 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
|
217 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
|
218 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
|
219 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
|
220 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
|
221 (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
|
222 $ 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
|
223 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
|
224 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
|
225 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
|
226 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
|
227 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
|
228 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
|
229 (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
|
230 |
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 $ 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
|
232 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
|
233 | |
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 | 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
|
235 |/ |
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 @ 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
|
237 |
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 |
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 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
|
240 |
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 $ 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
|
242 $ 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
|
243 $ 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
|
244 $ 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
|
245 |
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 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
|
247 |
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 $ 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
|
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 $ 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
|
251 |
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 $ 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
|
253 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
|
254 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
|
255 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
|
256 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
|
257 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
|
258 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
|
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 $ 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
|
261 |
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 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
|
263 |
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 $ 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
|
265 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
|
266 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
|
267 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
|
268 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
|
269 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
|
270 '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
|
271 |
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 $ 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
|
273 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
|
274 | |
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 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
|
276 | |
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 | 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
|
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 @ 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
|
280 |
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
|
281 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
|
282 ----------------------------------------- |
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
|
283 |
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
|
284 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
|
285 |
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
|
286 # 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
|
287 # | |
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
|
288 # * 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
|
289 # |/ |
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
|
290 # * |
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
|
291 |
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
|
292 (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
|
293 |
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
|
294 $ 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
|
295 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
|
296 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
|
297 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
|
298 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
|
299 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
|
300 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
|
301 (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
|
302 $ 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
|
303 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
|
304 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
|
305 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
|
306 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
|
307 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
|
308 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
|
309 (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
|
310 $ 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
|
311 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
|
312 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
|
313 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
|
314 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
|
315 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
|
316 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
|
317 (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
|
318 |
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
|
319 $ 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
|
320 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
|
321 | |
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
|
322 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
|
323 | |
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
|
324 | 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
|
325 | | |
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
|
326 | 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
|
327 |/ |
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
|
328 @ 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
|
329 |
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 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
|
332 |
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 (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
|
334 |
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 $ 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
|
336 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
|
337 $ 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
|
338 $ 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
|
339 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
|
340 |
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 (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
|
342 |
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
|
343 $ 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
|
344 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
|
345 $ 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
|
346 $ 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
|
347 |
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 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
|
349 |
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 $ 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
|
351 |
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
|
352 $ 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
|
353 |
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
|
354 $ 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
|
355 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
|
356 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
|
357 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
|
358 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
|
359 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
|
360 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
|
361 |
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
|
362 $ 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
|
363 |
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 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
|
365 |
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 $ 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
|
367 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
|
368 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
|
369 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
|
370 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
|
371 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
|
372 '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
|
373 |
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 $ 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
|
375 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
|
376 | |
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 | 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
|
378 |/ |
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 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
|
380 | |
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 @ 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
|
386 |
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
|
387 |
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
|
388 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
|
389 --------------------------------------------------------------------- |
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
|
390 |
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
|
391 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
|
392 |
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
|
393 # 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
|
394 # | |
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
|
395 # | 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
|
396 # |/ |
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
|
397 # * |
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
|
398 |
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
|
399 (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
|
400 |
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
|
401 $ 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
|
402 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
|
403 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
|
404 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
|
405 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
|
406 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
|
407 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
|
408 (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
|
409 $ 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
|
410 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
|
411 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
|
412 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
|
413 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
|
414 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
|
415 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
|
416 (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
|
417 $ 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
|
418 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
|
419 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
|
420 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
|
421 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
|
422 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
|
423 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
|
424 (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
|
425 |
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
|
426 $ 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
|
427 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
|
428 | |
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
|
429 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
|
430 | |
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
|
431 | 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
|
432 |/ |
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
|
433 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
|
434 | |
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
|
435 | 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
|
436 | | |
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
|
437 | 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
|
438 |/ |
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
|
439 @ 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
|
440 |
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
|
441 |
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
|
442 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
|
443 |
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
|
444 (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
|
445 |
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
|
446 $ 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
|
447 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
|
448 $ 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
|
449 $ 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
|
450 |
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
|
451 (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
|
452 |
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
|
453 $ 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
|
454 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
|
455 $ 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
|
456 $ 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
|
457 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
|
458 (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
|
459 $ 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
|
460 |
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
|
461 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
|
462 |
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
|
463 $ 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
|
464 |
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
|
465 $ 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
|
466 |
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
|
467 $ 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
|
468 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
|
469 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
|
470 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
|
471 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
|
472 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
|
473 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
|
474 |
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
|
475 $ 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
|
476 |
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
|
477 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
|
478 |
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
|
479 $ 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
|
480 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
|
481 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
|
482 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
|
483 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
|
484 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
|
485 '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
|
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 $ 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
|
488 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
|
489 | |
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 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
|
491 | |
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 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
|
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 | 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
|
495 |/ |
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 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
|
497 | |
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
|
498 | 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
|
499 | | |
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 | 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
|
501 |/ |
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 @ 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
|
503 |
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
|
504 |
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
|
505 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
|
506 --------------------------------------------------------------------- |
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
|
507 |
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
|
508 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
|
509 |
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
|
510 # 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
|
511 # | |
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
|
512 # | 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
|
513 # |/ |
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
|
514 # * (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
|
515 |
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
|
516 (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
|
517 |
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
|
518 $ 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
|
519 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
|
520 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
|
521 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
|
522 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
|
523 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
|
524 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
|
525 (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
|
526 $ 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
|
527 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
|
528 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
|
529 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
|
530 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
|
531 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
|
532 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
|
533 (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
|
534 $ 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
|
535 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
|
536 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
|
537 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
|
538 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
|
539 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
|
540 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
|
541 (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
|
542 |
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
|
543 $ 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
|
544 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
|
545 | |
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
|
546 | 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
|
547 |/ |
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
|
548 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
|
549 | |
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
|
550 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
|
551 | |
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
|
552 | 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
|
553 |/ |
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
|
554 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
|
555 | |
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
|
556 | 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
|
557 | | |
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
|
558 | 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
|
559 |/ |
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
|
560 @ 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
|
561 |
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
|
562 |
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
|
563 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
|
564 |
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
|
565 (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
|
566 |
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
|
567 $ 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
|
568 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
|
569 $ 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
|
570 $ 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
|
571 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
|
572 $ 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
|
573 |
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
|
574 (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
|
575 |
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
|
576 $ 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
|
577 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
|
578 $ 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
|
579 $ 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
|
580 |
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
|
581 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
|
582 |
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
|
583 $ 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
|
584 |
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
|
585 $ 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
|
586 |
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
|
587 $ 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
|
588 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
|
589 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
|
590 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
|
591 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
|
592 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
|
593 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
|
594 |
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
|
595 $ 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
|
596 |
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
|
597 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
|
598 |
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
|
599 $ 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
|
600 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
|
601 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
|
602 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
|
603 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
|
604 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
|
605 '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
|
606 |
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
|
607 $ 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
|
608 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
|
609 | |
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
|
610 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
|
611 | |
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
|
612 | 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
|
613 |/ |
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
|
614 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
|
615 | |
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
|
616 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
|
617 | |
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
|
618 | 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
|
619 |/ |
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
|
620 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
|
621 | |
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
|
622 | 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
|
623 | | |
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
|
624 | 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
|
625 |/ |
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
|
626 @ 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
|
627 |