Show More
@@ -1,72 +1,73 | |||
|
1 | 1 | #!/bin/sh |
|
2 | 2 | |
|
3 | 3 | "$TESTDIR/hghave" baz || exit 80 |
|
4 | 4 | |
|
5 | 5 | mkdir do_not_use_HOME_baz |
|
6 | 6 | cd do_not_use_HOME_baz |
|
7 | 7 | HOME=`pwd`; export HOME |
|
8 | 8 | cd .. |
|
9 | 9 | baz my-id "mercurial <mercurial@selenic.com>" |
|
10 | 10 | |
|
11 | 11 | echo "[extensions]" >> $HGRCPATH |
|
12 | 12 | echo "convert=" >> $HGRCPATH |
|
13 | 13 | echo 'hgext.graphlog =' >> $HGRCPATH |
|
14 | 14 | |
|
15 | 15 | echo % create baz archive |
|
16 | 16 | baz make-archive baz@mercurial--convert hg-test-convert-baz |
|
17 | 17 | |
|
18 | 18 | echo % initialize baz repo |
|
19 | 19 | mkdir baz-repo |
|
20 | 20 | cd baz-repo/ |
|
21 | 21 | baz init-tree baz@mercurial--convert/baz--test--0 |
|
22 | 22 | baz import |
|
23 | 23 | |
|
24 | 24 | echo % create initial files |
|
25 | 25 | echo 'this is a file' > a |
|
26 | 26 | baz add a |
|
27 | 27 | mkdir src |
|
28 | 28 | baz add src |
|
29 | 29 | cd src |
|
30 | 30 | dd count=1 if=/dev/zero of=b > /dev/null 2> /dev/null |
|
31 | 31 | baz add b |
|
32 | 32 | baz commit -s "added a file, src and src/b (binary)" |
|
33 | 33 | |
|
34 | 34 | echo % create link file and modify a |
|
35 | 35 | ln -s ../a a-link |
|
36 | 36 | baz add a-link |
|
37 | 37 | echo 'this a modification to a' >> ../a |
|
38 | 38 | baz commit -s "added link to a and modify a" |
|
39 | 39 | |
|
40 | 40 | echo % create second link and modify b |
|
41 | 41 | ln -s ../a a-link-2 |
|
42 | 42 | baz add a-link-2 |
|
43 | 43 | dd count=1 seek=1 if=/dev/zero of=b > /dev/null 2> /dev/null |
|
44 | 44 | baz commit -s "added second link and modify b" |
|
45 | 45 | |
|
46 | 46 | echo % b file to link and a-link-2 to regular file |
|
47 | 47 | rm -f a-link-2 |
|
48 | 48 | echo 'this is now a regular file' > a-link-2 |
|
49 | 49 | ln -sf ../a b |
|
50 | 50 | baz commit -s "file to link and link to file test" |
|
51 | 51 | |
|
52 | 52 | echo % move a-link-2 file and src directory |
|
53 | 53 | cd .. |
|
54 | 54 | baz mv src/a-link-2 c |
|
55 | 55 | baz mv src test |
|
56 | 56 | baz commit -s "move and rename a-link-2 file and src directory" |
|
57 | 57 | |
|
58 | 58 | cd .. |
|
59 | 59 | |
|
60 | 60 | echo % converting baz repo to Mercurial |
|
61 | 61 | hg convert baz-repo baz-repo-hg |
|
62 | 62 | |
|
63 | 63 | baz register-archive -d baz@mercurial--convert |
|
64 | 64 | |
|
65 | 65 | glog() |
|
66 | 66 | { |
|
67 | 67 | hg glog --template '#rev# "#desc|firstline#" files: #files#\n' "$@" |
|
68 | 68 | } |
|
69 | 69 | |
|
70 | 70 | echo % show graph log |
|
71 | 71 | glog -R baz-repo-hg |
|
72 | hg up -q -R baz-repo-hg | |
|
72 | 73 | hg -R baz-repo-hg manifest --debug |
@@ -1,61 +1,62 | |||
|
1 | 1 | #!/bin/sh |
|
2 | 2 | |
|
3 | 3 | "$TESTDIR/hghave" darcs || exit 80 |
|
4 | 4 | |
|
5 | 5 | echo "[extensions]" >> $HGRCPATH |
|
6 | 6 | echo "convert=" >> $HGRCPATH |
|
7 | 7 | echo 'hgext.graphlog =' >> $HGRCPATH |
|
8 | 8 | |
|
9 | 9 | DARCS_EMAIL='test@example.org'; export DARCS_EMAIL |
|
10 | 10 | HOME=do_not_use_HOME_darcs; export HOME |
|
11 | 11 | |
|
12 | 12 | # skip if we can't import elementtree |
|
13 | 13 | mkdir dummy |
|
14 | 14 | mkdir dummy/_darcs |
|
15 | 15 | if hg convert dummy 2>&1 | grep ElementTree > /dev/null; then |
|
16 | 16 | echo 'skipped: missing feature: elementtree module' |
|
17 | 17 | exit 80 |
|
18 | 18 | fi |
|
19 | 19 | |
|
20 | 20 | echo % initialize darcs repo |
|
21 | 21 | mkdir darcs-repo |
|
22 | 22 | cd darcs-repo |
|
23 | 23 | darcs init |
|
24 | 24 | echo a > a |
|
25 | 25 | darcs record -a -l -m p0 |
|
26 | 26 | cd .. |
|
27 | 27 | |
|
28 | 28 | echo % branch and update |
|
29 | 29 | darcs get darcs-repo darcs-clone >/dev/null |
|
30 | 30 | cd darcs-clone |
|
31 | 31 | echo c >> a |
|
32 | 32 | echo c > c |
|
33 | 33 | darcs record -a -l -m p1.1 |
|
34 | 34 | cd .. |
|
35 | 35 | |
|
36 | 36 | echo % update source |
|
37 | 37 | cd darcs-repo |
|
38 | 38 | echo b >> a |
|
39 | 39 | echo b > b |
|
40 | 40 | darcs record -a -l -m p1.2 |
|
41 | 41 | |
|
42 | 42 | echo % merge branch |
|
43 | 43 | darcs pull -a ../darcs-clone |
|
44 | 44 | echo e > a |
|
45 | 45 | darcs record -a -l -m p2 |
|
46 | 46 | cd .. |
|
47 | 47 | |
|
48 | 48 | glog() |
|
49 | 49 | { |
|
50 | 50 | hg glog --template '#rev# "#desc|firstline#" files: #files#\n' "$@" |
|
51 | 51 | } |
|
52 | 52 | |
|
53 | 53 | hg convert darcs-repo darcs-repo-hg 2>&1 | grep -v hGetLine | grep -v '^$' |
|
54 | 54 | # The converter does not currently handle patch conflicts very well. |
|
55 | 55 | # When they occur, it reverts *all* changes and moves forward, |
|
56 | 56 | # letting the conflict resolving patch fix collisions. |
|
57 | 57 | # Unfortunately, non-conflicting changes, like the addition of the |
|
58 | 58 | # "c" file in p1.1 patch are reverted too. |
|
59 | 59 | # Just to say that manifest not listing "c" here is a bug. |
|
60 | 60 | glog -R darcs-repo-hg |
|
61 | hg up -q -R darcs-repo-hg | |
|
61 | 62 | hg -R darcs-repo-hg manifest --debug |
@@ -1,72 +1,73 | |||
|
1 | 1 | #!/bin/sh |
|
2 | 2 | |
|
3 | 3 | "$TESTDIR/hghave" tla || exit 80 |
|
4 | 4 | |
|
5 | 5 | mkdir do_not_use_HOME_tla |
|
6 | 6 | cd do_not_use_HOME_tla |
|
7 | 7 | HOME=`pwd`; export HOME |
|
8 | 8 | cd .. |
|
9 | 9 | tla my-id "mercurial <mercurial@selenic.com>" |
|
10 | 10 | |
|
11 | 11 | echo "[extensions]" >> $HGRCPATH |
|
12 | 12 | echo "convert=" >> $HGRCPATH |
|
13 | 13 | echo 'hgext.graphlog =' >> $HGRCPATH |
|
14 | 14 | |
|
15 | 15 | echo % create tla archive |
|
16 | 16 | tla make-archive tla@mercurial--convert `pwd`/hg-test-convert-tla |
|
17 | 17 | |
|
18 | 18 | echo % initialize tla repo |
|
19 | 19 | mkdir tla-repo |
|
20 | 20 | cd tla-repo/ |
|
21 | 21 | tla init-tree tla@mercurial--convert/tla--test--0 |
|
22 | 22 | tla import |
|
23 | 23 | |
|
24 | 24 | echo % create initial files |
|
25 | 25 | echo 'this is a file' > a |
|
26 | 26 | tla add a |
|
27 | 27 | mkdir src |
|
28 | 28 | tla add src |
|
29 | 29 | cd src |
|
30 | 30 | dd count=1 if=/dev/zero of=b > /dev/null 2> /dev/null |
|
31 | 31 | tla add b |
|
32 | 32 | tla commit -s "added a file, src and src/b (binary)" |
|
33 | 33 | |
|
34 | 34 | echo % create link file and modify a |
|
35 | 35 | ln -s ../a a-link |
|
36 | 36 | tla add a-link |
|
37 | 37 | echo 'this a modification to a' >> ../a |
|
38 | 38 | tla commit -s "added link to a and modify a" |
|
39 | 39 | |
|
40 | 40 | echo % create second link and modify b |
|
41 | 41 | ln -s ../a a-link-2 |
|
42 | 42 | tla add a-link-2 |
|
43 | 43 | dd count=1 seek=1 if=/dev/zero of=b > /dev/null 2> /dev/null |
|
44 | 44 | tla commit -s "added second link and modify b" |
|
45 | 45 | |
|
46 | 46 | echo % b file to link and a-link-2 to regular file |
|
47 | 47 | rm -f a-link-2 |
|
48 | 48 | echo 'this is now a regular file' > a-link-2 |
|
49 | 49 | ln -sf ../a b |
|
50 | 50 | tla commit -s "file to link and link to file test" |
|
51 | 51 | |
|
52 | 52 | echo % move a-link-2 file and src directory |
|
53 | 53 | cd .. |
|
54 | 54 | tla mv src/a-link-2 c |
|
55 | 55 | tla mv src test |
|
56 | 56 | tla commit -s "move and rename a-link-2 file and src directory" |
|
57 | 57 | |
|
58 | 58 | cd .. |
|
59 | 59 | |
|
60 | 60 | echo % converting tla repo to Mercurial |
|
61 | 61 | hg convert tla-repo tla-repo-hg |
|
62 | 62 | |
|
63 | 63 | tla register-archive -d tla@mercurial--convert |
|
64 | 64 | |
|
65 | 65 | glog() |
|
66 | 66 | { |
|
67 | 67 | hg glog --template '#rev# "#desc|firstline#" files: #files#\n' "$@" |
|
68 | 68 | } |
|
69 | 69 | |
|
70 | 70 | echo % show graph log |
|
71 | 71 | glog -R tla-repo-hg |
|
72 | hg up -q -R tla-repo-hg | |
|
72 | 73 | hg -R tla-repo-hg manifest --debug |
General Comments 0
You need to be logged in to leave comments.
Login now