Show More
@@ -326,8 +326,11 b' def convert(ui, src, dest=None, revmapfi' | |||||
326 | usually should specify a target directory, because otherwise the |
|
326 | usually should specify a target directory, because otherwise the | |
327 | target may be named ``...-hg``. |
|
327 | target may be named ``...-hg``. | |
328 |
|
328 | |||
329 | It is possible to limit the amount of source history to be |
|
329 | The following options can be set with ``--config``: | |
330 | converted by specifying an initial Perforce revision: |
|
330 | ||
|
331 | :convert.p4.encoding: specify the encoding to use when decoding standard | |||
|
332 | output of the Perforce command line tool. The default is default system | |||
|
333 | encoding. | |||
331 |
|
334 | |||
332 | :convert.p4.startrev: specify initial Perforce revision (a |
|
335 | :convert.p4.startrev: specify initial Perforce revision (a | |
333 | Perforce changelist number). |
|
336 | Perforce changelist number). |
@@ -39,6 +39,9 b' def decodefilename(filename):' | |||||
39 |
|
39 | |||
40 | class p4_source(converter_source): |
|
40 | class p4_source(converter_source): | |
41 | def __init__(self, ui, path, revs=None): |
|
41 | def __init__(self, ui, path, revs=None): | |
|
42 | # avoid import cycle | |||
|
43 | import convcmd | |||
|
44 | ||||
42 | super(p4_source, self).__init__(ui, path, revs=revs) |
|
45 | super(p4_source, self).__init__(ui, path, revs=revs) | |
43 |
|
46 | |||
44 | if "/" in path and not path.startswith('//'): |
|
47 | if "/" in path and not path.startswith('//'): | |
@@ -54,7 +57,8 b' class p4_source(converter_source):' | |||||
54 | self.tags = {} |
|
57 | self.tags = {} | |
55 | self.lastbranch = {} |
|
58 | self.lastbranch = {} | |
56 | self.parent = {} |
|
59 | self.parent = {} | |
57 | self.encoding = "latin_1" |
|
60 | self.encoding = self.ui.config('convert', 'p4.encoding', | |
|
61 | default=convcmd.orig_encoding) | |||
58 | self.depotname = {} # mapping from local name to depot name |
|
62 | self.depotname = {} # mapping from local name to depot name | |
59 | self.localname = {} # mapping from depot name to local name |
|
63 | self.localname = {} # mapping from depot name to local name | |
60 | self.re_type = re.compile( |
|
64 | self.re_type = re.compile( |
@@ -275,9 +275,12 b'' | |||||
275 | that when a depot path is given you then usually should specify a target |
|
275 | that when a depot path is given you then usually should specify a target | |
276 | directory, because otherwise the target may be named "...-hg". |
|
276 | directory, because otherwise the target may be named "...-hg". | |
277 |
|
277 | |||
278 | It is possible to limit the amount of source history to be converted by |
|
278 | The following options can be set with "--config": | |
279 | specifying an initial Perforce revision: |
|
|||
280 |
|
279 | |||
|
280 | convert.p4.encoding | |||
|
281 | specify the encoding to use when decoding standard output of | |||
|
282 | the Perforce command line tool. The default is default | |||
|
283 | system encoding. | |||
281 | convert.p4.startrev |
|
284 | convert.p4.startrev | |
282 | specify initial Perforce revision (a Perforce changelist |
|
285 | specify initial Perforce revision (a Perforce changelist | |
283 | number). |
|
286 | number). |
General Comments 0
You need to be logged in to leave comments.
Login now