##// END OF EJS Templates
test-convert-darcs: don't let $HOME/.darcs pollute the test environment
Bryan O'Sullivan -
r5442:a1916700 default
parent child Browse files
Show More
@@ -1,52 +1,53
1 #!/bin/sh
1 #!/bin/sh
2
2
3 "$TESTDIR/hghave" darcs || exit 80
3 "$TESTDIR/hghave" darcs || exit 80
4
4
5 echo "[extensions]" >> $HGRCPATH
5 echo "[extensions]" >> $HGRCPATH
6 echo "convert=" >> $HGRCPATH
6 echo "convert=" >> $HGRCPATH
7 echo 'hgext.graphlog =' >> $HGRCPATH
7 echo 'hgext.graphlog =' >> $HGRCPATH
8
8
9 DARCS_EMAIL='test@example.org'; export DARCS_EMAIL
9 DARCS_EMAIL='test@example.org'; export DARCS_EMAIL
10 HOME=do_not_use_HOME_darcs; export HOME
10
11
11 echo % initialize darcs repo
12 echo % initialize darcs repo
12 mkdir darcs-repo
13 mkdir darcs-repo
13 cd darcs-repo
14 cd darcs-repo
14 darcs init
15 darcs init
15 echo a > a
16 echo a > a
16 darcs record -a -l -m p0
17 darcs record -a -l -m p0
17 cd ..
18 cd ..
18
19
19 echo % branch and update
20 echo % branch and update
20 darcs get darcs-repo darcs-clone
21 darcs get darcs-repo darcs-clone
21 cd darcs-clone
22 cd darcs-clone
22 echo c >> a
23 echo c >> a
23 echo c > c
24 echo c > c
24 darcs record -a -l -m p1.1
25 darcs record -a -l -m p1.1
25 cd ..
26 cd ..
26
27
27 echo % update source
28 echo % update source
28 cd darcs-repo
29 cd darcs-repo
29 echo b >> a
30 echo b >> a
30 echo b > b
31 echo b > b
31 darcs record -a -l -m p1.2
32 darcs record -a -l -m p1.2
32
33
33 echo % merge branch
34 echo % merge branch
34 darcs pull -a ../darcs-clone
35 darcs pull -a ../darcs-clone
35 echo e > a
36 echo e > a
36 darcs record -a -l -m p2
37 darcs record -a -l -m p2
37 cd ..
38 cd ..
38
39
39 glog()
40 glog()
40 {
41 {
41 hg glog --template '#rev# "#desc|firstline#" files: #files#\n' "$@"
42 hg glog --template '#rev# "#desc|firstline#" files: #files#\n' "$@"
42 }
43 }
43
44
44 hg convert darcs-repo darcs-repo-hg
45 hg convert darcs-repo darcs-repo-hg
45 # The converter does not currently handle patch conflicts very well.
46 # The converter does not currently handle patch conflicts very well.
46 # When they occur, it reverts *all* changes and moves forward,
47 # When they occur, it reverts *all* changes and moves forward,
47 # letting the conflict resolving patch fix collisions.
48 # letting the conflict resolving patch fix collisions.
48 # Unfortunately, non-conflicting changes, like the addition of the
49 # Unfortunately, non-conflicting changes, like the addition of the
49 # "c" file in p1.1 patch are reverted too.
50 # "c" file in p1.1 patch are reverted too.
50 # Just to say that manifest not listing "c" here is a bug.
51 # Just to say that manifest not listing "c" here is a bug.
51 glog -R darcs-repo-hg
52 glog -R darcs-repo-hg
52 hg -R darcs-repo-hg manifest --debug
53 hg -R darcs-repo-hg manifest --debug
General Comments 0
You need to be logged in to leave comments. Login now