##// END OF EJS Templates
tests: unify test-export
Adrian Buehlmann -
r12034:3bfd425f default
parent child Browse files
Show More
@@ -1,23 +1,110 b''
1 #!/bin/sh
2
3 hg init repo
4 cd repo
5 touch foo
6 hg add foo
7 for i in 0 1 2 3 4 5 6 7 8 9 10 11; do
8 echo "foo-$i" >> foo
9 hg ci -m "foo-$i"
10 done
1 $ hg init repo
2 $ cd repo
3 $ touch foo
4 $ hg add foo
5 $ for i in 0 1 2 3 4 5 6 7 8 9 10 11; do
6 > echo "foo-$i" >> foo
7 > hg ci -m "foo-$i"
8 > done
11 9
12 for out in "%nof%N" "%%%H" "%b-%R" "%h" "%r"; do
13 echo "# foo-$out.patch"
14 hg export -v -o "foo-$out.patch" 2:tip
15 done
10 $ for out in "%nof%N" "%%%H" "%b-%R" "%h" "%r"; do
11 > echo
12 > echo "# foo-$out.patch"
13 > hg export -v -o "foo-$out.patch" 2:tip
14 > done
15
16 # foo-%nof%N.patch
17 exporting patches:
18 foo-01of10.patch
19 foo-02of10.patch
20 foo-03of10.patch
21 foo-04of10.patch
22 foo-05of10.patch
23 foo-06of10.patch
24 foo-07of10.patch
25 foo-08of10.patch
26 foo-09of10.patch
27 foo-10of10.patch
28
29 # foo-%%%H.patch
30 exporting patches:
31 foo-%617188a1c80f869a7b66c85134da88a6fb145f67.patch
32 foo-%dd41a5ff707a5225204105611ba49cc5c229d55f.patch
33 foo-%f95a5410f8664b6e1490a4af654e4b7d41a7b321.patch
34 foo-%4346bcfde53b4d9042489078bcfa9c3e28201db2.patch
35 foo-%afda8c3a009cc99449a05ad8aa4655648c4ecd34.patch
36 foo-%35284ce2b6b99c9d2ac66268fe99e68e1974e1aa.patch
37 foo-%9688c41894e6931305fa7165a37f6568050b4e9b.patch
38 foo-%747d3c68f8ec44bb35816bfcd59aeb50b9654c2f.patch
39 foo-%5f17a83f5fbd9414006a5e563eab4c8a00729efd.patch
40 foo-%f3acbafac161ec68f1598af38f794f28847ca5d3.patch
41
42 # foo-%b-%R.patch
43 exporting patches:
44 foo-repo-2.patch
45 foo-repo-3.patch
46 foo-repo-4.patch
47 foo-repo-5.patch
48 foo-repo-6.patch
49 foo-repo-7.patch
50 foo-repo-8.patch
51 foo-repo-9.patch
52 foo-repo-10.patch
53 foo-repo-11.patch
54
55 # foo-%h.patch
56 exporting patches:
57 foo-617188a1c80f.patch
58 foo-dd41a5ff707a.patch
59 foo-f95a5410f866.patch
60 foo-4346bcfde53b.patch
61 foo-afda8c3a009c.patch
62 foo-35284ce2b6b9.patch
63 foo-9688c41894e6.patch
64 foo-747d3c68f8ec.patch
65 foo-5f17a83f5fbd.patch
66 foo-f3acbafac161.patch
67
68 # foo-%r.patch
69 exporting patches:
70 foo-02.patch
71 foo-03.patch
72 foo-04.patch
73 foo-05.patch
74 foo-06.patch
75 foo-07.patch
76 foo-08.patch
77 foo-09.patch
78 foo-10.patch
79 foo-11.patch
16 80
17 echo "# exporting 4 changesets to a file"
18 hg export -o export_internal 1 2 3 4
19 grep HG export_internal | wc -l | sed -e 's/^ *//'
20 echo "# exporting 4 changesets to a file"
21 hg export 1 2 3 4 | grep HG | wc -l | sed -e 's/^ *//'
22 echo "# exporting revision -2 to a file"
23 hg export -- -2
81 Exporting 4 changesets to a file:
82
83 $ hg export -o export_internal 1 2 3 4
84 $ grep HG export_internal | wc -l | sed -e 's/^ *//'
85 4
86
87 Exporting 4 changesets to a file:
88
89 $ hg export 1 2 3 4 | grep HG | wc -l | sed -e 's/^ *//'
90 4
91
92 Exporting revision -2 to a file:
93
94 $ hg export -- -2
95 # HG changeset patch
96 # User test
97 # Date 0 0
98 # Node ID 5f17a83f5fbd9414006a5e563eab4c8a00729efd
99 # Parent 747d3c68f8ec44bb35816bfcd59aeb50b9654c2f
100 foo-10
101
102 diff -r 747d3c68f8ec -r 5f17a83f5fbd foo
103 --- a/foo Thu Jan 01 00:00:00 1970 +0000
104 +++ b/foo Thu Jan 01 00:00:00 1970 +0000
105 @@ -8,3 +8,4 @@
106 foo-7
107 foo-8
108 foo-9
109 +foo-10
110
1 NO CONTENT: file was removed
General Comments 0
You need to be logged in to leave comments. Login now