Show More
@@ -1,107 +1,108 b'' | |||||
1 | #require darcs |
|
1 | #require darcs | |
2 |
|
2 | |||
3 | $ echo "[extensions]" >> $HGRCPATH |
|
3 | $ echo "[extensions]" >> $HGRCPATH | |
4 | $ echo "convert=" >> $HGRCPATH |
|
4 | $ echo "convert=" >> $HGRCPATH | |
5 | $ DARCS_EMAIL='test@example.org'; export DARCS_EMAIL |
|
5 | $ DARCS_EMAIL='test@example.org'; export DARCS_EMAIL | |
6 |
|
6 | |||
7 | initialize darcs repo |
|
7 | initialize darcs repo | |
8 |
|
8 | |||
9 | $ mkdir darcs-repo |
|
9 | $ mkdir darcs-repo | |
10 | $ cd darcs-repo |
|
10 | $ cd darcs-repo | |
11 | $ darcs init |
|
11 | $ darcs init -q | |
12 | $ echo a > a |
|
12 | $ echo a > a | |
13 | $ darcs record -a -l -m p0 |
|
13 | $ darcs record -a -l -m p0 | |
14 | Finished recording patch 'p0' |
|
14 | Finished recording patch 'p0' | |
15 | $ cd .. |
|
15 | $ cd .. | |
16 |
|
16 | |||
17 | branch and update |
|
17 | branch and update | |
18 |
|
18 | |||
19 | $ darcs get -q darcs-repo darcs-clone >/dev/null |
|
19 | $ darcs get -q darcs-repo darcs-clone >/dev/null | |
20 | $ cd darcs-clone |
|
20 | $ cd darcs-clone | |
21 | $ echo c >> a |
|
21 | $ echo c >> a | |
22 | $ echo c > c |
|
22 | $ echo c > c | |
23 | $ darcs record -a -l -m p1.1 |
|
23 | $ darcs record -a -l -m p1.1 | |
24 | Finished recording patch 'p1.1' |
|
24 | Finished recording patch 'p1.1' | |
25 | $ cd .. |
|
25 | $ cd .. | |
26 |
|
26 | |||
27 | skip if we can't import elementtree |
|
27 | skip if we can't import elementtree | |
28 |
|
28 | |||
29 | $ if hg convert darcs-repo darcs-dummy 2>&1 | grep ElementTree > /dev/null; then |
|
29 | $ if hg convert darcs-repo darcs-dummy 2>&1 | grep ElementTree > /dev/null; then | |
30 | > echo 'skipped: missing feature: elementtree module' |
|
30 | > echo 'skipped: missing feature: elementtree module' | |
31 | > exit 80 |
|
31 | > exit 80 | |
32 | > fi |
|
32 | > fi | |
33 |
|
33 | |||
34 | update source |
|
34 | update source | |
35 |
|
35 | |||
36 | $ cd darcs-repo |
|
36 | $ cd darcs-repo | |
37 | $ echo b >> a |
|
37 | $ echo b >> a | |
38 | $ echo b > b |
|
38 | $ echo b > b | |
39 | $ darcs record -a -l -m p1.2 |
|
39 | $ darcs record -a -l -m p1.2 | |
40 | Finished recording patch 'p1.2' |
|
40 | Finished recording patch 'p1.2' | |
41 |
|
41 | |||
42 | $ darcs pull -q -a --no-set-default ../darcs-clone |
|
42 | $ darcs pull -q -a --no-set-default ../darcs-clone | |
43 | Backing up ./a(*) (glob) |
|
43 | Backing up ./a(*) (glob) | |
44 | We have conflicts in the following files: |
|
44 | We have conflicts in the following files: | |
45 | ./a |
|
45 | ./a | |
|
46 | (?) | |||
46 | $ sleep 1 |
|
47 | $ sleep 1 | |
47 | $ echo e > a |
|
48 | $ echo e > a | |
48 | $ echo f > f |
|
49 | $ echo f > f | |
49 | $ mkdir dir |
|
50 | $ mkdir dir | |
50 | $ echo d > dir/d |
|
51 | $ echo d > dir/d | |
51 | $ echo d > dir/d2 |
|
52 | $ echo d > dir/d2 | |
52 | $ darcs record -a -l -m p2 |
|
53 | $ darcs record -a -l -m p2 | |
53 | Finished recording patch 'p2' |
|
54 | Finished recording patch 'p2' | |
54 |
|
55 | |||
55 | test file and directory move |
|
56 | test file and directory move | |
56 |
|
57 | |||
57 | $ darcs mv f ff |
|
58 | $ darcs mv -q f ff | |
58 |
|
59 | |||
59 | Test remove + move |
|
60 | Test remove + move | |
60 |
|
61 | |||
61 | $ darcs remove dir/d2 |
|
62 | $ darcs remove -q dir/d2 | |
62 | $ rm dir/d2 |
|
63 | $ rm dir/d2 | |
63 | $ darcs mv dir dir2 |
|
64 | $ darcs mv -q dir dir2 | |
64 | $ darcs record -a -l -m p3 |
|
65 | $ darcs record -a -l -m p3 | |
65 | Finished recording patch 'p3' |
|
66 | Finished recording patch 'p3' | |
66 |
|
67 | |||
67 | The converter does not currently handle patch conflicts very well. |
|
68 | The converter does not currently handle patch conflicts very well. | |
68 | When they occur, it reverts *all* changes and moves forward, |
|
69 | When they occur, it reverts *all* changes and moves forward, | |
69 | letting the conflict resolving patch fix collisions. |
|
70 | letting the conflict resolving patch fix collisions. | |
70 | Unfortunately, non-conflicting changes, like the addition of the |
|
71 | Unfortunately, non-conflicting changes, like the addition of the | |
71 | "c" file in p1.1 patch are reverted too. |
|
72 | "c" file in p1.1 patch are reverted too. | |
72 | Just to say that manifest not listing "c" here is a bug. |
|
73 | Just to say that manifest not listing "c" here is a bug. | |
73 |
|
74 | |||
74 | $ cd .. |
|
75 | $ cd .. | |
75 | $ hg convert darcs-repo darcs-repo-hg |
|
76 | $ hg convert darcs-repo darcs-repo-hg | |
76 | initializing destination darcs-repo-hg repository |
|
77 | initializing destination darcs-repo-hg repository | |
77 | scanning source... |
|
78 | scanning source... | |
78 | sorting... |
|
79 | sorting... | |
79 | converting... |
|
80 | converting... | |
80 | 4 p0 |
|
81 | 4 p0 | |
81 | 3 p1.2 |
|
82 | 3 p1.2 | |
82 | 2 p1.1 |
|
83 | 2 p1.1 | |
83 | 1 p2 |
|
84 | 1 p2 | |
84 | 0 p3 |
|
85 | 0 p3 | |
85 | $ hg log -R darcs-repo-hg -g --template '{rev} "{desc|firstline}" ({author}) files: {files}\n' "$@" |
|
86 | $ hg log -R darcs-repo-hg -g --template '{rev} "{desc|firstline}" ({author}) files: {files}\n' "$@" | |
86 | 4 "p3" (test@example.org) files: dir/d dir/d2 dir2/d f ff |
|
87 | 4 "p3" (test@example.org) files: dir/d dir/d2 dir2/d f ff | |
87 | 3 "p2" (test@example.org) files: a dir/d dir/d2 f |
|
88 | 3 "p2" (test@example.org) files: a dir/d dir/d2 f | |
88 | 2 "p1.1" (test@example.org) files: |
|
89 | 2 "p1.1" (test@example.org) files: | |
89 | 1 "p1.2" (test@example.org) files: a b |
|
90 | 1 "p1.2" (test@example.org) files: a b | |
90 | 0 "p0" (test@example.org) files: a |
|
91 | 0 "p0" (test@example.org) files: a | |
91 |
|
92 | |||
92 | $ hg up -q -R darcs-repo-hg |
|
93 | $ hg up -q -R darcs-repo-hg | |
93 | $ hg -R darcs-repo-hg manifest --debug |
|
94 | $ hg -R darcs-repo-hg manifest --debug | |
94 | 7225b30cdf38257d5cc7780772c051b6f33e6d6b 644 a |
|
95 | 7225b30cdf38257d5cc7780772c051b6f33e6d6b 644 a | |
95 | 1e88685f5ddec574a34c70af492f95b6debc8741 644 b |
|
96 | 1e88685f5ddec574a34c70af492f95b6debc8741 644 b | |
96 | 37406831adc447ec2385014019599dfec953c806 644 dir2/d |
|
97 | 37406831adc447ec2385014019599dfec953c806 644 dir2/d | |
97 | b783a337463792a5c7d548ad85a7d3253c16ba8c 644 ff |
|
98 | b783a337463792a5c7d548ad85a7d3253c16ba8c 644 ff | |
98 |
|
99 | |||
99 | #if no-outer-repo |
|
100 | #if no-outer-repo | |
100 |
|
101 | |||
101 | try converting darcs1 repository |
|
102 | try converting darcs1 repository | |
102 |
|
103 | |||
103 | $ hg clone -q "$TESTDIR/bundles/darcs1.hg" darcs |
|
104 | $ hg clone -q "$TESTDIR/bundles/darcs1.hg" darcs | |
104 | $ hg convert -s darcs darcs/darcs1 2>&1 | grep darcs-1.0 |
|
105 | $ hg convert -s darcs darcs/darcs1 2>&1 | grep darcs-1.0 | |
105 | darcs-1.0 repository format is unsupported, please upgrade |
|
106 | darcs-1.0 repository format is unsupported, please upgrade | |
106 |
|
107 | |||
107 | #endif |
|
108 | #endif |
General Comments 0
You need to be logged in to leave comments.
Login now