Show More
@@ -1,143 +1,107 b'' | |||||
1 |
|
1 | |||
2 | $ "$TESTDIR/hghave" darcs || exit 80 |
|
2 | $ "$TESTDIR/hghave" darcs || exit 80 | |
3 | $ echo "[extensions]" >> $HGRCPATH |
|
3 | $ echo "[extensions]" >> $HGRCPATH | |
4 | $ echo "convert=" >> $HGRCPATH |
|
4 | $ echo "convert=" >> $HGRCPATH | |
5 | $ echo 'graphlog =' >> $HGRCPATH |
|
5 | $ echo 'graphlog =' >> $HGRCPATH | |
6 | $ DARCS_EMAIL='test@example.org'; export DARCS_EMAIL |
|
6 | $ DARCS_EMAIL='test@example.org'; export DARCS_EMAIL | |
7 |
|
7 | |||
8 | skip if we can't import elementtree |
|
8 | skip if we can't import elementtree | |
9 |
|
9 | |||
10 | $ mkdir dummy |
|
10 | $ mkdir dummy | |
11 | $ mkdir dummy/_darcs |
|
11 | $ mkdir dummy/_darcs | |
12 | $ if hg convert dummy 2>&1 | grep ElementTree > /dev/null; then |
|
12 | $ if hg convert dummy 2>&1 | grep ElementTree > /dev/null; then | |
13 | > echo 'skipped: missing feature: elementtree module' |
|
13 | > echo 'skipped: missing feature: elementtree module' | |
14 | > exit 80 |
|
14 | > exit 80 | |
15 | > fi |
|
15 | > fi | |
16 |
|
16 | |||
17 | try converting darcs1 repository |
|
17 | try converting darcs1 repository | |
18 |
|
18 | |||
19 | $ hg clone -q "$TESTDIR/bundles/darcs1.hg" darcs |
|
19 | $ hg clone -q "$TESTDIR/bundles/darcs1.hg" darcs | |
20 | $ hg convert -s darcs darcs/darcs1 2>&1 | grep darcs-1.0 |
|
20 | $ hg convert -s darcs darcs/darcs1 2>&1 | grep darcs-1.0 | |
21 | darcs-1.0 repository format is unsupported, please upgrade |
|
21 | darcs-1.0 repository format is unsupported, please upgrade | |
22 |
|
22 | |||
23 | initialize darcs repo |
|
23 | initialize darcs repo | |
24 |
|
24 | |||
25 | $ mkdir darcs-repo |
|
25 | $ mkdir darcs-repo | |
26 | $ cd darcs-repo |
|
26 | $ cd darcs-repo | |
27 | $ darcs init |
|
27 | $ darcs init | |
28 | $ echo a > a |
|
28 | $ echo a > a | |
29 | $ darcs record -a -l -m p0 |
|
29 | $ darcs record -a -l -m p0 | |
30 | Finished recording patch 'p0' |
|
30 | Finished recording patch 'p0' | |
31 | $ cd .. |
|
31 | $ cd .. | |
32 |
|
32 | |||
33 | branch and update |
|
33 | branch and update | |
34 |
|
34 | |||
35 | $ darcs get darcs-repo darcs-clone >/dev/null |
|
35 | $ darcs get darcs-repo darcs-clone >/dev/null | |
36 | $ cd darcs-clone |
|
36 | $ cd darcs-clone | |
37 | $ echo c >> a |
|
37 | $ echo c >> a | |
38 | $ echo c > c |
|
38 | $ echo c > c | |
39 | $ darcs record -a -l -m p1.1 |
|
39 | $ darcs record -a -l -m p1.1 | |
40 | Finished recording patch 'p1.1' |
|
40 | Finished recording patch 'p1.1' | |
41 | $ cd .. |
|
41 | $ cd .. | |
42 |
|
42 | |||
43 | update source |
|
43 | update source | |
44 |
|
44 | |||
45 | $ cd darcs-repo |
|
45 | $ cd darcs-repo | |
46 | $ echo b >> a |
|
46 | $ echo b >> a | |
47 | $ echo b > b |
|
47 | $ echo b > b | |
48 | $ darcs record -a -l -m p1.2 |
|
48 | $ darcs record -a -l -m p1.2 | |
49 | Finished recording patch 'p1.2' |
|
49 | Finished recording patch 'p1.2' | |
50 |
|
50 | |||
51 | $ darcs pull -a ../darcs-clone |
|
51 | $ darcs pull -a --no-set-default ../darcs-clone | |
52 | Backing up ./a(-darcs-backup0) |
|
52 | Backing up ./a(-darcs-backup0) | |
53 | We have conflicts in the following files: |
|
53 | We have conflicts in the following files: | |
54 | ./a |
|
54 | ./a | |
55 | Finished pulling and applying. |
|
55 | Finished pulling and applying. | |
56 | $ sleep 1 |
|
56 | $ sleep 1 | |
57 | $ echo e > a |
|
57 | $ echo e > a | |
58 | $ echo f > f |
|
58 | $ echo f > f | |
59 | $ mkdir dir |
|
59 | $ mkdir dir | |
60 | $ echo d > dir/d |
|
60 | $ echo d > dir/d | |
61 | $ echo d > dir/d2 |
|
61 | $ echo d > dir/d2 | |
62 | $ darcs record -a -l -m p2 |
|
62 | $ darcs record -a -l -m p2 | |
63 | Finished recording patch 'p2' |
|
63 | Finished recording patch 'p2' | |
64 |
|
64 | |||
65 | test file and directory move |
|
65 | test file and directory move | |
66 |
|
66 | |||
67 | $ darcs mv f ff |
|
67 | $ darcs mv f ff | |
68 |
|
68 | |||
69 | Test remove + move |
|
69 | Test remove + move | |
70 |
|
70 | |||
71 | $ darcs remove dir/d2 |
|
71 | $ darcs remove dir/d2 | |
72 | $ rm dir/d2 |
|
72 | $ rm dir/d2 | |
73 | $ darcs mv dir dir2 |
|
73 | $ darcs mv dir dir2 | |
74 | $ darcs record -a -l -m p3 |
|
74 | $ darcs record -a -l -m p3 | |
75 | Finished recording patch 'p3' |
|
75 | Finished recording patch 'p3' | |
76 |
|
76 | |||
77 | test utf-8 commit message and author |
|
|||
78 |
|
||||
79 | $ echo g > g |
|
|||
80 |
|
||||
81 | darcs is encoding agnostic, so it takes whatever bytes it's given |
|
|||
82 |
|
||||
83 | $ darcs record -a -l -m 'p4: desc Γ±' -A 'author Γ±' |
|
|||
84 | Finished recording patch 'p4: desc \xc3\xb1' (esc) |
|
|||
85 |
|
||||
86 | Test latin-1 commit message |
|
|||
87 |
|
||||
88 | $ echo h > h |
|
|||
89 | $ printf "p5: desc " > ../p5 |
|
|||
90 | $ python -c 'print "".join([chr(i) for i in range(128, 256)])' >> ../p5 |
|
|||
91 | $ darcs record -a -l --logfile ../p5 |
|
|||
92 | Finished recording patch 'p5: desc \x80\x81\x82\x83\x84\x85\x86\x87\x88\x89\x8a\x8b\x8c\x8d\x8e\x8f\x90\x91\x92\x93\x94\x95\x96\x97\x98\x99\x9a\x9b\x9c\x9d\x9e\x9f\xa0\xa1\xa2\xa3\xa4\xa5\xa6\xa7\xa8\xa9\xaa\xab\xac\xad\xae\xaf\xb0\xb1\xb2\xb3\xb4\xb5\xb6\xb7\xb8\xb9\xba\xbb\xbc\xbd\xbe\xbf\xc0\xc1\xc2\xc3\xc4\xc5\xc6\xc7\xc8\xc9\xca\xcb\xcc\xcd\xce\xcf\xd0\xd1\xd2\xd3\xd4\xd5\xd6\xd7\xd8\xd9\xda\xdb\xdc\xdd\xde\xdf\xe0\xe1\xe2\xe3\xe4\xe5\xe6\xe7\xe8\xe9\xea\xeb\xec\xed\xee\xef\xf0\xf1\xf2\xf3\xf4\xf5\xf6\xf7\xf8\xf9\xfa\xfb\xfc\xfd\xfe\xff' (esc) |
|
|||
93 |
|
||||
94 | $ glog() |
|
|||
95 | > { |
|
|||
96 | > HGENCODING=utf-8 hg glog --template '{rev} "{desc|firstline}" ({author}) files: {files}\n' "$@" |
|
|||
97 | > } |
|
|||
98 | $ cd .. |
|
|||
99 | $ hg convert darcs-repo darcs-repo-hg |
|
|||
100 | initializing destination darcs-repo-hg repository |
|
|||
101 | scanning source... |
|
|||
102 | sorting... |
|
|||
103 | converting... |
|
|||
104 | 6 p0 |
|
|||
105 | 5 p1.2 |
|
|||
106 | 4 p1.1 |
|
|||
107 | 3 p2 |
|
|||
108 | 2 p3 |
|
|||
109 | 1 p4: desc ? |
|
|||
110 | 0 p5: desc ???????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????? |
|
|||
111 |
|
||||
112 | The converter does not currently handle patch conflicts very well. |
|
77 | The converter does not currently handle patch conflicts very well. | |
113 | When they occur, it reverts *all* changes and moves forward, |
|
78 | When they occur, it reverts *all* changes and moves forward, | |
114 | letting the conflict resolving patch fix collisions. |
|
79 | letting the conflict resolving patch fix collisions. | |
115 | Unfortunately, non-conflicting changes, like the addition of the |
|
80 | Unfortunately, non-conflicting changes, like the addition of the | |
116 | "c" file in p1.1 patch are reverted too. |
|
81 | "c" file in p1.1 patch are reverted too. | |
117 | Just to say that manifest not listing "c" here is a bug. |
|
82 | Just to say that manifest not listing "c" here is a bug. | |
118 |
|
83 | |||
119 | $ HGENCODING=latin-1 glog -R darcs-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(esc) |
|
85 | $ hg convert darcs-repo darcs-repo-hg | |
121 | | |
|
86 | initializing destination darcs-repo-hg repository | |
122 | $ HGENCODING=utf-8 glog -R darcs-repo-hg -r 0:5 |
|
87 | scanning source... | |
123 | o 5 "p4: desc \xc3\xb1" (author \xc3\xb1) files: g (esc) |
|
88 | sorting... | |
124 | | |
|
89 | converting... | |
125 | o 4 "p3" (test@example.org) files: dir/d dir/d2 dir2/d f ff |
|
90 | 4 p0 | |
126 | | |
|
91 | 3 p1.2 | |
127 | o 3 "p2" (test@example.org) files: a dir/d dir/d2 f |
|
92 | 2 p1.1 | |
128 | | |
|
93 | 1 p2 | |
129 | o 2 "p1.1" (test@example.org) files: |
|
94 | 0 p3 | |
130 | | |
|
95 | $ hg log -R darcs-repo-hg -g --template '{rev} "{desc|firstline}" ({author}) files: {files}\n' "$@" | |
131 |
|
|
96 | 4 "p3" (test@example.org) files: dir/d dir/d2 dir2/d f ff | |
132 | | |
|
97 | 3 "p2" (test@example.org) files: a dir/d dir/d2 f | |
133 |
|
|
98 | 2 "p1.1" (test@example.org) files: | |
134 |
|
99 | 1 "p1.2" (test@example.org) files: a b | ||
|
100 | 0 "p0" (test@example.org) files: a | |||
135 |
|
101 | |||
136 | $ hg up -q -R darcs-repo-hg |
|
102 | $ hg up -q -R darcs-repo-hg | |
137 | $ hg -R darcs-repo-hg manifest --debug |
|
103 | $ hg -R darcs-repo-hg manifest --debug | |
138 | 7225b30cdf38257d5cc7780772c051b6f33e6d6b 644 a |
|
104 | 7225b30cdf38257d5cc7780772c051b6f33e6d6b 644 a | |
139 | 1e88685f5ddec574a34c70af492f95b6debc8741 644 b |
|
105 | 1e88685f5ddec574a34c70af492f95b6debc8741 644 b | |
140 | 37406831adc447ec2385014019599dfec953c806 644 dir2/d |
|
106 | 37406831adc447ec2385014019599dfec953c806 644 dir2/d | |
141 | b783a337463792a5c7d548ad85a7d3253c16ba8c 644 ff |
|
107 | b783a337463792a5c7d548ad85a7d3253c16ba8c 644 ff | |
142 | 0973eb1b2ecc4de7fafe7447ce1b7462108b4848 644 g |
|
|||
143 | fe6f8b4f507fe3eb524c527192a84920a4288dac 644 h |
|
General Comments 0
You need to be logged in to leave comments.
Login now