Mercurial > hg
annotate tests/test-convert.out @ 6116:e27f39865d7e
keyword: add test for patch.diff monkey
author | Christian Ebert <blacktrash@gmx.net> |
---|---|
date | Fri, 15 Feb 2008 18:36:49 +0100 |
parents | 1209dc9d59de |
children | 31d81d476a7f |
rev | line source |
---|---|
5441
71e7c86adcb7
convert: refactor sink initialisation, to remove hardcoding of hg
Bryan O'Sullivan <bos@serpentine.com>
parents:
5015
diff
changeset
|
1 hg convert [OPTION]... SOURCE [DEST [MAPFILE]] |
71e7c86adcb7
convert: refactor sink initialisation, to remove hardcoding of hg
Bryan O'Sullivan <bos@serpentine.com>
parents:
5015
diff
changeset
|
2 |
71e7c86adcb7
convert: refactor sink initialisation, to remove hardcoding of hg
Bryan O'Sullivan <bos@serpentine.com>
parents:
5015
diff
changeset
|
3 Convert a foreign SCM repository to a Mercurial one. |
71e7c86adcb7
convert: refactor sink initialisation, to remove hardcoding of hg
Bryan O'Sullivan <bos@serpentine.com>
parents:
5015
diff
changeset
|
4 |
71e7c86adcb7
convert: refactor sink initialisation, to remove hardcoding of hg
Bryan O'Sullivan <bos@serpentine.com>
parents:
5015
diff
changeset
|
5 Accepted source formats: |
5488
247af577fe29
fix typo in convert help text, update test
Benoit Boissinot <benoit.boissinot@ens-lyon.org>
parents:
5441
diff
changeset
|
6 - Mercurial |
5441
71e7c86adcb7
convert: refactor sink initialisation, to remove hardcoding of hg
Bryan O'Sullivan <bos@serpentine.com>
parents:
5015
diff
changeset
|
7 - CVS |
71e7c86adcb7
convert: refactor sink initialisation, to remove hardcoding of hg
Bryan O'Sullivan <bos@serpentine.com>
parents:
5015
diff
changeset
|
8 - Darcs |
71e7c86adcb7
convert: refactor sink initialisation, to remove hardcoding of hg
Bryan O'Sullivan <bos@serpentine.com>
parents:
5015
diff
changeset
|
9 - git |
71e7c86adcb7
convert: refactor sink initialisation, to remove hardcoding of hg
Bryan O'Sullivan <bos@serpentine.com>
parents:
5015
diff
changeset
|
10 - Subversion |
6039
1209dc9d59de
Update help output of test-convert for GNU arch entry.
Thomas Arendsen Hein <thomas@intevation.de>
parents:
5805
diff
changeset
|
11 - GNU Arch |
5441
71e7c86adcb7
convert: refactor sink initialisation, to remove hardcoding of hg
Bryan O'Sullivan <bos@serpentine.com>
parents:
5015
diff
changeset
|
12 |
71e7c86adcb7
convert: refactor sink initialisation, to remove hardcoding of hg
Bryan O'Sullivan <bos@serpentine.com>
parents:
5015
diff
changeset
|
13 Accepted destination formats: |
71e7c86adcb7
convert: refactor sink initialisation, to remove hardcoding of hg
Bryan O'Sullivan <bos@serpentine.com>
parents:
5015
diff
changeset
|
14 - Mercurial |
5513
f0c58fd4b798
convert: add support for Subversion as a sink
Bryan O'Sullivan <bos@serpentine.com>
parents:
5488
diff
changeset
|
15 - Subversion (history on branches is not preserved) |
5441
71e7c86adcb7
convert: refactor sink initialisation, to remove hardcoding of hg
Bryan O'Sullivan <bos@serpentine.com>
parents:
5015
diff
changeset
|
16 |
71e7c86adcb7
convert: refactor sink initialisation, to remove hardcoding of hg
Bryan O'Sullivan <bos@serpentine.com>
parents:
5015
diff
changeset
|
17 If no revision is given, all revisions will be converted. Otherwise, |
71e7c86adcb7
convert: refactor sink initialisation, to remove hardcoding of hg
Bryan O'Sullivan <bos@serpentine.com>
parents:
5015
diff
changeset
|
18 convert will only import up to the named revision (given in a format |
71e7c86adcb7
convert: refactor sink initialisation, to remove hardcoding of hg
Bryan O'Sullivan <bos@serpentine.com>
parents:
5015
diff
changeset
|
19 understood by the source). |
71e7c86adcb7
convert: refactor sink initialisation, to remove hardcoding of hg
Bryan O'Sullivan <bos@serpentine.com>
parents:
5015
diff
changeset
|
20 |
71e7c86adcb7
convert: refactor sink initialisation, to remove hardcoding of hg
Bryan O'Sullivan <bos@serpentine.com>
parents:
5015
diff
changeset
|
21 If no destination directory name is specified, it defaults to the |
71e7c86adcb7
convert: refactor sink initialisation, to remove hardcoding of hg
Bryan O'Sullivan <bos@serpentine.com>
parents:
5015
diff
changeset
|
22 basename of the source with '-hg' appended. If the destination |
71e7c86adcb7
convert: refactor sink initialisation, to remove hardcoding of hg
Bryan O'Sullivan <bos@serpentine.com>
parents:
5015
diff
changeset
|
23 repository doesn't exist, it will be created. |
71e7c86adcb7
convert: refactor sink initialisation, to remove hardcoding of hg
Bryan O'Sullivan <bos@serpentine.com>
parents:
5015
diff
changeset
|
24 |
5488
247af577fe29
fix typo in convert help text, update test
Benoit Boissinot <benoit.boissinot@ens-lyon.org>
parents:
5441
diff
changeset
|
25 If <MAPFILE> isn't given, it will be put in a default location |
247af577fe29
fix typo in convert help text, update test
Benoit Boissinot <benoit.boissinot@ens-lyon.org>
parents:
5441
diff
changeset
|
26 (<dest>/.hg/shamap by default). The <MAPFILE> is a simple text |
5441
71e7c86adcb7
convert: refactor sink initialisation, to remove hardcoding of hg
Bryan O'Sullivan <bos@serpentine.com>
parents:
5015
diff
changeset
|
27 file that maps each source commit ID to the destination ID for |
71e7c86adcb7
convert: refactor sink initialisation, to remove hardcoding of hg
Bryan O'Sullivan <bos@serpentine.com>
parents:
5015
diff
changeset
|
28 that revision, like so: |
71e7c86adcb7
convert: refactor sink initialisation, to remove hardcoding of hg
Bryan O'Sullivan <bos@serpentine.com>
parents:
5015
diff
changeset
|
29 <source ID> <destination ID> |
71e7c86adcb7
convert: refactor sink initialisation, to remove hardcoding of hg
Bryan O'Sullivan <bos@serpentine.com>
parents:
5015
diff
changeset
|
30 |
71e7c86adcb7
convert: refactor sink initialisation, to remove hardcoding of hg
Bryan O'Sullivan <bos@serpentine.com>
parents:
5015
diff
changeset
|
31 If the file doesn't exist, it's automatically created. It's updated |
71e7c86adcb7
convert: refactor sink initialisation, to remove hardcoding of hg
Bryan O'Sullivan <bos@serpentine.com>
parents:
5015
diff
changeset
|
32 on each commit copied, so convert-repo can be interrupted and can |
71e7c86adcb7
convert: refactor sink initialisation, to remove hardcoding of hg
Bryan O'Sullivan <bos@serpentine.com>
parents:
5015
diff
changeset
|
33 be run repeatedly to copy new commits. |
71e7c86adcb7
convert: refactor sink initialisation, to remove hardcoding of hg
Bryan O'Sullivan <bos@serpentine.com>
parents:
5015
diff
changeset
|
34 |
71e7c86adcb7
convert: refactor sink initialisation, to remove hardcoding of hg
Bryan O'Sullivan <bos@serpentine.com>
parents:
5015
diff
changeset
|
35 The [username mapping] file is a simple text file that maps each source |
71e7c86adcb7
convert: refactor sink initialisation, to remove hardcoding of hg
Bryan O'Sullivan <bos@serpentine.com>
parents:
5015
diff
changeset
|
36 commit author to a destination commit author. It is handy for source SCMs |
71e7c86adcb7
convert: refactor sink initialisation, to remove hardcoding of hg
Bryan O'Sullivan <bos@serpentine.com>
parents:
5015
diff
changeset
|
37 that use unix logins to identify authors (eg: CVS). One line per author |
71e7c86adcb7
convert: refactor sink initialisation, to remove hardcoding of hg
Bryan O'Sullivan <bos@serpentine.com>
parents:
5015
diff
changeset
|
38 mapping and the line format is: |
71e7c86adcb7
convert: refactor sink initialisation, to remove hardcoding of hg
Bryan O'Sullivan <bos@serpentine.com>
parents:
5015
diff
changeset
|
39 srcauthor=whatever string you want |
71e7c86adcb7
convert: refactor sink initialisation, to remove hardcoding of hg
Bryan O'Sullivan <bos@serpentine.com>
parents:
5015
diff
changeset
|
40 |
71e7c86adcb7
convert: refactor sink initialisation, to remove hardcoding of hg
Bryan O'Sullivan <bos@serpentine.com>
parents:
5015
diff
changeset
|
41 The filemap is a file that allows filtering and remapping of files |
71e7c86adcb7
convert: refactor sink initialisation, to remove hardcoding of hg
Bryan O'Sullivan <bos@serpentine.com>
parents:
5015
diff
changeset
|
42 and directories. Comment lines start with '#'. Each line can |
71e7c86adcb7
convert: refactor sink initialisation, to remove hardcoding of hg
Bryan O'Sullivan <bos@serpentine.com>
parents:
5015
diff
changeset
|
43 contain one of the following directives: |
71e7c86adcb7
convert: refactor sink initialisation, to remove hardcoding of hg
Bryan O'Sullivan <bos@serpentine.com>
parents:
5015
diff
changeset
|
44 |
71e7c86adcb7
convert: refactor sink initialisation, to remove hardcoding of hg
Bryan O'Sullivan <bos@serpentine.com>
parents:
5015
diff
changeset
|
45 include path/to/file |
71e7c86adcb7
convert: refactor sink initialisation, to remove hardcoding of hg
Bryan O'Sullivan <bos@serpentine.com>
parents:
5015
diff
changeset
|
46 |
71e7c86adcb7
convert: refactor sink initialisation, to remove hardcoding of hg
Bryan O'Sullivan <bos@serpentine.com>
parents:
5015
diff
changeset
|
47 exclude path/to/file |
71e7c86adcb7
convert: refactor sink initialisation, to remove hardcoding of hg
Bryan O'Sullivan <bos@serpentine.com>
parents:
5015
diff
changeset
|
48 |
71e7c86adcb7
convert: refactor sink initialisation, to remove hardcoding of hg
Bryan O'Sullivan <bos@serpentine.com>
parents:
5015
diff
changeset
|
49 rename from/file to/file |
5761
07df2a5c02b2
Adjust changed test output after 0145f9afb0e7 (trailing whitespace)
Thomas Arendsen Hein <thomas@intevation.de>
parents:
5556
diff
changeset
|
50 |
5441
71e7c86adcb7
convert: refactor sink initialisation, to remove hardcoding of hg
Bryan O'Sullivan <bos@serpentine.com>
parents:
5015
diff
changeset
|
51 The 'include' directive causes a file, or all files under a |
5488
247af577fe29
fix typo in convert help text, update test
Benoit Boissinot <benoit.boissinot@ens-lyon.org>
parents:
5441
diff
changeset
|
52 directory, to be included in the destination repository, and the |
247af577fe29
fix typo in convert help text, update test
Benoit Boissinot <benoit.boissinot@ens-lyon.org>
parents:
5441
diff
changeset
|
53 exclusion of all other files and dirs not explicitely included. |
247af577fe29
fix typo in convert help text, update test
Benoit Boissinot <benoit.boissinot@ens-lyon.org>
parents:
5441
diff
changeset
|
54 The 'exclude' directive causes files or directories to be omitted. |
247af577fe29
fix typo in convert help text, update test
Benoit Boissinot <benoit.boissinot@ens-lyon.org>
parents:
5441
diff
changeset
|
55 The 'rename' directive renames a file or directory. To rename from a |
247af577fe29
fix typo in convert help text, update test
Benoit Boissinot <benoit.boissinot@ens-lyon.org>
parents:
5441
diff
changeset
|
56 subdirectory into the root of the repository, use '.' as the path to |
247af577fe29
fix typo in convert help text, update test
Benoit Boissinot <benoit.boissinot@ens-lyon.org>
parents:
5441
diff
changeset
|
57 rename to. |
5441
71e7c86adcb7
convert: refactor sink initialisation, to remove hardcoding of hg
Bryan O'Sullivan <bos@serpentine.com>
parents:
5015
diff
changeset
|
58 |
5556
61fdf2558c0a
convert: some tidyups, doc improvements, and test fixes
Bryan O'Sullivan <bos@serpentine.com>
parents:
5513
diff
changeset
|
59 Back end options: |
61fdf2558c0a
convert: some tidyups, doc improvements, and test fixes
Bryan O'Sullivan <bos@serpentine.com>
parents:
5513
diff
changeset
|
60 |
61fdf2558c0a
convert: some tidyups, doc improvements, and test fixes
Bryan O'Sullivan <bos@serpentine.com>
parents:
5513
diff
changeset
|
61 --config convert.hg.clonebranches=False (boolean) |
61fdf2558c0a
convert: some tidyups, doc improvements, and test fixes
Bryan O'Sullivan <bos@serpentine.com>
parents:
5513
diff
changeset
|
62 hg target: XXX not documented |
61fdf2558c0a
convert: some tidyups, doc improvements, and test fixes
Bryan O'Sullivan <bos@serpentine.com>
parents:
5513
diff
changeset
|
63 --config convert.hg.saverev=True (boolean) |
61fdf2558c0a
convert: some tidyups, doc improvements, and test fixes
Bryan O'Sullivan <bos@serpentine.com>
parents:
5513
diff
changeset
|
64 hg source: allow target to preserve source revision ID |
61fdf2558c0a
convert: some tidyups, doc improvements, and test fixes
Bryan O'Sullivan <bos@serpentine.com>
parents:
5513
diff
changeset
|
65 --config convert.hg.tagsbranch=default (branch name) |
61fdf2558c0a
convert: some tidyups, doc improvements, and test fixes
Bryan O'Sullivan <bos@serpentine.com>
parents:
5513
diff
changeset
|
66 hg target: XXX not documented |
61fdf2558c0a
convert: some tidyups, doc improvements, and test fixes
Bryan O'Sullivan <bos@serpentine.com>
parents:
5513
diff
changeset
|
67 --config convert.hg.usebranchnames=True (boolean) |
61fdf2558c0a
convert: some tidyups, doc improvements, and test fixes
Bryan O'Sullivan <bos@serpentine.com>
parents:
5513
diff
changeset
|
68 hg target: preserve branch names |
61fdf2558c0a
convert: some tidyups, doc improvements, and test fixes
Bryan O'Sullivan <bos@serpentine.com>
parents:
5513
diff
changeset
|
69 |
61fdf2558c0a
convert: some tidyups, doc improvements, and test fixes
Bryan O'Sullivan <bos@serpentine.com>
parents:
5513
diff
changeset
|
70 --config convert.svn.branches=branches (directory name) |
61fdf2558c0a
convert: some tidyups, doc improvements, and test fixes
Bryan O'Sullivan <bos@serpentine.com>
parents:
5513
diff
changeset
|
71 svn source: specify the directory containing branches |
61fdf2558c0a
convert: some tidyups, doc improvements, and test fixes
Bryan O'Sullivan <bos@serpentine.com>
parents:
5513
diff
changeset
|
72 --config convert.svn.tags=tags (directory name) |
61fdf2558c0a
convert: some tidyups, doc improvements, and test fixes
Bryan O'Sullivan <bos@serpentine.com>
parents:
5513
diff
changeset
|
73 svn source: specify the directory containing tags |
61fdf2558c0a
convert: some tidyups, doc improvements, and test fixes
Bryan O'Sullivan <bos@serpentine.com>
parents:
5513
diff
changeset
|
74 --config convert.svn.trunk=trunk (directory name) |
61fdf2558c0a
convert: some tidyups, doc improvements, and test fixes
Bryan O'Sullivan <bos@serpentine.com>
parents:
5513
diff
changeset
|
75 svn source: specify the name of the trunk branch |
61fdf2558c0a
convert: some tidyups, doc improvements, and test fixes
Bryan O'Sullivan <bos@serpentine.com>
parents:
5513
diff
changeset
|
76 |
5441
71e7c86adcb7
convert: refactor sink initialisation, to remove hardcoding of hg
Bryan O'Sullivan <bos@serpentine.com>
parents:
5015
diff
changeset
|
77 options: |
71e7c86adcb7
convert: refactor sink initialisation, to remove hardcoding of hg
Bryan O'Sullivan <bos@serpentine.com>
parents:
5015
diff
changeset
|
78 |
71e7c86adcb7
convert: refactor sink initialisation, to remove hardcoding of hg
Bryan O'Sullivan <bos@serpentine.com>
parents:
5015
diff
changeset
|
79 -A --authors username mapping filename |
71e7c86adcb7
convert: refactor sink initialisation, to remove hardcoding of hg
Bryan O'Sullivan <bos@serpentine.com>
parents:
5015
diff
changeset
|
80 -d --dest-type destination repository type |
71e7c86adcb7
convert: refactor sink initialisation, to remove hardcoding of hg
Bryan O'Sullivan <bos@serpentine.com>
parents:
5015
diff
changeset
|
81 --filemap remap file names using contents of file |
71e7c86adcb7
convert: refactor sink initialisation, to remove hardcoding of hg
Bryan O'Sullivan <bos@serpentine.com>
parents:
5015
diff
changeset
|
82 -r --rev import up to target revision REV |
71e7c86adcb7
convert: refactor sink initialisation, to remove hardcoding of hg
Bryan O'Sullivan <bos@serpentine.com>
parents:
5015
diff
changeset
|
83 -s --source-type source repository type |
71e7c86adcb7
convert: refactor sink initialisation, to remove hardcoding of hg
Bryan O'Sullivan <bos@serpentine.com>
parents:
5015
diff
changeset
|
84 --datesort try to sort changesets by date |
71e7c86adcb7
convert: refactor sink initialisation, to remove hardcoding of hg
Bryan O'Sullivan <bos@serpentine.com>
parents:
5015
diff
changeset
|
85 |
71e7c86adcb7
convert: refactor sink initialisation, to remove hardcoding of hg
Bryan O'Sullivan <bos@serpentine.com>
parents:
5015
diff
changeset
|
86 use "hg -v help convert" to show global options |
5015 | 87 adding a |
88 assuming destination a-hg | |
89 initializing destination a-hg repository | |
90 scanning source... | |
91 sorting... | |
92 converting... | |
93 4 a | |
94 3 b | |
95 2 c | |
96 1 d | |
97 0 e | |
98 pulling from ../a | |
99 searching for changes | |
100 no changes found | |
5441
71e7c86adcb7
convert: refactor sink initialisation, to remove hardcoding of hg
Bryan O'Sullivan <bos@serpentine.com>
parents:
5015
diff
changeset
|
101 % should fail |
71e7c86adcb7
convert: refactor sink initialisation, to remove hardcoding of hg
Bryan O'Sullivan <bos@serpentine.com>
parents:
5015
diff
changeset
|
102 initializing destination bogusfile repository |
71e7c86adcb7
convert: refactor sink initialisation, to remove hardcoding of hg
Bryan O'Sullivan <bos@serpentine.com>
parents:
5015
diff
changeset
|
103 abort: cannot create new bundle repository |
71e7c86adcb7
convert: refactor sink initialisation, to remove hardcoding of hg
Bryan O'Sullivan <bos@serpentine.com>
parents:
5015
diff
changeset
|
104 % should fail |
71e7c86adcb7
convert: refactor sink initialisation, to remove hardcoding of hg
Bryan O'Sullivan <bos@serpentine.com>
parents:
5015
diff
changeset
|
105 abort: Permission denied: bogusdir |
71e7c86adcb7
convert: refactor sink initialisation, to remove hardcoding of hg
Bryan O'Sullivan <bos@serpentine.com>
parents:
5015
diff
changeset
|
106 % should succeed |
71e7c86adcb7
convert: refactor sink initialisation, to remove hardcoding of hg
Bryan O'Sullivan <bos@serpentine.com>
parents:
5015
diff
changeset
|
107 initializing destination bogusdir repository |
71e7c86adcb7
convert: refactor sink initialisation, to remove hardcoding of hg
Bryan O'Sullivan <bos@serpentine.com>
parents:
5015
diff
changeset
|
108 scanning source... |
71e7c86adcb7
convert: refactor sink initialisation, to remove hardcoding of hg
Bryan O'Sullivan <bos@serpentine.com>
parents:
5015
diff
changeset
|
109 sorting... |
71e7c86adcb7
convert: refactor sink initialisation, to remove hardcoding of hg
Bryan O'Sullivan <bos@serpentine.com>
parents:
5015
diff
changeset
|
110 converting... |
71e7c86adcb7
convert: refactor sink initialisation, to remove hardcoding of hg
Bryan O'Sullivan <bos@serpentine.com>
parents:
5015
diff
changeset
|
111 4 a |
71e7c86adcb7
convert: refactor sink initialisation, to remove hardcoding of hg
Bryan O'Sullivan <bos@serpentine.com>
parents:
5015
diff
changeset
|
112 3 b |
71e7c86adcb7
convert: refactor sink initialisation, to remove hardcoding of hg
Bryan O'Sullivan <bos@serpentine.com>
parents:
5015
diff
changeset
|
113 2 c |
71e7c86adcb7
convert: refactor sink initialisation, to remove hardcoding of hg
Bryan O'Sullivan <bos@serpentine.com>
parents:
5015
diff
changeset
|
114 1 d |
71e7c86adcb7
convert: refactor sink initialisation, to remove hardcoding of hg
Bryan O'Sullivan <bos@serpentine.com>
parents:
5015
diff
changeset
|
115 0 e |
5805
e422305e0853
test-convert: test before() and after() conversion actions
Patrick Mezard <pmezard@gmail.com>
parents:
5761
diff
changeset
|
116 % test pre and post conversion actions |
e422305e0853
test-convert: test before() and after() conversion actions
Patrick Mezard <pmezard@gmail.com>
parents:
5761
diff
changeset
|
117 run hg source pre-conversion action |
e422305e0853
test-convert: test before() and after() conversion actions
Patrick Mezard <pmezard@gmail.com>
parents:
5761
diff
changeset
|
118 run hg sink pre-conversion action |
e422305e0853
test-convert: test before() and after() conversion actions
Patrick Mezard <pmezard@gmail.com>
parents:
5761
diff
changeset
|
119 run hg sink post-conversion action |
e422305e0853
test-convert: test before() and after() conversion actions
Patrick Mezard <pmezard@gmail.com>
parents:
5761
diff
changeset
|
120 run hg source post-conversion action |