Show More
@@ -56,13 +56,8 class p4_source(common.converter_source) | |||
|
56 | 56 | common.checktool('p4', abort=False) |
|
57 | 57 | |
|
58 | 58 | self.revmap = {} |
|
59 | self.heads = [] | |
|
60 | self.changeset = {} | |
|
61 | self.files = {} | |
|
62 | self.copies = {} | |
|
63 | 59 | self.encoding = self.ui.config('convert', 'p4.encoding', |
|
64 | 60 | default=convcmd.orig_encoding) |
|
65 | self.depotname = {} # mapping from local name to depot name | |
|
66 | 61 | self.re_type = re.compile( |
|
67 | 62 | "([a-z]+)?(text|binary|symlink|apple|resource|unicode|utf\d+)" |
|
68 | 63 | "(\+\w+)?$") |
@@ -74,7 +69,6 class p4_source(common.converter_source) | |||
|
74 | 69 | if revs and len(revs) > 1: |
|
75 | 70 | raise error.Abort(_("p4 source does not support specifying " |
|
76 | 71 | "multiple revisions")) |
|
77 | self._parse_once(ui, path) | |
|
78 | 72 | |
|
79 | 73 | def setrevmap(self, revmap): |
|
80 | 74 | """Sets the parsed revmap dictionary. |
@@ -240,13 +234,29 class p4_source(common.converter_source) | |||
|
240 | 234 | 'depotname': depotname, |
|
241 | 235 | } |
|
242 | 236 | |
|
243 | def _parse_once(self, ui, path): | |
|
244 | d = self._parse(ui, path) | |
|
245 | self.changeset = d['changeset'] | |
|
246 | self.heads = d['heads'] | |
|
247 | self.files = d['files'] | |
|
248 | self.copies = d['copies'] | |
|
249 | self.depotname = d['depotname'] | |
|
237 | @util.propertycache | |
|
238 | def _parse_once(self): | |
|
239 | return self._parse(self.ui, self.path) | |
|
240 | ||
|
241 | @util.propertycache | |
|
242 | def copies(self): | |
|
243 | return self._parse_once['copies'] | |
|
244 | ||
|
245 | @util.propertycache | |
|
246 | def files(self): | |
|
247 | return self._parse_once['files'] | |
|
248 | ||
|
249 | @util.propertycache | |
|
250 | def changeset(self): | |
|
251 | return self._parse_once['changeset'] | |
|
252 | ||
|
253 | @util.propertycache | |
|
254 | def heads(self): | |
|
255 | return self._parse_once['heads'] | |
|
256 | ||
|
257 | @util.propertycache | |
|
258 | def depotname(self): | |
|
259 | return self._parse_once['depotname'] | |
|
250 | 260 | |
|
251 | 261 | def getheads(self): |
|
252 | 262 | return self.heads |
@@ -307,11 +307,11 check keywords in p4 | |||
|
307 | 307 | convert |
|
308 | 308 | $ hg convert -s p4 $DEPOTPATH dst |
|
309 | 309 | initializing destination dst repository |
|
310 | scanning source... | |
|
310 | 311 | reading p4 views |
|
311 | 312 | collecting p4 changelists |
|
312 | 313 | 1 initial |
|
313 | 314 | 2 keywords |
|
314 | scanning source... | |
|
315 | 315 | sorting... |
|
316 | 316 | converting... |
|
317 | 317 | 1 initial |
@@ -67,12 +67,12 change some files | |||
|
67 | 67 | convert |
|
68 | 68 | $ hg convert -s p4 $DEPOTPATH dst |
|
69 | 69 | initializing destination dst repository |
|
70 | scanning source... | |
|
70 | 71 | reading p4 views |
|
71 | 72 | collecting p4 changelists |
|
72 | 73 | 1 initial |
|
73 | 74 | 2 change a |
|
74 | 75 | 3 change b/c |
|
75 | scanning source... | |
|
76 | 76 | sorting... |
|
77 | 77 | converting... |
|
78 | 78 | 2 initial |
@@ -98,13 +98,10 change some files | |||
|
98 | 98 | |
|
99 | 99 | convert again |
|
100 | 100 | $ hg convert -s p4 $DEPOTPATH dst |
|
101 | scanning source... | |
|
101 | 102 | reading p4 views |
|
102 | 103 | collecting p4 changelists |
|
103 | 1 initial | |
|
104 | 2 change a | |
|
105 | 3 change b/c | |
|
106 | 104 | 4 change a b/c |
|
107 | scanning source... | |
|
108 | 105 | sorting... |
|
109 | 106 | converting... |
|
110 | 107 | 0 change a b/c |
@@ -130,14 +127,10 interesting names | |||
|
130 | 127 | |
|
131 | 128 | convert again |
|
132 | 129 | $ hg convert -s p4 $DEPOTPATH dst |
|
130 | scanning source... | |
|
133 | 131 | reading p4 views |
|
134 | 132 | collecting p4 changelists |
|
135 | 1 initial | |
|
136 | 2 change a | |
|
137 | 3 change b/c | |
|
138 | 4 change a b/c | |
|
139 | 133 | 5 add d e f |
|
140 | scanning source... | |
|
141 | 134 | sorting... |
|
142 | 135 | converting... |
|
143 | 136 | 0 add d e f |
General Comments 0
You need to be logged in to leave comments.
Login now