Show More
@@ -1,358 +1,368 | |||||
1 | # Perforce source for convert extension. |
|
1 | # Perforce source for convert extension. | |
2 | # |
|
2 | # | |
3 | # Copyright 2009, Frank Kingswood <frank@kingswood-consulting.co.uk> |
|
3 | # Copyright 2009, Frank Kingswood <frank@kingswood-consulting.co.uk> | |
4 | # |
|
4 | # | |
5 | # This software may be used and distributed according to the terms of the |
|
5 | # This software may be used and distributed according to the terms of the | |
6 | # GNU General Public License version 2 or any later version. |
|
6 | # GNU General Public License version 2 or any later version. | |
7 | from __future__ import absolute_import |
|
7 | from __future__ import absolute_import | |
8 |
|
8 | |||
9 | import marshal |
|
9 | import marshal | |
10 | import re |
|
10 | import re | |
11 |
|
11 | |||
12 | from mercurial.i18n import _ |
|
12 | from mercurial.i18n import _ | |
13 | from mercurial import ( |
|
13 | from mercurial import ( | |
14 | error, |
|
14 | error, | |
15 | util, |
|
15 | util, | |
16 | ) |
|
16 | ) | |
17 |
|
17 | |||
18 | from . import common |
|
18 | from . import common | |
19 |
|
19 | |||
20 | def loaditer(f): |
|
20 | def loaditer(f): | |
21 | "Yield the dictionary objects generated by p4" |
|
21 | "Yield the dictionary objects generated by p4" | |
22 | try: |
|
22 | try: | |
23 | while True: |
|
23 | while True: | |
24 | d = marshal.load(f) |
|
24 | d = marshal.load(f) | |
25 | if not d: |
|
25 | if not d: | |
26 | break |
|
26 | break | |
27 | yield d |
|
27 | yield d | |
28 | except EOFError: |
|
28 | except EOFError: | |
29 | pass |
|
29 | pass | |
30 |
|
30 | |||
31 | def decodefilename(filename): |
|
31 | def decodefilename(filename): | |
32 | """Perforce escapes special characters @, #, *, or % |
|
32 | """Perforce escapes special characters @, #, *, or % | |
33 | with %40, %23, %2A, or %25 respectively |
|
33 | with %40, %23, %2A, or %25 respectively | |
34 |
|
34 | |||
35 | >>> decodefilename('portable-net45%252Bnetcore45%252Bwp8%252BMonoAndroid') |
|
35 | >>> decodefilename('portable-net45%252Bnetcore45%252Bwp8%252BMonoAndroid') | |
36 | 'portable-net45%2Bnetcore45%2Bwp8%2BMonoAndroid' |
|
36 | 'portable-net45%2Bnetcore45%2Bwp8%2BMonoAndroid' | |
37 | >>> decodefilename('//Depot/Directory/%2525/%2523/%23%40.%2A') |
|
37 | >>> decodefilename('//Depot/Directory/%2525/%2523/%23%40.%2A') | |
38 | '//Depot/Directory/%25/%23/#@.*' |
|
38 | '//Depot/Directory/%25/%23/#@.*' | |
39 | """ |
|
39 | """ | |
40 | replacements = [('%2A', '*'), ('%23', '#'), ('%40', '@'), ('%25', '%')] |
|
40 | replacements = [('%2A', '*'), ('%23', '#'), ('%40', '@'), ('%25', '%')] | |
41 | for k, v in replacements: |
|
41 | for k, v in replacements: | |
42 | filename = filename.replace(k, v) |
|
42 | filename = filename.replace(k, v) | |
43 | return filename |
|
43 | return filename | |
44 |
|
44 | |||
45 | class p4_source(common.converter_source): |
|
45 | class p4_source(common.converter_source): | |
46 | def __init__(self, ui, path, revs=None): |
|
46 | def __init__(self, ui, path, revs=None): | |
47 | # avoid import cycle |
|
47 | # avoid import cycle | |
48 | from . import convcmd |
|
48 | from . import convcmd | |
49 |
|
49 | |||
50 | super(p4_source, self).__init__(ui, path, revs=revs) |
|
50 | super(p4_source, self).__init__(ui, path, revs=revs) | |
51 |
|
51 | |||
52 | if "/" in path and not path.startswith('//'): |
|
52 | if "/" in path and not path.startswith('//'): | |
53 | raise common.NoRepo(_('%s does not look like a P4 repository') % |
|
53 | raise common.NoRepo(_('%s does not look like a P4 repository') % | |
54 | path) |
|
54 | path) | |
55 |
|
55 | |||
56 | common.checktool('p4', abort=False) |
|
56 | common.checktool('p4', abort=False) | |
57 |
|
57 | |||
58 | self.revmap = {} |
|
58 | self.revmap = {} | |
59 | self.heads = [] |
|
|||
60 | self.changeset = {} |
|
|||
61 | self.files = {} |
|
|||
62 | self.copies = {} |
|
|||
63 | self.encoding = self.ui.config('convert', 'p4.encoding', |
|
59 | self.encoding = self.ui.config('convert', 'p4.encoding', | |
64 | default=convcmd.orig_encoding) |
|
60 | default=convcmd.orig_encoding) | |
65 | self.depotname = {} # mapping from local name to depot name |
|
|||
66 | self.re_type = re.compile( |
|
61 | self.re_type = re.compile( | |
67 | "([a-z]+)?(text|binary|symlink|apple|resource|unicode|utf\d+)" |
|
62 | "([a-z]+)?(text|binary|symlink|apple|resource|unicode|utf\d+)" | |
68 | "(\+\w+)?$") |
|
63 | "(\+\w+)?$") | |
69 | self.re_keywords = re.compile( |
|
64 | self.re_keywords = re.compile( | |
70 | r"\$(Id|Header|Date|DateTime|Change|File|Revision|Author)" |
|
65 | r"\$(Id|Header|Date|DateTime|Change|File|Revision|Author)" | |
71 | r":[^$\n]*\$") |
|
66 | r":[^$\n]*\$") | |
72 | self.re_keywords_old = re.compile("\$(Id|Header):[^$\n]*\$") |
|
67 | self.re_keywords_old = re.compile("\$(Id|Header):[^$\n]*\$") | |
73 |
|
68 | |||
74 | if revs and len(revs) > 1: |
|
69 | if revs and len(revs) > 1: | |
75 | raise error.Abort(_("p4 source does not support specifying " |
|
70 | raise error.Abort(_("p4 source does not support specifying " | |
76 | "multiple revisions")) |
|
71 | "multiple revisions")) | |
77 | self._parse_once(ui, path) |
|
|||
78 |
|
72 | |||
79 | def setrevmap(self, revmap): |
|
73 | def setrevmap(self, revmap): | |
80 | """Sets the parsed revmap dictionary. |
|
74 | """Sets the parsed revmap dictionary. | |
81 |
|
75 | |||
82 | Revmap stores mappings from a source revision to a target revision. |
|
76 | Revmap stores mappings from a source revision to a target revision. | |
83 | It is set in convertcmd.convert and provided by the user as a file |
|
77 | It is set in convertcmd.convert and provided by the user as a file | |
84 | on the commandline. |
|
78 | on the commandline. | |
85 |
|
79 | |||
86 | Revisions in the map are considered beeing present in the |
|
80 | Revisions in the map are considered beeing present in the | |
87 | repository and ignored during _parse(). This allows for incremental |
|
81 | repository and ignored during _parse(). This allows for incremental | |
88 | imports if a revmap is provided. |
|
82 | imports if a revmap is provided. | |
89 | """ |
|
83 | """ | |
90 | self.revmap = revmap |
|
84 | self.revmap = revmap | |
91 |
|
85 | |||
92 | def _parse_view(self, path): |
|
86 | def _parse_view(self, path): | |
93 | "Read changes affecting the path" |
|
87 | "Read changes affecting the path" | |
94 | cmd = 'p4 -G changes -s submitted %s' % util.shellquote(path) |
|
88 | cmd = 'p4 -G changes -s submitted %s' % util.shellquote(path) | |
95 | stdout = util.popen(cmd, mode='rb') |
|
89 | stdout = util.popen(cmd, mode='rb') | |
96 | p4changes = {} |
|
90 | p4changes = {} | |
97 | for d in loaditer(stdout): |
|
91 | for d in loaditer(stdout): | |
98 | c = d.get("change", None) |
|
92 | c = d.get("change", None) | |
99 | if c: |
|
93 | if c: | |
100 | p4changes[c] = True |
|
94 | p4changes[c] = True | |
101 | return p4changes |
|
95 | return p4changes | |
102 |
|
96 | |||
103 | def _parse(self, ui, path): |
|
97 | def _parse(self, ui, path): | |
104 | "Prepare list of P4 filenames and revisions to import" |
|
98 | "Prepare list of P4 filenames and revisions to import" | |
105 | p4changes = {} |
|
99 | p4changes = {} | |
106 | changeset = {} |
|
100 | changeset = {} | |
107 | files_map = {} |
|
101 | files_map = {} | |
108 | copies_map = {} |
|
102 | copies_map = {} | |
109 | localname = {} |
|
103 | localname = {} | |
110 | depotname = {} |
|
104 | depotname = {} | |
111 | heads = [] |
|
105 | heads = [] | |
112 |
|
106 | |||
113 | ui.status(_('reading p4 views\n')) |
|
107 | ui.status(_('reading p4 views\n')) | |
114 |
|
108 | |||
115 | # read client spec or view |
|
109 | # read client spec or view | |
116 | if "/" in path: |
|
110 | if "/" in path: | |
117 | p4changes.update(self._parse_view(path)) |
|
111 | p4changes.update(self._parse_view(path)) | |
118 | if path.startswith("//") and path.endswith("/..."): |
|
112 | if path.startswith("//") and path.endswith("/..."): | |
119 | views = {path[:-3]:""} |
|
113 | views = {path[:-3]:""} | |
120 | else: |
|
114 | else: | |
121 | views = {"//": ""} |
|
115 | views = {"//": ""} | |
122 | else: |
|
116 | else: | |
123 | cmd = 'p4 -G client -o %s' % util.shellquote(path) |
|
117 | cmd = 'p4 -G client -o %s' % util.shellquote(path) | |
124 | clientspec = marshal.load(util.popen(cmd, mode='rb')) |
|
118 | clientspec = marshal.load(util.popen(cmd, mode='rb')) | |
125 |
|
119 | |||
126 | views = {} |
|
120 | views = {} | |
127 | for client in clientspec: |
|
121 | for client in clientspec: | |
128 | if client.startswith("View"): |
|
122 | if client.startswith("View"): | |
129 | sview, cview = clientspec[client].split() |
|
123 | sview, cview = clientspec[client].split() | |
130 | p4changes.update(self._parse_view(sview)) |
|
124 | p4changes.update(self._parse_view(sview)) | |
131 | if sview.endswith("...") and cview.endswith("..."): |
|
125 | if sview.endswith("...") and cview.endswith("..."): | |
132 | sview = sview[:-3] |
|
126 | sview = sview[:-3] | |
133 | cview = cview[:-3] |
|
127 | cview = cview[:-3] | |
134 | cview = cview[2:] |
|
128 | cview = cview[2:] | |
135 | cview = cview[cview.find("/") + 1:] |
|
129 | cview = cview[cview.find("/") + 1:] | |
136 | views[sview] = cview |
|
130 | views[sview] = cview | |
137 |
|
131 | |||
138 | # list of changes that affect our source files |
|
132 | # list of changes that affect our source files | |
139 | p4changes = p4changes.keys() |
|
133 | p4changes = p4changes.keys() | |
140 | p4changes.sort(key=int) |
|
134 | p4changes.sort(key=int) | |
141 |
|
135 | |||
142 | # list with depot pathnames, longest first |
|
136 | # list with depot pathnames, longest first | |
143 | vieworder = views.keys() |
|
137 | vieworder = views.keys() | |
144 | vieworder.sort(key=len, reverse=True) |
|
138 | vieworder.sort(key=len, reverse=True) | |
145 |
|
139 | |||
146 | # handle revision limiting |
|
140 | # handle revision limiting | |
147 | startrev = self.ui.config('convert', 'p4.startrev', default=0) |
|
141 | startrev = self.ui.config('convert', 'p4.startrev', default=0) | |
148 |
|
142 | |||
149 | # now read the full changelists to get the list of file revisions |
|
143 | # now read the full changelists to get the list of file revisions | |
150 | ui.status(_('collecting p4 changelists\n')) |
|
144 | ui.status(_('collecting p4 changelists\n')) | |
151 | lastid = None |
|
145 | lastid = None | |
152 | for change in p4changes: |
|
146 | for change in p4changes: | |
153 | if startrev and int(change) < int(startrev): |
|
147 | if startrev and int(change) < int(startrev): | |
154 | continue |
|
148 | continue | |
155 | if self.revs and int(change) > int(self.revs[0]): |
|
149 | if self.revs and int(change) > int(self.revs[0]): | |
156 | continue |
|
150 | continue | |
157 | if change in self.revmap: |
|
151 | if change in self.revmap: | |
158 | # Ignore already present revisions, but set the parent pointer. |
|
152 | # Ignore already present revisions, but set the parent pointer. | |
159 | lastid = change |
|
153 | lastid = change | |
160 | continue |
|
154 | continue | |
161 |
|
155 | |||
162 | if lastid: |
|
156 | if lastid: | |
163 | parents = [lastid] |
|
157 | parents = [lastid] | |
164 | else: |
|
158 | else: | |
165 | parents = [] |
|
159 | parents = [] | |
166 |
|
160 | |||
167 | d = self._fetch_revision(change) |
|
161 | d = self._fetch_revision(change) | |
168 | c = self._construct_commit(d, parents) |
|
162 | c = self._construct_commit(d, parents) | |
169 |
|
163 | |||
170 | shortdesc = c.desc.splitlines(True)[0].rstrip('\r\n') |
|
164 | shortdesc = c.desc.splitlines(True)[0].rstrip('\r\n') | |
171 | t = '%s %s' % (c.rev, repr(shortdesc)[1:-1]) |
|
165 | t = '%s %s' % (c.rev, repr(shortdesc)[1:-1]) | |
172 | ui.status(util.ellipsis(t, 80) + '\n') |
|
166 | ui.status(util.ellipsis(t, 80) + '\n') | |
173 |
|
167 | |||
174 | files = [] |
|
168 | files = [] | |
175 | copies = {} |
|
169 | copies = {} | |
176 | copiedfiles = [] |
|
170 | copiedfiles = [] | |
177 | i = 0 |
|
171 | i = 0 | |
178 | while ("depotFile%d" % i) in d and ("rev%d" % i) in d: |
|
172 | while ("depotFile%d" % i) in d and ("rev%d" % i) in d: | |
179 | oldname = d["depotFile%d" % i] |
|
173 | oldname = d["depotFile%d" % i] | |
180 | filename = None |
|
174 | filename = None | |
181 | for v in vieworder: |
|
175 | for v in vieworder: | |
182 | if oldname.lower().startswith(v.lower()): |
|
176 | if oldname.lower().startswith(v.lower()): | |
183 | filename = decodefilename(views[v] + oldname[len(v):]) |
|
177 | filename = decodefilename(views[v] + oldname[len(v):]) | |
184 | break |
|
178 | break | |
185 | if filename: |
|
179 | if filename: | |
186 | files.append((filename, d["rev%d" % i])) |
|
180 | files.append((filename, d["rev%d" % i])) | |
187 | depotname[filename] = oldname |
|
181 | depotname[filename] = oldname | |
188 | if (d.get("action%d" % i) == "move/add"): |
|
182 | if (d.get("action%d" % i) == "move/add"): | |
189 | copiedfiles.append(filename) |
|
183 | copiedfiles.append(filename) | |
190 | localname[oldname] = filename |
|
184 | localname[oldname] = filename | |
191 | i += 1 |
|
185 | i += 1 | |
192 |
|
186 | |||
193 | # Collect information about copied files |
|
187 | # Collect information about copied files | |
194 | for filename in copiedfiles: |
|
188 | for filename in copiedfiles: | |
195 | oldname = depotname[filename] |
|
189 | oldname = depotname[filename] | |
196 |
|
190 | |||
197 | flcmd = 'p4 -G filelog %s' \ |
|
191 | flcmd = 'p4 -G filelog %s' \ | |
198 | % util.shellquote(oldname) |
|
192 | % util.shellquote(oldname) | |
199 | flstdout = util.popen(flcmd, mode='rb') |
|
193 | flstdout = util.popen(flcmd, mode='rb') | |
200 |
|
194 | |||
201 | copiedfilename = None |
|
195 | copiedfilename = None | |
202 | for d in loaditer(flstdout): |
|
196 | for d in loaditer(flstdout): | |
203 | copiedoldname = None |
|
197 | copiedoldname = None | |
204 |
|
198 | |||
205 | i = 0 |
|
199 | i = 0 | |
206 | while ("change%d" % i) in d: |
|
200 | while ("change%d" % i) in d: | |
207 | if (d["change%d" % i] == change and |
|
201 | if (d["change%d" % i] == change and | |
208 | d["action%d" % i] == "move/add"): |
|
202 | d["action%d" % i] == "move/add"): | |
209 | j = 0 |
|
203 | j = 0 | |
210 | while ("file%d,%d" % (i, j)) in d: |
|
204 | while ("file%d,%d" % (i, j)) in d: | |
211 | if d["how%d,%d" % (i, j)] == "moved from": |
|
205 | if d["how%d,%d" % (i, j)] == "moved from": | |
212 | copiedoldname = d["file%d,%d" % (i, j)] |
|
206 | copiedoldname = d["file%d,%d" % (i, j)] | |
213 | break |
|
207 | break | |
214 | j += 1 |
|
208 | j += 1 | |
215 | i += 1 |
|
209 | i += 1 | |
216 |
|
210 | |||
217 | if copiedoldname and copiedoldname in localname: |
|
211 | if copiedoldname and copiedoldname in localname: | |
218 | copiedfilename = localname[copiedoldname] |
|
212 | copiedfilename = localname[copiedoldname] | |
219 | break |
|
213 | break | |
220 |
|
214 | |||
221 | if copiedfilename: |
|
215 | if copiedfilename: | |
222 | copies[filename] = copiedfilename |
|
216 | copies[filename] = copiedfilename | |
223 | else: |
|
217 | else: | |
224 | ui.warn(_("cannot find source for copied file: %s@%s\n") |
|
218 | ui.warn(_("cannot find source for copied file: %s@%s\n") | |
225 | % (filename, change)) |
|
219 | % (filename, change)) | |
226 |
|
220 | |||
227 | changeset[change] = c |
|
221 | changeset[change] = c | |
228 | files_map[change] = files |
|
222 | files_map[change] = files | |
229 | copies_map[change] = copies |
|
223 | copies_map[change] = copies | |
230 | lastid = change |
|
224 | lastid = change | |
231 |
|
225 | |||
232 | if lastid and len(changeset) > 0: |
|
226 | if lastid and len(changeset) > 0: | |
233 | heads = [lastid] |
|
227 | heads = [lastid] | |
234 |
|
228 | |||
235 | return { |
|
229 | return { | |
236 | 'changeset': changeset, |
|
230 | 'changeset': changeset, | |
237 | 'files': files_map, |
|
231 | 'files': files_map, | |
238 | 'copies': copies_map, |
|
232 | 'copies': copies_map, | |
239 | 'heads': heads, |
|
233 | 'heads': heads, | |
240 | 'depotname': depotname, |
|
234 | 'depotname': depotname, | |
241 | } |
|
235 | } | |
242 |
|
236 | |||
243 | def _parse_once(self, ui, path): |
|
237 | @util.propertycache | |
244 | d = self._parse(ui, path) |
|
238 | def _parse_once(self): | |
245 | self.changeset = d['changeset'] |
|
239 | return self._parse(self.ui, self.path) | |
246 | self.heads = d['heads'] |
|
240 | ||
247 | self.files = d['files'] |
|
241 | @util.propertycache | |
248 | self.copies = d['copies'] |
|
242 | def copies(self): | |
249 | self.depotname = d['depotname'] |
|
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 | def getheads(self): |
|
261 | def getheads(self): | |
252 | return self.heads |
|
262 | return self.heads | |
253 |
|
263 | |||
254 | def getfile(self, name, rev): |
|
264 | def getfile(self, name, rev): | |
255 | cmd = 'p4 -G print %s' \ |
|
265 | cmd = 'p4 -G print %s' \ | |
256 | % util.shellquote("%s#%s" % (self.depotname[name], rev)) |
|
266 | % util.shellquote("%s#%s" % (self.depotname[name], rev)) | |
257 |
|
267 | |||
258 | lasterror = None |
|
268 | lasterror = None | |
259 | while True: |
|
269 | while True: | |
260 | stdout = util.popen(cmd, mode='rb') |
|
270 | stdout = util.popen(cmd, mode='rb') | |
261 |
|
271 | |||
262 | mode = None |
|
272 | mode = None | |
263 | contents = [] |
|
273 | contents = [] | |
264 | keywords = None |
|
274 | keywords = None | |
265 |
|
275 | |||
266 | for d in loaditer(stdout): |
|
276 | for d in loaditer(stdout): | |
267 | code = d["code"] |
|
277 | code = d["code"] | |
268 | data = d.get("data") |
|
278 | data = d.get("data") | |
269 |
|
279 | |||
270 | if code == "error": |
|
280 | if code == "error": | |
271 | # if this is the first time error happened |
|
281 | # if this is the first time error happened | |
272 | # re-attempt getting the file |
|
282 | # re-attempt getting the file | |
273 | if not lasterror: |
|
283 | if not lasterror: | |
274 | lasterror = IOError(d["generic"], data) |
|
284 | lasterror = IOError(d["generic"], data) | |
275 | # this will exit inner-most for-loop |
|
285 | # this will exit inner-most for-loop | |
276 | break |
|
286 | break | |
277 | else: |
|
287 | else: | |
278 | raise lasterror |
|
288 | raise lasterror | |
279 |
|
289 | |||
280 | elif code == "stat": |
|
290 | elif code == "stat": | |
281 | action = d.get("action") |
|
291 | action = d.get("action") | |
282 | if action in ["purge", "delete", "move/delete"]: |
|
292 | if action in ["purge", "delete", "move/delete"]: | |
283 | return None, None |
|
293 | return None, None | |
284 | p4type = self.re_type.match(d["type"]) |
|
294 | p4type = self.re_type.match(d["type"]) | |
285 | if p4type: |
|
295 | if p4type: | |
286 | mode = "" |
|
296 | mode = "" | |
287 | flags = ((p4type.group(1) or "") |
|
297 | flags = ((p4type.group(1) or "") | |
288 | + (p4type.group(3) or "")) |
|
298 | + (p4type.group(3) or "")) | |
289 | if "x" in flags: |
|
299 | if "x" in flags: | |
290 | mode = "x" |
|
300 | mode = "x" | |
291 | if p4type.group(2) == "symlink": |
|
301 | if p4type.group(2) == "symlink": | |
292 | mode = "l" |
|
302 | mode = "l" | |
293 | if "ko" in flags: |
|
303 | if "ko" in flags: | |
294 | keywords = self.re_keywords_old |
|
304 | keywords = self.re_keywords_old | |
295 | elif "k" in flags: |
|
305 | elif "k" in flags: | |
296 | keywords = self.re_keywords |
|
306 | keywords = self.re_keywords | |
297 |
|
307 | |||
298 | elif code == "text" or code == "binary": |
|
308 | elif code == "text" or code == "binary": | |
299 | contents.append(data) |
|
309 | contents.append(data) | |
300 |
|
310 | |||
301 | lasterror = None |
|
311 | lasterror = None | |
302 |
|
312 | |||
303 | if not lasterror: |
|
313 | if not lasterror: | |
304 | break |
|
314 | break | |
305 |
|
315 | |||
306 | if mode is None: |
|
316 | if mode is None: | |
307 | return None, None |
|
317 | return None, None | |
308 |
|
318 | |||
309 | contents = ''.join(contents) |
|
319 | contents = ''.join(contents) | |
310 |
|
320 | |||
311 | if keywords: |
|
321 | if keywords: | |
312 | contents = keywords.sub("$\\1$", contents) |
|
322 | contents = keywords.sub("$\\1$", contents) | |
313 | if mode == "l" and contents.endswith("\n"): |
|
323 | if mode == "l" and contents.endswith("\n"): | |
314 | contents = contents[:-1] |
|
324 | contents = contents[:-1] | |
315 |
|
325 | |||
316 | return contents, mode |
|
326 | return contents, mode | |
317 |
|
327 | |||
318 | def getchanges(self, rev, full): |
|
328 | def getchanges(self, rev, full): | |
319 | if full: |
|
329 | if full: | |
320 | raise error.Abort(_("convert from p4 does not support --full")) |
|
330 | raise error.Abort(_("convert from p4 does not support --full")) | |
321 | return self.files[rev], self.copies[rev], set() |
|
331 | return self.files[rev], self.copies[rev], set() | |
322 |
|
332 | |||
323 | def _construct_commit(self, obj, parents=None): |
|
333 | def _construct_commit(self, obj, parents=None): | |
324 | """ |
|
334 | """ | |
325 | Constructs a common.commit object from an unmarshalled |
|
335 | Constructs a common.commit object from an unmarshalled | |
326 | `p4 describe` output |
|
336 | `p4 describe` output | |
327 | """ |
|
337 | """ | |
328 | desc = self.recode(obj.get("desc", "")) |
|
338 | desc = self.recode(obj.get("desc", "")) | |
329 | date = (int(obj["time"]), 0) # timezone not set |
|
339 | date = (int(obj["time"]), 0) # timezone not set | |
330 | if parents is None: |
|
340 | if parents is None: | |
331 | parents = [] |
|
341 | parents = [] | |
332 |
|
342 | |||
333 | return common.commit(author=self.recode(obj["user"]), |
|
343 | return common.commit(author=self.recode(obj["user"]), | |
334 | date=util.datestr(date, '%Y-%m-%d %H:%M:%S %1%2'), |
|
344 | date=util.datestr(date, '%Y-%m-%d %H:%M:%S %1%2'), | |
335 | parents=parents, desc=desc, branch=None, rev=obj['change'], |
|
345 | parents=parents, desc=desc, branch=None, rev=obj['change'], | |
336 | extra={"p4": obj['change'], "convert_revision": obj['change']}) |
|
346 | extra={"p4": obj['change'], "convert_revision": obj['change']}) | |
337 |
|
347 | |||
338 | def _fetch_revision(self, rev): |
|
348 | def _fetch_revision(self, rev): | |
339 | """Return an output of `p4 describe` including author, commit date as |
|
349 | """Return an output of `p4 describe` including author, commit date as | |
340 | a dictionary.""" |
|
350 | a dictionary.""" | |
341 | cmd = "p4 -G describe -s %s" % rev |
|
351 | cmd = "p4 -G describe -s %s" % rev | |
342 | stdout = util.popen(cmd, mode='rb') |
|
352 | stdout = util.popen(cmd, mode='rb') | |
343 | return marshal.load(stdout) |
|
353 | return marshal.load(stdout) | |
344 |
|
354 | |||
345 | def getcommit(self, rev): |
|
355 | def getcommit(self, rev): | |
346 | if rev in self.changeset: |
|
356 | if rev in self.changeset: | |
347 | return self.changeset[rev] |
|
357 | return self.changeset[rev] | |
348 | elif rev in self.revmap: |
|
358 | elif rev in self.revmap: | |
349 | d = self._fetch_revision(rev) |
|
359 | d = self._fetch_revision(rev) | |
350 | return self._construct_commit(d, parents=None) |
|
360 | return self._construct_commit(d, parents=None) | |
351 | raise error.Abort( |
|
361 | raise error.Abort( | |
352 | _("cannot find %s in the revmap or parsed changesets") % rev) |
|
362 | _("cannot find %s in the revmap or parsed changesets") % rev) | |
353 |
|
363 | |||
354 | def gettags(self): |
|
364 | def gettags(self): | |
355 | return {} |
|
365 | return {} | |
356 |
|
366 | |||
357 | def getchangedfiles(self, rev, i): |
|
367 | def getchangedfiles(self, rev, i): | |
358 | return sorted([x[0] for x in self.files[rev]]) |
|
368 | return sorted([x[0] for x in self.files[rev]]) |
@@ -1,755 +1,755 | |||||
1 | #require p4 execbit symlink |
|
1 | #require p4 execbit symlink | |
2 |
|
2 | |||
3 | $ echo "[extensions]" >> $HGRCPATH |
|
3 | $ echo "[extensions]" >> $HGRCPATH | |
4 | $ echo "convert = " >> $HGRCPATH |
|
4 | $ echo "convert = " >> $HGRCPATH | |
5 |
|
5 | |||
6 | create p4 depot |
|
6 | create p4 depot | |
7 | $ P4ROOT=`pwd`/depot; export P4ROOT |
|
7 | $ P4ROOT=`pwd`/depot; export P4ROOT | |
8 | $ P4AUDIT=$P4ROOT/audit; export P4AUDIT |
|
8 | $ P4AUDIT=$P4ROOT/audit; export P4AUDIT | |
9 | $ P4JOURNAL=$P4ROOT/journal; export P4JOURNAL |
|
9 | $ P4JOURNAL=$P4ROOT/journal; export P4JOURNAL | |
10 | $ P4LOG=$P4ROOT/log; export P4LOG |
|
10 | $ P4LOG=$P4ROOT/log; export P4LOG | |
11 | $ P4PORT=localhost:$HGPORT; export P4PORT |
|
11 | $ P4PORT=localhost:$HGPORT; export P4PORT | |
12 | $ P4DEBUG=1; export P4DEBUG |
|
12 | $ P4DEBUG=1; export P4DEBUG | |
13 | $ P4CHARSET=utf8; export P4CHARSET |
|
13 | $ P4CHARSET=utf8; export P4CHARSET | |
14 |
|
14 | |||
15 | start the p4 server |
|
15 | start the p4 server | |
16 | $ [ ! -d $P4ROOT ] && mkdir $P4ROOT |
|
16 | $ [ ! -d $P4ROOT ] && mkdir $P4ROOT | |
17 | $ p4d -f -J off -xi >$P4ROOT/stdout 2>$P4ROOT/stderr |
|
17 | $ p4d -f -J off -xi >$P4ROOT/stdout 2>$P4ROOT/stderr | |
18 | $ p4d -f -J off >$P4ROOT/stdout 2>$P4ROOT/stderr & |
|
18 | $ p4d -f -J off >$P4ROOT/stdout 2>$P4ROOT/stderr & | |
19 | $ echo $! >> $DAEMON_PIDS |
|
19 | $ echo $! >> $DAEMON_PIDS | |
20 | $ trap "echo stopping the p4 server ; p4 admin stop" EXIT |
|
20 | $ trap "echo stopping the p4 server ; p4 admin stop" EXIT | |
21 |
|
21 | |||
22 | wait for the server to initialize |
|
22 | wait for the server to initialize | |
23 | $ while ! p4 ; do |
|
23 | $ while ! p4 ; do | |
24 | > sleep 1 |
|
24 | > sleep 1 | |
25 | > done >/dev/null 2>/dev/null |
|
25 | > done >/dev/null 2>/dev/null | |
26 |
|
26 | |||
27 | create a client spec |
|
27 | create a client spec | |
28 | $ P4CLIENT=hg-p4-import; export P4CLIENT |
|
28 | $ P4CLIENT=hg-p4-import; export P4CLIENT | |
29 | $ DEPOTPATH=//depot/test-mercurial-import/... |
|
29 | $ DEPOTPATH=//depot/test-mercurial-import/... | |
30 | $ p4 client -o | sed '/^View:/,$ d' >p4client |
|
30 | $ p4 client -o | sed '/^View:/,$ d' >p4client | |
31 | $ echo View: >>p4client |
|
31 | $ echo View: >>p4client | |
32 | $ echo " $DEPOTPATH //$P4CLIENT/..." >>p4client |
|
32 | $ echo " $DEPOTPATH //$P4CLIENT/..." >>p4client | |
33 | $ p4 client -i <p4client |
|
33 | $ p4 client -i <p4client | |
34 | Client hg-p4-import saved. |
|
34 | Client hg-p4-import saved. | |
35 |
|
35 | |||
36 | populate the depot |
|
36 | populate the depot | |
37 | $ TYPES="text binary symlink" |
|
37 | $ TYPES="text binary symlink" | |
38 | $ TYPES="$TYPES text+m text+w text+x text+k text+kx text+ko text+l text+C text+D text+F text+S text+S2" |
|
38 | $ TYPES="$TYPES text+m text+w text+x text+k text+kx text+ko text+l text+C text+D text+F text+S text+S2" | |
39 | $ TYPES="$TYPES binary+k binary+x binary+kx symlink+k" |
|
39 | $ TYPES="$TYPES binary+k binary+x binary+kx symlink+k" | |
40 | $ TYPES="$TYPES ctext cxtext ktext kxtext ltext tempobj ubinary uxbinary xbinary xltext xtempobj xtext" |
|
40 | $ TYPES="$TYPES ctext cxtext ktext kxtext ltext tempobj ubinary uxbinary xbinary xltext xtempobj xtext" | |
41 | not testing these |
|
41 | not testing these | |
42 | $ #TYPES="$TYPES apple resource unicode utf16 uresource xunicode xutf16" |
|
42 | $ #TYPES="$TYPES apple resource unicode utf16 uresource xunicode xutf16" | |
43 | $ for T in $TYPES ; do |
|
43 | $ for T in $TYPES ; do | |
44 | > T2=`echo $T | tr [:upper:] [:lower:]` |
|
44 | > T2=`echo $T | tr [:upper:] [:lower:]` | |
45 | > case $T in |
|
45 | > case $T in | |
46 | > apple) |
|
46 | > apple) | |
47 | > ;; |
|
47 | > ;; | |
48 | > symlink*) |
|
48 | > symlink*) | |
49 | > echo "this is target $T" >target_$T2 |
|
49 | > echo "this is target $T" >target_$T2 | |
50 | > ln -s target_$T file_$T2 |
|
50 | > ln -s target_$T file_$T2 | |
51 | > p4 add target_$T2 |
|
51 | > p4 add target_$T2 | |
52 | > p4 add -t $T file_$T2 |
|
52 | > p4 add -t $T file_$T2 | |
53 | > ;; |
|
53 | > ;; | |
54 | > binary*) |
|
54 | > binary*) | |
55 | > $PYTHON -c "file('file_$T2', 'wb').write('this is $T')" |
|
55 | > $PYTHON -c "file('file_$T2', 'wb').write('this is $T')" | |
56 | > p4 add -t $T file_$T2 |
|
56 | > p4 add -t $T file_$T2 | |
57 | > ;; |
|
57 | > ;; | |
58 | > *) |
|
58 | > *) | |
59 | > echo "this is $T" >file_$T2 |
|
59 | > echo "this is $T" >file_$T2 | |
60 | > p4 add -t $T file_$T2 |
|
60 | > p4 add -t $T file_$T2 | |
61 | > ;; |
|
61 | > ;; | |
62 | > esac |
|
62 | > esac | |
63 | > done |
|
63 | > done | |
64 | //depot/test-mercurial-import/file_text#1 - opened for add |
|
64 | //depot/test-mercurial-import/file_text#1 - opened for add | |
65 | //depot/test-mercurial-import/file_binary#1 - opened for add |
|
65 | //depot/test-mercurial-import/file_binary#1 - opened for add | |
66 | //depot/test-mercurial-import/target_symlink#1 - opened for add |
|
66 | //depot/test-mercurial-import/target_symlink#1 - opened for add | |
67 | //depot/test-mercurial-import/file_symlink#1 - opened for add |
|
67 | //depot/test-mercurial-import/file_symlink#1 - opened for add | |
68 | //depot/test-mercurial-import/file_text+m#1 - opened for add |
|
68 | //depot/test-mercurial-import/file_text+m#1 - opened for add | |
69 | //depot/test-mercurial-import/file_text+w#1 - opened for add |
|
69 | //depot/test-mercurial-import/file_text+w#1 - opened for add | |
70 | //depot/test-mercurial-import/file_text+x#1 - opened for add |
|
70 | //depot/test-mercurial-import/file_text+x#1 - opened for add | |
71 | //depot/test-mercurial-import/file_text+k#1 - opened for add |
|
71 | //depot/test-mercurial-import/file_text+k#1 - opened for add | |
72 | //depot/test-mercurial-import/file_text+kx#1 - opened for add |
|
72 | //depot/test-mercurial-import/file_text+kx#1 - opened for add | |
73 | //depot/test-mercurial-import/file_text+ko#1 - opened for add |
|
73 | //depot/test-mercurial-import/file_text+ko#1 - opened for add | |
74 | //depot/test-mercurial-import/file_text+l#1 - opened for add |
|
74 | //depot/test-mercurial-import/file_text+l#1 - opened for add | |
75 | //depot/test-mercurial-import/file_text+c#1 - opened for add |
|
75 | //depot/test-mercurial-import/file_text+c#1 - opened for add | |
76 | //depot/test-mercurial-import/file_text+d#1 - opened for add |
|
76 | //depot/test-mercurial-import/file_text+d#1 - opened for add | |
77 | //depot/test-mercurial-import/file_text+f#1 - opened for add |
|
77 | //depot/test-mercurial-import/file_text+f#1 - opened for add | |
78 | //depot/test-mercurial-import/file_text+s#1 - opened for add |
|
78 | //depot/test-mercurial-import/file_text+s#1 - opened for add | |
79 | //depot/test-mercurial-import/file_text+s2#1 - opened for add |
|
79 | //depot/test-mercurial-import/file_text+s2#1 - opened for add | |
80 | //depot/test-mercurial-import/file_binary+k#1 - opened for add |
|
80 | //depot/test-mercurial-import/file_binary+k#1 - opened for add | |
81 | //depot/test-mercurial-import/file_binary+x#1 - opened for add |
|
81 | //depot/test-mercurial-import/file_binary+x#1 - opened for add | |
82 | //depot/test-mercurial-import/file_binary+kx#1 - opened for add |
|
82 | //depot/test-mercurial-import/file_binary+kx#1 - opened for add | |
83 | //depot/test-mercurial-import/target_symlink+k#1 - opened for add |
|
83 | //depot/test-mercurial-import/target_symlink+k#1 - opened for add | |
84 | //depot/test-mercurial-import/file_symlink+k#1 - opened for add |
|
84 | //depot/test-mercurial-import/file_symlink+k#1 - opened for add | |
85 | //depot/test-mercurial-import/file_ctext#1 - opened for add |
|
85 | //depot/test-mercurial-import/file_ctext#1 - opened for add | |
86 | //depot/test-mercurial-import/file_cxtext#1 - opened for add |
|
86 | //depot/test-mercurial-import/file_cxtext#1 - opened for add | |
87 | //depot/test-mercurial-import/file_ktext#1 - opened for add |
|
87 | //depot/test-mercurial-import/file_ktext#1 - opened for add | |
88 | //depot/test-mercurial-import/file_kxtext#1 - opened for add |
|
88 | //depot/test-mercurial-import/file_kxtext#1 - opened for add | |
89 | //depot/test-mercurial-import/file_ltext#1 - opened for add |
|
89 | //depot/test-mercurial-import/file_ltext#1 - opened for add | |
90 | //depot/test-mercurial-import/file_tempobj#1 - opened for add |
|
90 | //depot/test-mercurial-import/file_tempobj#1 - opened for add | |
91 | //depot/test-mercurial-import/file_ubinary#1 - opened for add |
|
91 | //depot/test-mercurial-import/file_ubinary#1 - opened for add | |
92 | //depot/test-mercurial-import/file_uxbinary#1 - opened for add |
|
92 | //depot/test-mercurial-import/file_uxbinary#1 - opened for add | |
93 | //depot/test-mercurial-import/file_xbinary#1 - opened for add |
|
93 | //depot/test-mercurial-import/file_xbinary#1 - opened for add | |
94 | //depot/test-mercurial-import/file_xltext#1 - opened for add |
|
94 | //depot/test-mercurial-import/file_xltext#1 - opened for add | |
95 | //depot/test-mercurial-import/file_xtempobj#1 - opened for add |
|
95 | //depot/test-mercurial-import/file_xtempobj#1 - opened for add | |
96 | //depot/test-mercurial-import/file_xtext#1 - opened for add |
|
96 | //depot/test-mercurial-import/file_xtext#1 - opened for add | |
97 | $ p4 submit -d initial |
|
97 | $ p4 submit -d initial | |
98 | Submitting change 1. |
|
98 | Submitting change 1. | |
99 | Locking 33 files ... |
|
99 | Locking 33 files ... | |
100 | add //depot/test-mercurial-import/file_binary#1 |
|
100 | add //depot/test-mercurial-import/file_binary#1 | |
101 | add //depot/test-mercurial-import/file_binary+k#1 |
|
101 | add //depot/test-mercurial-import/file_binary+k#1 | |
102 | add //depot/test-mercurial-import/file_binary+kx#1 |
|
102 | add //depot/test-mercurial-import/file_binary+kx#1 | |
103 | add //depot/test-mercurial-import/file_binary+x#1 |
|
103 | add //depot/test-mercurial-import/file_binary+x#1 | |
104 | add //depot/test-mercurial-import/file_ctext#1 |
|
104 | add //depot/test-mercurial-import/file_ctext#1 | |
105 | add //depot/test-mercurial-import/file_cxtext#1 |
|
105 | add //depot/test-mercurial-import/file_cxtext#1 | |
106 | add //depot/test-mercurial-import/file_ktext#1 |
|
106 | add //depot/test-mercurial-import/file_ktext#1 | |
107 | add //depot/test-mercurial-import/file_kxtext#1 |
|
107 | add //depot/test-mercurial-import/file_kxtext#1 | |
108 | add //depot/test-mercurial-import/file_ltext#1 |
|
108 | add //depot/test-mercurial-import/file_ltext#1 | |
109 | add //depot/test-mercurial-import/file_symlink#1 |
|
109 | add //depot/test-mercurial-import/file_symlink#1 | |
110 | add //depot/test-mercurial-import/file_symlink+k#1 |
|
110 | add //depot/test-mercurial-import/file_symlink+k#1 | |
111 | add //depot/test-mercurial-import/file_tempobj#1 |
|
111 | add //depot/test-mercurial-import/file_tempobj#1 | |
112 | add //depot/test-mercurial-import/file_text#1 |
|
112 | add //depot/test-mercurial-import/file_text#1 | |
113 | add //depot/test-mercurial-import/file_text+c#1 |
|
113 | add //depot/test-mercurial-import/file_text+c#1 | |
114 | add //depot/test-mercurial-import/file_text+d#1 |
|
114 | add //depot/test-mercurial-import/file_text+d#1 | |
115 | add //depot/test-mercurial-import/file_text+f#1 |
|
115 | add //depot/test-mercurial-import/file_text+f#1 | |
116 | add //depot/test-mercurial-import/file_text+k#1 |
|
116 | add //depot/test-mercurial-import/file_text+k#1 | |
117 | add //depot/test-mercurial-import/file_text+ko#1 |
|
117 | add //depot/test-mercurial-import/file_text+ko#1 | |
118 | add //depot/test-mercurial-import/file_text+kx#1 |
|
118 | add //depot/test-mercurial-import/file_text+kx#1 | |
119 | add //depot/test-mercurial-import/file_text+l#1 |
|
119 | add //depot/test-mercurial-import/file_text+l#1 | |
120 | add //depot/test-mercurial-import/file_text+m#1 |
|
120 | add //depot/test-mercurial-import/file_text+m#1 | |
121 | add //depot/test-mercurial-import/file_text+s#1 |
|
121 | add //depot/test-mercurial-import/file_text+s#1 | |
122 | add //depot/test-mercurial-import/file_text+s2#1 |
|
122 | add //depot/test-mercurial-import/file_text+s2#1 | |
123 | add //depot/test-mercurial-import/file_text+w#1 |
|
123 | add //depot/test-mercurial-import/file_text+w#1 | |
124 | add //depot/test-mercurial-import/file_text+x#1 |
|
124 | add //depot/test-mercurial-import/file_text+x#1 | |
125 | add //depot/test-mercurial-import/file_ubinary#1 |
|
125 | add //depot/test-mercurial-import/file_ubinary#1 | |
126 | add //depot/test-mercurial-import/file_uxbinary#1 |
|
126 | add //depot/test-mercurial-import/file_uxbinary#1 | |
127 | add //depot/test-mercurial-import/file_xbinary#1 |
|
127 | add //depot/test-mercurial-import/file_xbinary#1 | |
128 | add //depot/test-mercurial-import/file_xltext#1 |
|
128 | add //depot/test-mercurial-import/file_xltext#1 | |
129 | add //depot/test-mercurial-import/file_xtempobj#1 |
|
129 | add //depot/test-mercurial-import/file_xtempobj#1 | |
130 | add //depot/test-mercurial-import/file_xtext#1 |
|
130 | add //depot/test-mercurial-import/file_xtext#1 | |
131 | add //depot/test-mercurial-import/target_symlink#1 |
|
131 | add //depot/test-mercurial-import/target_symlink#1 | |
132 | add //depot/test-mercurial-import/target_symlink+k#1 |
|
132 | add //depot/test-mercurial-import/target_symlink+k#1 | |
133 | Change 1 submitted. |
|
133 | Change 1 submitted. | |
134 | //depot/test-mercurial-import/file_binary+k#1 - refreshing |
|
134 | //depot/test-mercurial-import/file_binary+k#1 - refreshing | |
135 | //depot/test-mercurial-import/file_binary+kx#1 - refreshing |
|
135 | //depot/test-mercurial-import/file_binary+kx#1 - refreshing | |
136 | //depot/test-mercurial-import/file_ktext#1 - refreshing |
|
136 | //depot/test-mercurial-import/file_ktext#1 - refreshing | |
137 | //depot/test-mercurial-import/file_kxtext#1 - refreshing |
|
137 | //depot/test-mercurial-import/file_kxtext#1 - refreshing | |
138 | //depot/test-mercurial-import/file_symlink+k#1 - refreshing |
|
138 | //depot/test-mercurial-import/file_symlink+k#1 - refreshing | |
139 | //depot/test-mercurial-import/file_text+k#1 - refreshing |
|
139 | //depot/test-mercurial-import/file_text+k#1 - refreshing | |
140 | //depot/test-mercurial-import/file_text+ko#1 - refreshing |
|
140 | //depot/test-mercurial-import/file_text+ko#1 - refreshing | |
141 | //depot/test-mercurial-import/file_text+kx#1 - refreshing |
|
141 | //depot/test-mercurial-import/file_text+kx#1 - refreshing | |
142 |
|
142 | |||
143 | test keyword expansion |
|
143 | test keyword expansion | |
144 | $ p4 edit file_* target_* |
|
144 | $ p4 edit file_* target_* | |
145 | //depot/test-mercurial-import/file_binary#1 - opened for edit |
|
145 | //depot/test-mercurial-import/file_binary#1 - opened for edit | |
146 | //depot/test-mercurial-import/file_binary+k#1 - opened for edit |
|
146 | //depot/test-mercurial-import/file_binary+k#1 - opened for edit | |
147 | //depot/test-mercurial-import/file_binary+kx#1 - opened for edit |
|
147 | //depot/test-mercurial-import/file_binary+kx#1 - opened for edit | |
148 | //depot/test-mercurial-import/file_binary+x#1 - opened for edit |
|
148 | //depot/test-mercurial-import/file_binary+x#1 - opened for edit | |
149 | //depot/test-mercurial-import/file_ctext#1 - opened for edit |
|
149 | //depot/test-mercurial-import/file_ctext#1 - opened for edit | |
150 | //depot/test-mercurial-import/file_cxtext#1 - opened for edit |
|
150 | //depot/test-mercurial-import/file_cxtext#1 - opened for edit | |
151 | //depot/test-mercurial-import/file_ktext#1 - opened for edit |
|
151 | //depot/test-mercurial-import/file_ktext#1 - opened for edit | |
152 | //depot/test-mercurial-import/file_kxtext#1 - opened for edit |
|
152 | //depot/test-mercurial-import/file_kxtext#1 - opened for edit | |
153 | //depot/test-mercurial-import/file_ltext#1 - opened for edit |
|
153 | //depot/test-mercurial-import/file_ltext#1 - opened for edit | |
154 | //depot/test-mercurial-import/file_symlink#1 - opened for edit |
|
154 | //depot/test-mercurial-import/file_symlink#1 - opened for edit | |
155 | //depot/test-mercurial-import/file_symlink+k#1 - opened for edit |
|
155 | //depot/test-mercurial-import/file_symlink+k#1 - opened for edit | |
156 | //depot/test-mercurial-import/file_tempobj#1 - opened for edit |
|
156 | //depot/test-mercurial-import/file_tempobj#1 - opened for edit | |
157 | //depot/test-mercurial-import/file_text#1 - opened for edit |
|
157 | //depot/test-mercurial-import/file_text#1 - opened for edit | |
158 | //depot/test-mercurial-import/file_text+c#1 - opened for edit |
|
158 | //depot/test-mercurial-import/file_text+c#1 - opened for edit | |
159 | //depot/test-mercurial-import/file_text+d#1 - opened for edit |
|
159 | //depot/test-mercurial-import/file_text+d#1 - opened for edit | |
160 | //depot/test-mercurial-import/file_text+f#1 - opened for edit |
|
160 | //depot/test-mercurial-import/file_text+f#1 - opened for edit | |
161 | //depot/test-mercurial-import/file_text+k#1 - opened for edit |
|
161 | //depot/test-mercurial-import/file_text+k#1 - opened for edit | |
162 | //depot/test-mercurial-import/file_text+ko#1 - opened for edit |
|
162 | //depot/test-mercurial-import/file_text+ko#1 - opened for edit | |
163 | //depot/test-mercurial-import/file_text+kx#1 - opened for edit |
|
163 | //depot/test-mercurial-import/file_text+kx#1 - opened for edit | |
164 | //depot/test-mercurial-import/file_text+l#1 - opened for edit |
|
164 | //depot/test-mercurial-import/file_text+l#1 - opened for edit | |
165 | //depot/test-mercurial-import/file_text+m#1 - opened for edit |
|
165 | //depot/test-mercurial-import/file_text+m#1 - opened for edit | |
166 | //depot/test-mercurial-import/file_text+s#1 - opened for edit |
|
166 | //depot/test-mercurial-import/file_text+s#1 - opened for edit | |
167 | //depot/test-mercurial-import/file_text+s2#1 - opened for edit |
|
167 | //depot/test-mercurial-import/file_text+s2#1 - opened for edit | |
168 | //depot/test-mercurial-import/file_text+w#1 - opened for edit |
|
168 | //depot/test-mercurial-import/file_text+w#1 - opened for edit | |
169 | //depot/test-mercurial-import/file_text+x#1 - opened for edit |
|
169 | //depot/test-mercurial-import/file_text+x#1 - opened for edit | |
170 | //depot/test-mercurial-import/file_ubinary#1 - opened for edit |
|
170 | //depot/test-mercurial-import/file_ubinary#1 - opened for edit | |
171 | //depot/test-mercurial-import/file_uxbinary#1 - opened for edit |
|
171 | //depot/test-mercurial-import/file_uxbinary#1 - opened for edit | |
172 | //depot/test-mercurial-import/file_xbinary#1 - opened for edit |
|
172 | //depot/test-mercurial-import/file_xbinary#1 - opened for edit | |
173 | //depot/test-mercurial-import/file_xltext#1 - opened for edit |
|
173 | //depot/test-mercurial-import/file_xltext#1 - opened for edit | |
174 | //depot/test-mercurial-import/file_xtempobj#1 - opened for edit |
|
174 | //depot/test-mercurial-import/file_xtempobj#1 - opened for edit | |
175 | //depot/test-mercurial-import/file_xtext#1 - opened for edit |
|
175 | //depot/test-mercurial-import/file_xtext#1 - opened for edit | |
176 | //depot/test-mercurial-import/target_symlink#1 - opened for edit |
|
176 | //depot/test-mercurial-import/target_symlink#1 - opened for edit | |
177 | //depot/test-mercurial-import/target_symlink+k#1 - opened for edit |
|
177 | //depot/test-mercurial-import/target_symlink+k#1 - opened for edit | |
178 | $ for T in $TYPES ; do |
|
178 | $ for T in $TYPES ; do | |
179 | > T2=`echo $T | tr [:upper:] [:lower:]` |
|
179 | > T2=`echo $T | tr [:upper:] [:lower:]` | |
180 | > echo '$Id$' >>file_$T2 |
|
180 | > echo '$Id$' >>file_$T2 | |
181 | > echo '$Header$' >>file_$T2 |
|
181 | > echo '$Header$' >>file_$T2 | |
182 | > echo '$Date$' >>file_$T2 |
|
182 | > echo '$Date$' >>file_$T2 | |
183 | > echo '$DateTime$' >>file_$T2 |
|
183 | > echo '$DateTime$' >>file_$T2 | |
184 | > echo '$Change$' >>file_$T2 |
|
184 | > echo '$Change$' >>file_$T2 | |
185 | > echo '$File$' >>file_$T2 |
|
185 | > echo '$File$' >>file_$T2 | |
186 | > echo '$Revision$' >>file_$T2 |
|
186 | > echo '$Revision$' >>file_$T2 | |
187 | > echo '$Header$$Header$Header$' >>file_$T2 |
|
187 | > echo '$Header$$Header$Header$' >>file_$T2 | |
188 | > done |
|
188 | > done | |
189 |
|
189 | |||
190 | $ ln -s 'target_$Header$' crazy_symlink+k |
|
190 | $ ln -s 'target_$Header$' crazy_symlink+k | |
191 | $ p4 add -t symlink+k crazy_symlink+k |
|
191 | $ p4 add -t symlink+k crazy_symlink+k | |
192 | //depot/test-mercurial-import/crazy_symlink+k#1 - opened for add |
|
192 | //depot/test-mercurial-import/crazy_symlink+k#1 - opened for add | |
193 |
|
193 | |||
194 | $ p4 submit -d keywords |
|
194 | $ p4 submit -d keywords | |
195 | Submitting change 2. |
|
195 | Submitting change 2. | |
196 | Locking 34 files ... |
|
196 | Locking 34 files ... | |
197 | add //depot/test-mercurial-import/crazy_symlink+k#1 |
|
197 | add //depot/test-mercurial-import/crazy_symlink+k#1 | |
198 | edit //depot/test-mercurial-import/file_binary#2 |
|
198 | edit //depot/test-mercurial-import/file_binary#2 | |
199 | edit //depot/test-mercurial-import/file_binary+k#2 |
|
199 | edit //depot/test-mercurial-import/file_binary+k#2 | |
200 | edit //depot/test-mercurial-import/file_binary+kx#2 |
|
200 | edit //depot/test-mercurial-import/file_binary+kx#2 | |
201 | edit //depot/test-mercurial-import/file_binary+x#2 |
|
201 | edit //depot/test-mercurial-import/file_binary+x#2 | |
202 | edit //depot/test-mercurial-import/file_ctext#2 |
|
202 | edit //depot/test-mercurial-import/file_ctext#2 | |
203 | edit //depot/test-mercurial-import/file_cxtext#2 |
|
203 | edit //depot/test-mercurial-import/file_cxtext#2 | |
204 | edit //depot/test-mercurial-import/file_ktext#2 |
|
204 | edit //depot/test-mercurial-import/file_ktext#2 | |
205 | edit //depot/test-mercurial-import/file_kxtext#2 |
|
205 | edit //depot/test-mercurial-import/file_kxtext#2 | |
206 | edit //depot/test-mercurial-import/file_ltext#2 |
|
206 | edit //depot/test-mercurial-import/file_ltext#2 | |
207 | edit //depot/test-mercurial-import/file_symlink#2 |
|
207 | edit //depot/test-mercurial-import/file_symlink#2 | |
208 | edit //depot/test-mercurial-import/file_symlink+k#2 |
|
208 | edit //depot/test-mercurial-import/file_symlink+k#2 | |
209 | edit //depot/test-mercurial-import/file_tempobj#2 |
|
209 | edit //depot/test-mercurial-import/file_tempobj#2 | |
210 | edit //depot/test-mercurial-import/file_text#2 |
|
210 | edit //depot/test-mercurial-import/file_text#2 | |
211 | edit //depot/test-mercurial-import/file_text+c#2 |
|
211 | edit //depot/test-mercurial-import/file_text+c#2 | |
212 | edit //depot/test-mercurial-import/file_text+d#2 |
|
212 | edit //depot/test-mercurial-import/file_text+d#2 | |
213 | edit //depot/test-mercurial-import/file_text+f#2 |
|
213 | edit //depot/test-mercurial-import/file_text+f#2 | |
214 | edit //depot/test-mercurial-import/file_text+k#2 |
|
214 | edit //depot/test-mercurial-import/file_text+k#2 | |
215 | edit //depot/test-mercurial-import/file_text+ko#2 |
|
215 | edit //depot/test-mercurial-import/file_text+ko#2 | |
216 | edit //depot/test-mercurial-import/file_text+kx#2 |
|
216 | edit //depot/test-mercurial-import/file_text+kx#2 | |
217 | edit //depot/test-mercurial-import/file_text+l#2 |
|
217 | edit //depot/test-mercurial-import/file_text+l#2 | |
218 | edit //depot/test-mercurial-import/file_text+m#2 |
|
218 | edit //depot/test-mercurial-import/file_text+m#2 | |
219 | edit //depot/test-mercurial-import/file_text+s#2 |
|
219 | edit //depot/test-mercurial-import/file_text+s#2 | |
220 | edit //depot/test-mercurial-import/file_text+s2#2 |
|
220 | edit //depot/test-mercurial-import/file_text+s2#2 | |
221 | edit //depot/test-mercurial-import/file_text+w#2 |
|
221 | edit //depot/test-mercurial-import/file_text+w#2 | |
222 | edit //depot/test-mercurial-import/file_text+x#2 |
|
222 | edit //depot/test-mercurial-import/file_text+x#2 | |
223 | edit //depot/test-mercurial-import/file_ubinary#2 |
|
223 | edit //depot/test-mercurial-import/file_ubinary#2 | |
224 | edit //depot/test-mercurial-import/file_uxbinary#2 |
|
224 | edit //depot/test-mercurial-import/file_uxbinary#2 | |
225 | edit //depot/test-mercurial-import/file_xbinary#2 |
|
225 | edit //depot/test-mercurial-import/file_xbinary#2 | |
226 | edit //depot/test-mercurial-import/file_xltext#2 |
|
226 | edit //depot/test-mercurial-import/file_xltext#2 | |
227 | edit //depot/test-mercurial-import/file_xtempobj#2 |
|
227 | edit //depot/test-mercurial-import/file_xtempobj#2 | |
228 | edit //depot/test-mercurial-import/file_xtext#2 |
|
228 | edit //depot/test-mercurial-import/file_xtext#2 | |
229 | edit //depot/test-mercurial-import/target_symlink#2 |
|
229 | edit //depot/test-mercurial-import/target_symlink#2 | |
230 | edit //depot/test-mercurial-import/target_symlink+k#2 |
|
230 | edit //depot/test-mercurial-import/target_symlink+k#2 | |
231 | Change 2 submitted. |
|
231 | Change 2 submitted. | |
232 | //depot/test-mercurial-import/crazy_symlink+k#1 - refreshing |
|
232 | //depot/test-mercurial-import/crazy_symlink+k#1 - refreshing | |
233 | //depot/test-mercurial-import/file_binary+k#2 - refreshing |
|
233 | //depot/test-mercurial-import/file_binary+k#2 - refreshing | |
234 | //depot/test-mercurial-import/file_binary+kx#2 - refreshing |
|
234 | //depot/test-mercurial-import/file_binary+kx#2 - refreshing | |
235 | //depot/test-mercurial-import/file_ktext#2 - refreshing |
|
235 | //depot/test-mercurial-import/file_ktext#2 - refreshing | |
236 | //depot/test-mercurial-import/file_kxtext#2 - refreshing |
|
236 | //depot/test-mercurial-import/file_kxtext#2 - refreshing | |
237 | //depot/test-mercurial-import/file_symlink+k#2 - refreshing |
|
237 | //depot/test-mercurial-import/file_symlink+k#2 - refreshing | |
238 | //depot/test-mercurial-import/file_text+k#2 - refreshing |
|
238 | //depot/test-mercurial-import/file_text+k#2 - refreshing | |
239 | //depot/test-mercurial-import/file_text+ko#2 - refreshing |
|
239 | //depot/test-mercurial-import/file_text+ko#2 - refreshing | |
240 | //depot/test-mercurial-import/file_text+kx#2 - refreshing |
|
240 | //depot/test-mercurial-import/file_text+kx#2 - refreshing | |
241 |
|
241 | |||
242 | check keywords in p4 |
|
242 | check keywords in p4 | |
243 | $ grep -H Header file_* |
|
243 | $ grep -H Header file_* | |
244 | file_binary:$Header$ |
|
244 | file_binary:$Header$ | |
245 | file_binary:$Header$$Header$Header$ |
|
245 | file_binary:$Header$$Header$Header$ | |
246 | file_binary+k:$Header: //depot/test-mercurial-import/file_binary+k#2 $ |
|
246 | file_binary+k:$Header: //depot/test-mercurial-import/file_binary+k#2 $ | |
247 | file_binary+k:$Header: //depot/test-mercurial-import/file_binary+k#2 $$Header: //depot/test-mercurial-import/file_binary+k#2 $Header$ |
|
247 | file_binary+k:$Header: //depot/test-mercurial-import/file_binary+k#2 $$Header: //depot/test-mercurial-import/file_binary+k#2 $Header$ | |
248 | file_binary+kx:$Header: //depot/test-mercurial-import/file_binary+kx#2 $ |
|
248 | file_binary+kx:$Header: //depot/test-mercurial-import/file_binary+kx#2 $ | |
249 | file_binary+kx:$Header: //depot/test-mercurial-import/file_binary+kx#2 $$Header: //depot/test-mercurial-import/file_binary+kx#2 $Header$ |
|
249 | file_binary+kx:$Header: //depot/test-mercurial-import/file_binary+kx#2 $$Header: //depot/test-mercurial-import/file_binary+kx#2 $Header$ | |
250 | file_binary+x:$Header$ |
|
250 | file_binary+x:$Header$ | |
251 | file_binary+x:$Header$$Header$Header$ |
|
251 | file_binary+x:$Header$$Header$Header$ | |
252 | file_ctext:$Header$ |
|
252 | file_ctext:$Header$ | |
253 | file_ctext:$Header$$Header$Header$ |
|
253 | file_ctext:$Header$$Header$Header$ | |
254 | file_cxtext:$Header$ |
|
254 | file_cxtext:$Header$ | |
255 | file_cxtext:$Header$$Header$Header$ |
|
255 | file_cxtext:$Header$$Header$Header$ | |
256 | file_ktext:$Header: //depot/test-mercurial-import/file_ktext#2 $ |
|
256 | file_ktext:$Header: //depot/test-mercurial-import/file_ktext#2 $ | |
257 | file_ktext:$Header: //depot/test-mercurial-import/file_ktext#2 $$Header: //depot/test-mercurial-import/file_ktext#2 $Header$ |
|
257 | file_ktext:$Header: //depot/test-mercurial-import/file_ktext#2 $$Header: //depot/test-mercurial-import/file_ktext#2 $Header$ | |
258 | file_kxtext:$Header: //depot/test-mercurial-import/file_kxtext#2 $ |
|
258 | file_kxtext:$Header: //depot/test-mercurial-import/file_kxtext#2 $ | |
259 | file_kxtext:$Header: //depot/test-mercurial-import/file_kxtext#2 $$Header: //depot/test-mercurial-import/file_kxtext#2 $Header$ |
|
259 | file_kxtext:$Header: //depot/test-mercurial-import/file_kxtext#2 $$Header: //depot/test-mercurial-import/file_kxtext#2 $Header$ | |
260 | file_ltext:$Header$ |
|
260 | file_ltext:$Header$ | |
261 | file_ltext:$Header$$Header$Header$ |
|
261 | file_ltext:$Header$$Header$Header$ | |
262 | file_symlink:$Header$ |
|
262 | file_symlink:$Header$ | |
263 | file_symlink:$Header$$Header$Header$ |
|
263 | file_symlink:$Header$$Header$Header$ | |
264 | file_symlink+k:$Header$ |
|
264 | file_symlink+k:$Header$ | |
265 | file_symlink+k:$Header$$Header$Header$ |
|
265 | file_symlink+k:$Header$$Header$Header$ | |
266 | file_tempobj:$Header$ |
|
266 | file_tempobj:$Header$ | |
267 | file_tempobj:$Header$$Header$Header$ |
|
267 | file_tempobj:$Header$$Header$Header$ | |
268 | file_text:$Header$ |
|
268 | file_text:$Header$ | |
269 | file_text:$Header$$Header$Header$ |
|
269 | file_text:$Header$$Header$Header$ | |
270 | file_text+c:$Header$ |
|
270 | file_text+c:$Header$ | |
271 | file_text+c:$Header$$Header$Header$ |
|
271 | file_text+c:$Header$$Header$Header$ | |
272 | file_text+d:$Header$ |
|
272 | file_text+d:$Header$ | |
273 | file_text+d:$Header$$Header$Header$ |
|
273 | file_text+d:$Header$$Header$Header$ | |
274 | file_text+f:$Header$ |
|
274 | file_text+f:$Header$ | |
275 | file_text+f:$Header$$Header$Header$ |
|
275 | file_text+f:$Header$$Header$Header$ | |
276 | file_text+k:$Header: //depot/test-mercurial-import/file_text+k#2 $ |
|
276 | file_text+k:$Header: //depot/test-mercurial-import/file_text+k#2 $ | |
277 | file_text+k:$Header: //depot/test-mercurial-import/file_text+k#2 $$Header: //depot/test-mercurial-import/file_text+k#2 $Header$ |
|
277 | file_text+k:$Header: //depot/test-mercurial-import/file_text+k#2 $$Header: //depot/test-mercurial-import/file_text+k#2 $Header$ | |
278 | file_text+ko:$Header: //depot/test-mercurial-import/file_text+ko#2 $ |
|
278 | file_text+ko:$Header: //depot/test-mercurial-import/file_text+ko#2 $ | |
279 | file_text+ko:$Header: //depot/test-mercurial-import/file_text+ko#2 $$Header: //depot/test-mercurial-import/file_text+ko#2 $Header$ |
|
279 | file_text+ko:$Header: //depot/test-mercurial-import/file_text+ko#2 $$Header: //depot/test-mercurial-import/file_text+ko#2 $Header$ | |
280 | file_text+kx:$Header: //depot/test-mercurial-import/file_text+kx#2 $ |
|
280 | file_text+kx:$Header: //depot/test-mercurial-import/file_text+kx#2 $ | |
281 | file_text+kx:$Header: //depot/test-mercurial-import/file_text+kx#2 $$Header: //depot/test-mercurial-import/file_text+kx#2 $Header$ |
|
281 | file_text+kx:$Header: //depot/test-mercurial-import/file_text+kx#2 $$Header: //depot/test-mercurial-import/file_text+kx#2 $Header$ | |
282 | file_text+l:$Header$ |
|
282 | file_text+l:$Header$ | |
283 | file_text+l:$Header$$Header$Header$ |
|
283 | file_text+l:$Header$$Header$Header$ | |
284 | file_text+m:$Header$ |
|
284 | file_text+m:$Header$ | |
285 | file_text+m:$Header$$Header$Header$ |
|
285 | file_text+m:$Header$$Header$Header$ | |
286 | file_text+s:$Header$ |
|
286 | file_text+s:$Header$ | |
287 | file_text+s:$Header$$Header$Header$ |
|
287 | file_text+s:$Header$$Header$Header$ | |
288 | file_text+s2:$Header$ |
|
288 | file_text+s2:$Header$ | |
289 | file_text+s2:$Header$$Header$Header$ |
|
289 | file_text+s2:$Header$$Header$Header$ | |
290 | file_text+w:$Header$ |
|
290 | file_text+w:$Header$ | |
291 | file_text+w:$Header$$Header$Header$ |
|
291 | file_text+w:$Header$$Header$Header$ | |
292 | file_text+x:$Header$ |
|
292 | file_text+x:$Header$ | |
293 | file_text+x:$Header$$Header$Header$ |
|
293 | file_text+x:$Header$$Header$Header$ | |
294 | file_ubinary:$Header$ |
|
294 | file_ubinary:$Header$ | |
295 | file_ubinary:$Header$$Header$Header$ |
|
295 | file_ubinary:$Header$$Header$Header$ | |
296 | file_uxbinary:$Header$ |
|
296 | file_uxbinary:$Header$ | |
297 | file_uxbinary:$Header$$Header$Header$ |
|
297 | file_uxbinary:$Header$$Header$Header$ | |
298 | file_xbinary:$Header$ |
|
298 | file_xbinary:$Header$ | |
299 | file_xbinary:$Header$$Header$Header$ |
|
299 | file_xbinary:$Header$$Header$Header$ | |
300 | file_xltext:$Header$ |
|
300 | file_xltext:$Header$ | |
301 | file_xltext:$Header$$Header$Header$ |
|
301 | file_xltext:$Header$$Header$Header$ | |
302 | file_xtempobj:$Header$ |
|
302 | file_xtempobj:$Header$ | |
303 | file_xtempobj:$Header$$Header$Header$ |
|
303 | file_xtempobj:$Header$$Header$Header$ | |
304 | file_xtext:$Header$ |
|
304 | file_xtext:$Header$ | |
305 | file_xtext:$Header$$Header$Header$ |
|
305 | file_xtext:$Header$$Header$Header$ | |
306 |
|
306 | |||
307 | convert |
|
307 | convert | |
308 | $ hg convert -s p4 $DEPOTPATH dst |
|
308 | $ hg convert -s p4 $DEPOTPATH dst | |
309 | initializing destination dst repository |
|
309 | initializing destination dst repository | |
|
310 | scanning source... | |||
310 | reading p4 views |
|
311 | reading p4 views | |
311 | collecting p4 changelists |
|
312 | collecting p4 changelists | |
312 | 1 initial |
|
313 | 1 initial | |
313 | 2 keywords |
|
314 | 2 keywords | |
314 | scanning source... |
|
|||
315 | sorting... |
|
315 | sorting... | |
316 | converting... |
|
316 | converting... | |
317 | 1 initial |
|
317 | 1 initial | |
318 | 0 keywords |
|
318 | 0 keywords | |
319 | $ hg -R dst log --template 'rev={rev} desc="{desc}" tags="{tags}" files="{files}"\n' |
|
319 | $ hg -R dst log --template 'rev={rev} desc="{desc}" tags="{tags}" files="{files}"\n' | |
320 | rev=1 desc="keywords" tags="tip" files="crazy_symlink+k file_binary file_binary+k file_binary+kx file_binary+x file_ctext file_cxtext file_ktext file_kxtext file_ltext file_tempobj file_text file_text+c file_text+d file_text+f file_text+k file_text+ko file_text+kx file_text+l file_text+m file_text+s file_text+s2 file_text+w file_text+x file_ubinary file_uxbinary file_xbinary file_xltext file_xtempobj file_xtext target_symlink target_symlink+k" |
|
320 | rev=1 desc="keywords" tags="tip" files="crazy_symlink+k file_binary file_binary+k file_binary+kx file_binary+x file_ctext file_cxtext file_ktext file_kxtext file_ltext file_tempobj file_text file_text+c file_text+d file_text+f file_text+k file_text+ko file_text+kx file_text+l file_text+m file_text+s file_text+s2 file_text+w file_text+x file_ubinary file_uxbinary file_xbinary file_xltext file_xtempobj file_xtext target_symlink target_symlink+k" | |
321 | rev=0 desc="initial" tags="" files="file_binary file_binary+k file_binary+kx file_binary+x file_ctext file_cxtext file_ktext file_kxtext file_ltext file_symlink file_symlink+k file_text file_text+c file_text+d file_text+f file_text+k file_text+ko file_text+kx file_text+l file_text+m file_text+s2 file_text+w file_text+x file_ubinary file_uxbinary file_xbinary file_xltext file_xtext target_symlink target_symlink+k" |
|
321 | rev=0 desc="initial" tags="" files="file_binary file_binary+k file_binary+kx file_binary+x file_ctext file_cxtext file_ktext file_kxtext file_ltext file_symlink file_symlink+k file_text file_text+c file_text+d file_text+f file_text+k file_text+ko file_text+kx file_text+l file_text+m file_text+s2 file_text+w file_text+x file_ubinary file_uxbinary file_xbinary file_xltext file_xtext target_symlink target_symlink+k" | |
322 |
|
322 | |||
323 | revision 0 |
|
323 | revision 0 | |
324 | $ hg -R dst update 0 |
|
324 | $ hg -R dst update 0 | |
325 | 30 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
325 | 30 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
326 | $ head dst/file_* | cat -v |
|
326 | $ head dst/file_* | cat -v | |
327 | ==> dst/file_binary <== |
|
327 | ==> dst/file_binary <== | |
328 | this is binary |
|
328 | this is binary | |
329 | ==> dst/file_binary+k <== |
|
329 | ==> dst/file_binary+k <== | |
330 | this is binary+k |
|
330 | this is binary+k | |
331 | ==> dst/file_binary+kx <== |
|
331 | ==> dst/file_binary+kx <== | |
332 | this is binary+kx |
|
332 | this is binary+kx | |
333 | ==> dst/file_binary+x <== |
|
333 | ==> dst/file_binary+x <== | |
334 | this is binary+x |
|
334 | this is binary+x | |
335 | ==> dst/file_ctext <== |
|
335 | ==> dst/file_ctext <== | |
336 | this is ctext |
|
336 | this is ctext | |
337 |
|
337 | |||
338 | ==> dst/file_cxtext <== |
|
338 | ==> dst/file_cxtext <== | |
339 | this is cxtext |
|
339 | this is cxtext | |
340 |
|
340 | |||
341 | ==> dst/file_ktext <== |
|
341 | ==> dst/file_ktext <== | |
342 | this is ktext |
|
342 | this is ktext | |
343 |
|
343 | |||
344 | ==> dst/file_kxtext <== |
|
344 | ==> dst/file_kxtext <== | |
345 | this is kxtext |
|
345 | this is kxtext | |
346 |
|
346 | |||
347 | ==> dst/file_ltext <== |
|
347 | ==> dst/file_ltext <== | |
348 | this is ltext |
|
348 | this is ltext | |
349 |
|
349 | |||
350 | ==> dst/file_symlink <== |
|
350 | ==> dst/file_symlink <== | |
351 | this is target symlink |
|
351 | this is target symlink | |
352 |
|
352 | |||
353 | ==> dst/file_symlink+k <== |
|
353 | ==> dst/file_symlink+k <== | |
354 | this is target symlink+k |
|
354 | this is target symlink+k | |
355 |
|
355 | |||
356 | ==> dst/file_text <== |
|
356 | ==> dst/file_text <== | |
357 | this is text |
|
357 | this is text | |
358 |
|
358 | |||
359 | ==> dst/file_text+c <== |
|
359 | ==> dst/file_text+c <== | |
360 | this is text+C |
|
360 | this is text+C | |
361 |
|
361 | |||
362 | ==> dst/file_text+d <== |
|
362 | ==> dst/file_text+d <== | |
363 | this is text+D |
|
363 | this is text+D | |
364 |
|
364 | |||
365 | ==> dst/file_text+f <== |
|
365 | ==> dst/file_text+f <== | |
366 | this is text+F |
|
366 | this is text+F | |
367 |
|
367 | |||
368 | ==> dst/file_text+k <== |
|
368 | ==> dst/file_text+k <== | |
369 | this is text+k |
|
369 | this is text+k | |
370 |
|
370 | |||
371 | ==> dst/file_text+ko <== |
|
371 | ==> dst/file_text+ko <== | |
372 | this is text+ko |
|
372 | this is text+ko | |
373 |
|
373 | |||
374 | ==> dst/file_text+kx <== |
|
374 | ==> dst/file_text+kx <== | |
375 | this is text+kx |
|
375 | this is text+kx | |
376 |
|
376 | |||
377 | ==> dst/file_text+l <== |
|
377 | ==> dst/file_text+l <== | |
378 | this is text+l |
|
378 | this is text+l | |
379 |
|
379 | |||
380 | ==> dst/file_text+m <== |
|
380 | ==> dst/file_text+m <== | |
381 | this is text+m |
|
381 | this is text+m | |
382 |
|
382 | |||
383 | ==> dst/file_text+s2 <== |
|
383 | ==> dst/file_text+s2 <== | |
384 | this is text+S2 |
|
384 | this is text+S2 | |
385 |
|
385 | |||
386 | ==> dst/file_text+w <== |
|
386 | ==> dst/file_text+w <== | |
387 | this is text+w |
|
387 | this is text+w | |
388 |
|
388 | |||
389 | ==> dst/file_text+x <== |
|
389 | ==> dst/file_text+x <== | |
390 | this is text+x |
|
390 | this is text+x | |
391 |
|
391 | |||
392 | ==> dst/file_ubinary <== |
|
392 | ==> dst/file_ubinary <== | |
393 | this is ubinary |
|
393 | this is ubinary | |
394 |
|
394 | |||
395 | ==> dst/file_uxbinary <== |
|
395 | ==> dst/file_uxbinary <== | |
396 | this is uxbinary |
|
396 | this is uxbinary | |
397 |
|
397 | |||
398 | ==> dst/file_xbinary <== |
|
398 | ==> dst/file_xbinary <== | |
399 | this is xbinary |
|
399 | this is xbinary | |
400 |
|
400 | |||
401 | ==> dst/file_xltext <== |
|
401 | ==> dst/file_xltext <== | |
402 | this is xltext |
|
402 | this is xltext | |
403 |
|
403 | |||
404 | ==> dst/file_xtext <== |
|
404 | ==> dst/file_xtext <== | |
405 | this is xtext |
|
405 | this is xtext | |
406 |
|
406 | |||
407 | revision 1 |
|
407 | revision 1 | |
408 | $ hg -R dst update 1 |
|
408 | $ hg -R dst update 1 | |
409 | 32 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
409 | 32 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
410 | $ head dst/file_* | cat -v |
|
410 | $ head dst/file_* | cat -v | |
411 | ==> dst/file_binary <== |
|
411 | ==> dst/file_binary <== | |
412 | this is binary$Id$ |
|
412 | this is binary$Id$ | |
413 | $Header$ |
|
413 | $Header$ | |
414 | $Date$ |
|
414 | $Date$ | |
415 | $DateTime$ |
|
415 | $DateTime$ | |
416 | $Change$ |
|
416 | $Change$ | |
417 | $File$ |
|
417 | $File$ | |
418 | $Revision$ |
|
418 | $Revision$ | |
419 | $Header$$Header$Header$ |
|
419 | $Header$$Header$Header$ | |
420 |
|
420 | |||
421 | ==> dst/file_binary+k <== |
|
421 | ==> dst/file_binary+k <== | |
422 | this is binary+k$Id$ |
|
422 | this is binary+k$Id$ | |
423 | $Header$ |
|
423 | $Header$ | |
424 | $Date$ |
|
424 | $Date$ | |
425 | $DateTime$ |
|
425 | $DateTime$ | |
426 | $Change$ |
|
426 | $Change$ | |
427 | $File$ |
|
427 | $File$ | |
428 | $Revision$ |
|
428 | $Revision$ | |
429 | $Header$$Header$Header$ |
|
429 | $Header$$Header$Header$ | |
430 |
|
430 | |||
431 | ==> dst/file_binary+kx <== |
|
431 | ==> dst/file_binary+kx <== | |
432 | this is binary+kx$Id$ |
|
432 | this is binary+kx$Id$ | |
433 | $Header$ |
|
433 | $Header$ | |
434 | $Date$ |
|
434 | $Date$ | |
435 | $DateTime$ |
|
435 | $DateTime$ | |
436 | $Change$ |
|
436 | $Change$ | |
437 | $File$ |
|
437 | $File$ | |
438 | $Revision$ |
|
438 | $Revision$ | |
439 | $Header$$Header$Header$ |
|
439 | $Header$$Header$Header$ | |
440 |
|
440 | |||
441 | ==> dst/file_binary+x <== |
|
441 | ==> dst/file_binary+x <== | |
442 | this is binary+x$Id$ |
|
442 | this is binary+x$Id$ | |
443 | $Header$ |
|
443 | $Header$ | |
444 | $Date$ |
|
444 | $Date$ | |
445 | $DateTime$ |
|
445 | $DateTime$ | |
446 | $Change$ |
|
446 | $Change$ | |
447 | $File$ |
|
447 | $File$ | |
448 | $Revision$ |
|
448 | $Revision$ | |
449 | $Header$$Header$Header$ |
|
449 | $Header$$Header$Header$ | |
450 |
|
450 | |||
451 | ==> dst/file_ctext <== |
|
451 | ==> dst/file_ctext <== | |
452 | this is ctext |
|
452 | this is ctext | |
453 | $Id$ |
|
453 | $Id$ | |
454 | $Header$ |
|
454 | $Header$ | |
455 | $Date$ |
|
455 | $Date$ | |
456 | $DateTime$ |
|
456 | $DateTime$ | |
457 | $Change$ |
|
457 | $Change$ | |
458 | $File$ |
|
458 | $File$ | |
459 | $Revision$ |
|
459 | $Revision$ | |
460 | $Header$$Header$Header$ |
|
460 | $Header$$Header$Header$ | |
461 |
|
461 | |||
462 | ==> dst/file_cxtext <== |
|
462 | ==> dst/file_cxtext <== | |
463 | this is cxtext |
|
463 | this is cxtext | |
464 | $Id$ |
|
464 | $Id$ | |
465 | $Header$ |
|
465 | $Header$ | |
466 | $Date$ |
|
466 | $Date$ | |
467 | $DateTime$ |
|
467 | $DateTime$ | |
468 | $Change$ |
|
468 | $Change$ | |
469 | $File$ |
|
469 | $File$ | |
470 | $Revision$ |
|
470 | $Revision$ | |
471 | $Header$$Header$Header$ |
|
471 | $Header$$Header$Header$ | |
472 |
|
472 | |||
473 | ==> dst/file_ktext <== |
|
473 | ==> dst/file_ktext <== | |
474 | this is ktext |
|
474 | this is ktext | |
475 | $Id$ |
|
475 | $Id$ | |
476 | $Header$ |
|
476 | $Header$ | |
477 | $Date$ |
|
477 | $Date$ | |
478 | $DateTime$ |
|
478 | $DateTime$ | |
479 | $Change$ |
|
479 | $Change$ | |
480 | $File$ |
|
480 | $File$ | |
481 | $Revision$ |
|
481 | $Revision$ | |
482 | $Header$$Header$Header$ |
|
482 | $Header$$Header$Header$ | |
483 |
|
483 | |||
484 | ==> dst/file_kxtext <== |
|
484 | ==> dst/file_kxtext <== | |
485 | this is kxtext |
|
485 | this is kxtext | |
486 | $Id$ |
|
486 | $Id$ | |
487 | $Header$ |
|
487 | $Header$ | |
488 | $Date$ |
|
488 | $Date$ | |
489 | $DateTime$ |
|
489 | $DateTime$ | |
490 | $Change$ |
|
490 | $Change$ | |
491 | $File$ |
|
491 | $File$ | |
492 | $Revision$ |
|
492 | $Revision$ | |
493 | $Header$$Header$Header$ |
|
493 | $Header$$Header$Header$ | |
494 |
|
494 | |||
495 | ==> dst/file_ltext <== |
|
495 | ==> dst/file_ltext <== | |
496 | this is ltext |
|
496 | this is ltext | |
497 | $Id$ |
|
497 | $Id$ | |
498 | $Header$ |
|
498 | $Header$ | |
499 | $Date$ |
|
499 | $Date$ | |
500 | $DateTime$ |
|
500 | $DateTime$ | |
501 | $Change$ |
|
501 | $Change$ | |
502 | $File$ |
|
502 | $File$ | |
503 | $Revision$ |
|
503 | $Revision$ | |
504 | $Header$$Header$Header$ |
|
504 | $Header$$Header$Header$ | |
505 |
|
505 | |||
506 | ==> dst/file_symlink <== |
|
506 | ==> dst/file_symlink <== | |
507 | this is target symlink |
|
507 | this is target symlink | |
508 | $Id$ |
|
508 | $Id$ | |
509 | $Header$ |
|
509 | $Header$ | |
510 | $Date$ |
|
510 | $Date$ | |
511 | $DateTime$ |
|
511 | $DateTime$ | |
512 | $Change$ |
|
512 | $Change$ | |
513 | $File$ |
|
513 | $File$ | |
514 | $Revision$ |
|
514 | $Revision$ | |
515 | $Header$$Header$Header$ |
|
515 | $Header$$Header$Header$ | |
516 |
|
516 | |||
517 | ==> dst/file_symlink+k <== |
|
517 | ==> dst/file_symlink+k <== | |
518 | this is target symlink+k |
|
518 | this is target symlink+k | |
519 | $Id$ |
|
519 | $Id$ | |
520 | $Header$ |
|
520 | $Header$ | |
521 | $Date$ |
|
521 | $Date$ | |
522 | $DateTime$ |
|
522 | $DateTime$ | |
523 | $Change$ |
|
523 | $Change$ | |
524 | $File$ |
|
524 | $File$ | |
525 | $Revision$ |
|
525 | $Revision$ | |
526 | $Header$$Header$Header$ |
|
526 | $Header$$Header$Header$ | |
527 |
|
527 | |||
528 | ==> dst/file_tempobj <== |
|
528 | ==> dst/file_tempobj <== | |
529 | this is tempobj |
|
529 | this is tempobj | |
530 | $Id$ |
|
530 | $Id$ | |
531 | $Header$ |
|
531 | $Header$ | |
532 | $Date$ |
|
532 | $Date$ | |
533 | $DateTime$ |
|
533 | $DateTime$ | |
534 | $Change$ |
|
534 | $Change$ | |
535 | $File$ |
|
535 | $File$ | |
536 | $Revision$ |
|
536 | $Revision$ | |
537 | $Header$$Header$Header$ |
|
537 | $Header$$Header$Header$ | |
538 |
|
538 | |||
539 | ==> dst/file_text <== |
|
539 | ==> dst/file_text <== | |
540 | this is text |
|
540 | this is text | |
541 | $Id$ |
|
541 | $Id$ | |
542 | $Header$ |
|
542 | $Header$ | |
543 | $Date$ |
|
543 | $Date$ | |
544 | $DateTime$ |
|
544 | $DateTime$ | |
545 | $Change$ |
|
545 | $Change$ | |
546 | $File$ |
|
546 | $File$ | |
547 | $Revision$ |
|
547 | $Revision$ | |
548 | $Header$$Header$Header$ |
|
548 | $Header$$Header$Header$ | |
549 |
|
549 | |||
550 | ==> dst/file_text+c <== |
|
550 | ==> dst/file_text+c <== | |
551 | this is text+C |
|
551 | this is text+C | |
552 | $Id$ |
|
552 | $Id$ | |
553 | $Header$ |
|
553 | $Header$ | |
554 | $Date$ |
|
554 | $Date$ | |
555 | $DateTime$ |
|
555 | $DateTime$ | |
556 | $Change$ |
|
556 | $Change$ | |
557 | $File$ |
|
557 | $File$ | |
558 | $Revision$ |
|
558 | $Revision$ | |
559 | $Header$$Header$Header$ |
|
559 | $Header$$Header$Header$ | |
560 |
|
560 | |||
561 | ==> dst/file_text+d <== |
|
561 | ==> dst/file_text+d <== | |
562 | this is text+D |
|
562 | this is text+D | |
563 | $Id$ |
|
563 | $Id$ | |
564 | $Header$ |
|
564 | $Header$ | |
565 | $Date$ |
|
565 | $Date$ | |
566 | $DateTime$ |
|
566 | $DateTime$ | |
567 | $Change$ |
|
567 | $Change$ | |
568 | $File$ |
|
568 | $File$ | |
569 | $Revision$ |
|
569 | $Revision$ | |
570 | $Header$$Header$Header$ |
|
570 | $Header$$Header$Header$ | |
571 |
|
571 | |||
572 | ==> dst/file_text+f <== |
|
572 | ==> dst/file_text+f <== | |
573 | this is text+F |
|
573 | this is text+F | |
574 | $Id$ |
|
574 | $Id$ | |
575 | $Header$ |
|
575 | $Header$ | |
576 | $Date$ |
|
576 | $Date$ | |
577 | $DateTime$ |
|
577 | $DateTime$ | |
578 | $Change$ |
|
578 | $Change$ | |
579 | $File$ |
|
579 | $File$ | |
580 | $Revision$ |
|
580 | $Revision$ | |
581 | $Header$$Header$Header$ |
|
581 | $Header$$Header$Header$ | |
582 |
|
582 | |||
583 | ==> dst/file_text+k <== |
|
583 | ==> dst/file_text+k <== | |
584 | this is text+k |
|
584 | this is text+k | |
585 | $Id$ |
|
585 | $Id$ | |
586 | $Header$ |
|
586 | $Header$ | |
587 | $Date$ |
|
587 | $Date$ | |
588 | $DateTime$ |
|
588 | $DateTime$ | |
589 | $Change$ |
|
589 | $Change$ | |
590 | $File$ |
|
590 | $File$ | |
591 | $Revision$ |
|
591 | $Revision$ | |
592 | $Header$$Header$Header$ |
|
592 | $Header$$Header$Header$ | |
593 |
|
593 | |||
594 | ==> dst/file_text+ko <== |
|
594 | ==> dst/file_text+ko <== | |
595 | this is text+ko |
|
595 | this is text+ko | |
596 | $Id$ |
|
596 | $Id$ | |
597 | $Header$ |
|
597 | $Header$ | |
598 | $Date$ |
|
598 | $Date$ | |
599 | $DateTime$ |
|
599 | $DateTime$ | |
600 | $Change$ |
|
600 | $Change$ | |
601 | $File$ |
|
601 | $File$ | |
602 | $Revision$ |
|
602 | $Revision$ | |
603 | $Header$$Header$Header$ |
|
603 | $Header$$Header$Header$ | |
604 |
|
604 | |||
605 | ==> dst/file_text+kx <== |
|
605 | ==> dst/file_text+kx <== | |
606 | this is text+kx |
|
606 | this is text+kx | |
607 | $Id$ |
|
607 | $Id$ | |
608 | $Header$ |
|
608 | $Header$ | |
609 | $Date$ |
|
609 | $Date$ | |
610 | $DateTime$ |
|
610 | $DateTime$ | |
611 | $Change$ |
|
611 | $Change$ | |
612 | $File$ |
|
612 | $File$ | |
613 | $Revision$ |
|
613 | $Revision$ | |
614 | $Header$$Header$Header$ |
|
614 | $Header$$Header$Header$ | |
615 |
|
615 | |||
616 | ==> dst/file_text+l <== |
|
616 | ==> dst/file_text+l <== | |
617 | this is text+l |
|
617 | this is text+l | |
618 | $Id$ |
|
618 | $Id$ | |
619 | $Header$ |
|
619 | $Header$ | |
620 | $Date$ |
|
620 | $Date$ | |
621 | $DateTime$ |
|
621 | $DateTime$ | |
622 | $Change$ |
|
622 | $Change$ | |
623 | $File$ |
|
623 | $File$ | |
624 | $Revision$ |
|
624 | $Revision$ | |
625 | $Header$$Header$Header$ |
|
625 | $Header$$Header$Header$ | |
626 |
|
626 | |||
627 | ==> dst/file_text+m <== |
|
627 | ==> dst/file_text+m <== | |
628 | this is text+m |
|
628 | this is text+m | |
629 | $Id$ |
|
629 | $Id$ | |
630 | $Header$ |
|
630 | $Header$ | |
631 | $Date$ |
|
631 | $Date$ | |
632 | $DateTime$ |
|
632 | $DateTime$ | |
633 | $Change$ |
|
633 | $Change$ | |
634 | $File$ |
|
634 | $File$ | |
635 | $Revision$ |
|
635 | $Revision$ | |
636 | $Header$$Header$Header$ |
|
636 | $Header$$Header$Header$ | |
637 |
|
637 | |||
638 | ==> dst/file_text+s <== |
|
638 | ==> dst/file_text+s <== | |
639 | this is text+S |
|
639 | this is text+S | |
640 | $Id$ |
|
640 | $Id$ | |
641 | $Header$ |
|
641 | $Header$ | |
642 | $Date$ |
|
642 | $Date$ | |
643 | $DateTime$ |
|
643 | $DateTime$ | |
644 | $Change$ |
|
644 | $Change$ | |
645 | $File$ |
|
645 | $File$ | |
646 | $Revision$ |
|
646 | $Revision$ | |
647 | $Header$$Header$Header$ |
|
647 | $Header$$Header$Header$ | |
648 |
|
648 | |||
649 | ==> dst/file_text+s2 <== |
|
649 | ==> dst/file_text+s2 <== | |
650 | this is text+S2 |
|
650 | this is text+S2 | |
651 | $Id$ |
|
651 | $Id$ | |
652 | $Header$ |
|
652 | $Header$ | |
653 | $Date$ |
|
653 | $Date$ | |
654 | $DateTime$ |
|
654 | $DateTime$ | |
655 | $Change$ |
|
655 | $Change$ | |
656 | $File$ |
|
656 | $File$ | |
657 | $Revision$ |
|
657 | $Revision$ | |
658 | $Header$$Header$Header$ |
|
658 | $Header$$Header$Header$ | |
659 |
|
659 | |||
660 | ==> dst/file_text+w <== |
|
660 | ==> dst/file_text+w <== | |
661 | this is text+w |
|
661 | this is text+w | |
662 | $Id$ |
|
662 | $Id$ | |
663 | $Header$ |
|
663 | $Header$ | |
664 | $Date$ |
|
664 | $Date$ | |
665 | $DateTime$ |
|
665 | $DateTime$ | |
666 | $Change$ |
|
666 | $Change$ | |
667 | $File$ |
|
667 | $File$ | |
668 | $Revision$ |
|
668 | $Revision$ | |
669 | $Header$$Header$Header$ |
|
669 | $Header$$Header$Header$ | |
670 |
|
670 | |||
671 | ==> dst/file_text+x <== |
|
671 | ==> dst/file_text+x <== | |
672 | this is text+x |
|
672 | this is text+x | |
673 | $Id$ |
|
673 | $Id$ | |
674 | $Header$ |
|
674 | $Header$ | |
675 | $Date$ |
|
675 | $Date$ | |
676 | $DateTime$ |
|
676 | $DateTime$ | |
677 | $Change$ |
|
677 | $Change$ | |
678 | $File$ |
|
678 | $File$ | |
679 | $Revision$ |
|
679 | $Revision$ | |
680 | $Header$$Header$Header$ |
|
680 | $Header$$Header$Header$ | |
681 |
|
681 | |||
682 | ==> dst/file_ubinary <== |
|
682 | ==> dst/file_ubinary <== | |
683 | this is ubinary |
|
683 | this is ubinary | |
684 | $Id$ |
|
684 | $Id$ | |
685 | $Header$ |
|
685 | $Header$ | |
686 | $Date$ |
|
686 | $Date$ | |
687 | $DateTime$ |
|
687 | $DateTime$ | |
688 | $Change$ |
|
688 | $Change$ | |
689 | $File$ |
|
689 | $File$ | |
690 | $Revision$ |
|
690 | $Revision$ | |
691 | $Header$$Header$Header$ |
|
691 | $Header$$Header$Header$ | |
692 |
|
692 | |||
693 | ==> dst/file_uxbinary <== |
|
693 | ==> dst/file_uxbinary <== | |
694 | this is uxbinary |
|
694 | this is uxbinary | |
695 | $Id$ |
|
695 | $Id$ | |
696 | $Header$ |
|
696 | $Header$ | |
697 | $Date$ |
|
697 | $Date$ | |
698 | $DateTime$ |
|
698 | $DateTime$ | |
699 | $Change$ |
|
699 | $Change$ | |
700 | $File$ |
|
700 | $File$ | |
701 | $Revision$ |
|
701 | $Revision$ | |
702 | $Header$$Header$Header$ |
|
702 | $Header$$Header$Header$ | |
703 |
|
703 | |||
704 | ==> dst/file_xbinary <== |
|
704 | ==> dst/file_xbinary <== | |
705 | this is xbinary |
|
705 | this is xbinary | |
706 | $Id$ |
|
706 | $Id$ | |
707 | $Header$ |
|
707 | $Header$ | |
708 | $Date$ |
|
708 | $Date$ | |
709 | $DateTime$ |
|
709 | $DateTime$ | |
710 | $Change$ |
|
710 | $Change$ | |
711 | $File$ |
|
711 | $File$ | |
712 | $Revision$ |
|
712 | $Revision$ | |
713 | $Header$$Header$Header$ |
|
713 | $Header$$Header$Header$ | |
714 |
|
714 | |||
715 | ==> dst/file_xltext <== |
|
715 | ==> dst/file_xltext <== | |
716 | this is xltext |
|
716 | this is xltext | |
717 | $Id$ |
|
717 | $Id$ | |
718 | $Header$ |
|
718 | $Header$ | |
719 | $Date$ |
|
719 | $Date$ | |
720 | $DateTime$ |
|
720 | $DateTime$ | |
721 | $Change$ |
|
721 | $Change$ | |
722 | $File$ |
|
722 | $File$ | |
723 | $Revision$ |
|
723 | $Revision$ | |
724 | $Header$$Header$Header$ |
|
724 | $Header$$Header$Header$ | |
725 |
|
725 | |||
726 | ==> dst/file_xtempobj <== |
|
726 | ==> dst/file_xtempobj <== | |
727 | this is xtempobj |
|
727 | this is xtempobj | |
728 | $Id$ |
|
728 | $Id$ | |
729 | $Header$ |
|
729 | $Header$ | |
730 | $Date$ |
|
730 | $Date$ | |
731 | $DateTime$ |
|
731 | $DateTime$ | |
732 | $Change$ |
|
732 | $Change$ | |
733 | $File$ |
|
733 | $File$ | |
734 | $Revision$ |
|
734 | $Revision$ | |
735 | $Header$$Header$Header$ |
|
735 | $Header$$Header$Header$ | |
736 |
|
736 | |||
737 | ==> dst/file_xtext <== |
|
737 | ==> dst/file_xtext <== | |
738 | this is xtext |
|
738 | this is xtext | |
739 | $Id$ |
|
739 | $Id$ | |
740 | $Header$ |
|
740 | $Header$ | |
741 | $Date$ |
|
741 | $Date$ | |
742 | $DateTime$ |
|
742 | $DateTime$ | |
743 | $Change$ |
|
743 | $Change$ | |
744 | $File$ |
|
744 | $File$ | |
745 | $Revision$ |
|
745 | $Revision$ | |
746 | $Header$$Header$Header$ |
|
746 | $Header$$Header$Header$ | |
747 |
|
747 | |||
748 | crazy_symlink |
|
748 | crazy_symlink | |
749 | $ readlink crazy_symlink+k |
|
749 | $ readlink crazy_symlink+k | |
750 | target_$Header: //depot/test-mercurial-import/crazy_symlink+k#1 $ |
|
750 | target_$Header: //depot/test-mercurial-import/crazy_symlink+k#1 $ | |
751 | $ readlink dst/crazy_symlink+k |
|
751 | $ readlink dst/crazy_symlink+k | |
752 | target_$Header$ |
|
752 | target_$Header$ | |
753 |
|
753 | |||
754 | exit trap: |
|
754 | exit trap: | |
755 | stopping the p4 server |
|
755 | stopping the p4 server |
@@ -1,152 +1,145 | |||||
1 | #require p4 |
|
1 | #require p4 | |
2 |
|
2 | |||
3 | $ echo "[extensions]" >> $HGRCPATH |
|
3 | $ echo "[extensions]" >> $HGRCPATH | |
4 | $ echo "convert = " >> $HGRCPATH |
|
4 | $ echo "convert = " >> $HGRCPATH | |
5 |
|
5 | |||
6 | create p4 depot |
|
6 | create p4 depot | |
7 | $ P4ROOT=`pwd`/depot; export P4ROOT |
|
7 | $ P4ROOT=`pwd`/depot; export P4ROOT | |
8 | $ P4AUDIT=$P4ROOT/audit; export P4AUDIT |
|
8 | $ P4AUDIT=$P4ROOT/audit; export P4AUDIT | |
9 | $ P4JOURNAL=$P4ROOT/journal; export P4JOURNAL |
|
9 | $ P4JOURNAL=$P4ROOT/journal; export P4JOURNAL | |
10 | $ P4LOG=$P4ROOT/log; export P4LOG |
|
10 | $ P4LOG=$P4ROOT/log; export P4LOG | |
11 | $ P4PORT=localhost:$HGPORT; export P4PORT |
|
11 | $ P4PORT=localhost:$HGPORT; export P4PORT | |
12 | $ P4DEBUG=1; export P4DEBUG |
|
12 | $ P4DEBUG=1; export P4DEBUG | |
13 |
|
13 | |||
14 | start the p4 server |
|
14 | start the p4 server | |
15 | $ [ ! -d $P4ROOT ] && mkdir $P4ROOT |
|
15 | $ [ ! -d $P4ROOT ] && mkdir $P4ROOT | |
16 | $ p4d -f -J off >$P4ROOT/stdout 2>$P4ROOT/stderr & |
|
16 | $ p4d -f -J off >$P4ROOT/stdout 2>$P4ROOT/stderr & | |
17 | $ echo $! >> $DAEMON_PIDS |
|
17 | $ echo $! >> $DAEMON_PIDS | |
18 | $ trap "echo stopping the p4 server ; p4 admin stop" EXIT |
|
18 | $ trap "echo stopping the p4 server ; p4 admin stop" EXIT | |
19 |
|
19 | |||
20 | $ # wait for the server to initialize |
|
20 | $ # wait for the server to initialize | |
21 | $ while ! p4 ; do |
|
21 | $ while ! p4 ; do | |
22 | > sleep 1 |
|
22 | > sleep 1 | |
23 | > done >/dev/null 2>/dev/null |
|
23 | > done >/dev/null 2>/dev/null | |
24 |
|
24 | |||
25 | create a client spec |
|
25 | create a client spec | |
26 | $ P4CLIENT=hg-p4-import; export P4CLIENT |
|
26 | $ P4CLIENT=hg-p4-import; export P4CLIENT | |
27 | $ DEPOTPATH=//depot/test-mercurial-import/... |
|
27 | $ DEPOTPATH=//depot/test-mercurial-import/... | |
28 | $ p4 client -o | sed '/^View:/,$ d' >p4client |
|
28 | $ p4 client -o | sed '/^View:/,$ d' >p4client | |
29 | $ echo View: >>p4client |
|
29 | $ echo View: >>p4client | |
30 | $ echo " $DEPOTPATH //$P4CLIENT/..." >>p4client |
|
30 | $ echo " $DEPOTPATH //$P4CLIENT/..." >>p4client | |
31 | $ p4 client -i <p4client |
|
31 | $ p4 client -i <p4client | |
32 | Client hg-p4-import saved. |
|
32 | Client hg-p4-import saved. | |
33 |
|
33 | |||
34 | populate the depot |
|
34 | populate the depot | |
35 | $ echo a > a |
|
35 | $ echo a > a | |
36 | $ mkdir b |
|
36 | $ mkdir b | |
37 | $ echo c > b/c |
|
37 | $ echo c > b/c | |
38 | $ p4 add a b/c |
|
38 | $ p4 add a b/c | |
39 | //depot/test-mercurial-import/a#1 - opened for add |
|
39 | //depot/test-mercurial-import/a#1 - opened for add | |
40 | //depot/test-mercurial-import/b/c#1 - opened for add |
|
40 | //depot/test-mercurial-import/b/c#1 - opened for add | |
41 | $ p4 submit -d initial |
|
41 | $ p4 submit -d initial | |
42 | Submitting change 1. |
|
42 | Submitting change 1. | |
43 | Locking 2 files ... |
|
43 | Locking 2 files ... | |
44 | add //depot/test-mercurial-import/a#1 |
|
44 | add //depot/test-mercurial-import/a#1 | |
45 | add //depot/test-mercurial-import/b/c#1 |
|
45 | add //depot/test-mercurial-import/b/c#1 | |
46 | Change 1 submitted. |
|
46 | Change 1 submitted. | |
47 |
|
47 | |||
48 | change some files |
|
48 | change some files | |
49 | $ p4 edit a |
|
49 | $ p4 edit a | |
50 | //depot/test-mercurial-import/a#1 - opened for edit |
|
50 | //depot/test-mercurial-import/a#1 - opened for edit | |
51 | $ echo aa >> a |
|
51 | $ echo aa >> a | |
52 | $ p4 submit -d "change a" |
|
52 | $ p4 submit -d "change a" | |
53 | Submitting change 2. |
|
53 | Submitting change 2. | |
54 | Locking 1 files ... |
|
54 | Locking 1 files ... | |
55 | edit //depot/test-mercurial-import/a#2 |
|
55 | edit //depot/test-mercurial-import/a#2 | |
56 | Change 2 submitted. |
|
56 | Change 2 submitted. | |
57 |
|
57 | |||
58 | $ p4 edit b/c |
|
58 | $ p4 edit b/c | |
59 | //depot/test-mercurial-import/b/c#1 - opened for edit |
|
59 | //depot/test-mercurial-import/b/c#1 - opened for edit | |
60 | $ echo cc >> b/c |
|
60 | $ echo cc >> b/c | |
61 | $ p4 submit -d "change b/c" |
|
61 | $ p4 submit -d "change b/c" | |
62 | Submitting change 3. |
|
62 | Submitting change 3. | |
63 | Locking 1 files ... |
|
63 | Locking 1 files ... | |
64 | edit //depot/test-mercurial-import/b/c#2 |
|
64 | edit //depot/test-mercurial-import/b/c#2 | |
65 | Change 3 submitted. |
|
65 | Change 3 submitted. | |
66 |
|
66 | |||
67 | convert |
|
67 | convert | |
68 | $ hg convert -s p4 $DEPOTPATH dst |
|
68 | $ hg convert -s p4 $DEPOTPATH dst | |
69 | initializing destination dst repository |
|
69 | initializing destination dst repository | |
|
70 | scanning source... | |||
70 | reading p4 views |
|
71 | reading p4 views | |
71 | collecting p4 changelists |
|
72 | collecting p4 changelists | |
72 | 1 initial |
|
73 | 1 initial | |
73 | 2 change a |
|
74 | 2 change a | |
74 | 3 change b/c |
|
75 | 3 change b/c | |
75 | scanning source... |
|
|||
76 | sorting... |
|
76 | sorting... | |
77 | converting... |
|
77 | converting... | |
78 | 2 initial |
|
78 | 2 initial | |
79 | 1 change a |
|
79 | 1 change a | |
80 | 0 change b/c |
|
80 | 0 change b/c | |
81 | $ hg -R dst log --template 'rev={rev} desc="{desc}" tags="{tags}" files="{files}"\n' |
|
81 | $ hg -R dst log --template 'rev={rev} desc="{desc}" tags="{tags}" files="{files}"\n' | |
82 | rev=2 desc="change b/c" tags="tip" files="b/c" |
|
82 | rev=2 desc="change b/c" tags="tip" files="b/c" | |
83 | rev=1 desc="change a" tags="" files="a" |
|
83 | rev=1 desc="change a" tags="" files="a" | |
84 | rev=0 desc="initial" tags="" files="a b/c" |
|
84 | rev=0 desc="initial" tags="" files="a b/c" | |
85 |
|
85 | |||
86 | change some files |
|
86 | change some files | |
87 | $ p4 edit a b/c |
|
87 | $ p4 edit a b/c | |
88 | //depot/test-mercurial-import/a#2 - opened for edit |
|
88 | //depot/test-mercurial-import/a#2 - opened for edit | |
89 | //depot/test-mercurial-import/b/c#2 - opened for edit |
|
89 | //depot/test-mercurial-import/b/c#2 - opened for edit | |
90 | $ echo aaa >> a |
|
90 | $ echo aaa >> a | |
91 | $ echo ccc >> b/c |
|
91 | $ echo ccc >> b/c | |
92 | $ p4 submit -d "change a b/c" |
|
92 | $ p4 submit -d "change a b/c" | |
93 | Submitting change 4. |
|
93 | Submitting change 4. | |
94 | Locking 2 files ... |
|
94 | Locking 2 files ... | |
95 | edit //depot/test-mercurial-import/a#3 |
|
95 | edit //depot/test-mercurial-import/a#3 | |
96 | edit //depot/test-mercurial-import/b/c#3 |
|
96 | edit //depot/test-mercurial-import/b/c#3 | |
97 | Change 4 submitted. |
|
97 | Change 4 submitted. | |
98 |
|
98 | |||
99 | convert again |
|
99 | convert again | |
100 | $ hg convert -s p4 $DEPOTPATH dst |
|
100 | $ hg convert -s p4 $DEPOTPATH dst | |
|
101 | scanning source... | |||
101 | reading p4 views |
|
102 | reading p4 views | |
102 | collecting p4 changelists |
|
103 | collecting p4 changelists | |
103 | 1 initial |
|
|||
104 | 2 change a |
|
|||
105 | 3 change b/c |
|
|||
106 | 4 change a b/c |
|
104 | 4 change a b/c | |
107 | scanning source... |
|
|||
108 | sorting... |
|
105 | sorting... | |
109 | converting... |
|
106 | converting... | |
110 | 0 change a b/c |
|
107 | 0 change a b/c | |
111 | $ hg -R dst log --template 'rev={rev} desc="{desc}" tags="{tags}" files="{files}"\n' |
|
108 | $ hg -R dst log --template 'rev={rev} desc="{desc}" tags="{tags}" files="{files}"\n' | |
112 | rev=3 desc="change a b/c" tags="tip" files="a b/c" |
|
109 | rev=3 desc="change a b/c" tags="tip" files="a b/c" | |
113 | rev=2 desc="change b/c" tags="" files="b/c" |
|
110 | rev=2 desc="change b/c" tags="" files="b/c" | |
114 | rev=1 desc="change a" tags="" files="a" |
|
111 | rev=1 desc="change a" tags="" files="a" | |
115 | rev=0 desc="initial" tags="" files="a b/c" |
|
112 | rev=0 desc="initial" tags="" files="a b/c" | |
116 |
|
113 | |||
117 | interesting names |
|
114 | interesting names | |
118 | $ echo dddd > "d d" |
|
115 | $ echo dddd > "d d" | |
119 | $ mkdir " e" |
|
116 | $ mkdir " e" | |
120 | $ echo fff >" e/ f" |
|
117 | $ echo fff >" e/ f" | |
121 | $ p4 add "d d" " e/ f" |
|
118 | $ p4 add "d d" " e/ f" | |
122 | //depot/test-mercurial-import/d d#1 - opened for add |
|
119 | //depot/test-mercurial-import/d d#1 - opened for add | |
123 | //depot/test-mercurial-import/ e/ f#1 - opened for add |
|
120 | //depot/test-mercurial-import/ e/ f#1 - opened for add | |
124 | $ p4 submit -d "add d e f" |
|
121 | $ p4 submit -d "add d e f" | |
125 | Submitting change 5. |
|
122 | Submitting change 5. | |
126 | Locking 2 files ... |
|
123 | Locking 2 files ... | |
127 | add //depot/test-mercurial-import/ e/ f#1 |
|
124 | add //depot/test-mercurial-import/ e/ f#1 | |
128 | add //depot/test-mercurial-import/d d#1 |
|
125 | add //depot/test-mercurial-import/d d#1 | |
129 | Change 5 submitted. |
|
126 | Change 5 submitted. | |
130 |
|
127 | |||
131 | convert again |
|
128 | convert again | |
132 | $ hg convert -s p4 $DEPOTPATH dst |
|
129 | $ hg convert -s p4 $DEPOTPATH dst | |
|
130 | scanning source... | |||
133 | reading p4 views |
|
131 | reading p4 views | |
134 | collecting p4 changelists |
|
132 | collecting p4 changelists | |
135 | 1 initial |
|
|||
136 | 2 change a |
|
|||
137 | 3 change b/c |
|
|||
138 | 4 change a b/c |
|
|||
139 | 5 add d e f |
|
133 | 5 add d e f | |
140 | scanning source... |
|
|||
141 | sorting... |
|
134 | sorting... | |
142 | converting... |
|
135 | converting... | |
143 | 0 add d e f |
|
136 | 0 add d e f | |
144 | $ hg -R dst log --template 'rev={rev} desc="{desc}" tags="{tags}" files="{files}"\n' |
|
137 | $ hg -R dst log --template 'rev={rev} desc="{desc}" tags="{tags}" files="{files}"\n' | |
145 | rev=4 desc="add d e f" tags="tip" files=" e/ f d d" |
|
138 | rev=4 desc="add d e f" tags="tip" files=" e/ f d d" | |
146 | rev=3 desc="change a b/c" tags="" files="a b/c" |
|
139 | rev=3 desc="change a b/c" tags="" files="a b/c" | |
147 | rev=2 desc="change b/c" tags="" files="b/c" |
|
140 | rev=2 desc="change b/c" tags="" files="b/c" | |
148 | rev=1 desc="change a" tags="" files="a" |
|
141 | rev=1 desc="change a" tags="" files="a" | |
149 | rev=0 desc="initial" tags="" files="a b/c" |
|
142 | rev=0 desc="initial" tags="" files="a b/c" | |
150 |
|
143 | |||
151 | exit trap: |
|
144 | exit trap: | |
152 | stopping the p4 server |
|
145 | stopping the p4 server |
General Comments 0
You need to be logged in to leave comments.
Login now