Show More
@@ -1,67 +1,124 | |||
|
1 | #!/bin/sh | |
|
2 | 1 | |
|
3 | cat >> $HGRCPATH <<EOF | |
|
4 | [extensions] | |
|
5 | convert= | |
|
6 | [convert] | |
|
7 | hg.saverev=False | |
|
8 | EOF | |
|
9 | ||
|
10 | hg init orig | |
|
11 | cd orig | |
|
12 | echo foo > foo | |
|
13 | echo bar > bar | |
|
14 | hg ci -qAm 'add foo and bar' | |
|
2 | $ cat >> $HGRCPATH <<EOF | |
|
3 | > [extensions] | |
|
4 | > convert= | |
|
5 | > [convert] | |
|
6 | > hg.saverev=False | |
|
7 | > EOF | |
|
8 | $ hg init orig | |
|
9 | $ cd orig | |
|
10 | $ echo foo > foo | |
|
11 | $ echo bar > bar | |
|
12 | $ hg ci -qAm 'add foo and bar' | |
|
13 | $ hg rm foo | |
|
14 | $ hg ci -m 'remove foo' | |
|
15 | $ mkdir foo | |
|
16 | $ echo file > foo/file | |
|
17 | $ hg ci -qAm 'add foo/file' | |
|
18 | $ hg tag some-tag | |
|
19 | $ hg log | |
|
20 | changeset: 3:593cbf6fb2b4 | |
|
21 | tag: tip | |
|
22 | user: test | |
|
23 | date: Thu Jan 01 00:00:00 1970 +0000 | |
|
24 | summary: Added tag some-tag for changeset ad681a868e44 | |
|
15 | 25 | |
|
16 | hg rm foo | |
|
17 | hg ci -m 'remove foo' | |
|
26 | changeset: 2:ad681a868e44 | |
|
27 | tag: some-tag | |
|
28 | user: test | |
|
29 | date: Thu Jan 01 00:00:00 1970 +0000 | |
|
30 | summary: add foo/file | |
|
18 | 31 | |
|
19 | mkdir foo | |
|
20 | echo file > foo/file | |
|
21 | hg ci -qAm 'add foo/file' | |
|
32 | changeset: 1:cbba8ecc03b7 | |
|
33 | user: test | |
|
34 | date: Thu Jan 01 00:00:00 1970 +0000 | |
|
35 | summary: remove foo | |
|
36 | ||
|
37 | changeset: 0:327daa9251fa | |
|
38 | user: test | |
|
39 | date: Thu Jan 01 00:00:00 1970 +0000 | |
|
40 | summary: add foo and bar | |
|
22 | 41 | |
|
23 | hg tag some-tag | |
|
42 | $ cd .. | |
|
43 | $ hg convert orig new 2>&1 | grep -v 'subversion python bindings could not be loaded' | |
|
44 | initializing destination new repository | |
|
45 | scanning source... | |
|
46 | sorting... | |
|
47 | converting... | |
|
48 | 3 add foo and bar | |
|
49 | 2 remove foo | |
|
50 | 1 add foo/file | |
|
51 | 0 Added tag some-tag for changeset ad681a868e44 | |
|
52 | $ cd new | |
|
53 | $ hg out ../orig | |
|
54 | comparing with ../orig | |
|
55 | searching for changes | |
|
56 | no changes found | |
|
57 | [1] | |
|
24 | 58 | |
|
25 | hg log | |
|
26 | cd .. | |
|
27 | ||
|
28 | hg convert orig new 2>&1 | grep -v 'subversion python bindings could not be loaded' | |
|
29 | cd new | |
|
30 | hg out ../orig | |
|
59 | dirstate should be empty: | |
|
31 | 60 | |
|
32 | echo '% dirstate should be empty:' | |
|
33 | hg debugstate | |
|
34 | hg parents -q | |
|
61 | $ hg debugstate | |
|
62 | $ hg parents -q | |
|
63 | $ hg up -C | |
|
64 | 3 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
|
65 | $ hg copy bar baz | |
|
66 | ||
|
67 | put something in the dirstate: | |
|
68 | ||
|
69 | $ hg debugstate > debugstate | |
|
70 | $ grep baz debugstate | |
|
71 | a 0 -1 unset baz | |
|
72 | copy: bar -> baz | |
|
73 | ||
|
74 | add a new revision in the original repo | |
|
35 | 75 | |
|
36 | hg up -C | |
|
37 | hg copy bar baz | |
|
38 | echo '% put something in the dirstate:' | |
|
39 | hg debugstate > debugstate | |
|
40 | grep baz debugstate | |
|
41 | ||
|
42 | echo '% add a new revision in the original repo' | |
|
43 | cd ../orig | |
|
44 | echo baz > baz | |
|
45 | hg ci -qAm 'add baz' | |
|
76 | $ cd ../orig | |
|
77 | $ echo baz > baz | |
|
78 | $ hg ci -qAm 'add baz' | |
|
79 | $ cd .. | |
|
80 | $ hg convert orig new 2>&1 | grep -v 'subversion python bindings could not be loaded' | |
|
81 | scanning source... | |
|
82 | sorting... | |
|
83 | converting... | |
|
84 | 0 add baz | |
|
85 | $ cd new | |
|
86 | $ hg out ../orig | |
|
87 | comparing with ../orig | |
|
88 | searching for changes | |
|
89 | no changes found | |
|
90 | [1] | |
|
46 | 91 | |
|
47 | cd .. | |
|
48 | hg convert orig new 2>&1 | grep -v 'subversion python bindings could not be loaded' | |
|
49 | cd new | |
|
50 | hg out ../orig | |
|
51 | echo '% dirstate should be the same (no output below):' | |
|
52 | hg debugstate > new-debugstate | |
|
53 | diff debugstate new-debugstate | |
|
92 | dirstate should be the same (no output below): | |
|
93 | ||
|
94 | $ hg debugstate > new-debugstate | |
|
95 | $ diff debugstate new-debugstate | |
|
96 | ||
|
97 | no copies | |
|
98 | ||
|
99 | $ hg up -C | |
|
100 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
|
101 | $ hg debugrename baz | |
|
102 | baz not renamed | |
|
103 | $ cd .. | |
|
104 | ||
|
105 | test tag rewriting | |
|
54 | 106 | |
|
55 | echo '% no copies' | |
|
56 | hg up -C | |
|
57 | hg debugrename baz | |
|
58 | cd .. | |
|
59 | ||
|
60 | echo '% test tag rewriting' | |
|
61 | cat > filemap <<EOF | |
|
62 | exclude foo | |
|
63 | EOF | |
|
64 | hg convert --filemap filemap orig new-filemap 2>&1 | grep -v 'subversion python bindings could not be loaded' | |
|
65 | cd new-filemap | |
|
66 | hg tags | |
|
67 | cd .. | |
|
107 | $ cat > filemap <<EOF | |
|
108 | > exclude foo | |
|
109 | > EOF | |
|
110 | $ hg convert --filemap filemap orig new-filemap 2>&1 | grep -v 'subversion python bindings could not be loaded' | |
|
111 | initializing destination new-filemap repository | |
|
112 | scanning source... | |
|
113 | sorting... | |
|
114 | converting... | |
|
115 | 4 add foo and bar | |
|
116 | 3 remove foo | |
|
117 | 2 add foo/file | |
|
118 | 1 Added tag some-tag for changeset ad681a868e44 | |
|
119 | 0 add baz | |
|
120 | $ cd new-filemap | |
|
121 | $ hg tags | |
|
122 | tip 2:6f4fd1df87fb | |
|
123 | some-tag 0:ba8636729451 | |
|
124 | $ cd .. |
|
1 | NO CONTENT: file was removed |
General Comments 0
You need to be logged in to leave comments.
Login now