Show More
@@ -11,6 +11,7 b'' | |||||
11 | > sys.exit(0) |
|
11 | > sys.exit(0) | |
12 | > sys.exit(1) |
|
12 | > sys.exit(1) | |
13 | > EOF |
|
13 | > EOF | |
|
14 | ||||
14 | $ hg init a |
|
15 | $ hg init a | |
15 | $ cd a |
|
16 | $ cd a | |
16 | $ echo "Rev 1" >rev |
|
17 | $ echo "Rev 1" >rev | |
@@ -20,11 +21,17 b'' | |||||
20 | marked working directory as branch abranch |
|
21 | marked working directory as branch abranch | |
21 | $ echo "Rev 2" >rev |
|
22 | $ echo "Rev 2" >rev | |
22 | $ hg commit -m "With branch." |
|
23 | $ hg commit -m "With branch." | |
23 | $ if hg export 0 | python ../findbranch.py; then |
|
24 | ||
|
25 | $ hg export 0 > ../r0.patch | |||
|
26 | $ hg export 1 > ../r1.patch | |||
|
27 | $ cd .. | |||
|
28 | ||||
|
29 | $ if python findbranch.py < r0.patch; then | |||
24 | > echo "Export of default branch revision has Branch header" 1>&2 |
|
30 | > echo "Export of default branch revision has Branch header" 1>&2 | |
25 | > exit 1 |
|
31 | > exit 1 | |
26 | > fi |
|
32 | > fi | |
27 | $ if hg export 1 | python ../findbranch.py; then |
|
33 | ||
|
34 | $ if python findbranch.py < r1.patch; then | |||
28 | > : # Do nothing |
|
35 | > : # Do nothing | |
29 | > else |
|
36 | > else | |
30 | > echo "Export of branch revision is missing Branch header" 1>&2 |
|
37 | > echo "Export of branch revision is missing Branch header" 1>&2 | |
@@ -33,18 +40,17 b'' | |||||
33 |
|
40 | |||
34 | Make sure import still works with branch information in patches. |
|
41 | Make sure import still works with branch information in patches. | |
35 |
|
42 | |||
36 | $ cd .. |
|
|||
37 | $ hg init b |
|
43 | $ hg init b | |
38 | $ cd b |
|
44 | $ cd b | |
39 | $ hg -R ../a export 0 | hg import - |
|
45 | $ hg import ../r0.patch | |
40 |
applying |
|
46 | applying ../r0.patch | |
41 | $ hg -R ../a export 1 | hg import - |
|
47 | $ hg import ../r1.patch | |
42 |
applying |
|
48 | applying ../r1.patch | |
43 | $ cd .. |
|
49 | $ cd .. | |
44 | $ rm -rf b |
|
50 | ||
45 |
$ hg init |
|
51 | $ hg init c | |
46 |
$ cd |
|
52 | $ cd c | |
47 | $ hg -R ../a export 0 | hg import --exact - |
|
53 | $ hg import --exact ../r0.patch | |
48 |
applying |
|
54 | applying ../r0.patch | |
49 | $ hg -R ../a export 1 | hg import --exact - |
|
55 | $ hg import --exact ../r1.patch | |
50 |
applying |
|
56 | applying ../r1.patch |
General Comments 0
You need to be logged in to leave comments.
Login now