##// END OF EJS Templates
tests: clean up two wayward `python` invocations...
Augie Fackler -
r36968:c18ae7a0 default
parent child Browse files
Show More
@@ -1,53 +1,53
1 1 Test attempting a narrow clone against a server that doesn't support narrowhg.
2 2
3 3 $ . "$TESTDIR/narrow-library.sh"
4 4
5 5 $ hg init master
6 6 $ cd master
7 7
8 8 $ for x in `$TESTDIR/seq.py 10`; do
9 9 > echo $x > "f$x"
10 10 > hg add "f$x"
11 11 > hg commit -m "Add $x"
12 12 > done
13 13
14 14 $ hg serve -a localhost -p $HGPORT1 --config extensions.narrow=! -d \
15 15 > --pid-file=hg.pid
16 16 $ cat hg.pid >> "$DAEMON_PIDS"
17 17 $ hg serve -a localhost -p $HGPORT2 -d --pid-file=hg.pid
18 18 $ cat hg.pid >> "$DAEMON_PIDS"
19 19
20 20 Verify that narrow is advertised in the bundle2 capabilities:
21 21 $ echo hello | hg -R . serve --stdio | \
22 > python -c "import sys, urllib; print urllib.unquote_plus(list(sys.stdin)[1])" | grep narrow
22 > $PYTHON -c "import sys, urllib; print urllib.unquote_plus(list(sys.stdin)[1])" | grep narrow
23 23 narrow=v0
24 24
25 25 $ cd ..
26 26
27 27 $ hg clone --narrow --include f1 http://localhost:$HGPORT1/ narrowclone
28 28 requesting all changes
29 29 abort: server doesn't support narrow clones
30 30 [255]
31 31
32 32 Make a narrow clone (via HGPORT2), then try to narrow and widen
33 33 into it (from HGPORT1) to prove that narrowing is fine and widening fails
34 34 gracefully:
35 35 $ hg clone -r 0 --narrow --include f1 http://localhost:$HGPORT2/ narrowclone
36 36 adding changesets
37 37 adding manifests
38 38 adding file changes
39 39 added 1 changesets with 1 changes to 1 files
40 40 new changesets * (glob)
41 41 updating to branch default
42 42 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
43 43 $ cd narrowclone
44 44 $ hg tracked --addexclude f2 http://localhost:$HGPORT1/
45 45 comparing with http://localhost:$HGPORT1/
46 46 searching for changes
47 47 looking for local changes to affected paths
48 48 $ hg tracked --addinclude f1 http://localhost:$HGPORT1/
49 49 comparing with http://localhost:$HGPORT1/
50 50 searching for changes
51 51 no changes found
52 52 abort: server doesn't support narrow clones
53 53 [255]
@@ -1,72 +1,72
1 1 test sparse
2 2
3 3 $ cat >> $HGRCPATH << EOF
4 4 > [ui]
5 > ssh = python "$RUNTESTDIR/dummyssh"
5 > ssh = $PYTHON "$RUNTESTDIR/dummyssh"
6 6 > username = nobody <no.reply@fb.com>
7 7 > [extensions]
8 8 > sparse=
9 9 > purge=
10 10 > strip=
11 11 > rebase=
12 12 > EOF
13 13
14 14 $ hg init myrepo
15 15 $ cd myrepo
16 16 $ echo a > index.html
17 17 $ echo x > data.py
18 18 $ echo z > readme.txt
19 19 $ cat > webpage.sparse <<EOF
20 20 > [include]
21 21 > *.html
22 22 > EOF
23 23 $ cat > backend.sparse <<EOF
24 24 > [include]
25 25 > *.py
26 26 > EOF
27 27 $ hg ci -Aqm 'initial'
28 28 $ cd ..
29 29
30 30 Verify local clone with a sparse profile works
31 31
32 32 $ hg clone --enable-profile webpage.sparse myrepo clone1
33 33 updating to branch default
34 34 warning: sparse profile 'webpage.sparse' not found in rev 000000000000 - ignoring it
35 35 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
36 36 $ cd clone1
37 37 $ ls
38 38 index.html
39 39 $ cd ..
40 40
41 41 Verify local clone with include works
42 42
43 43 $ hg clone --include *.sparse myrepo clone2
44 44 updating to branch default
45 45 2 files updated, 0 files merged, 0 files removed, 0 files unresolved
46 46 $ cd clone2
47 47 $ ls
48 48 backend.sparse
49 49 webpage.sparse
50 50 $ cd ..
51 51
52 52 Verify local clone with exclude works
53 53
54 54 $ hg clone --exclude data.py myrepo clone3
55 55 updating to branch default
56 56 4 files updated, 0 files merged, 0 files removed, 0 files unresolved
57 57 $ cd clone3
58 58 $ ls
59 59 backend.sparse
60 60 index.html
61 61 readme.txt
62 62 webpage.sparse
63 63 $ cd ..
64 64
65 65 Verify sparse clone profile over ssh works
66 66
67 67 $ hg clone -q --enable-profile webpage.sparse ssh://user@dummy/myrepo clone4
68 68 warning: sparse profile 'webpage.sparse' not found in rev 000000000000 - ignoring it
69 69 $ cd clone4
70 70 $ ls
71 71 index.html
72 72 $ cd ..
General Comments 0
You need to be logged in to leave comments. Login now