Mercurial > hgsubversion
annotate tests/fixtures/replace_branch_with_branch.sh @ 587:c06f59441f8e
editor: fix replaced directory copies
Known failures:
- Replaced directories copy records are wrong in stupid mode
- Replaced files copy records are probably wrong in all modes
author | Patrick Mezard <pmezard@gmail.com> |
---|---|
date | Tue, 02 Mar 2010 17:06:06 +0100 |
parents | 44c56a7727c4 |
children | 2723152c8111 |
rev | line source |
---|---|
582
44c56a7727c4
editor: fix issamefile() and copy detection in replay mode
Patrick Mezard <pmezard@gmail.com>
parents:
diff
changeset
|
1 #!/bin/sh |
44c56a7727c4
editor: fix issamefile() and copy detection in replay mode
Patrick Mezard <pmezard@gmail.com>
parents:
diff
changeset
|
2 |
44c56a7727c4
editor: fix issamefile() and copy detection in replay mode
Patrick Mezard <pmezard@gmail.com>
parents:
diff
changeset
|
3 RSVN="`pwd`/rsvn.py" |
44c56a7727c4
editor: fix issamefile() and copy detection in replay mode
Patrick Mezard <pmezard@gmail.com>
parents:
diff
changeset
|
4 export PATH=/bin:/usr/bin |
44c56a7727c4
editor: fix issamefile() and copy detection in replay mode
Patrick Mezard <pmezard@gmail.com>
parents:
diff
changeset
|
5 mkdir temp |
44c56a7727c4
editor: fix issamefile() and copy detection in replay mode
Patrick Mezard <pmezard@gmail.com>
parents:
diff
changeset
|
6 cd temp |
44c56a7727c4
editor: fix issamefile() and copy detection in replay mode
Patrick Mezard <pmezard@gmail.com>
parents:
diff
changeset
|
7 |
44c56a7727c4
editor: fix issamefile() and copy detection in replay mode
Patrick Mezard <pmezard@gmail.com>
parents:
diff
changeset
|
8 svnadmin create repo |
44c56a7727c4
editor: fix issamefile() and copy detection in replay mode
Patrick Mezard <pmezard@gmail.com>
parents:
diff
changeset
|
9 svn co file://`pwd`/repo wc |
44c56a7727c4
editor: fix issamefile() and copy detection in replay mode
Patrick Mezard <pmezard@gmail.com>
parents:
diff
changeset
|
10 |
44c56a7727c4
editor: fix issamefile() and copy detection in replay mode
Patrick Mezard <pmezard@gmail.com>
parents:
diff
changeset
|
11 cd wc |
44c56a7727c4
editor: fix issamefile() and copy detection in replay mode
Patrick Mezard <pmezard@gmail.com>
parents:
diff
changeset
|
12 mkdir trunk branches |
44c56a7727c4
editor: fix issamefile() and copy detection in replay mode
Patrick Mezard <pmezard@gmail.com>
parents:
diff
changeset
|
13 cd trunk |
44c56a7727c4
editor: fix issamefile() and copy detection in replay mode
Patrick Mezard <pmezard@gmail.com>
parents:
diff
changeset
|
14 echo a > a |
44c56a7727c4
editor: fix issamefile() and copy detection in replay mode
Patrick Mezard <pmezard@gmail.com>
parents:
diff
changeset
|
15 cd .. |
44c56a7727c4
editor: fix issamefile() and copy detection in replay mode
Patrick Mezard <pmezard@gmail.com>
parents:
diff
changeset
|
16 svn add * |
44c56a7727c4
editor: fix issamefile() and copy detection in replay mode
Patrick Mezard <pmezard@gmail.com>
parents:
diff
changeset
|
17 svn ci -m 'initial' |
44c56a7727c4
editor: fix issamefile() and copy detection in replay mode
Patrick Mezard <pmezard@gmail.com>
parents:
diff
changeset
|
18 |
44c56a7727c4
editor: fix issamefile() and copy detection in replay mode
Patrick Mezard <pmezard@gmail.com>
parents:
diff
changeset
|
19 svn up |
44c56a7727c4
editor: fix issamefile() and copy detection in replay mode
Patrick Mezard <pmezard@gmail.com>
parents:
diff
changeset
|
20 svn cp trunk branches/branch1 |
44c56a7727c4
editor: fix issamefile() and copy detection in replay mode
Patrick Mezard <pmezard@gmail.com>
parents:
diff
changeset
|
21 svn ci -m 'branch1' |
44c56a7727c4
editor: fix issamefile() and copy detection in replay mode
Patrick Mezard <pmezard@gmail.com>
parents:
diff
changeset
|
22 svn up |
44c56a7727c4
editor: fix issamefile() and copy detection in replay mode
Patrick Mezard <pmezard@gmail.com>
parents:
diff
changeset
|
23 echo b > branches/branch1/b |
44c56a7727c4
editor: fix issamefile() and copy detection in replay mode
Patrick Mezard <pmezard@gmail.com>
parents:
diff
changeset
|
24 echo d > branches/branch1/d |
587
c06f59441f8e
editor: fix replaced directory copies
Patrick Mezard <pmezard@gmail.com>
parents:
582
diff
changeset
|
25 mkdir branches/branch1/dir |
c06f59441f8e
editor: fix replaced directory copies
Patrick Mezard <pmezard@gmail.com>
parents:
582
diff
changeset
|
26 echo e > branches/branch1/dir/e |
c06f59441f8e
editor: fix replaced directory copies
Patrick Mezard <pmezard@gmail.com>
parents:
582
diff
changeset
|
27 svn add branches/branch1/b branches/branch1/d branches/branch1/dir |
582
44c56a7727c4
editor: fix issamefile() and copy detection in replay mode
Patrick Mezard <pmezard@gmail.com>
parents:
diff
changeset
|
28 svn ci -m 'add b to branch1' |
44c56a7727c4
editor: fix issamefile() and copy detection in replay mode
Patrick Mezard <pmezard@gmail.com>
parents:
diff
changeset
|
29 svn cp trunk branches/branch2 |
44c56a7727c4
editor: fix issamefile() and copy detection in replay mode
Patrick Mezard <pmezard@gmail.com>
parents:
diff
changeset
|
30 svn ci -m 'branch2' |
44c56a7727c4
editor: fix issamefile() and copy detection in replay mode
Patrick Mezard <pmezard@gmail.com>
parents:
diff
changeset
|
31 svn up |
44c56a7727c4
editor: fix issamefile() and copy detection in replay mode
Patrick Mezard <pmezard@gmail.com>
parents:
diff
changeset
|
32 echo c > branches/branch2/c |
587
c06f59441f8e
editor: fix replaced directory copies
Patrick Mezard <pmezard@gmail.com>
parents:
582
diff
changeset
|
33 mkdir branches/branch2/dir |
c06f59441f8e
editor: fix replaced directory copies
Patrick Mezard <pmezard@gmail.com>
parents:
582
diff
changeset
|
34 echo e2 > branches/branch2/dir/e |
c06f59441f8e
editor: fix replaced directory copies
Patrick Mezard <pmezard@gmail.com>
parents:
582
diff
changeset
|
35 svn add branches/branch2/c branches/branch2/dir |
582
44c56a7727c4
editor: fix issamefile() and copy detection in replay mode
Patrick Mezard <pmezard@gmail.com>
parents:
diff
changeset
|
36 svn ci -m 'add c to branch2' |
44c56a7727c4
editor: fix issamefile() and copy detection in replay mode
Patrick Mezard <pmezard@gmail.com>
parents:
diff
changeset
|
37 svn up |
44c56a7727c4
editor: fix issamefile() and copy detection in replay mode
Patrick Mezard <pmezard@gmail.com>
parents:
diff
changeset
|
38 |
44c56a7727c4
editor: fix issamefile() and copy detection in replay mode
Patrick Mezard <pmezard@gmail.com>
parents:
diff
changeset
|
39 # Clobber branch1 with branch2 |
44c56a7727c4
editor: fix issamefile() and copy detection in replay mode
Patrick Mezard <pmezard@gmail.com>
parents:
diff
changeset
|
40 cd .. |
44c56a7727c4
editor: fix issamefile() and copy detection in replay mode
Patrick Mezard <pmezard@gmail.com>
parents:
diff
changeset
|
41 cat > clobber.rsvn <<EOF |
44c56a7727c4
editor: fix issamefile() and copy detection in replay mode
Patrick Mezard <pmezard@gmail.com>
parents:
diff
changeset
|
42 rdelete branches/branch1 |
44c56a7727c4
editor: fix issamefile() and copy detection in replay mode
Patrick Mezard <pmezard@gmail.com>
parents:
diff
changeset
|
43 rcopy branches/branch2 branches/branch1 |
44c56a7727c4
editor: fix issamefile() and copy detection in replay mode
Patrick Mezard <pmezard@gmail.com>
parents:
diff
changeset
|
44 rcopy branches/branch1/d branches/branch1/a |
587
c06f59441f8e
editor: fix replaced directory copies
Patrick Mezard <pmezard@gmail.com>
parents:
582
diff
changeset
|
45 rcopy branches/branch1/dir branches/branch1/dir |
c06f59441f8e
editor: fix replaced directory copies
Patrick Mezard <pmezard@gmail.com>
parents:
582
diff
changeset
|
46 rcopy branches/branch1/dir branches/branch1/dir2 |
582
44c56a7727c4
editor: fix issamefile() and copy detection in replay mode
Patrick Mezard <pmezard@gmail.com>
parents:
diff
changeset
|
47 EOF |
44c56a7727c4
editor: fix issamefile() and copy detection in replay mode
Patrick Mezard <pmezard@gmail.com>
parents:
diff
changeset
|
48 |
44c56a7727c4
editor: fix issamefile() and copy detection in replay mode
Patrick Mezard <pmezard@gmail.com>
parents:
diff
changeset
|
49 python $RSVN --message=blah --username=evil `pwd`/repo < clobber.rsvn |
44c56a7727c4
editor: fix issamefile() and copy detection in replay mode
Patrick Mezard <pmezard@gmail.com>
parents:
diff
changeset
|
50 |
44c56a7727c4
editor: fix issamefile() and copy detection in replay mode
Patrick Mezard <pmezard@gmail.com>
parents:
diff
changeset
|
51 svnadmin dump repo > ../replace_branch_with_branch.svndump |