Show More
@@ -19,11 +19,8 b' class changectx(object):' | |||||
19 | if not changeid and changeid != 0: |
|
19 | if not changeid and changeid != 0: | |
20 | p1, p2 = self._repo.dirstate.parents() |
|
20 | p1, p2 = self._repo.dirstate.parents() | |
21 | self._rev = self._repo.changelog.rev(p1) |
|
21 | self._rev = self._repo.changelog.rev(p1) | |
22 |
|
|
22 | self._node = p1 | |
23 | changeid = 'tip' |
|
23 | return | |
24 | else: |
|
|||
25 | self._node = p1 |
|
|||
26 | return |
|
|||
27 |
|
24 | |||
28 | self._node = self._repo.lookup(changeid) |
|
25 | self._node = self._repo.lookup(changeid) | |
29 | self._rev = self._repo.changelog.rev(self._node) |
|
26 | self._rev = self._repo.changelog.rev(self._node) |
@@ -5,6 +5,18 b' 0 files updated, 0 files merged, 2 files' | |||||
5 | % hg children at revision 3 (tip) |
|
5 | % hg children at revision 3 (tip) | |
6 | 0 files updated, 0 files merged, 1 files removed, 0 files unresolved |
|
6 | 0 files updated, 0 files merged, 1 files removed, 0 files unresolved | |
7 | % hg children at nullrev (should be 0 and 3) |
|
7 | % hg children at nullrev (should be 0 and 3) | |
|
8 | changeset: 0:4df8521a7374 | |||
|
9 | user: test | |||
|
10 | date: Thu Jan 01 00:00:00 1970 +0000 | |||
|
11 | summary: 0 | |||
|
12 | ||||
|
13 | changeset: 3:e2962852269d | |||
|
14 | tag: tip | |||
|
15 | parent: -1:000000000000 | |||
|
16 | user: test | |||
|
17 | date: Thu Jan 01 00:00:03 1970 +0000 | |||
|
18 | summary: 3 | |||
|
19 | ||||
8 | 2 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
20 | 2 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
9 | % hg children at revision 1 (should be 2) |
|
21 | % hg children at revision 1 (should be 2) | |
10 | changeset: 2:8f5eea5023c2 |
|
22 | changeset: 2:8f5eea5023c2 |
@@ -80,6 +80,7 b' splitrepo()' | |||||
80 | echo "include $i" >> "$fmap" |
|
80 | echo "include $i" >> "$fmap" | |
81 | done |
|
81 | done | |
82 | hg -q convert $opts --filemap "$fmap" --datesort source "$repo" |
|
82 | hg -q convert $opts --filemap "$fmap" --datesort source "$repo" | |
|
83 | hg up -q -R "$repo" | |||
83 | glog -R "$repo" |
|
84 | glog -R "$repo" | |
84 | hg -R "$repo" manifest --debug |
|
85 | hg -R "$repo" manifest --debug | |
85 | } |
|
86 | } | |
@@ -115,6 +116,7 b' rename foo foo2' | |||||
115 | rename copied copied2 |
|
116 | rename copied copied2 | |
116 | EOF |
|
117 | EOF | |
117 | hg -q convert --filemap renames.fmap --datesort source renames.repo |
|
118 | hg -q convert --filemap renames.fmap --datesort source renames.repo | |
|
119 | hg up -q -R renames.repo | |||
118 | glog -R renames.repo |
|
120 | glog -R renames.repo | |
119 | hg -R renames.repo manifest --debug |
|
121 | hg -R renames.repo manifest --debug | |
120 | hg --cwd renames.repo debugrename copied2 |
|
122 | hg --cwd renames.repo debugrename copied2 |
@@ -29,7 +29,7 b' bc3eca3f47023a3e70ca0d8cc95a22a6827db19d' | |||||
29 | copied renamed from foo:2ed2a3912a0b24502043eae84ee4b279c18b90dd |
|
29 | copied renamed from foo:2ed2a3912a0b24502043eae84ee4b279c18b90dd | |
30 |
|
30 | |||
31 | % foo: skip unwanted merges; use 1st parent in 1st merge, 2nd in 2nd |
|
31 | % foo: skip unwanted merges; use 1st parent in 1st merge, 2nd in 2nd | |
32 |
|
|
32 | @ 3 "8: change foo" files: foo | |
33 | | |
|
33 | | | |
34 | o 2 "6: change foo baz" files: foo |
|
34 | o 2 "6: change foo baz" files: foo | |
35 | | |
|
35 | | | |
@@ -39,7 +39,7 b' o 0 "0: add foo baz dir/" files: foo' | |||||
39 |
|
39 | |||
40 | 9a7b52012991e4873687192c3e17e61ba3e837a3 644 foo |
|
40 | 9a7b52012991e4873687192c3e17e61ba3e837a3 644 foo | |
41 | % bar: merges are not merges anymore |
|
41 | % bar: merges are not merges anymore | |
42 |
|
|
42 | @ 4 "7: second merge; change bar" files: bar | |
43 | | |
|
43 | | | |
44 | o 3 "5: change bar baz quux" files: bar |
|
44 | o 3 "5: change bar baz quux" files: bar | |
45 | | |
|
45 | | | |
@@ -51,7 +51,7 b' o 0 "1: add bar quux; copy foo to copie' | |||||
51 |
|
51 | |||
52 | 9463f52fe115e377cf2878d4fc548117211063f2 644 bar |
|
52 | 9463f52fe115e377cf2878d4fc548117211063f2 644 bar | |
53 | % baz: 1st merge is not a merge anymore; 2nd still is |
|
53 | % baz: 1st merge is not a merge anymore; 2nd still is | |
54 |
|
|
54 | @ 4 "7: second merge; change bar" files: baz | |
55 | |\ |
|
55 | |\ | |
56 | | o 3 "6: change foo baz" files: baz |
|
56 | | o 3 "6: change foo baz" files: baz | |
57 | | | |
|
57 | | | | |
@@ -63,7 +63,7 b' o 0 "0: add foo baz dir/" files: baz' | |||||
63 |
|
63 | |||
64 | 94c1be4dfde2ee8d78db8bbfcf81210813307c3d 644 baz |
|
64 | 94c1be4dfde2ee8d78db8bbfcf81210813307c3d 644 baz | |
65 | % foo quux: we add additional merges when they are interesting |
|
65 | % foo quux: we add additional merges when they are interesting | |
66 |
|
|
66 | @ 8 "8: change foo" files: foo | |
67 | | |
|
67 | | | |
68 | o 7 "7: second merge; change bar" files: |
|
68 | o 7 "7: second merge; change bar" files: | |
69 | |\ |
|
69 | |\ | |
@@ -84,14 +84,14 b' o 0 "0: add foo baz dir/" files: foo' | |||||
84 | 9a7b52012991e4873687192c3e17e61ba3e837a3 644 foo |
|
84 | 9a7b52012991e4873687192c3e17e61ba3e837a3 644 foo | |
85 | bc3eca3f47023a3e70ca0d8cc95a22a6827db19d 644 quux |
|
85 | bc3eca3f47023a3e70ca0d8cc95a22a6827db19d 644 quux | |
86 | % bar quux: partial conversion |
|
86 | % bar quux: partial conversion | |
87 |
|
|
87 | @ 1 "3: change bar quux" files: bar quux | |
88 | | |
|
88 | | | |
89 | o 0 "1: add bar quux; copy foo to copied" files: bar quux |
|
89 | o 0 "1: add bar quux; copy foo to copied" files: bar quux | |
90 |
|
90 | |||
91 | b79105bedc55102f394e90a789c9c380117c1b4a 644 bar |
|
91 | b79105bedc55102f394e90a789c9c380117c1b4a 644 bar | |
92 | db0421cc6b685a458c8d86c7d5c004f94429ea23 644 quux |
|
92 | db0421cc6b685a458c8d86c7d5c004f94429ea23 644 quux | |
93 | % bar quux: complete the partial conversion |
|
93 | % bar quux: complete the partial conversion | |
94 |
|
|
94 | @ 4 "7: second merge; change bar" files: bar | |
95 | | |
|
95 | | | |
96 | o 3 "5: change bar baz quux" files: bar quux |
|
96 | o 3 "5: change bar baz quux" files: bar quux | |
97 | | |
|
97 | | | |
@@ -104,11 +104,11 b' o 0 "1: add bar quux; copy foo to copie' | |||||
104 | 9463f52fe115e377cf2878d4fc548117211063f2 644 bar |
|
104 | 9463f52fe115e377cf2878d4fc548117211063f2 644 bar | |
105 | bc3eca3f47023a3e70ca0d8cc95a22a6827db19d 644 quux |
|
105 | bc3eca3f47023a3e70ca0d8cc95a22a6827db19d 644 quux | |
106 | % foo: partial conversion |
|
106 | % foo: partial conversion | |
107 |
|
|
107 | @ 0 "0: add foo baz dir/" files: foo | |
108 |
|
108 | |||
109 | 2ed2a3912a0b24502043eae84ee4b279c18b90dd 644 foo |
|
109 | 2ed2a3912a0b24502043eae84ee4b279c18b90dd 644 foo | |
110 | % foo: complete the partial conversion |
|
110 | % foo: complete the partial conversion | |
111 |
|
|
111 | @ 3 "8: change foo" files: foo | |
112 | | |
|
112 | | | |
113 | o 2 "6: change foo baz" files: foo |
|
113 | o 2 "6: change foo baz" files: foo | |
114 | | |
|
114 | | | |
@@ -118,12 +118,12 b' o 0 "0: add foo baz dir/" files: foo' | |||||
118 |
|
118 | |||
119 | 9a7b52012991e4873687192c3e17e61ba3e837a3 644 foo |
|
119 | 9a7b52012991e4873687192c3e17e61ba3e837a3 644 foo | |
120 | % copied: copied file; source not included in new repo |
|
120 | % copied: copied file; source not included in new repo | |
121 |
|
|
121 | @ 0 "1: add bar quux; copy foo to copied" files: copied | |
122 |
|
122 | |||
123 | 2ed2a3912a0b24502043eae84ee4b279c18b90dd 644 copied |
|
123 | 2ed2a3912a0b24502043eae84ee4b279c18b90dd 644 copied | |
124 | copied not renamed |
|
124 | copied not renamed | |
125 | % foo copied: copied file; source included in new repo |
|
125 | % foo copied: copied file; source included in new repo | |
126 |
|
|
126 | @ 4 "8: change foo" files: foo | |
127 | | |
|
127 | | | |
128 | o 3 "6: change foo baz" files: foo |
|
128 | o 3 "6: change foo baz" files: foo | |
129 | | |
|
129 | | | |
@@ -136,7 +136,7 b' o 0 "0: add foo baz dir/" files: foo' | |||||
136 | 6ca237634e1f6bee1b6db94292fb44f092a25842 644 copied |
|
136 | 6ca237634e1f6bee1b6db94292fb44f092a25842 644 copied | |
137 | 9a7b52012991e4873687192c3e17e61ba3e837a3 644 foo |
|
137 | 9a7b52012991e4873687192c3e17e61ba3e837a3 644 foo | |
138 | copied renamed from foo:2ed2a3912a0b24502043eae84ee4b279c18b90dd |
|
138 | copied renamed from foo:2ed2a3912a0b24502043eae84ee4b279c18b90dd | |
139 |
|
|
139 | @ 4 "8: change foo" files: foo2 | |
140 | | |
|
140 | | | |
141 | o 3 "6: change foo baz" files: foo2 |
|
141 | o 3 "6: change foo baz" files: foo2 | |
142 | | |
|
142 | | |
@@ -53,7 +53,7 b" commit -m 'Merge branch other'" | |||||
53 | cd .. |
|
53 | cd .. | |
54 |
|
54 | |||
55 | hg convert --datesort git-repo |
|
55 | hg convert --datesort git-repo | |
56 |
|
56 | hg up -q -R git-repo-hg | ||
57 | hg -R git-repo-hg tip -v |
|
57 | hg -R git-repo-hg tip -v | |
58 |
|
58 | |||
59 | count=10 |
|
59 | count=10 | |
@@ -117,12 +117,14 b' splitrepo()' | |||||
117 | echo "include $i" >> "$fmap" |
|
117 | echo "include $i" >> "$fmap" | |
118 | done |
|
118 | done | |
119 | hg -q convert $opts --filemap "$fmap" --datesort git-repo2 "$repo" |
|
119 | hg -q convert $opts --filemap "$fmap" --datesort git-repo2 "$repo" | |
|
120 | hg up -q -R "$repo" | |||
120 | glog -R "$repo" |
|
121 | glog -R "$repo" | |
121 | hg -R "$repo" manifest --debug |
|
122 | hg -R "$repo" manifest --debug | |
122 | } |
|
123 | } | |
123 |
|
124 | |||
124 | echo '% full conversion' |
|
125 | echo '% full conversion' | |
125 | hg -q convert --datesort git-repo2 fullrepo |
|
126 | hg -q convert --datesort git-repo2 fullrepo | |
|
127 | hg up -q -R fullrepo | |||
126 | glog -R fullrepo |
|
128 | glog -R fullrepo | |
127 | hg -R fullrepo manifest --debug |
|
129 | hg -R fullrepo manifest --debug | |
128 |
|
130 |
@@ -24,7 +24,7 b' committer: test <test@example.org>' | |||||
24 |
|
24 | |||
25 |
|
25 | |||
26 | % full conversion |
|
26 | % full conversion | |
27 |
|
|
27 | @ 9 "Discard change to foo" files: foo | |
28 | |\ |
|
28 | |\ | |
29 | | o 8 "change foo" files: foo |
|
29 | | o 8 "change foo" files: foo | |
30 | | | |
|
30 | | | | |
@@ -49,7 +49,7 b' 354ae8da6e890359ef49ade27b68bbc361f3ca88' | |||||
49 | 9277c9cc8dd4576fc01a17939b4351e5ada93466 644 foo |
|
49 | 9277c9cc8dd4576fc01a17939b4351e5ada93466 644 foo | |
50 | 88dfeab657e8cf2cef3dec67b914f49791ae76b1 644 quux |
|
50 | 88dfeab657e8cf2cef3dec67b914f49791ae76b1 644 quux | |
51 | % foo bar baz: octopus merge |
|
51 | % foo bar baz: octopus merge | |
52 |
|
|
52 | @ 8 "Discard change to foo" files: foo | |
53 | |\ |
|
53 | |\ | |
54 | | o 7 "change foo" files: foo |
|
54 | | o 7 "change foo" files: foo | |
55 | | | |
|
55 | | | | |
@@ -71,7 +71,7 b' 245a3b8bc653999c2b22cdabd517ccb47aecafdf' | |||||
71 | 354ae8da6e890359ef49ade27b68bbc361f3ca88 644 baz |
|
71 | 354ae8da6e890359ef49ade27b68bbc361f3ca88 644 baz | |
72 | 9277c9cc8dd4576fc01a17939b4351e5ada93466 644 foo |
|
72 | 9277c9cc8dd4576fc01a17939b4351e5ada93466 644 foo | |
73 | % foo baz quux: only some parents of an octopus merge; "discard" a head |
|
73 | % foo baz quux: only some parents of an octopus merge; "discard" a head | |
74 |
|
|
74 | @ 6 "Discard change to foo" files: foo | |
75 | | |
|
75 | | | |
76 | o 5 "change foo" files: foo |
|
76 | o 5 "change foo" files: foo | |
77 | | |
|
77 | | |
General Comments 0
You need to be logged in to leave comments.
Login now