pmezard / hgforest-crew

Branch of hg forest extension (http://hg.akoha.org/hgforest) working with hg crew repository

Clone this repository (size: 105.9 KB): HTTPS / SSH
$ hg clone http://bitbucket.org/pmezard/hgforest-crew/
commit 80: 7403cc6df41c
parent 79: 1858f812ef71
branch: default
test-forest: move path rewriting calls in a function
Patrick Mézard / pmezard
2 years ago

Changed (Δ502 bytes):

raw changeset »

test-forest (25 lines added, 20 lines removed)

Up to file-list test-forest:

2
2
3
3
#alias hg='hg --traceback'
4
4
5
fixpath()
6
{
7
    sed -e "s@\(/private\)*$HGTMP@HGTMP@g"
8
}
9
5
10
HGRCPATH=$HGTMP/.hgrc
6
11
export HGRCPATH
7
12
echo "[extensions]" >> $HGRCPATH
@@ -84,36 +89,36 @@ hg clone toplevel newtop
84
89
hg fseed -R newtop top-snap default
85
90
rm -rf newtop
86
91
hg fseed --traceback --root newtop top-snap default >/dev/null
87
hg fsnap --cwd newtop --compatible | sed "s@\(/private\)*$HGTMP@HGTMP@g"
88
hg fsnap --cwd newtop | sed "s@\(/private\)*$HGTMP@HGTMP@g"
92
hg fsnap --cwd newtop --compatible | fixpath
93
hg fsnap --cwd newtop | fixpath
89
94
rm -rf newtop
90
95
91
96
echo "# fpull"
92
97
hg fpull --cwd topcopy -u --snapfile=../top-snap default 2>&1 \
93
    | sed "s@\(/private\)*$HGTMP@HGTMP@g"
98
    | fixpath
94
99
hg fpull --cwd topcopy -u ../top-snap default 2>&1 \
95
    | sed "s@\(/private\)*$HGTMP@HGTMP@g"
100
    | fixpath
96
101
# Simulate a new repository
97
102
rm -rf topcopy/t
98
103
hg fpull -R topcopy -u 2>&1 \
99
    | sed "s@\(/private\)*$HGTMP@HGTMP@g"
104
    | fixpath
100
105
101
106
echo "# foutgoing"
102
107
echo "t/t/f" > topcopy/t/t/f
103
108
hg commit --cwd topcopy/t/t -m "delete new line" -d "0 0"
104
109
hg remove --cwd topcopy/d/d f2
105
110
hg commit -R topcopy -m "remove new file" -d "0 0"
106
hg foutgoing -R topcopy 2>&1 | sed "s@\(/private\)*$HGTMP@HGTMP@g"
107
hg foutgoing --cwd topcopy default 2>&1 | sed "s@\(/private\)*$HGTMP@HGTMP@g"
108
hg foutgoing -R topcopy foo 2>&1 | sed "s@\(/private\)*$HGTMP@HGTMP@g"
111
hg foutgoing -R topcopy 2>&1 | fixpath
112
hg foutgoing --cwd topcopy default 2>&1 | fixpath
113
hg foutgoing -R topcopy foo 2>&1 | fixpath
109
114
110
115
echo "# fincoming"
111
hg fincoming -R toplevel topcopy 2>&1 | sed "s@\(/private\)*$HGTMP@HGTMP@g"
112
hg fincoming --cwd toplevel ../topcopy 2>&1 | sed "s@\(/private\)*$HGTMP@HGTMP@g"
113
hg fincoming -R toplevel foo 2>&1 | sed "s@\(/private\)*$HGTMP@HGTMP@g"
116
hg fincoming -R toplevel topcopy 2>&1 | fixpath
117
hg fincoming --cwd toplevel ../topcopy 2>&1 | fixpath
118
hg fincoming -R toplevel foo 2>&1 | fixpath
114
119
115
120
echo "# fpush"
116
hg fpush -R topcopy top-snap default | sed "s@\(/private\)*$HGTMP@HGTMP@g"
121
hg fpush -R topcopy top-snap default | fixpath
117
122
118
123
echo "# fseed and fpull, missing section"
119
124
cat top-snap | \
@@ -129,7 +134,7 @@ hg fseed --cwd missing ../top-snap-missi
129
134
hg ftrees -R missing --convert
130
135
# pull (should find toplevel changesets)
131
136
hg fpull -R missing top-snap-missing default 2>&1 \
132
    | sed "s@\(/private\)*$HGTMP@HGTMP@g"
137
    | fixpath
133
138
rm -rf missing
134
139
135
140
echo "# fseed and fpull, named section"
@@ -139,7 +144,7 @@ hg fseed --root named top-snap-named def
139
144
hg ftrees --cwd named --convert
140
145
# pull (should find nothing)
141
146
hg fpull --cwd named ../top-snap-named default 2>&1 \
142
    | sed "s@\(/private\)*$HGTMP@HGTMP@g"
147
    | fixpath
143
148
rm -rf named
144
149
145
150
# create an mq patch in topcopy/t
@@ -168,11 +173,11 @@ hg fsnap --cwd topcopy ../top-snap1
168
173
169
174
echo "# fpull + mq"
170
175
hg fpull --cwd topcopy -u ../top-snap default 2>&1 \
171
    | sed "s@\(/private\)*$HGTMP@HGTMP@g"
176
    | fixpath
172
177
173
178
echo "# fpush + mq"
174
179
hg fpush --cwd topcopy ../top-snap default 2>&1 \
175
    | sed "s@\(/private\)*$HGTMP@HGTMP@g"
180
    | fixpath
176
181
177
182
echo "# fupdate + mq"
178
183
hg fupdate --cwd topcopy
@@ -210,12 +215,12 @@ hg init partial/b
210
215
echo "b" >partial/b/f
211
216
hg commit --cwd partial/a -A -m init -d "0 0"
212
217
hg commit --cwd partial/b -A -m init -d "0 0"
213
hg fclone partial partial-clone | sed "s@\(/private\)*$HGTMP@HGTMP@g"
218
hg fclone partial partial-clone | fixpath
214
219
rm -rf partial-clone/b
215
hg --cwd partial-clone fpull --partial 2>&1 | sed "s@\(/private\)*$HGTMP@HGTMP@g"
220
hg --cwd partial-clone fpull --partial 2>&1 | fixpath
216
221
echo "[forest]" >> partial-clone/.hg/hgrc
217
222
echo "partial = Yes" >> partial-clone/.hg/hgrc
218
hg --cwd partial-clone fpull 2>&1 | sed "s@\(/private\)*$HGTMP@HGTMP@g"
223
hg --cwd partial-clone fpull 2>&1 | fixpath
219
224
echo "[forest]" >> partial-clone/.hg/hgrc
220
225
echo "partial = No" >> partial-clone/.hg/hgrc
221
hg --cwd partial-clone fpull 2>&1 | sed "s@\(/private\)*$HGTMP@HGTMP@g"
226
hg --cwd partial-clone fpull 2>&1 | fixpath