Show More
@@ -1,97 +1,97 b'' | |||
|
1 | 1 | mock bugzilla driver for testing template output: |
|
2 | 2 | |
|
3 | 3 | $ cat <<EOF > bzmock.py |
|
4 | 4 | > from __future__ import absolute_import |
|
5 | 5 | > from mercurial import extensions |
|
6 | 6 | > |
|
7 | 7 | > def extsetup(ui): |
|
8 | 8 | > bugzilla = extensions.find('bugzilla') |
|
9 | 9 | > class bzmock(bugzilla.bzaccess): |
|
10 | 10 | > def __init__(self, ui): |
|
11 | 11 | > super(bzmock, self).__init__(ui) |
|
12 | 12 | > self._logfile = ui.config('bugzilla', 'mocklog') |
|
13 | 13 | > def updatebug(self, bugid, newstate, text, committer): |
|
14 | 14 | > with open(self._logfile, 'a') as f: |
|
15 | 15 | > f.write('update bugid=%r, newstate=%r, committer=%r\n' |
|
16 | 16 | > % (bugid, newstate, committer)) |
|
17 | 17 | > f.write('----\n' + text + '\n----\n') |
|
18 | 18 | > def notify(self, bugs, committer): |
|
19 | 19 | > with open(self._logfile, 'a') as f: |
|
20 | 20 | > f.write('notify bugs=%r, committer=%r\n' |
|
21 | 21 | > % (bugs, committer)) |
|
22 | 22 | > bugzilla.bugzilla._versions['mock'] = bzmock |
|
23 | 23 | > EOF |
|
24 | 24 | |
|
25 | 25 | set up mock repository: |
|
26 | 26 | |
|
27 | 27 | $ hg init mockremote |
|
28 | 28 | $ cat <<EOF > mockremote/.hg/hgrc |
|
29 | 29 | > [extensions] |
|
30 | 30 | > bugzilla = |
|
31 | 31 | > bzmock = $TESTTMP/bzmock.py |
|
32 | 32 | > |
|
33 | 33 | > [bugzilla] |
|
34 | 34 | > version = mock |
|
35 | 35 | > mocklog = $TESTTMP/bzmock.log |
|
36 | 36 | > |
|
37 | 37 | > [hooks] |
|
38 | 38 | > incoming.bugzilla = python:hgext.bugzilla.hook |
|
39 | 39 | > |
|
40 | 40 | > [web] |
|
41 | 41 | > baseurl=http://example.org/hg |
|
42 | 42 | > |
|
43 | 43 | > %include $TESTTMP/bzstyle.hgrc |
|
44 | 44 | > EOF |
|
45 | 45 | |
|
46 | 46 | $ hg clone -q mockremote mocklocal |
|
47 | 47 | |
|
48 | 48 | push with default template: |
|
49 | 49 | |
|
50 | 50 | $ echo '[bugzilla]' > bzstyle.hgrc |
|
51 | 51 | $ echo foo > mocklocal/foo |
|
52 | 52 | $ hg ci -R mocklocal -Aqm 'Fixes bug 123' |
|
53 | 53 | $ hg -R mocklocal push -q |
|
54 | 54 | $ cat bzmock.log && rm bzmock.log |
|
55 | 55 | update bugid=123, newstate={}, committer='test' |
|
56 | 56 | ---- |
|
57 | changeset 7875a8342c6f in repo $TESTTMP/mockremote refers to bug 123. | |
|
57 | changeset 7875a8342c6f in repo $TESTTMP/mockremote refers to bug 123. (glob) | |
|
58 | 58 | details: |
|
59 | 59 | Fixes bug 123 |
|
60 | 60 | ---- |
|
61 | 61 | notify bugs={123: {}}, committer='test' |
|
62 | 62 | |
|
63 | 63 | push with style: |
|
64 | 64 | |
|
65 | 65 | $ cat <<EOF > bzstyle.map |
|
66 | 66 | > changeset = "{node|short} refers to bug {bug}." |
|
67 | 67 | > EOF |
|
68 | 68 | $ echo "style = $TESTTMP/bzstyle.map" >> bzstyle.hgrc |
|
69 | 69 | $ echo foo >> mocklocal/foo |
|
70 | 70 | $ hg ci -R mocklocal -qm 'Fixes bug 456' |
|
71 | 71 | $ hg -R mocklocal push -q |
|
72 | 72 | $ cat bzmock.log && rm bzmock.log |
|
73 | 73 | update bugid=456, newstate={}, committer='test' |
|
74 | 74 | ---- |
|
75 | 75 | 2808b172464b refers to bug 456. |
|
76 | 76 | ---- |
|
77 | 77 | notify bugs={456: {}}, committer='test' |
|
78 | 78 | |
|
79 | 79 | push with template (overrides style): |
|
80 | 80 | |
|
81 | 81 | $ cat <<EOF >> bzstyle.hgrc |
|
82 | 82 | > template = Changeset {node|short} in {root|basename}. |
|
83 | 83 | > {hgweb}/rev/{node|short}\n |
|
84 | 84 | > {desc} |
|
85 | 85 | > EOF |
|
86 | 86 | $ echo foo >> mocklocal/foo |
|
87 | 87 | $ hg ci -R mocklocal -qm 'Fixes bug 789' |
|
88 | 88 | $ hg -R mocklocal push -q |
|
89 | 89 | $ cat bzmock.log && rm bzmock.log |
|
90 | 90 | update bugid=789, newstate={}, committer='test' |
|
91 | 91 | ---- |
|
92 | 92 | Changeset a770f3e409f2 in mockremote. |
|
93 | 93 | http://example.org/hg/rev/a770f3e409f2 |
|
94 | 94 | |
|
95 | 95 | Fixes bug 789 |
|
96 | 96 | ---- |
|
97 | 97 | notify bugs={789: {}}, committer='test' |
@@ -1,535 +1,535 b'' | |||
|
1 | 1 | $ cat >> $HGRCPATH <<EOF |
|
2 | 2 | > [extensions] |
|
3 | 3 | > convert= |
|
4 | 4 | > [convert] |
|
5 | 5 | > hg.saverev=False |
|
6 | 6 | > EOF |
|
7 | 7 | $ hg help convert |
|
8 | 8 | hg convert [OPTION]... SOURCE [DEST [REVMAP]] |
|
9 | 9 | |
|
10 | 10 | convert a foreign SCM repository to a Mercurial one. |
|
11 | 11 | |
|
12 | 12 | Accepted source formats [identifiers]: |
|
13 | 13 | |
|
14 | 14 | - Mercurial [hg] |
|
15 | 15 | - CVS [cvs] |
|
16 | 16 | - Darcs [darcs] |
|
17 | 17 | - git [git] |
|
18 | 18 | - Subversion [svn] |
|
19 | 19 | - Monotone [mtn] |
|
20 | 20 | - GNU Arch [gnuarch] |
|
21 | 21 | - Bazaar [bzr] |
|
22 | 22 | - Perforce [p4] |
|
23 | 23 | |
|
24 | 24 | Accepted destination formats [identifiers]: |
|
25 | 25 | |
|
26 | 26 | - Mercurial [hg] |
|
27 | 27 | - Subversion [svn] (history on branches is not preserved) |
|
28 | 28 | |
|
29 | 29 | If no revision is given, all revisions will be converted. Otherwise, |
|
30 | 30 | convert will only import up to the named revision (given in a format |
|
31 | 31 | understood by the source). |
|
32 | 32 | |
|
33 | 33 | If no destination directory name is specified, it defaults to the basename |
|
34 | 34 | of the source with "-hg" appended. If the destination repository doesn't |
|
35 | 35 | exist, it will be created. |
|
36 | 36 | |
|
37 | 37 | By default, all sources except Mercurial will use --branchsort. Mercurial |
|
38 | 38 | uses --sourcesort to preserve original revision numbers order. Sort modes |
|
39 | 39 | have the following effects: |
|
40 | 40 | |
|
41 | 41 | --branchsort convert from parent to child revision when possible, which |
|
42 | 42 | means branches are usually converted one after the other. |
|
43 | 43 | It generates more compact repositories. |
|
44 | 44 | --datesort sort revisions by date. Converted repositories have good- |
|
45 | 45 | looking changelogs but are often an order of magnitude |
|
46 | 46 | larger than the same ones generated by --branchsort. |
|
47 | 47 | --sourcesort try to preserve source revisions order, only supported by |
|
48 | 48 | Mercurial sources. |
|
49 | 49 | --closesort try to move closed revisions as close as possible to parent |
|
50 | 50 | branches, only supported by Mercurial sources. |
|
51 | 51 | |
|
52 | 52 | If "REVMAP" isn't given, it will be put in a default location |
|
53 | 53 | ("<dest>/.hg/shamap" by default). The "REVMAP" is a simple text file that |
|
54 | 54 | maps each source commit ID to the destination ID for that revision, like |
|
55 | 55 | so: |
|
56 | 56 | |
|
57 | 57 | <source ID> <destination ID> |
|
58 | 58 | |
|
59 | 59 | If the file doesn't exist, it's automatically created. It's updated on |
|
60 | 60 | each commit copied, so 'hg convert' can be interrupted and can be run |
|
61 | 61 | repeatedly to copy new commits. |
|
62 | 62 | |
|
63 | 63 | The authormap is a simple text file that maps each source commit author to |
|
64 | 64 | a destination commit author. It is handy for source SCMs that use unix |
|
65 | 65 | logins to identify authors (e.g.: CVS). One line per author mapping and |
|
66 | 66 | the line format is: |
|
67 | 67 | |
|
68 | 68 | source author = destination author |
|
69 | 69 | |
|
70 | 70 | Empty lines and lines starting with a "#" are ignored. |
|
71 | 71 | |
|
72 | 72 | The filemap is a file that allows filtering and remapping of files and |
|
73 | 73 | directories. Each line can contain one of the following directives: |
|
74 | 74 | |
|
75 | 75 | include path/to/file-or-dir |
|
76 | 76 | |
|
77 | 77 | exclude path/to/file-or-dir |
|
78 | 78 | |
|
79 | 79 | rename path/to/source path/to/destination |
|
80 | 80 | |
|
81 | 81 | Comment lines start with "#". A specified path matches if it equals the |
|
82 | 82 | full relative name of a file or one of its parent directories. The |
|
83 | 83 | "include" or "exclude" directive with the longest matching path applies, |
|
84 | 84 | so line order does not matter. |
|
85 | 85 | |
|
86 | 86 | The "include" directive causes a file, or all files under a directory, to |
|
87 | 87 | be included in the destination repository. The default if there are no |
|
88 | 88 | "include" statements is to include everything. If there are any "include" |
|
89 | 89 | statements, nothing else is included. The "exclude" directive causes files |
|
90 | 90 | or directories to be omitted. The "rename" directive renames a file or |
|
91 | 91 | directory if it is converted. To rename from a subdirectory into the root |
|
92 | 92 | of the repository, use "." as the path to rename to. |
|
93 | 93 | |
|
94 | 94 | "--full" will make sure the converted changesets contain exactly the right |
|
95 | 95 | files with the right content. It will make a full conversion of all files, |
|
96 | 96 | not just the ones that have changed. Files that already are correct will |
|
97 | 97 | not be changed. This can be used to apply filemap changes when converting |
|
98 | 98 | incrementally. This is currently only supported for Mercurial and |
|
99 | 99 | Subversion. |
|
100 | 100 | |
|
101 | 101 | The splicemap is a file that allows insertion of synthetic history, |
|
102 | 102 | letting you specify the parents of a revision. This is useful if you want |
|
103 | 103 | to e.g. give a Subversion merge two parents, or graft two disconnected |
|
104 | 104 | series of history together. Each entry contains a key, followed by a |
|
105 | 105 | space, followed by one or two comma-separated values: |
|
106 | 106 | |
|
107 | 107 | key parent1, parent2 |
|
108 | 108 | |
|
109 | 109 | The key is the revision ID in the source revision control system whose |
|
110 | 110 | parents should be modified (same format as a key in .hg/shamap). The |
|
111 | 111 | values are the revision IDs (in either the source or destination revision |
|
112 | 112 | control system) that should be used as the new parents for that node. For |
|
113 | 113 | example, if you have merged "release-1.0" into "trunk", then you should |
|
114 | 114 | specify the revision on "trunk" as the first parent and the one on the |
|
115 | 115 | "release-1.0" branch as the second. |
|
116 | 116 | |
|
117 | 117 | The branchmap is a file that allows you to rename a branch when it is |
|
118 | 118 | being brought in from whatever external repository. When used in |
|
119 | 119 | conjunction with a splicemap, it allows for a powerful combination to help |
|
120 | 120 | fix even the most badly mismanaged repositories and turn them into nicely |
|
121 | 121 | structured Mercurial repositories. The branchmap contains lines of the |
|
122 | 122 | form: |
|
123 | 123 | |
|
124 | 124 | original_branch_name new_branch_name |
|
125 | 125 | |
|
126 | 126 | where "original_branch_name" is the name of the branch in the source |
|
127 | 127 | repository, and "new_branch_name" is the name of the branch is the |
|
128 | 128 | destination repository. No whitespace is allowed in the branch names. This |
|
129 | 129 | can be used to (for instance) move code in one repository from "default" |
|
130 | 130 | to a named branch. |
|
131 | 131 | |
|
132 | 132 | Mercurial Source |
|
133 | 133 | ################ |
|
134 | 134 | |
|
135 | 135 | The Mercurial source recognizes the following configuration options, which |
|
136 | 136 | you can set on the command line with "--config": |
|
137 | 137 | |
|
138 | 138 | convert.hg.ignoreerrors |
|
139 | 139 | ignore integrity errors when reading. Use it to fix |
|
140 | 140 | Mercurial repositories with missing revlogs, by converting |
|
141 | 141 | from and to Mercurial. Default is False. |
|
142 | 142 | convert.hg.saverev |
|
143 | 143 | store original revision ID in changeset (forces target IDs |
|
144 | 144 | to change). It takes a boolean argument and defaults to |
|
145 | 145 | False. |
|
146 | 146 | convert.hg.startrev |
|
147 | 147 | specify the initial Mercurial revision. The default is 0. |
|
148 | 148 | convert.hg.revs |
|
149 | 149 | revset specifying the source revisions to convert. |
|
150 | 150 | |
|
151 | 151 | CVS Source |
|
152 | 152 | ########## |
|
153 | 153 | |
|
154 | 154 | CVS source will use a sandbox (i.e. a checked-out copy) from CVS to |
|
155 | 155 | indicate the starting point of what will be converted. Direct access to |
|
156 | 156 | the repository files is not needed, unless of course the repository is |
|
157 | 157 | ":local:". The conversion uses the top level directory in the sandbox to |
|
158 | 158 | find the CVS repository, and then uses CVS rlog commands to find files to |
|
159 | 159 | convert. This means that unless a filemap is given, all files under the |
|
160 | 160 | starting directory will be converted, and that any directory |
|
161 | 161 | reorganization in the CVS sandbox is ignored. |
|
162 | 162 | |
|
163 | 163 | The following options can be used with "--config": |
|
164 | 164 | |
|
165 | 165 | convert.cvsps.cache |
|
166 | 166 | Set to False to disable remote log caching, for testing and |
|
167 | 167 | debugging purposes. Default is True. |
|
168 | 168 | convert.cvsps.fuzz |
|
169 | 169 | Specify the maximum time (in seconds) that is allowed |
|
170 | 170 | between commits with identical user and log message in a |
|
171 | 171 | single changeset. When very large files were checked in as |
|
172 | 172 | part of a changeset then the default may not be long enough. |
|
173 | 173 | The default is 60. |
|
174 | 174 | convert.cvsps.mergeto |
|
175 | 175 | Specify a regular expression to which commit log messages |
|
176 | 176 | are matched. If a match occurs, then the conversion process |
|
177 | 177 | will insert a dummy revision merging the branch on which |
|
178 | 178 | this log message occurs to the branch indicated in the |
|
179 | 179 | regex. Default is "{{mergetobranch ([-\w]+)}}" |
|
180 | 180 | convert.cvsps.mergefrom |
|
181 | 181 | Specify a regular expression to which commit log messages |
|
182 | 182 | are matched. If a match occurs, then the conversion process |
|
183 | 183 | will add the most recent revision on the branch indicated in |
|
184 | 184 | the regex as the second parent of the changeset. Default is |
|
185 | 185 | "{{mergefrombranch ([-\w]+)}}" |
|
186 | 186 | convert.localtimezone |
|
187 | 187 | use local time (as determined by the TZ environment |
|
188 | 188 | variable) for changeset date/times. The default is False |
|
189 | 189 | (use UTC). |
|
190 | 190 | hooks.cvslog Specify a Python function to be called at the end of |
|
191 | 191 | gathering the CVS log. The function is passed a list with |
|
192 | 192 | the log entries, and can modify the entries in-place, or add |
|
193 | 193 | or delete them. |
|
194 | 194 | hooks.cvschangesets |
|
195 | 195 | Specify a Python function to be called after the changesets |
|
196 | 196 | are calculated from the CVS log. The function is passed a |
|
197 | 197 | list with the changeset entries, and can modify the |
|
198 | 198 | changesets in-place, or add or delete them. |
|
199 | 199 | |
|
200 | 200 | An additional "debugcvsps" Mercurial command allows the builtin changeset |
|
201 | 201 | merging code to be run without doing a conversion. Its parameters and |
|
202 | 202 | output are similar to that of cvsps 2.1. Please see the command help for |
|
203 | 203 | more details. |
|
204 | 204 | |
|
205 | 205 | Subversion Source |
|
206 | 206 | ################# |
|
207 | 207 | |
|
208 | 208 | Subversion source detects classical trunk/branches/tags layouts. By |
|
209 | 209 | default, the supplied "svn://repo/path/" source URL is converted as a |
|
210 | 210 | single branch. If "svn://repo/path/trunk" exists it replaces the default |
|
211 | 211 | branch. If "svn://repo/path/branches" exists, its subdirectories are |
|
212 | 212 | listed as possible branches. If "svn://repo/path/tags" exists, it is |
|
213 | 213 | looked for tags referencing converted branches. Default "trunk", |
|
214 | 214 | "branches" and "tags" values can be overridden with following options. Set |
|
215 | 215 | them to paths relative to the source URL, or leave them blank to disable |
|
216 | 216 | auto detection. |
|
217 | 217 | |
|
218 | 218 | The following options can be set with "--config": |
|
219 | 219 | |
|
220 | 220 | convert.svn.branches |
|
221 | 221 | specify the directory containing branches. The default is |
|
222 | 222 | "branches". |
|
223 | 223 | convert.svn.tags |
|
224 | 224 | specify the directory containing tags. The default is |
|
225 | 225 | "tags". |
|
226 | 226 | convert.svn.trunk |
|
227 | 227 | specify the name of the trunk branch. The default is |
|
228 | 228 | "trunk". |
|
229 | 229 | convert.localtimezone |
|
230 | 230 | use local time (as determined by the TZ environment |
|
231 | 231 | variable) for changeset date/times. The default is False |
|
232 | 232 | (use UTC). |
|
233 | 233 | |
|
234 | 234 | Source history can be retrieved starting at a specific revision, instead |
|
235 | 235 | of being integrally converted. Only single branch conversions are |
|
236 | 236 | supported. |
|
237 | 237 | |
|
238 | 238 | convert.svn.startrev |
|
239 | 239 | specify start Subversion revision number. The default is 0. |
|
240 | 240 | |
|
241 | 241 | Git Source |
|
242 | 242 | ########## |
|
243 | 243 | |
|
244 | 244 | The Git importer converts commits from all reachable branches (refs in |
|
245 | 245 | refs/heads) and remotes (refs in refs/remotes) to Mercurial. Branches are |
|
246 | 246 | converted to bookmarks with the same name, with the leading 'refs/heads' |
|
247 | 247 | stripped. Git submodules are converted to Git subrepos in Mercurial. |
|
248 | 248 | |
|
249 | 249 | The following options can be set with "--config": |
|
250 | 250 | |
|
251 | 251 | convert.git.similarity |
|
252 | 252 | specify how similar files modified in a commit must be to be |
|
253 | 253 | imported as renames or copies, as a percentage between "0" |
|
254 | 254 | (disabled) and "100" (files must be identical). For example, |
|
255 | 255 | "90" means that a delete/add pair will be imported as a |
|
256 | 256 | rename if more than 90% of the file hasn't changed. The |
|
257 | 257 | default is "50". |
|
258 | 258 | convert.git.findcopiesharder |
|
259 | 259 | while detecting copies, look at all files in the working |
|
260 | 260 | copy instead of just changed ones. This is very expensive |
|
261 | 261 | for large projects, and is only effective when |
|
262 | 262 | "convert.git.similarity" is greater than 0. The default is |
|
263 | 263 | False. |
|
264 | 264 | convert.git.remoteprefix |
|
265 | 265 | remote refs are converted as bookmarks with |
|
266 | 266 | "convert.git.remoteprefix" as a prefix followed by a /. The |
|
267 | 267 | default is 'remote'. |
|
268 | 268 | convert.git.skipsubmodules |
|
269 | 269 | does not convert root level .gitmodules files or files with |
|
270 | 270 | 160000 mode indicating a submodule. Default is False. |
|
271 | 271 | |
|
272 | 272 | Perforce Source |
|
273 | 273 | ############### |
|
274 | 274 | |
|
275 | 275 | The Perforce (P4) importer can be given a p4 depot path or a client |
|
276 | 276 | specification as source. It will convert all files in the source to a flat |
|
277 | 277 | Mercurial repository, ignoring labels, branches and integrations. Note |
|
278 | 278 | that when a depot path is given you then usually should specify a target |
|
279 | 279 | directory, because otherwise the target may be named "...-hg". |
|
280 | 280 | |
|
281 | 281 | The following options can be set with "--config": |
|
282 | 282 | |
|
283 | 283 | convert.p4.encoding |
|
284 | 284 | specify the encoding to use when decoding standard output of |
|
285 | 285 | the Perforce command line tool. The default is default |
|
286 | 286 | system encoding. |
|
287 | 287 | convert.p4.startrev |
|
288 | 288 | specify initial Perforce revision (a Perforce changelist |
|
289 | 289 | number). |
|
290 | 290 | |
|
291 | 291 | Mercurial Destination |
|
292 | 292 | ##################### |
|
293 | 293 | |
|
294 | 294 | The Mercurial destination will recognize Mercurial subrepositories in the |
|
295 | 295 | destination directory, and update the .hgsubstate file automatically if |
|
296 | 296 | the destination subrepositories contain the <dest>/<sub>/.hg/shamap file. |
|
297 | 297 | Converting a repository with subrepositories requires converting a single |
|
298 | 298 | repository at a time, from the bottom up. |
|
299 | 299 | |
|
300 | 300 | The following options are supported: |
|
301 | 301 | |
|
302 | 302 | convert.hg.clonebranches |
|
303 | 303 | dispatch source branches in separate clones. The default is |
|
304 | 304 | False. |
|
305 | 305 | convert.hg.tagsbranch |
|
306 | 306 | branch name for tag revisions, defaults to "default". |
|
307 | 307 | convert.hg.usebranchnames |
|
308 | 308 | preserve branch names. The default is True. |
|
309 | 309 | convert.hg.sourcename |
|
310 | 310 | records the given string as a 'convert_source' extra value |
|
311 | 311 | on each commit made in the target repository. The default is |
|
312 | 312 | None. |
|
313 | 313 | |
|
314 | 314 | All Destinations |
|
315 | 315 | ################ |
|
316 | 316 | |
|
317 | 317 | All destination types accept the following options: |
|
318 | 318 | |
|
319 | 319 | convert.skiptags |
|
320 | 320 | does not convert tags from the source repo to the target |
|
321 | 321 | repo. The default is False. |
|
322 | 322 | |
|
323 | 323 | options ([+] can be repeated): |
|
324 | 324 | |
|
325 | 325 | -s --source-type TYPE source repository type |
|
326 | 326 | -d --dest-type TYPE destination repository type |
|
327 | 327 | -r --rev REV [+] import up to source revision REV |
|
328 | 328 | -A --authormap FILE remap usernames using this file |
|
329 | 329 | --filemap FILE remap file names using contents of file |
|
330 | 330 | --full apply filemap changes by converting all files again |
|
331 | 331 | --splicemap FILE splice synthesized history into place |
|
332 | 332 | --branchmap FILE change branch names while converting |
|
333 | 333 | --branchsort try to sort changesets by branches |
|
334 | 334 | --datesort try to sort changesets by date |
|
335 | 335 | --sourcesort preserve source changesets order |
|
336 | 336 | --closesort try to reorder closed revisions |
|
337 | 337 | |
|
338 | 338 | (some details hidden, use --verbose to show complete help) |
|
339 | 339 | $ hg init a |
|
340 | 340 | $ cd a |
|
341 | 341 | $ echo a > a |
|
342 | 342 | $ hg ci -d'0 0' -Ama |
|
343 | 343 | adding a |
|
344 | 344 | $ hg cp a b |
|
345 | 345 | $ hg ci -d'1 0' -mb |
|
346 | 346 | $ hg rm a |
|
347 | 347 | $ hg ci -d'2 0' -mc |
|
348 | 348 | $ hg mv b a |
|
349 | 349 | $ hg ci -d'3 0' -md |
|
350 | 350 | $ echo a >> a |
|
351 | 351 | $ hg ci -d'4 0' -me |
|
352 | 352 | $ cd .. |
|
353 | 353 | $ hg convert a 2>&1 | grep -v 'subversion python bindings could not be loaded' |
|
354 | 354 | assuming destination a-hg |
|
355 | 355 | initializing destination a-hg repository |
|
356 | 356 | scanning source... |
|
357 | 357 | sorting... |
|
358 | 358 | converting... |
|
359 | 359 | 4 a |
|
360 | 360 | 3 b |
|
361 | 361 | 2 c |
|
362 | 362 | 1 d |
|
363 | 363 | 0 e |
|
364 | 364 | $ hg --cwd a-hg pull ../a |
|
365 | 365 | pulling from ../a |
|
366 | 366 | searching for changes |
|
367 | 367 | no changes found |
|
368 | 368 | |
|
369 | 369 | conversion to existing file should fail |
|
370 | 370 | |
|
371 | 371 | $ touch bogusfile |
|
372 | 372 | $ hg convert a bogusfile |
|
373 | 373 | initializing destination bogusfile repository |
|
374 | 374 | abort: cannot create new bundle repository |
|
375 | 375 | [255] |
|
376 | 376 | |
|
377 | 377 | #if unix-permissions no-root |
|
378 | 378 | |
|
379 | 379 | conversion to dir without permissions should fail |
|
380 | 380 | |
|
381 | 381 | $ mkdir bogusdir |
|
382 | 382 | $ chmod 000 bogusdir |
|
383 | 383 | |
|
384 | 384 | $ hg convert a bogusdir |
|
385 | 385 | abort: Permission denied: 'bogusdir' |
|
386 | 386 | [255] |
|
387 | 387 | |
|
388 | 388 | user permissions should succeed |
|
389 | 389 | |
|
390 | 390 | $ chmod 700 bogusdir |
|
391 | 391 | $ hg convert a bogusdir |
|
392 | 392 | initializing destination bogusdir repository |
|
393 | 393 | scanning source... |
|
394 | 394 | sorting... |
|
395 | 395 | converting... |
|
396 | 396 | 4 a |
|
397 | 397 | 3 b |
|
398 | 398 | 2 c |
|
399 | 399 | 1 d |
|
400 | 400 | 0 e |
|
401 | 401 | |
|
402 | 402 | #endif |
|
403 | 403 | |
|
404 | 404 | test pre and post conversion actions |
|
405 | 405 | |
|
406 | 406 | $ echo 'include b' > filemap |
|
407 | 407 | $ hg convert --debug --filemap filemap a partialb | \ |
|
408 | 408 | > grep 'run hg' |
|
409 | 409 | run hg source pre-conversion action |
|
410 | 410 | run hg sink pre-conversion action |
|
411 | 411 | run hg sink post-conversion action |
|
412 | 412 | run hg source post-conversion action |
|
413 | 413 | |
|
414 | 414 | converting empty dir should fail "nicely |
|
415 | 415 | |
|
416 | 416 | $ mkdir emptydir |
|
417 | 417 | |
|
418 | 418 | override $PATH to ensure p4 not visible; use $PYTHON in case we're |
|
419 | 419 | running from a devel copy, not a temp installation |
|
420 | 420 | |
|
421 | 421 | $ PATH="$BINDIR" $PYTHON "$BINDIR"/hg convert emptydir |
|
422 | 422 | assuming destination emptydir-hg |
|
423 | 423 | initializing destination emptydir-hg repository |
|
424 | 424 | emptydir does not look like a CVS checkout |
|
425 | $TESTTMP/emptydir does not look like a Git repository | |
|
425 | $TESTTMP/emptydir does not look like a Git repository (glob) | |
|
426 | 426 | emptydir does not look like a Subversion repository |
|
427 | 427 | emptydir is not a local Mercurial repository |
|
428 | 428 | emptydir does not look like a darcs repository |
|
429 | 429 | emptydir does not look like a monotone repository |
|
430 | 430 | emptydir does not look like a GNU Arch repository |
|
431 | 431 | emptydir does not look like a Bazaar repository |
|
432 | 432 | cannot find required "p4" tool |
|
433 | 433 | abort: emptydir: missing or unsupported repository |
|
434 | 434 | [255] |
|
435 | 435 | |
|
436 | 436 | convert with imaginary source type |
|
437 | 437 | |
|
438 | 438 | $ hg convert --source-type foo a a-foo |
|
439 | 439 | initializing destination a-foo repository |
|
440 | 440 | abort: foo: invalid source repository type |
|
441 | 441 | [255] |
|
442 | 442 | |
|
443 | 443 | convert with imaginary sink type |
|
444 | 444 | |
|
445 | 445 | $ hg convert --dest-type foo a a-foo |
|
446 | 446 | abort: foo: invalid destination repository type |
|
447 | 447 | [255] |
|
448 | 448 | |
|
449 | 449 | testing: convert must not produce duplicate entries in fncache |
|
450 | 450 | |
|
451 | 451 | $ hg convert a b |
|
452 | 452 | initializing destination b repository |
|
453 | 453 | scanning source... |
|
454 | 454 | sorting... |
|
455 | 455 | converting... |
|
456 | 456 | 4 a |
|
457 | 457 | 3 b |
|
458 | 458 | 2 c |
|
459 | 459 | 1 d |
|
460 | 460 | 0 e |
|
461 | 461 | |
|
462 | 462 | contents of fncache file: |
|
463 | 463 | |
|
464 | 464 | $ cat b/.hg/store/fncache | sort |
|
465 | 465 | data/a.i |
|
466 | 466 | data/b.i |
|
467 | 467 | |
|
468 | 468 | test bogus URL |
|
469 | 469 | |
|
470 | 470 | $ hg convert -q bzr+ssh://foobar@selenic.com/baz baz |
|
471 | 471 | abort: bzr+ssh://foobar@selenic.com/baz: missing or unsupported repository |
|
472 | 472 | [255] |
|
473 | 473 | |
|
474 | 474 | test revset converted() lookup |
|
475 | 475 | |
|
476 | 476 | $ hg --config convert.hg.saverev=True convert a c |
|
477 | 477 | initializing destination c repository |
|
478 | 478 | scanning source... |
|
479 | 479 | sorting... |
|
480 | 480 | converting... |
|
481 | 481 | 4 a |
|
482 | 482 | 3 b |
|
483 | 483 | 2 c |
|
484 | 484 | 1 d |
|
485 | 485 | 0 e |
|
486 | 486 | $ echo f > c/f |
|
487 | 487 | $ hg -R c ci -d'0 0' -Amf |
|
488 | 488 | adding f |
|
489 | 489 | created new head |
|
490 | 490 | $ hg -R c log -r "converted(09d945a62ce6)" |
|
491 | 491 | changeset: 1:98c3dd46a874 |
|
492 | 492 | user: test |
|
493 | 493 | date: Thu Jan 01 00:00:01 1970 +0000 |
|
494 | 494 | summary: b |
|
495 | 495 | |
|
496 | 496 | $ hg -R c log -r "converted()" |
|
497 | 497 | changeset: 0:31ed57b2037c |
|
498 | 498 | user: test |
|
499 | 499 | date: Thu Jan 01 00:00:00 1970 +0000 |
|
500 | 500 | summary: a |
|
501 | 501 | |
|
502 | 502 | changeset: 1:98c3dd46a874 |
|
503 | 503 | user: test |
|
504 | 504 | date: Thu Jan 01 00:00:01 1970 +0000 |
|
505 | 505 | summary: b |
|
506 | 506 | |
|
507 | 507 | changeset: 2:3b9ca06ef716 |
|
508 | 508 | user: test |
|
509 | 509 | date: Thu Jan 01 00:00:02 1970 +0000 |
|
510 | 510 | summary: c |
|
511 | 511 | |
|
512 | 512 | changeset: 3:4e0debd37cf2 |
|
513 | 513 | user: test |
|
514 | 514 | date: Thu Jan 01 00:00:03 1970 +0000 |
|
515 | 515 | summary: d |
|
516 | 516 | |
|
517 | 517 | changeset: 4:9de3bc9349c5 |
|
518 | 518 | user: test |
|
519 | 519 | date: Thu Jan 01 00:00:04 1970 +0000 |
|
520 | 520 | summary: e |
|
521 | 521 | |
|
522 | 522 | |
|
523 | 523 | test specifying a sourcename |
|
524 | 524 | $ echo g > a/g |
|
525 | 525 | $ hg -R a ci -d'0 0' -Amg |
|
526 | 526 | adding g |
|
527 | 527 | $ hg --config convert.hg.sourcename=mysource --config convert.hg.saverev=True convert a c |
|
528 | 528 | scanning source... |
|
529 | 529 | sorting... |
|
530 | 530 | converting... |
|
531 | 531 | 0 g |
|
532 | 532 | $ hg -R c log -r tip --template '{extras % "{extra}\n"}' |
|
533 | 533 | branch=default |
|
534 | 534 | convert_revision=a3bc6100aa8ec03e00aaf271f1f50046fb432072 |
|
535 | 535 | convert_source=mysource |
@@ -1,628 +1,628 b'' | |||
|
1 | 1 | |
|
2 | 2 | $ cat <<EOF >> $HGRCPATH |
|
3 | 3 | > [extensions] |
|
4 | 4 | > notify= |
|
5 | 5 | > |
|
6 | 6 | > [hooks] |
|
7 | 7 | > incoming.notify = python:hgext.notify.hook |
|
8 | 8 | > |
|
9 | 9 | > [notify] |
|
10 | 10 | > sources = pull |
|
11 | 11 | > diffstat = False |
|
12 | 12 | > |
|
13 | 13 | > [usersubs] |
|
14 | 14 | > foo@bar = * |
|
15 | 15 | > |
|
16 | 16 | > [reposubs] |
|
17 | 17 | > * = baz |
|
18 | 18 | > EOF |
|
19 | 19 | $ hg help notify |
|
20 | 20 | notify extension - hooks for sending email push notifications |
|
21 | 21 | |
|
22 | 22 | This extension implements hooks to send email notifications when changesets |
|
23 | 23 | are sent from or received by the local repository. |
|
24 | 24 | |
|
25 | 25 | First, enable the extension as explained in 'hg help extensions', and register |
|
26 | 26 | the hook you want to run. "incoming" and "changegroup" hooks are run when |
|
27 | 27 | changesets are received, while "outgoing" hooks are for changesets sent to |
|
28 | 28 | another repository: |
|
29 | 29 | |
|
30 | 30 | [hooks] |
|
31 | 31 | # one email for each incoming changeset |
|
32 | 32 | incoming.notify = python:hgext.notify.hook |
|
33 | 33 | # one email for all incoming changesets |
|
34 | 34 | changegroup.notify = python:hgext.notify.hook |
|
35 | 35 | |
|
36 | 36 | # one email for all outgoing changesets |
|
37 | 37 | outgoing.notify = python:hgext.notify.hook |
|
38 | 38 | |
|
39 | 39 | This registers the hooks. To enable notification, subscribers must be assigned |
|
40 | 40 | to repositories. The "[usersubs]" section maps multiple repositories to a |
|
41 | 41 | given recipient. The "[reposubs]" section maps multiple recipients to a single |
|
42 | 42 | repository: |
|
43 | 43 | |
|
44 | 44 | [usersubs] |
|
45 | 45 | # key is subscriber email, value is a comma-separated list of repo patterns |
|
46 | 46 | user@host = pattern |
|
47 | 47 | |
|
48 | 48 | [reposubs] |
|
49 | 49 | # key is repo pattern, value is a comma-separated list of subscriber emails |
|
50 | 50 | pattern = user@host |
|
51 | 51 | |
|
52 | 52 | A "pattern" is a "glob" matching the absolute path to a repository, optionally |
|
53 | 53 | combined with a revset expression. A revset expression, if present, is |
|
54 | 54 | separated from the glob by a hash. Example: |
|
55 | 55 | |
|
56 | 56 | [reposubs] |
|
57 | 57 | */widgets#branch(release) = qa-team@example.com |
|
58 | 58 | |
|
59 | 59 | This sends to "qa-team@example.com" whenever a changeset on the "release" |
|
60 | 60 | branch triggers a notification in any repository ending in "widgets". |
|
61 | 61 | |
|
62 | 62 | In order to place them under direct user management, "[usersubs]" and |
|
63 | 63 | "[reposubs]" sections may be placed in a separate "hgrc" file and incorporated |
|
64 | 64 | by reference: |
|
65 | 65 | |
|
66 | 66 | [notify] |
|
67 | 67 | config = /path/to/subscriptionsfile |
|
68 | 68 | |
|
69 | 69 | Notifications will not be sent until the "notify.test" value is set to |
|
70 | 70 | "False"; see below. |
|
71 | 71 | |
|
72 | 72 | Notifications content can be tweaked with the following configuration entries: |
|
73 | 73 | |
|
74 | 74 | notify.test |
|
75 | 75 | If "True", print messages to stdout instead of sending them. Default: True. |
|
76 | 76 | |
|
77 | 77 | notify.sources |
|
78 | 78 | Space-separated list of change sources. Notifications are activated only |
|
79 | 79 | when a changeset's source is in this list. Sources may be: |
|
80 | 80 | |
|
81 | 81 | "serve" changesets received via http or ssh |
|
82 | 82 | "pull" changesets received via "hg pull" |
|
83 | 83 | "unbundle" changesets received via "hg unbundle" |
|
84 | 84 | "push" changesets sent or received via "hg push" |
|
85 | 85 | "bundle" changesets sent via "hg unbundle" |
|
86 | 86 | |
|
87 | 87 | Default: serve. |
|
88 | 88 | |
|
89 | 89 | notify.strip |
|
90 | 90 | Number of leading slashes to strip from url paths. By default, notifications |
|
91 | 91 | reference repositories with their absolute path. "notify.strip" lets you |
|
92 | 92 | turn them into relative paths. For example, "notify.strip=3" will change |
|
93 | 93 | "/long/path/repository" into "repository". Default: 0. |
|
94 | 94 | |
|
95 | 95 | notify.domain |
|
96 | 96 | Default email domain for sender or recipients with no explicit domain. |
|
97 | 97 | |
|
98 | 98 | notify.style |
|
99 | 99 | Style file to use when formatting emails. |
|
100 | 100 | |
|
101 | 101 | notify.template |
|
102 | 102 | Template to use when formatting emails. |
|
103 | 103 | |
|
104 | 104 | notify.incoming |
|
105 | 105 | Template to use when run as an incoming hook, overriding "notify.template". |
|
106 | 106 | |
|
107 | 107 | notify.outgoing |
|
108 | 108 | Template to use when run as an outgoing hook, overriding "notify.template". |
|
109 | 109 | |
|
110 | 110 | notify.changegroup |
|
111 | 111 | Template to use when running as a changegroup hook, overriding |
|
112 | 112 | "notify.template". |
|
113 | 113 | |
|
114 | 114 | notify.maxdiff |
|
115 | 115 | Maximum number of diff lines to include in notification email. Set to 0 to |
|
116 | 116 | disable the diff, or -1 to include all of it. Default: 300. |
|
117 | 117 | |
|
118 | 118 | notify.maxsubject |
|
119 | 119 | Maximum number of characters in email's subject line. Default: 67. |
|
120 | 120 | |
|
121 | 121 | notify.diffstat |
|
122 | 122 | Set to True to include a diffstat before diff content. Default: True. |
|
123 | 123 | |
|
124 | 124 | notify.merge |
|
125 | 125 | If True, send notifications for merge changesets. Default: True. |
|
126 | 126 | |
|
127 | 127 | notify.mbox |
|
128 | 128 | If set, append mails to this mbox file instead of sending. Default: None. |
|
129 | 129 | |
|
130 | 130 | notify.fromauthor |
|
131 | 131 | If set, use the committer of the first changeset in a changegroup for the |
|
132 | 132 | "From" field of the notification mail. If not set, take the user from the |
|
133 | 133 | pushing repo. Default: False. |
|
134 | 134 | |
|
135 | 135 | If set, the following entries will also be used to customize the |
|
136 | 136 | notifications: |
|
137 | 137 | |
|
138 | 138 | email.from |
|
139 | 139 | Email "From" address to use if none can be found in the generated email |
|
140 | 140 | content. |
|
141 | 141 | |
|
142 | 142 | web.baseurl |
|
143 | 143 | Root repository URL to combine with repository paths when making references. |
|
144 | 144 | See also "notify.strip". |
|
145 | 145 | |
|
146 | 146 | no commands defined |
|
147 | 147 | $ hg init a |
|
148 | 148 | $ echo a > a/a |
|
149 | 149 | |
|
150 | 150 | commit |
|
151 | 151 | |
|
152 | 152 | $ hg --cwd a commit -Ama -d '0 0' |
|
153 | 153 | adding a |
|
154 | 154 | |
|
155 | 155 | |
|
156 | 156 | clone |
|
157 | 157 | |
|
158 | 158 | $ hg --traceback clone a b |
|
159 | 159 | updating to branch default |
|
160 | 160 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
161 | 161 | $ echo a >> a/a |
|
162 | 162 | |
|
163 | 163 | commit |
|
164 | 164 | |
|
165 | 165 | $ hg --traceback --cwd a commit -Amb -d '1 0' |
|
166 | 166 | |
|
167 | 167 | on Mac OS X 10.5 the tmp path is very long so would get stripped in the subject line |
|
168 | 168 | |
|
169 | 169 | $ cat <<EOF >> $HGRCPATH |
|
170 | 170 | > [notify] |
|
171 | 171 | > maxsubject = 200 |
|
172 | 172 | > EOF |
|
173 | 173 | |
|
174 | 174 | the python call below wraps continuation lines, which appear on Mac OS X 10.5 because |
|
175 | 175 | of the very long subject line |
|
176 | 176 | pull (minimal config) |
|
177 | 177 | |
|
178 | 178 | $ hg --traceback --cwd b pull ../a | \ |
|
179 | 179 | > $PYTHON -c 'import sys,re; print re.sub("\n[\t ]", " ", sys.stdin.read()),' |
|
180 | 180 | pulling from ../a |
|
181 | 181 | searching for changes |
|
182 | 182 | adding changesets |
|
183 | 183 | adding manifests |
|
184 | 184 | adding file changes |
|
185 | 185 | added 1 changesets with 1 changes to 1 files |
|
186 | 186 | Content-Type: text/plain; charset="us-ascii" |
|
187 | 187 | MIME-Version: 1.0 |
|
188 | 188 | Content-Transfer-Encoding: 7bit |
|
189 | 189 | Date: * (glob) |
|
190 | 190 | Subject: changeset in $TESTTMP/b: b |
|
191 | 191 | From: test |
|
192 | 192 | X-Hg-Notification: changeset 0647d048b600 |
|
193 | 193 | Message-Id: <*> (glob) |
|
194 | 194 | To: baz, foo@bar |
|
195 | 195 | |
|
196 | 196 | changeset 0647d048b600 in $TESTTMP/b (glob) |
|
197 | 197 | details: $TESTTMP/b?cmd=changeset;node=0647d048b600 |
|
198 | 198 | description: b |
|
199 | 199 | |
|
200 | 200 | diffs (6 lines): |
|
201 | 201 | |
|
202 | 202 | diff -r cb9a9f314b8b -r 0647d048b600 a |
|
203 | 203 | --- a/a Thu Jan 01 00:00:00 1970 +0000 |
|
204 | 204 | +++ b/a Thu Jan 01 00:00:01 1970 +0000 |
|
205 | 205 | @@ -1,1 +1,2 @@ a |
|
206 | 206 | +a |
|
207 | 207 | (run 'hg update' to get a working copy) |
|
208 | 208 | $ cat <<EOF >> $HGRCPATH |
|
209 | 209 | > [notify] |
|
210 | 210 | > config = `pwd`/.notify.conf |
|
211 | 211 | > domain = test.com |
|
212 | 212 | > strip = 42 |
|
213 | 213 | > template = Subject: {desc|firstline|strip}\nFrom: {author}\nX-Test: foo\n\nchangeset {node|short} in {webroot}\ndescription:\n\t{desc|tabindent|strip} |
|
214 | 214 | > |
|
215 | 215 | > [web] |
|
216 | 216 | > baseurl = http://test/ |
|
217 | 217 | > EOF |
|
218 | 218 | |
|
219 | 219 | fail for config file is missing |
|
220 | 220 | |
|
221 | 221 | $ hg --cwd b rollback |
|
222 | 222 | repository tip rolled back to revision 0 (undo pull) |
|
223 | 223 | $ hg --cwd b pull ../a 2>&1 | grep 'error.*\.notify\.conf' > /dev/null && echo pull failed |
|
224 | 224 | pull failed |
|
225 | 225 | $ touch ".notify.conf" |
|
226 | 226 | |
|
227 | 227 | pull |
|
228 | 228 | |
|
229 | 229 | $ hg --cwd b rollback |
|
230 | 230 | repository tip rolled back to revision 0 (undo pull) |
|
231 | 231 | $ hg --traceback --cwd b pull ../a | \ |
|
232 | 232 | > $PYTHON -c 'import sys,re; print re.sub("\n\t", " ", sys.stdin.read()),' |
|
233 | 233 | pulling from ../a |
|
234 | 234 | searching for changes |
|
235 | 235 | adding changesets |
|
236 | 236 | adding manifests |
|
237 | 237 | adding file changes |
|
238 | 238 | added 1 changesets with 1 changes to 1 files |
|
239 | 239 | Content-Type: text/plain; charset="us-ascii" |
|
240 | 240 | MIME-Version: 1.0 |
|
241 | 241 | Content-Transfer-Encoding: 7bit |
|
242 | 242 | X-Test: foo |
|
243 | 243 | Date: * (glob) |
|
244 | 244 | Subject: b |
|
245 | 245 | From: test@test.com |
|
246 | 246 | X-Hg-Notification: changeset 0647d048b600 |
|
247 | 247 | Message-Id: <*> (glob) |
|
248 | 248 | To: baz@test.com, foo@bar |
|
249 | 249 | |
|
250 | 250 | changeset 0647d048b600 in b |
|
251 | 251 | description: b |
|
252 | 252 | diffs (6 lines): |
|
253 | 253 | |
|
254 | 254 | diff -r cb9a9f314b8b -r 0647d048b600 a |
|
255 | 255 | --- a/a Thu Jan 01 00:00:00 1970 +0000 |
|
256 | 256 | +++ b/a Thu Jan 01 00:00:01 1970 +0000 |
|
257 | 257 | @@ -1,1 +1,2 @@ |
|
258 | 258 | a |
|
259 | 259 | +a |
|
260 | 260 | (run 'hg update' to get a working copy) |
|
261 | 261 | |
|
262 | 262 | $ cat << EOF >> $HGRCPATH |
|
263 | 263 | > [hooks] |
|
264 | 264 | > incoming.notify = python:hgext.notify.hook |
|
265 | 265 | > |
|
266 | 266 | > [notify] |
|
267 | 267 | > sources = pull |
|
268 | 268 | > diffstat = True |
|
269 | 269 | > EOF |
|
270 | 270 | |
|
271 | 271 | pull |
|
272 | 272 | |
|
273 | 273 | $ hg --cwd b rollback |
|
274 | 274 | repository tip rolled back to revision 0 (undo pull) |
|
275 | 275 | $ hg --traceback --cwd b pull ../a | \ |
|
276 | 276 | > $PYTHON -c 'import sys,re; print re.sub("\n\t", " ", sys.stdin.read()),' |
|
277 | 277 | pulling from ../a |
|
278 | 278 | searching for changes |
|
279 | 279 | adding changesets |
|
280 | 280 | adding manifests |
|
281 | 281 | adding file changes |
|
282 | 282 | added 1 changesets with 1 changes to 1 files |
|
283 | 283 | Content-Type: text/plain; charset="us-ascii" |
|
284 | 284 | MIME-Version: 1.0 |
|
285 | 285 | Content-Transfer-Encoding: 7bit |
|
286 | 286 | X-Test: foo |
|
287 | 287 | Date: * (glob) |
|
288 | 288 | Subject: b |
|
289 | 289 | From: test@test.com |
|
290 | 290 | X-Hg-Notification: changeset 0647d048b600 |
|
291 | 291 | Message-Id: <*> (glob) |
|
292 | 292 | To: baz@test.com, foo@bar |
|
293 | 293 | |
|
294 | 294 | changeset 0647d048b600 in b |
|
295 | 295 | description: b |
|
296 | 296 | diffstat: |
|
297 | 297 | |
|
298 | 298 | a | 1 + |
|
299 | 299 | 1 files changed, 1 insertions(+), 0 deletions(-) |
|
300 | 300 | |
|
301 | 301 | diffs (6 lines): |
|
302 | 302 | |
|
303 | 303 | diff -r cb9a9f314b8b -r 0647d048b600 a |
|
304 | 304 | --- a/a Thu Jan 01 00:00:00 1970 +0000 |
|
305 | 305 | +++ b/a Thu Jan 01 00:00:01 1970 +0000 |
|
306 | 306 | @@ -1,1 +1,2 @@ |
|
307 | 307 | a |
|
308 | 308 | +a |
|
309 | 309 | (run 'hg update' to get a working copy) |
|
310 | 310 | |
|
311 | 311 | test merge |
|
312 | 312 | |
|
313 | 313 | $ cd a |
|
314 | 314 | $ hg up -C 0 |
|
315 | 315 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
316 | 316 | $ echo a >> a |
|
317 | 317 | $ hg ci -Am adda2 -d '2 0' |
|
318 | 318 | created new head |
|
319 | 319 | $ hg merge |
|
320 | 320 | 0 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
321 | 321 | (branch merge, don't forget to commit) |
|
322 | 322 | $ hg ci -m merge -d '3 0' |
|
323 | 323 | $ cd .. |
|
324 | 324 | $ hg --traceback --cwd b pull ../a | \ |
|
325 | 325 | > $PYTHON -c 'import sys,re; print re.sub("\n\t", " ", sys.stdin.read()),' |
|
326 | 326 | pulling from ../a |
|
327 | 327 | searching for changes |
|
328 | 328 | adding changesets |
|
329 | 329 | adding manifests |
|
330 | 330 | adding file changes |
|
331 | 331 | added 2 changesets with 0 changes to 0 files |
|
332 | 332 | Content-Type: text/plain; charset="us-ascii" |
|
333 | 333 | MIME-Version: 1.0 |
|
334 | 334 | Content-Transfer-Encoding: 7bit |
|
335 | 335 | X-Test: foo |
|
336 | 336 | Date: * (glob) |
|
337 | 337 | Subject: adda2 |
|
338 | 338 | From: test@test.com |
|
339 | 339 | X-Hg-Notification: changeset 0a184ce6067f |
|
340 | 340 | Message-Id: <*> (glob) |
|
341 | 341 | To: baz@test.com, foo@bar |
|
342 | 342 | |
|
343 | 343 | changeset 0a184ce6067f in b |
|
344 | 344 | description: adda2 |
|
345 | 345 | diffstat: |
|
346 | 346 | |
|
347 | 347 | a | 1 + |
|
348 | 348 | 1 files changed, 1 insertions(+), 0 deletions(-) |
|
349 | 349 | |
|
350 | 350 | diffs (6 lines): |
|
351 | 351 | |
|
352 | 352 | diff -r cb9a9f314b8b -r 0a184ce6067f a |
|
353 | 353 | --- a/a Thu Jan 01 00:00:00 1970 +0000 |
|
354 | 354 | +++ b/a Thu Jan 01 00:00:02 1970 +0000 |
|
355 | 355 | @@ -1,1 +1,2 @@ |
|
356 | 356 | a |
|
357 | 357 | +a |
|
358 | 358 | Content-Type: text/plain; charset="us-ascii" |
|
359 | 359 | MIME-Version: 1.0 |
|
360 | 360 | Content-Transfer-Encoding: 7bit |
|
361 | 361 | X-Test: foo |
|
362 | 362 | Date: * (glob) |
|
363 | 363 | Subject: merge |
|
364 | 364 | From: test@test.com |
|
365 | 365 | X-Hg-Notification: changeset 6a0cf76b2701 |
|
366 | 366 | Message-Id: <*> (glob) |
|
367 | 367 | To: baz@test.com, foo@bar |
|
368 | 368 | |
|
369 | 369 | changeset 6a0cf76b2701 in b |
|
370 | 370 | description: merge |
|
371 | 371 | (run 'hg update' to get a working copy) |
|
372 | 372 | |
|
373 | 373 | non-ascii content and truncation of multi-byte subject |
|
374 | 374 | |
|
375 | 375 | $ cat <<EOF >> $HGRCPATH |
|
376 | 376 | > [notify] |
|
377 | 377 | > maxsubject = 4 |
|
378 | 378 | > EOF |
|
379 | 379 | $ echo a >> a/a |
|
380 | 380 | $ hg --cwd a --encoding utf-8 commit -A -d '0 0' \ |
|
381 | 381 | > -m `$PYTHON -c 'print "\xc3\xa0\xc3\xa1\xc3\xa2\xc3\xa3\xc3\xa4"'` |
|
382 | 382 | $ hg --traceback --cwd b --encoding utf-8 pull ../a | \ |
|
383 | 383 | > $PYTHON -c 'import sys,re; print re.sub("\n\t", " ", sys.stdin.read()),' |
|
384 | 384 | pulling from ../a |
|
385 | 385 | searching for changes |
|
386 | 386 | adding changesets |
|
387 | 387 | adding manifests |
|
388 | 388 | adding file changes |
|
389 | 389 | added 1 changesets with 1 changes to 1 files |
|
390 | 390 | Content-Type: text/plain; charset="us-ascii" |
|
391 | 391 | MIME-Version: 1.0 |
|
392 | 392 | Content-Transfer-Encoding: 8bit |
|
393 | 393 | X-Test: foo |
|
394 | 394 | Date: * (glob) |
|
395 | 395 | Subject: \xc3\xa0... (esc) |
|
396 | 396 | From: test@test.com |
|
397 | 397 | X-Hg-Notification: changeset 7ea05ad269dc |
|
398 | 398 | Message-Id: <*> (glob) |
|
399 | 399 | To: baz@test.com, foo@bar |
|
400 | 400 | |
|
401 | 401 | changeset 7ea05ad269dc in b |
|
402 | 402 | description: \xc3\xa0\xc3\xa1\xc3\xa2\xc3\xa3\xc3\xa4 (esc) |
|
403 | 403 | diffstat: |
|
404 | 404 | |
|
405 | 405 | a | 1 + |
|
406 | 406 | 1 files changed, 1 insertions(+), 0 deletions(-) |
|
407 | 407 | |
|
408 | 408 | diffs (7 lines): |
|
409 | 409 | |
|
410 | 410 | diff -r 6a0cf76b2701 -r 7ea05ad269dc a |
|
411 | 411 | --- a/a Thu Jan 01 00:00:03 1970 +0000 |
|
412 | 412 | +++ b/a Thu Jan 01 00:00:00 1970 +0000 |
|
413 | 413 | @@ -1,2 +1,3 @@ |
|
414 | 414 | a |
|
415 | 415 | a |
|
416 | 416 | +a |
|
417 | 417 | (run 'hg update' to get a working copy) |
|
418 | 418 | |
|
419 | 419 | long lines |
|
420 | 420 | |
|
421 | 421 | $ cat <<EOF >> $HGRCPATH |
|
422 | 422 | > [notify] |
|
423 | 423 | > maxsubject = 67 |
|
424 | 424 | > test = False |
|
425 | 425 | > mbox = mbox |
|
426 | 426 | > EOF |
|
427 | 427 | $ $PYTHON -c 'file("a/a", "ab").write("no" * 500 + "\n")' |
|
428 | 428 | $ hg --cwd a commit -A -m "long line" |
|
429 | 429 | $ hg --traceback --cwd b pull ../a |
|
430 | 430 | pulling from ../a |
|
431 | 431 | searching for changes |
|
432 | 432 | adding changesets |
|
433 | 433 | adding manifests |
|
434 | 434 | adding file changes |
|
435 | 435 | added 1 changesets with 1 changes to 1 files |
|
436 | 436 | notify: sending 2 subscribers 1 changes |
|
437 | 437 | (run 'hg update' to get a working copy) |
|
438 | 438 | $ $PYTHON -c 'import sys,re; print re.sub("\n\t", " ", file("b/mbox").read()),' |
|
439 | 439 | From test@test.com ... ... .. ..:..:.. .... (re) |
|
440 | 440 | Content-Type: text/plain; charset="us-ascii" |
|
441 | 441 | MIME-Version: 1.0 |
|
442 | 442 | Content-Transfer-Encoding: quoted-printable |
|
443 | 443 | X-Test: foo |
|
444 | 444 | Date: * (glob) |
|
445 | 445 | Subject: long line |
|
446 | 446 | From: test@test.com |
|
447 | 447 | X-Hg-Notification: changeset e0be44cf638b |
|
448 | 448 | Message-Id: <hg.e0be44cf638b.*.*@*> (glob) |
|
449 | 449 | To: baz@test.com, foo@bar |
|
450 | 450 | |
|
451 | 451 | changeset e0be44cf638b in b |
|
452 | 452 | description: long line |
|
453 | 453 | diffstat: |
|
454 | 454 | |
|
455 | 455 | a | 1 + |
|
456 | 456 | 1 files changed, 1 insertions(+), 0 deletions(-) |
|
457 | 457 | |
|
458 | 458 | diffs (8 lines): |
|
459 | 459 | |
|
460 | 460 | diff -r 7ea05ad269dc -r e0be44cf638b a |
|
461 | 461 | --- a/a Thu Jan 01 00:00:00 1970 +0000 |
|
462 | 462 | +++ b/a Thu Jan 01 00:00:00 1970 +0000 |
|
463 | 463 | @@ -1,3 +1,4 @@ |
|
464 | 464 | a |
|
465 | 465 | a |
|
466 | 466 | a |
|
467 | 467 | +nonononononononononononononononononononononononononononononononononononono= |
|
468 | 468 | nononononononononononononononononononononononononononononononononononononon= |
|
469 | 469 | ononononononononononononononononononononononononononononononononononononono= |
|
470 | 470 | nononononononononononononononononononononononononononononononononononononon= |
|
471 | 471 | ononononononononononononononononononononononononononononononononononononono= |
|
472 | 472 | nononononononononononononononononononononononononononononononononononononon= |
|
473 | 473 | ononononononononononononononononononononononononononononononononononononono= |
|
474 | 474 | nononononononononononononononononononononononononononononononononononononon= |
|
475 | 475 | ononononononononononononononononononononononononononononononononononononono= |
|
476 | 476 | nononononononononononononononononononononononononononononononononononononon= |
|
477 | 477 | ononononononononononononononononononononononononononononononononononononono= |
|
478 | 478 | nononononononononononononononononononononononononononononononononononononon= |
|
479 | 479 | ononononononononononononononononononononononononononononononononononononono= |
|
480 | 480 | nonononononononononononono |
|
481 | 481 | |
|
482 | 482 | revset selection: send to address that matches branch and repo |
|
483 | 483 | |
|
484 | 484 | $ cat << EOF >> $HGRCPATH |
|
485 | 485 | > [hooks] |
|
486 | 486 | > incoming.notify = python:hgext.notify.hook |
|
487 | 487 | > |
|
488 | 488 | > [notify] |
|
489 | 489 | > sources = pull |
|
490 | 490 | > test = True |
|
491 | 491 | > diffstat = False |
|
492 | 492 | > maxdiff = 0 |
|
493 | 493 | > |
|
494 | 494 | > [reposubs] |
|
495 | 495 | > */a#branch(test) = will_no_be_send@example.com |
|
496 | 496 | > */b#branch(test) = notify@example.com |
|
497 | 497 | > EOF |
|
498 | 498 | $ hg --cwd a branch test |
|
499 | 499 | marked working directory as branch test |
|
500 | 500 | (branches are permanent and global, did you want a bookmark?) |
|
501 | 501 | $ echo a >> a/a |
|
502 | 502 | $ hg --cwd a ci -m test -d '1 0' |
|
503 | 503 | $ hg --traceback --cwd b pull ../a | \ |
|
504 | 504 | > $PYTHON -c 'import sys,re; print re.sub("\n\t", " ", sys.stdin.read()),' |
|
505 | 505 | pulling from ../a |
|
506 | 506 | searching for changes |
|
507 | 507 | adding changesets |
|
508 | 508 | adding manifests |
|
509 | 509 | adding file changes |
|
510 | 510 | added 1 changesets with 1 changes to 1 files |
|
511 | 511 | Content-Type: text/plain; charset="us-ascii" |
|
512 | 512 | MIME-Version: 1.0 |
|
513 | 513 | Content-Transfer-Encoding: 7bit |
|
514 | 514 | X-Test: foo |
|
515 | 515 | Date: * (glob) |
|
516 | 516 | Subject: test |
|
517 | 517 | From: test@test.com |
|
518 | 518 | X-Hg-Notification: changeset fbbcbc516f2f |
|
519 | 519 | Message-Id: <hg.fbbcbc516f2f.*.*@*> (glob) |
|
520 | 520 | To: baz@test.com, foo@bar, notify@example.com |
|
521 | 521 | |
|
522 | 522 | changeset fbbcbc516f2f in b |
|
523 | 523 | description: test |
|
524 | 524 | (run 'hg update' to get a working copy) |
|
525 | 525 | |
|
526 | 526 | revset selection: don't send to address that waits for mails |
|
527 | 527 | from different branch |
|
528 | 528 | |
|
529 | 529 | $ hg --cwd a update default |
|
530 | 530 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
531 | 531 | $ echo a >> a/a |
|
532 | 532 | $ hg --cwd a ci -m test -d '1 0' |
|
533 | 533 | $ hg --traceback --cwd b pull ../a | \ |
|
534 | 534 | > $PYTHON -c 'import sys,re; print re.sub("\n\t", " ", sys.stdin.read()),' |
|
535 | 535 | pulling from ../a |
|
536 | 536 | searching for changes |
|
537 | 537 | adding changesets |
|
538 | 538 | adding manifests |
|
539 | 539 | adding file changes |
|
540 | 540 | added 1 changesets with 0 changes to 0 files (+1 heads) |
|
541 | 541 | Content-Type: text/plain; charset="us-ascii" |
|
542 | 542 | MIME-Version: 1.0 |
|
543 | 543 | Content-Transfer-Encoding: 7bit |
|
544 | 544 | X-Test: foo |
|
545 | 545 | Date: * (glob) |
|
546 | 546 | Subject: test |
|
547 | 547 | From: test@test.com |
|
548 | 548 | X-Hg-Notification: changeset 38b42fa092de |
|
549 | 549 | Message-Id: <hg.38b42fa092de.*.*@*> (glob) |
|
550 | 550 | To: baz@test.com, foo@bar |
|
551 | 551 | |
|
552 | 552 | changeset 38b42fa092de in b |
|
553 | 553 | description: test |
|
554 | 554 | (run 'hg heads' to see heads) |
|
555 | 555 | |
|
556 | 556 | default template: |
|
557 | 557 | |
|
558 | 558 | $ grep -v '^template =' $HGRCPATH > "$HGRCPATH.new" |
|
559 | 559 | $ mv "$HGRCPATH.new" $HGRCPATH |
|
560 | 560 | $ echo a >> a/a |
|
561 | 561 | $ hg --cwd a commit -m 'default template' |
|
562 | 562 | $ hg --cwd b pull ../a -q | \ |
|
563 | 563 | > $PYTHON -c 'import sys,re; print re.sub("\n\t", " ", sys.stdin.read()),' |
|
564 | 564 | Content-Type: text/plain; charset="us-ascii" |
|
565 | 565 | MIME-Version: 1.0 |
|
566 | 566 | Content-Transfer-Encoding: 7bit |
|
567 | 567 | Date: * (glob) |
|
568 | 568 | Subject: changeset in b: default template |
|
569 | 569 | From: test@test.com |
|
570 | 570 | X-Hg-Notification: changeset 3548c9e294b6 |
|
571 | 571 | Message-Id: <hg.3548c9e294b6.*.*@*> (glob) |
|
572 | 572 | To: baz@test.com, foo@bar |
|
573 | 573 | |
|
574 | changeset 3548c9e294b6 in $TESTTMP/b | |
|
574 | changeset 3548c9e294b6 in $TESTTMP/b (glob) | |
|
575 | 575 | details: http://test/b?cmd=changeset;node=3548c9e294b6 |
|
576 | 576 | description: default template |
|
577 | 577 | |
|
578 | 578 | with style: |
|
579 | 579 | |
|
580 | 580 | $ cat <<EOF > notifystyle.map |
|
581 | 581 | > changeset = "Subject: {desc|firstline|strip} |
|
582 | 582 | > From: {author} |
|
583 | 583 | > {""} |
|
584 | 584 | > changeset {node|short}" |
|
585 | 585 | > EOF |
|
586 | 586 | $ cat <<EOF >> $HGRCPATH |
|
587 | 587 | > [notify] |
|
588 | 588 | > style = $TESTTMP/notifystyle.map |
|
589 | 589 | > EOF |
|
590 | 590 | $ echo a >> a/a |
|
591 | 591 | $ hg --cwd a commit -m 'with style' |
|
592 | 592 | $ hg --cwd b pull ../a -q | \ |
|
593 | 593 | > $PYTHON -c 'import sys,re; print re.sub("\n\t", " ", sys.stdin.read()),' |
|
594 | 594 | Content-Type: text/plain; charset="us-ascii" |
|
595 | 595 | MIME-Version: 1.0 |
|
596 | 596 | Content-Transfer-Encoding: 7bit |
|
597 | 597 | Date: * (glob) |
|
598 | 598 | Subject: with style |
|
599 | 599 | From: test@test.com |
|
600 | 600 | X-Hg-Notification: changeset e917dbd961d3 |
|
601 | 601 | Message-Id: <hg.e917dbd961d3.*.*@*> (glob) |
|
602 | 602 | To: baz@test.com, foo@bar |
|
603 | 603 | |
|
604 | 604 | changeset e917dbd961d3 |
|
605 | 605 | |
|
606 | 606 | with template (overrides style): |
|
607 | 607 | |
|
608 | 608 | $ cat <<EOF >> $HGRCPATH |
|
609 | 609 | > template = Subject: {node|short}: {desc|firstline|strip} |
|
610 | 610 | > From: {author} |
|
611 | 611 | > {""} |
|
612 | 612 | > {desc} |
|
613 | 613 | > EOF |
|
614 | 614 | $ echo a >> a/a |
|
615 | 615 | $ hg --cwd a commit -m 'with template' |
|
616 | 616 | $ hg --cwd b pull ../a -q | \ |
|
617 | 617 | > $PYTHON -c 'import sys,re; print re.sub("\n\t", " ", sys.stdin.read()),' |
|
618 | 618 | Content-Type: text/plain; charset="us-ascii" |
|
619 | 619 | MIME-Version: 1.0 |
|
620 | 620 | Content-Transfer-Encoding: 7bit |
|
621 | 621 | Date: * (glob) |
|
622 | 622 | Subject: a09743fd3edd: with template |
|
623 | 623 | From: test@test.com |
|
624 | 624 | X-Hg-Notification: changeset a09743fd3edd |
|
625 | 625 | Message-Id: <hg.a09743fd3edd.*.*@*> (glob) |
|
626 | 626 | To: baz@test.com, foo@bar |
|
627 | 627 | |
|
628 | 628 | with template |
@@ -1,1099 +1,1099 b'' | |||
|
1 | 1 | $ cat >> $HGRCPATH <<EOF |
|
2 | 2 | > [extdiff] |
|
3 | 3 | > # for portability: |
|
4 | 4 | > pdiff = sh "$RUNTESTDIR/pdiff" |
|
5 | 5 | > [progress] |
|
6 | 6 | > disable=False |
|
7 | 7 | > assume-tty = 1 |
|
8 | 8 | > delay = 0 |
|
9 | 9 | > # set changedelay really large so we don't see nested topics |
|
10 | 10 | > changedelay = 30000 |
|
11 | 11 | > format = topic bar number |
|
12 | 12 | > refresh = 0 |
|
13 | 13 | > width = 60 |
|
14 | 14 | > EOF |
|
15 | 15 | |
|
16 | 16 | Preparing the subrepository 'sub2' |
|
17 | 17 | |
|
18 | 18 | $ hg init sub2 |
|
19 | 19 | $ echo sub2 > sub2/sub2 |
|
20 | 20 | $ hg add -R sub2 |
|
21 | 21 | adding sub2/sub2 (glob) |
|
22 | 22 | $ hg commit -R sub2 -m "sub2 import" |
|
23 | 23 | |
|
24 | 24 | Preparing the 'sub1' repo which depends on the subrepo 'sub2' |
|
25 | 25 | |
|
26 | 26 | $ hg init sub1 |
|
27 | 27 | $ echo sub1 > sub1/sub1 |
|
28 | 28 | $ echo "sub2 = ../sub2" > sub1/.hgsub |
|
29 | 29 | $ hg clone sub2 sub1/sub2 |
|
30 | 30 | \r (no-eol) (esc) |
|
31 | 31 | linking [ <=> ] 1\r (no-eol) (esc) |
|
32 | 32 | linking [ <=> ] 2\r (no-eol) (esc) |
|
33 | 33 | linking [ <=> ] 3\r (no-eol) (esc) |
|
34 | 34 | linking [ <=> ] 4\r (no-eol) (esc) |
|
35 | 35 | linking [ <=> ] 5\r (no-eol) (esc) |
|
36 | 36 | linking [ <=> ] 6\r (no-eol) (esc) |
|
37 | 37 | \r (no-eol) (esc) |
|
38 | 38 | \r (no-eol) (esc) |
|
39 | 39 | updating [===========================================>] 1/1\r (no-eol) (esc) |
|
40 | 40 | \r (no-eol) (esc) |
|
41 | 41 | updating to branch default |
|
42 | 42 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
43 | 43 | $ hg add -R sub1 |
|
44 | 44 | adding sub1/.hgsub (glob) |
|
45 | 45 | adding sub1/sub1 (glob) |
|
46 | 46 | $ hg commit -R sub1 -m "sub1 import" |
|
47 | 47 | |
|
48 | 48 | Preparing the 'main' repo which depends on the subrepo 'sub1' |
|
49 | 49 | |
|
50 | 50 | $ hg init main |
|
51 | 51 | $ echo main > main/main |
|
52 | 52 | $ echo "sub1 = ../sub1" > main/.hgsub |
|
53 | 53 | $ hg clone sub1 main/sub1 |
|
54 | 54 | \r (no-eol) (esc) |
|
55 | 55 | linking [ <=> ] 1\r (no-eol) (esc) |
|
56 | 56 | linking [ <=> ] 2\r (no-eol) (esc) |
|
57 | 57 | linking [ <=> ] 3\r (no-eol) (esc) |
|
58 | 58 | linking [ <=> ] 4\r (no-eol) (esc) |
|
59 | 59 | linking [ <=> ] 5\r (no-eol) (esc) |
|
60 | 60 | linking [ <=> ] 6\r (no-eol) (esc) |
|
61 | 61 | linking [ <=> ] 7\r (no-eol) (esc) |
|
62 | 62 | linking [ <=> ] 8\r (no-eol) (esc) |
|
63 | 63 | \r (no-eol) (esc) |
|
64 | 64 | \r (no-eol) (esc) |
|
65 | 65 | updating [===========================================>] 3/3\r (no-eol) (esc) |
|
66 | 66 | updating [===========================================>] 1/1\r (no-eol) (esc) |
|
67 | 67 | \r (no-eol) (esc) |
|
68 | 68 | updating to branch default |
|
69 | 69 | cloning subrepo sub2 from $TESTTMP/sub2 |
|
70 | 70 | 3 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
71 | 71 | $ hg add -R main |
|
72 | 72 | adding main/.hgsub (glob) |
|
73 | 73 | adding main/main (glob) |
|
74 | 74 | $ hg commit -R main -m "main import" |
|
75 | 75 | |
|
76 | 76 | Cleaning both repositories, just as a clone -U |
|
77 | 77 | |
|
78 | 78 | $ hg up -C -R sub2 null |
|
79 | 79 | \r (no-eol) (esc) |
|
80 | 80 | updating [===========================================>] 1/1\r (no-eol) (esc) |
|
81 | 81 | \r (no-eol) (esc) |
|
82 | 82 | 0 files updated, 0 files merged, 1 files removed, 0 files unresolved |
|
83 | 83 | $ hg up -C -R sub1 null |
|
84 | 84 | \r (no-eol) (esc) |
|
85 | 85 | updating [===========================================>] 1/1\r (no-eol) (esc) |
|
86 | 86 | \r (no-eol) (esc) |
|
87 | 87 | \r (no-eol) (esc) |
|
88 | 88 | updating [===========================================>] 3/3\r (no-eol) (esc) |
|
89 | 89 | \r (no-eol) (esc) |
|
90 | 90 | 0 files updated, 0 files merged, 3 files removed, 0 files unresolved |
|
91 | 91 | $ hg up -C -R main null |
|
92 | 92 | \r (no-eol) (esc) |
|
93 | 93 | updating [===========================================>] 1/1\r (no-eol) (esc) |
|
94 | 94 | \r (no-eol) (esc) |
|
95 | 95 | \r (no-eol) (esc) |
|
96 | 96 | updating [===========================================>] 3/3\r (no-eol) (esc) |
|
97 | 97 | \r (no-eol) (esc) |
|
98 | 98 | \r (no-eol) (esc) |
|
99 | 99 | updating [===========================================>] 3/3\r (no-eol) (esc) |
|
100 | 100 | \r (no-eol) (esc) |
|
101 | 101 | 0 files updated, 0 files merged, 3 files removed, 0 files unresolved |
|
102 | 102 | $ rm -rf main/sub1 |
|
103 | 103 | $ rm -rf sub1/sub2 |
|
104 | 104 | |
|
105 | 105 | Clone main |
|
106 | 106 | |
|
107 | 107 | $ hg --config extensions.largefiles= clone main cloned |
|
108 | 108 | \r (no-eol) (esc) |
|
109 | 109 | linking [ <=> ] 1\r (no-eol) (esc) |
|
110 | 110 | linking [ <=> ] 2\r (no-eol) (esc) |
|
111 | 111 | linking [ <=> ] 3\r (no-eol) (esc) |
|
112 | 112 | linking [ <=> ] 4\r (no-eol) (esc) |
|
113 | 113 | linking [ <=> ] 5\r (no-eol) (esc) |
|
114 | 114 | linking [ <=> ] 6\r (no-eol) (esc) |
|
115 | 115 | linking [ <=> ] 7\r (no-eol) (esc) |
|
116 | 116 | linking [ <=> ] 8\r (no-eol) (esc) |
|
117 | 117 | \r (no-eol) (esc) |
|
118 | 118 | \r (no-eol) (esc) |
|
119 | 119 | updating [===========================================>] 3/3\r (no-eol) (esc) |
|
120 | 120 | updating [===========================================>] 3/3\r (no-eol) (esc) |
|
121 | 121 | updating [===========================================>] 1/1\r (no-eol) (esc) |
|
122 | 122 | \r (no-eol) (esc) |
|
123 | 123 | updating to branch default |
|
124 | 124 | cloning subrepo sub1 from $TESTTMP/sub1 |
|
125 | 125 | cloning subrepo sub1/sub2 from $TESTTMP/sub2 (glob) |
|
126 | 126 | 3 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
127 | 127 | |
|
128 | 128 | Largefiles is NOT enabled in the clone if the source repo doesn't require it |
|
129 | 129 | $ cat cloned/.hg/hgrc |
|
130 | 130 | # example repository config (see "hg help config" for more info) |
|
131 | 131 | [paths] |
|
132 | 132 | default = $TESTTMP/main (glob) |
|
133 | 133 | |
|
134 | 134 | # path aliases to other clones of this repo in URLs or filesystem paths |
|
135 | 135 | # (see "hg help config.paths" for more info) |
|
136 | 136 | # |
|
137 | 137 | # default-push = ssh://jdoe@example.net/hg/jdoes-fork |
|
138 | 138 | # my-fork = ssh://jdoe@example.net/hg/jdoes-fork |
|
139 | 139 | # my-clone = /home/jdoe/jdoes-clone |
|
140 | 140 | |
|
141 | 141 | [ui] |
|
142 | 142 | # name and email (local to this repository, optional), e.g. |
|
143 | 143 | # username = Jane Doe <jdoe@example.com> |
|
144 | 144 | |
|
145 | 145 | Checking cloned repo ids |
|
146 | 146 | |
|
147 | 147 | $ printf "cloned " ; hg id -R cloned |
|
148 | 148 | cloned 7f491f53a367 tip |
|
149 | 149 | $ printf "cloned/sub1 " ; hg id -R cloned/sub1 |
|
150 | 150 | cloned/sub1 fc3b4ce2696f tip |
|
151 | 151 | $ printf "cloned/sub1/sub2 " ; hg id -R cloned/sub1/sub2 |
|
152 | 152 | cloned/sub1/sub2 c57a0840e3ba tip |
|
153 | 153 | |
|
154 | 154 | debugsub output for main and sub1 |
|
155 | 155 | |
|
156 | 156 | $ hg debugsub -R cloned |
|
157 | 157 | path sub1 |
|
158 | 158 | source ../sub1 |
|
159 | 159 | revision fc3b4ce2696f7741438c79207583768f2ce6b0dd |
|
160 | 160 | $ hg debugsub -R cloned/sub1 |
|
161 | 161 | path sub2 |
|
162 | 162 | source ../sub2 |
|
163 | 163 | revision c57a0840e3badd667ef3c3ef65471609acb2ba3c |
|
164 | 164 | |
|
165 | 165 | Modifying deeply nested 'sub2' |
|
166 | 166 | |
|
167 | 167 | $ echo modified > cloned/sub1/sub2/sub2 |
|
168 | 168 | $ hg commit --subrepos -m "deep nested modif should trigger a commit" -R cloned |
|
169 | 169 | committing subrepository sub1 |
|
170 | 170 | committing subrepository sub1/sub2 (glob) |
|
171 | 171 | |
|
172 | 172 | Checking modified node ids |
|
173 | 173 | |
|
174 | 174 | $ printf "cloned " ; hg id -R cloned |
|
175 | 175 | cloned ffe6649062fe tip |
|
176 | 176 | $ printf "cloned/sub1 " ; hg id -R cloned/sub1 |
|
177 | 177 | cloned/sub1 2ecb03bf44a9 tip |
|
178 | 178 | $ printf "cloned/sub1/sub2 " ; hg id -R cloned/sub1/sub2 |
|
179 | 179 | cloned/sub1/sub2 53dd3430bcaf tip |
|
180 | 180 | |
|
181 | 181 | debugsub output for main and sub1 |
|
182 | 182 | |
|
183 | 183 | $ hg debugsub -R cloned |
|
184 | 184 | path sub1 |
|
185 | 185 | source ../sub1 |
|
186 | 186 | revision 2ecb03bf44a94e749e8669481dd9069526ce7cb9 |
|
187 | 187 | $ hg debugsub -R cloned/sub1 |
|
188 | 188 | path sub2 |
|
189 | 189 | source ../sub2 |
|
190 | 190 | revision 53dd3430bcaf5ab4a7c48262bcad6d441f510487 |
|
191 | 191 | |
|
192 | 192 | Check that deep archiving works |
|
193 | 193 | |
|
194 | 194 | $ cd cloned |
|
195 | 195 | $ echo 'test' > sub1/sub2/test.txt |
|
196 | 196 | $ hg --config extensions.largefiles=! add sub1/sub2/test.txt |
|
197 | 197 | $ mkdir sub1/sub2/folder |
|
198 | 198 | $ echo 'subfolder' > sub1/sub2/folder/test.txt |
|
199 | 199 | $ hg ci -ASm "add test.txt" |
|
200 | 200 | adding sub1/sub2/folder/test.txt |
|
201 | 201 | committing subrepository sub1 |
|
202 | 202 | committing subrepository sub1/sub2 (glob) |
|
203 | 203 | |
|
204 | 204 | .. but first take a detour through some deep removal testing |
|
205 | 205 | |
|
206 | 206 | $ hg remove -S -I 're:.*.txt' . |
|
207 | 207 | \r (no-eol) (esc) |
|
208 | 208 | searching [==========================================>] 1/1\r (no-eol) (esc) |
|
209 | 209 | searching [==========================================>] 1/1\r (no-eol) (esc) |
|
210 | 210 | \r (no-eol) (esc) |
|
211 | 211 | \r (no-eol) (esc) |
|
212 | 212 | deleting [=====================> ] 1/2\r (no-eol) (esc) |
|
213 | 213 | \r (no-eol) (esc) |
|
214 | 214 | \r (no-eol) (esc) |
|
215 | 215 | deleting [===========================================>] 2/2\r (no-eol) (esc) |
|
216 | 216 | \r (no-eol) (esc) |
|
217 | 217 | \r (no-eol) (esc) |
|
218 | 218 | \r (no-eol) (esc) |
|
219 | 219 | removing sub1/sub2/folder/test.txt (glob) |
|
220 | 220 | removing sub1/sub2/test.txt (glob) |
|
221 | 221 | $ hg status -S |
|
222 | 222 | R sub1/sub2/folder/test.txt |
|
223 | 223 | R sub1/sub2/test.txt |
|
224 | 224 | $ hg update -Cq |
|
225 | 225 | $ hg remove -I 're:.*.txt' sub1 |
|
226 | 226 | \r (no-eol) (esc) |
|
227 | 227 | searching [==========================================>] 1/1\r (no-eol) (esc) |
|
228 | 228 | \r (no-eol) (esc) |
|
229 | 229 | \r (no-eol) (esc) |
|
230 | 230 | deleting [===========================================>] 1/1\r (no-eol) (esc) |
|
231 | 231 | \r (no-eol) (esc) |
|
232 | 232 | $ hg status -S |
|
233 | 233 | $ hg remove sub1/sub2/folder/test.txt |
|
234 | 234 | \r (no-eol) (esc) |
|
235 | 235 | searching [==========================================>] 1/1\r (no-eol) (esc) |
|
236 | 236 | searching [==========================================>] 1/1\r (no-eol) (esc) |
|
237 | 237 | \r (no-eol) (esc) |
|
238 | 238 | \r (no-eol) (esc) |
|
239 | 239 | deleting [===========================================>] 1/1\r (no-eol) (esc) |
|
240 | 240 | \r (no-eol) (esc) |
|
241 | 241 | \r (no-eol) (esc) |
|
242 | 242 | deleting [===========================================>] 1/1\r (no-eol) (esc) |
|
243 | 243 | \r (no-eol) (esc) |
|
244 | 244 | \r (no-eol) (esc) |
|
245 | 245 | deleting [===========================================>] 1/1\r (no-eol) (esc) |
|
246 | 246 | \r (no-eol) (esc) |
|
247 | 247 | $ hg remove sub1/.hgsubstate |
|
248 | 248 | \r (no-eol) (esc) |
|
249 | 249 | searching [==========================================>] 1/1\r (no-eol) (esc) |
|
250 | 250 | \r (no-eol) (esc) |
|
251 | 251 | \r (no-eol) (esc) |
|
252 | 252 | deleting [===========================================>] 1/1\r (no-eol) (esc) |
|
253 | 253 | \r (no-eol) (esc) |
|
254 | 254 | \r (no-eol) (esc) |
|
255 | 255 | deleting [===========================================>] 1/1\r (no-eol) (esc) |
|
256 | 256 | \r (no-eol) (esc) |
|
257 | 257 | $ mv sub1/.hgsub sub1/x.hgsub |
|
258 | 258 | $ hg status -S |
|
259 | 259 | warning: subrepo spec file 'sub1/.hgsub' not found |
|
260 | 260 | R sub1/.hgsubstate |
|
261 | 261 | R sub1/sub2/folder/test.txt |
|
262 | 262 | ! sub1/.hgsub |
|
263 | 263 | ? sub1/x.hgsub |
|
264 | 264 | $ mv sub1/x.hgsub sub1/.hgsub |
|
265 | 265 | $ hg update -Cq |
|
266 | 266 | $ touch sub1/foo |
|
267 | 267 | $ hg forget sub1/sub2/folder/test.txt |
|
268 | 268 | $ rm sub1/sub2/test.txt |
|
269 | 269 | |
|
270 | 270 | Test relative path printing + subrepos |
|
271 | 271 | $ mkdir -p foo/bar |
|
272 | 272 | $ cd foo |
|
273 | 273 | $ touch bar/abc |
|
274 | 274 | $ hg addremove -S .. |
|
275 | 275 | \r (no-eol) (esc) |
|
276 | 276 | searching for exact renames [ ] 0/1\r (no-eol) (esc) |
|
277 | 277 | \r (no-eol) (esc) |
|
278 | 278 | adding ../sub1/sub2/folder/test.txt (glob) |
|
279 | 279 | removing ../sub1/sub2/test.txt (glob) |
|
280 | 280 | adding ../sub1/foo (glob) |
|
281 | 281 | adding bar/abc (glob) |
|
282 | 282 | $ cd .. |
|
283 | 283 | $ hg status -S |
|
284 | 284 | A foo/bar/abc |
|
285 | 285 | A sub1/foo |
|
286 | 286 | R sub1/sub2/test.txt |
|
287 | 287 | |
|
288 | 288 | Archive wdir() with subrepos |
|
289 | 289 | $ hg rm main |
|
290 | 290 | \r (no-eol) (esc) |
|
291 | 291 | deleting [===========================================>] 1/1\r (no-eol) (esc) |
|
292 | 292 | \r (no-eol) (esc) |
|
293 | 293 | $ hg archive -S -r 'wdir()' ../wdir |
|
294 | 294 | \r (no-eol) (esc) |
|
295 | 295 | archiving [ ] 0/3\r (no-eol) (esc) |
|
296 | 296 | archiving [=============> ] 1/3\r (no-eol) (esc) |
|
297 | 297 | archiving [===========================> ] 2/3\r (no-eol) (esc) |
|
298 | 298 | archiving [==========================================>] 3/3\r (no-eol) (esc) |
|
299 | 299 | \r (no-eol) (esc) |
|
300 | 300 | \r (no-eol) (esc) |
|
301 | 301 | archiving (sub1) [ ] 0/4\r (no-eol) (esc) |
|
302 | 302 | archiving (sub1) [========> ] 1/4\r (no-eol) (esc) |
|
303 | 303 | archiving (sub1) [=================> ] 2/4\r (no-eol) (esc) |
|
304 | 304 | archiving (sub1) [==========================> ] 3/4\r (no-eol) (esc) |
|
305 | 305 | archiving (sub1) [===================================>] 4/4\r (no-eol) (esc) |
|
306 | 306 | \r (no-eol) (esc) |
|
307 | 307 | \r (no-eol) (esc) |
|
308 | archiving (sub1/sub2) [ ] 0/2\r (no-eol) (esc) | |
|
309 | archiving (sub1/sub2) [==============> ] 1/2\r (no-eol) (esc) | |
|
310 | archiving (sub1/sub2) [==============================>] 2/2\r (no-eol) (esc) | |
|
308 | archiving (sub1/sub2) [ ] 0/2\r (no-eol) (glob) (esc) | |
|
309 | archiving (sub1/sub2) [==============> ] 1/2\r (no-eol) (glob) (esc) | |
|
310 | archiving (sub1/sub2) [==============================>] 2/2\r (no-eol) (glob) (esc) | |
|
311 | 311 | \r (no-eol) (esc) |
|
312 | 312 | $ diff -r . ../wdir | egrep -v '\.hg$|^Common subdirectories:' |
|
313 | 313 | Only in ../wdir: .hg_archival.txt |
|
314 | 314 | |
|
315 | 315 | $ find ../wdir -type f | sort |
|
316 | 316 | ../wdir/.hg_archival.txt |
|
317 | 317 | ../wdir/.hgsub |
|
318 | 318 | ../wdir/.hgsubstate |
|
319 | 319 | ../wdir/foo/bar/abc |
|
320 | 320 | ../wdir/sub1/.hgsub |
|
321 | 321 | ../wdir/sub1/.hgsubstate |
|
322 | 322 | ../wdir/sub1/foo |
|
323 | 323 | ../wdir/sub1/sub1 |
|
324 | 324 | ../wdir/sub1/sub2/folder/test.txt |
|
325 | 325 | ../wdir/sub1/sub2/sub2 |
|
326 | 326 | |
|
327 | 327 | $ cat ../wdir/.hg_archival.txt |
|
328 | 328 | repo: 7f491f53a367861f47ee64a80eb997d1f341b77a |
|
329 | 329 | node: 9bb10eebee29dc0f1201dcf5977b811a540255fd+ |
|
330 | 330 | branch: default |
|
331 | 331 | latesttag: null |
|
332 | 332 | latesttagdistance: 4 |
|
333 | 333 | changessincelatesttag: 4 |
|
334 | 334 | |
|
335 | 335 | Attempting to archive 'wdir()' with a missing file is handled gracefully |
|
336 | 336 | $ rm sub1/sub1 |
|
337 | 337 | $ rm -r ../wdir |
|
338 | 338 | $ hg archive -v -S -r 'wdir()' ../wdir |
|
339 | 339 | \r (no-eol) (esc) |
|
340 | 340 | archiving [ ] 0/3\r (no-eol) (esc) |
|
341 | 341 | archiving [=============> ] 1/3\r (no-eol) (esc) |
|
342 | 342 | archiving [===========================> ] 2/3\r (no-eol) (esc) |
|
343 | 343 | archiving [==========================================>] 3/3\r (no-eol) (esc) |
|
344 | 344 | \r (no-eol) (esc) |
|
345 | 345 | \r (no-eol) (esc) |
|
346 | 346 | archiving (sub1) [ ] 0/3\r (no-eol) (esc) |
|
347 | 347 | archiving (sub1) [===========> ] 1/3\r (no-eol) (esc) |
|
348 | 348 | archiving (sub1) [=======================> ] 2/3\r (no-eol) (esc) |
|
349 | 349 | archiving (sub1) [===================================>] 3/3\r (no-eol) (esc) |
|
350 | 350 | \r (no-eol) (esc) |
|
351 | 351 | \r (no-eol) (esc) |
|
352 | archiving (sub1/sub2) [ ] 0/2\r (no-eol) (esc) | |
|
353 | archiving (sub1/sub2) [==============> ] 1/2\r (no-eol) (esc) | |
|
354 | archiving (sub1/sub2) [==============================>] 2/2\r (no-eol) (esc) | |
|
352 | archiving (sub1/sub2) [ ] 0/2\r (no-eol) (glob) (esc) | |
|
353 | archiving (sub1/sub2) [==============> ] 1/2\r (no-eol) (glob) (esc) | |
|
354 | archiving (sub1/sub2) [==============================>] 2/2\r (no-eol) (glob) (esc) | |
|
355 | 355 | \r (no-eol) (esc) |
|
356 | 356 | $ find ../wdir -type f | sort |
|
357 | 357 | ../wdir/.hg_archival.txt |
|
358 | 358 | ../wdir/.hgsub |
|
359 | 359 | ../wdir/.hgsubstate |
|
360 | 360 | ../wdir/foo/bar/abc |
|
361 | 361 | ../wdir/sub1/.hgsub |
|
362 | 362 | ../wdir/sub1/.hgsubstate |
|
363 | 363 | ../wdir/sub1/foo |
|
364 | 364 | ../wdir/sub1/sub2/folder/test.txt |
|
365 | 365 | ../wdir/sub1/sub2/sub2 |
|
366 | 366 | |
|
367 | 367 | Continue relative path printing + subrepos |
|
368 | 368 | $ hg update -Cq |
|
369 | 369 | $ rm -r ../wdir |
|
370 | 370 | $ hg archive -S -r 'wdir()' ../wdir |
|
371 | 371 | \r (no-eol) (esc) |
|
372 | 372 | archiving [ ] 0/3\r (no-eol) (esc) |
|
373 | 373 | archiving [=============> ] 1/3\r (no-eol) (esc) |
|
374 | 374 | archiving [===========================> ] 2/3\r (no-eol) (esc) |
|
375 | 375 | archiving [==========================================>] 3/3\r (no-eol) (esc) |
|
376 | 376 | \r (no-eol) (esc) |
|
377 | 377 | \r (no-eol) (esc) |
|
378 | 378 | archiving (sub1) [ ] 0/3\r (no-eol) (esc) |
|
379 | 379 | archiving (sub1) [===========> ] 1/3\r (no-eol) (esc) |
|
380 | 380 | archiving (sub1) [=======================> ] 2/3\r (no-eol) (esc) |
|
381 | 381 | archiving (sub1) [===================================>] 3/3\r (no-eol) (esc) |
|
382 | 382 | \r (no-eol) (esc) |
|
383 | 383 | \r (no-eol) (esc) |
|
384 | archiving (sub1/sub2) [ ] 0/3\r (no-eol) (esc) | |
|
385 | archiving (sub1/sub2) [=========> ] 1/3\r (no-eol) (esc) | |
|
386 | archiving (sub1/sub2) [===================> ] 2/3\r (no-eol) (esc) | |
|
387 | archiving (sub1/sub2) [==============================>] 3/3\r (no-eol) (esc) | |
|
384 | archiving (sub1/sub2) [ ] 0/3\r (no-eol) (glob) (esc) | |
|
385 | archiving (sub1/sub2) [=========> ] 1/3\r (no-eol) (glob) (esc) | |
|
386 | archiving (sub1/sub2) [===================> ] 2/3\r (no-eol) (glob) (esc) | |
|
387 | archiving (sub1/sub2) [==============================>] 3/3\r (no-eol) (glob) (esc) | |
|
388 | 388 | \r (no-eol) (esc) |
|
389 | 389 | $ cat ../wdir/.hg_archival.txt |
|
390 | 390 | repo: 7f491f53a367861f47ee64a80eb997d1f341b77a |
|
391 | 391 | node: 9bb10eebee29dc0f1201dcf5977b811a540255fd |
|
392 | 392 | branch: default |
|
393 | 393 | latesttag: null |
|
394 | 394 | latesttagdistance: 4 |
|
395 | 395 | changessincelatesttag: 4 |
|
396 | 396 | |
|
397 | 397 | $ touch sub1/sub2/folder/bar |
|
398 | 398 | $ hg addremove sub1/sub2 |
|
399 | 399 | adding sub1/sub2/folder/bar (glob) |
|
400 | 400 | $ hg status -S |
|
401 | 401 | A sub1/sub2/folder/bar |
|
402 | 402 | ? foo/bar/abc |
|
403 | 403 | ? sub1/foo |
|
404 | 404 | $ hg update -Cq |
|
405 | 405 | $ hg addremove sub1 |
|
406 | 406 | adding sub1/sub2/folder/bar (glob) |
|
407 | 407 | adding sub1/foo (glob) |
|
408 | 408 | $ hg update -Cq |
|
409 | 409 | $ rm sub1/sub2/folder/test.txt |
|
410 | 410 | $ rm sub1/sub2/test.txt |
|
411 | 411 | $ hg ci -ASm "remove test.txt" |
|
412 | 412 | adding sub1/sub2/folder/bar |
|
413 | 413 | removing sub1/sub2/folder/test.txt |
|
414 | 414 | removing sub1/sub2/test.txt |
|
415 | 415 | adding sub1/foo |
|
416 | 416 | adding foo/bar/abc |
|
417 | 417 | committing subrepository sub1 |
|
418 | 418 | committing subrepository sub1/sub2 (glob) |
|
419 | 419 | |
|
420 | 420 | $ hg forget sub1/sub2/sub2 |
|
421 | 421 | $ echo x > sub1/sub2/x.txt |
|
422 | 422 | $ hg add sub1/sub2/x.txt |
|
423 | 423 | |
|
424 | 424 | Files sees uncommitted adds and removes in subrepos |
|
425 | 425 | $ hg files -S |
|
426 | 426 | .hgsub |
|
427 | 427 | .hgsubstate |
|
428 | 428 | foo/bar/abc (glob) |
|
429 | 429 | main |
|
430 | 430 | sub1/.hgsub (glob) |
|
431 | 431 | sub1/.hgsubstate (glob) |
|
432 | 432 | sub1/foo (glob) |
|
433 | 433 | sub1/sub1 (glob) |
|
434 | 434 | sub1/sub2/folder/bar (glob) |
|
435 | 435 | sub1/sub2/x.txt (glob) |
|
436 | 436 | |
|
437 | 437 | $ hg files -S "set:eol('dos') or eol('unix') or size('<= 0')" |
|
438 | 438 | .hgsub |
|
439 | 439 | .hgsubstate |
|
440 | 440 | foo/bar/abc (glob) |
|
441 | 441 | main |
|
442 | 442 | sub1/.hgsub (glob) |
|
443 | 443 | sub1/.hgsubstate (glob) |
|
444 | 444 | sub1/foo (glob) |
|
445 | 445 | sub1/sub1 (glob) |
|
446 | 446 | sub1/sub2/folder/bar (glob) |
|
447 | 447 | sub1/sub2/x.txt (glob) |
|
448 | 448 | |
|
449 | 449 | $ hg files -r '.^' -S "set:eol('dos') or eol('unix')" |
|
450 | 450 | .hgsub |
|
451 | 451 | .hgsubstate |
|
452 | 452 | main |
|
453 | 453 | sub1/.hgsub (glob) |
|
454 | 454 | sub1/.hgsubstate (glob) |
|
455 | 455 | sub1/sub1 (glob) |
|
456 | 456 | sub1/sub2/folder/test.txt (glob) |
|
457 | 457 | sub1/sub2/sub2 (glob) |
|
458 | 458 | sub1/sub2/test.txt (glob) |
|
459 | 459 | |
|
460 | 460 | $ hg files sub1 |
|
461 | 461 | sub1/.hgsub (glob) |
|
462 | 462 | sub1/.hgsubstate (glob) |
|
463 | 463 | sub1/foo (glob) |
|
464 | 464 | sub1/sub1 (glob) |
|
465 | 465 | sub1/sub2/folder/bar (glob) |
|
466 | 466 | sub1/sub2/x.txt (glob) |
|
467 | 467 | |
|
468 | 468 | $ hg files sub1/sub2 |
|
469 | 469 | sub1/sub2/folder/bar (glob) |
|
470 | 470 | sub1/sub2/x.txt (glob) |
|
471 | 471 | |
|
472 | 472 | $ hg files |
|
473 | 473 | .hgsub |
|
474 | 474 | .hgsubstate |
|
475 | 475 | foo/bar/abc (glob) |
|
476 | 476 | main |
|
477 | 477 | |
|
478 | 478 | $ hg files -S -r '.^' sub1/sub2/folder |
|
479 | 479 | sub1/sub2/folder/test.txt (glob) |
|
480 | 480 | |
|
481 | 481 | $ hg files -S -r '.^' sub1/sub2/missing |
|
482 | 482 | sub1/sub2/missing: no such file in rev 78026e779ea6 (glob) |
|
483 | 483 | [1] |
|
484 | 484 | |
|
485 | 485 | $ hg files -r '.^' sub1/ |
|
486 | 486 | sub1/.hgsub (glob) |
|
487 | 487 | sub1/.hgsubstate (glob) |
|
488 | 488 | sub1/sub1 (glob) |
|
489 | 489 | sub1/sub2/folder/test.txt (glob) |
|
490 | 490 | sub1/sub2/sub2 (glob) |
|
491 | 491 | sub1/sub2/test.txt (glob) |
|
492 | 492 | |
|
493 | 493 | $ hg files -r '.^' sub1/sub2 |
|
494 | 494 | sub1/sub2/folder/test.txt (glob) |
|
495 | 495 | sub1/sub2/sub2 (glob) |
|
496 | 496 | sub1/sub2/test.txt (glob) |
|
497 | 497 | |
|
498 | 498 | $ hg rollback -q |
|
499 | 499 | $ hg up -Cq |
|
500 | 500 | |
|
501 | 501 | $ hg --config extensions.largefiles=! archive -S ../archive_all |
|
502 | 502 | \r (no-eol) (esc) |
|
503 | 503 | archiving [ ] 0/3\r (no-eol) (esc) |
|
504 | 504 | archiving [=============> ] 1/3\r (no-eol) (esc) |
|
505 | 505 | archiving [===========================> ] 2/3\r (no-eol) (esc) |
|
506 | 506 | archiving [==========================================>] 3/3\r (no-eol) (esc) |
|
507 | 507 | \r (no-eol) (esc) |
|
508 | 508 | \r (no-eol) (esc) |
|
509 | 509 | archiving (sub1) [ ] 0/3\r (no-eol) (esc) |
|
510 | 510 | archiving (sub1) [===========> ] 1/3\r (no-eol) (esc) |
|
511 | 511 | archiving (sub1) [=======================> ] 2/3\r (no-eol) (esc) |
|
512 | 512 | archiving (sub1) [===================================>] 3/3\r (no-eol) (esc) |
|
513 | 513 | \r (no-eol) (esc) |
|
514 | 514 | \r (no-eol) (esc) |
|
515 | archiving (sub1/sub2) [ ] 0/3\r (no-eol) (esc) | |
|
516 | archiving (sub1/sub2) [=========> ] 1/3\r (no-eol) (esc) | |
|
517 | archiving (sub1/sub2) [===================> ] 2/3\r (no-eol) (esc) | |
|
518 | archiving (sub1/sub2) [==============================>] 3/3\r (no-eol) (esc) | |
|
515 | archiving (sub1/sub2) [ ] 0/3\r (no-eol) (glob) (esc) | |
|
516 | archiving (sub1/sub2) [=========> ] 1/3\r (no-eol) (glob) (esc) | |
|
517 | archiving (sub1/sub2) [===================> ] 2/3\r (no-eol) (glob) (esc) | |
|
518 | archiving (sub1/sub2) [==============================>] 3/3\r (no-eol) (glob) (esc) | |
|
519 | 519 | \r (no-eol) (esc) |
|
520 | 520 | $ find ../archive_all | sort |
|
521 | 521 | ../archive_all |
|
522 | 522 | ../archive_all/.hg_archival.txt |
|
523 | 523 | ../archive_all/.hgsub |
|
524 | 524 | ../archive_all/.hgsubstate |
|
525 | 525 | ../archive_all/main |
|
526 | 526 | ../archive_all/sub1 |
|
527 | 527 | ../archive_all/sub1/.hgsub |
|
528 | 528 | ../archive_all/sub1/.hgsubstate |
|
529 | 529 | ../archive_all/sub1/sub1 |
|
530 | 530 | ../archive_all/sub1/sub2 |
|
531 | 531 | ../archive_all/sub1/sub2/folder |
|
532 | 532 | ../archive_all/sub1/sub2/folder/test.txt |
|
533 | 533 | ../archive_all/sub1/sub2/sub2 |
|
534 | 534 | ../archive_all/sub1/sub2/test.txt |
|
535 | 535 | |
|
536 | 536 | Check that archive -X works in deep subrepos |
|
537 | 537 | |
|
538 | 538 | $ hg --config extensions.largefiles=! archive -S -X '**test*' ../archive_exclude |
|
539 | 539 | \r (no-eol) (esc) |
|
540 | 540 | archiving [ ] 0/3\r (no-eol) (esc) |
|
541 | 541 | archiving [=============> ] 1/3\r (no-eol) (esc) |
|
542 | 542 | archiving [===========================> ] 2/3\r (no-eol) (esc) |
|
543 | 543 | archiving [==========================================>] 3/3\r (no-eol) (esc) |
|
544 | 544 | \r (no-eol) (esc) |
|
545 | 545 | \r (no-eol) (esc) |
|
546 | 546 | archiving (sub1) [ ] 0/3\r (no-eol) (esc) |
|
547 | 547 | archiving (sub1) [===========> ] 1/3\r (no-eol) (esc) |
|
548 | 548 | archiving (sub1) [=======================> ] 2/3\r (no-eol) (esc) |
|
549 | 549 | archiving (sub1) [===================================>] 3/3\r (no-eol) (esc) |
|
550 | 550 | \r (no-eol) (esc) |
|
551 | 551 | \r (no-eol) (esc) |
|
552 | archiving (sub1/sub2) [ ] 0/1\r (no-eol) (esc) | |
|
553 | archiving (sub1/sub2) [==============================>] 1/1\r (no-eol) (esc) | |
|
552 | archiving (sub1/sub2) [ ] 0/1\r (no-eol) (glob) (esc) | |
|
553 | archiving (sub1/sub2) [==============================>] 1/1\r (no-eol) (glob) (esc) | |
|
554 | 554 | \r (no-eol) (esc) |
|
555 | 555 | $ find ../archive_exclude | sort |
|
556 | 556 | ../archive_exclude |
|
557 | 557 | ../archive_exclude/.hg_archival.txt |
|
558 | 558 | ../archive_exclude/.hgsub |
|
559 | 559 | ../archive_exclude/.hgsubstate |
|
560 | 560 | ../archive_exclude/main |
|
561 | 561 | ../archive_exclude/sub1 |
|
562 | 562 | ../archive_exclude/sub1/.hgsub |
|
563 | 563 | ../archive_exclude/sub1/.hgsubstate |
|
564 | 564 | ../archive_exclude/sub1/sub1 |
|
565 | 565 | ../archive_exclude/sub1/sub2 |
|
566 | 566 | ../archive_exclude/sub1/sub2/sub2 |
|
567 | 567 | |
|
568 | 568 | $ hg --config extensions.largefiles=! archive -S -I '**test*' ../archive_include |
|
569 | 569 | \r (no-eol) (esc) |
|
570 | 570 | archiving (sub1) [ <=> ] 0\r (no-eol) (esc) |
|
571 | 571 | \r (no-eol) (esc) |
|
572 | 572 | \r (no-eol) (esc) |
|
573 | archiving (sub1/sub2) [ ] 0/2\r (no-eol) (esc) | |
|
574 | archiving (sub1/sub2) [==============> ] 1/2\r (no-eol) (esc) | |
|
575 | archiving (sub1/sub2) [==============================>] 2/2\r (no-eol) (esc) | |
|
573 | archiving (sub1/sub2) [ ] 0/2\r (no-eol) (glob) (esc) | |
|
574 | archiving (sub1/sub2) [==============> ] 1/2\r (no-eol) (glob) (esc) | |
|
575 | archiving (sub1/sub2) [==============================>] 2/2\r (no-eol) (glob) (esc) | |
|
576 | 576 | \r (no-eol) (esc) |
|
577 | 577 | $ find ../archive_include | sort |
|
578 | 578 | ../archive_include |
|
579 | 579 | ../archive_include/sub1 |
|
580 | 580 | ../archive_include/sub1/sub2 |
|
581 | 581 | ../archive_include/sub1/sub2/folder |
|
582 | 582 | ../archive_include/sub1/sub2/folder/test.txt |
|
583 | 583 | ../archive_include/sub1/sub2/test.txt |
|
584 | 584 | |
|
585 | 585 | Check that deep archive works with largefiles (which overrides hgsubrepo impl) |
|
586 | 586 | This also tests the repo.ui regression in 43fb170a23bd, and that lf subrepo |
|
587 | 587 | subrepos are archived properly. |
|
588 | 588 | Note that add --large through a subrepo currently adds the file as a normal file |
|
589 | 589 | |
|
590 | 590 | $ echo "large" > sub1/sub2/large.bin |
|
591 | 591 | $ hg --config extensions.largefiles= add --large -R sub1/sub2 sub1/sub2/large.bin |
|
592 | 592 | $ echo "large" > large.bin |
|
593 | 593 | $ hg --config extensions.largefiles= add --large large.bin |
|
594 | 594 | $ hg --config extensions.largefiles= ci -S -m "add large files" |
|
595 | 595 | committing subrepository sub1 |
|
596 | 596 | committing subrepository sub1/sub2 (glob) |
|
597 | 597 | |
|
598 | 598 | $ hg --config extensions.largefiles= archive -S ../archive_lf |
|
599 | 599 | $ find ../archive_lf | sort |
|
600 | 600 | ../archive_lf |
|
601 | 601 | ../archive_lf/.hg_archival.txt |
|
602 | 602 | ../archive_lf/.hgsub |
|
603 | 603 | ../archive_lf/.hgsubstate |
|
604 | 604 | ../archive_lf/large.bin |
|
605 | 605 | ../archive_lf/main |
|
606 | 606 | ../archive_lf/sub1 |
|
607 | 607 | ../archive_lf/sub1/.hgsub |
|
608 | 608 | ../archive_lf/sub1/.hgsubstate |
|
609 | 609 | ../archive_lf/sub1/sub1 |
|
610 | 610 | ../archive_lf/sub1/sub2 |
|
611 | 611 | ../archive_lf/sub1/sub2/folder |
|
612 | 612 | ../archive_lf/sub1/sub2/folder/test.txt |
|
613 | 613 | ../archive_lf/sub1/sub2/large.bin |
|
614 | 614 | ../archive_lf/sub1/sub2/sub2 |
|
615 | 615 | ../archive_lf/sub1/sub2/test.txt |
|
616 | 616 | $ rm -rf ../archive_lf |
|
617 | 617 | |
|
618 | 618 | Exclude large files from main and sub-sub repo |
|
619 | 619 | |
|
620 | 620 | $ hg --config extensions.largefiles= archive -S -X '**.bin' ../archive_lf |
|
621 | 621 | $ find ../archive_lf | sort |
|
622 | 622 | ../archive_lf |
|
623 | 623 | ../archive_lf/.hg_archival.txt |
|
624 | 624 | ../archive_lf/.hgsub |
|
625 | 625 | ../archive_lf/.hgsubstate |
|
626 | 626 | ../archive_lf/main |
|
627 | 627 | ../archive_lf/sub1 |
|
628 | 628 | ../archive_lf/sub1/.hgsub |
|
629 | 629 | ../archive_lf/sub1/.hgsubstate |
|
630 | 630 | ../archive_lf/sub1/sub1 |
|
631 | 631 | ../archive_lf/sub1/sub2 |
|
632 | 632 | ../archive_lf/sub1/sub2/folder |
|
633 | 633 | ../archive_lf/sub1/sub2/folder/test.txt |
|
634 | 634 | ../archive_lf/sub1/sub2/sub2 |
|
635 | 635 | ../archive_lf/sub1/sub2/test.txt |
|
636 | 636 | $ rm -rf ../archive_lf |
|
637 | 637 | |
|
638 | 638 | Exclude normal files from main and sub-sub repo |
|
639 | 639 | |
|
640 | 640 | $ hg --config extensions.largefiles= archive -S -X '**.txt' -p '.' ../archive_lf.tgz |
|
641 | 641 | $ tar -tzf ../archive_lf.tgz | sort |
|
642 | 642 | .hgsub |
|
643 | 643 | .hgsubstate |
|
644 | 644 | large.bin |
|
645 | 645 | main |
|
646 | 646 | sub1/.hgsub |
|
647 | 647 | sub1/.hgsubstate |
|
648 | 648 | sub1/sub1 |
|
649 | 649 | sub1/sub2/large.bin |
|
650 | 650 | sub1/sub2/sub2 |
|
651 | 651 | |
|
652 | 652 | Include normal files from within a largefiles subrepo |
|
653 | 653 | |
|
654 | 654 | $ hg --config extensions.largefiles= archive -S -I '**.txt' ../archive_lf |
|
655 | 655 | $ find ../archive_lf | sort |
|
656 | 656 | ../archive_lf |
|
657 | 657 | ../archive_lf/.hg_archival.txt |
|
658 | 658 | ../archive_lf/sub1 |
|
659 | 659 | ../archive_lf/sub1/sub2 |
|
660 | 660 | ../archive_lf/sub1/sub2/folder |
|
661 | 661 | ../archive_lf/sub1/sub2/folder/test.txt |
|
662 | 662 | ../archive_lf/sub1/sub2/test.txt |
|
663 | 663 | $ rm -rf ../archive_lf |
|
664 | 664 | |
|
665 | 665 | Include large files from within a largefiles subrepo |
|
666 | 666 | |
|
667 | 667 | $ hg --config extensions.largefiles= archive -S -I '**.bin' ../archive_lf |
|
668 | 668 | $ find ../archive_lf | sort |
|
669 | 669 | ../archive_lf |
|
670 | 670 | ../archive_lf/large.bin |
|
671 | 671 | ../archive_lf/sub1 |
|
672 | 672 | ../archive_lf/sub1/sub2 |
|
673 | 673 | ../archive_lf/sub1/sub2/large.bin |
|
674 | 674 | $ rm -rf ../archive_lf |
|
675 | 675 | |
|
676 | 676 | Find an exact largefile match in a largefiles subrepo |
|
677 | 677 | |
|
678 | 678 | $ hg --config extensions.largefiles= archive -S -I 'sub1/sub2/large.bin' ../archive_lf |
|
679 | 679 | $ find ../archive_lf | sort |
|
680 | 680 | ../archive_lf |
|
681 | 681 | ../archive_lf/sub1 |
|
682 | 682 | ../archive_lf/sub1/sub2 |
|
683 | 683 | ../archive_lf/sub1/sub2/large.bin |
|
684 | 684 | $ rm -rf ../archive_lf |
|
685 | 685 | |
|
686 | 686 | The local repo enables largefiles if a largefiles repo is cloned |
|
687 | 687 | $ hg showconfig extensions |
|
688 | 688 | abort: repository requires features unknown to this Mercurial: largefiles! |
|
689 | 689 | (see https://mercurial-scm.org/wiki/MissingRequirement for more information) |
|
690 | 690 | [255] |
|
691 | 691 | $ hg --config extensions.largefiles= clone -qU . ../lfclone |
|
692 | 692 | $ cat ../lfclone/.hg/hgrc |
|
693 | 693 | # example repository config (see "hg help config" for more info) |
|
694 | 694 | [paths] |
|
695 | 695 | default = $TESTTMP/cloned (glob) |
|
696 | 696 | |
|
697 | 697 | # path aliases to other clones of this repo in URLs or filesystem paths |
|
698 | 698 | # (see "hg help config.paths" for more info) |
|
699 | 699 | # |
|
700 | 700 | # default-push = ssh://jdoe@example.net/hg/jdoes-fork |
|
701 | 701 | # my-fork = ssh://jdoe@example.net/hg/jdoes-fork |
|
702 | 702 | # my-clone = /home/jdoe/jdoes-clone |
|
703 | 703 | |
|
704 | 704 | [ui] |
|
705 | 705 | # name and email (local to this repository, optional), e.g. |
|
706 | 706 | # username = Jane Doe <jdoe@example.com> |
|
707 | 707 | |
|
708 | 708 | [extensions] |
|
709 | 709 | largefiles= |
|
710 | 710 | |
|
711 | 711 | Find an exact match to a standin (should archive nothing) |
|
712 | 712 | $ hg --config extensions.largefiles= archive -S -I 'sub/sub2/.hglf/large.bin' ../archive_lf |
|
713 | 713 | $ find ../archive_lf 2> /dev/null | sort |
|
714 | 714 | |
|
715 | 715 | $ cat >> $HGRCPATH <<EOF |
|
716 | 716 | > [extensions] |
|
717 | 717 | > largefiles= |
|
718 | 718 | > [largefiles] |
|
719 | 719 | > patterns=glob:**.dat |
|
720 | 720 | > EOF |
|
721 | 721 | |
|
722 | 722 | Test forget through a deep subrepo with the largefiles extension, both a |
|
723 | 723 | largefile and a normal file. Then a largefile that hasn't been committed yet. |
|
724 | 724 | $ touch sub1/sub2/untracked.txt |
|
725 | 725 | $ touch sub1/sub2/large.dat |
|
726 | 726 | $ hg forget sub1/sub2/large.bin sub1/sub2/test.txt sub1/sub2/untracked.txt |
|
727 | 727 | not removing sub1/sub2/untracked.txt: file is already untracked (glob) |
|
728 | 728 | [1] |
|
729 | 729 | $ hg add --large --dry-run -v sub1/sub2/untracked.txt |
|
730 | 730 | adding sub1/sub2/untracked.txt as a largefile (glob) |
|
731 | 731 | $ hg add --large -v sub1/sub2/untracked.txt |
|
732 | 732 | adding sub1/sub2/untracked.txt as a largefile (glob) |
|
733 | 733 | $ hg add --normal -v sub1/sub2/large.dat |
|
734 | 734 | adding sub1/sub2/large.dat (glob) |
|
735 | 735 | $ hg forget -v sub1/sub2/untracked.txt |
|
736 | 736 | removing sub1/sub2/untracked.txt (glob) |
|
737 | 737 | $ hg status -S |
|
738 | 738 | A sub1/sub2/large.dat |
|
739 | 739 | R sub1/sub2/large.bin |
|
740 | 740 | R sub1/sub2/test.txt |
|
741 | 741 | ? foo/bar/abc |
|
742 | 742 | ? sub1/sub2/untracked.txt |
|
743 | 743 | ? sub1/sub2/x.txt |
|
744 | 744 | $ hg add sub1/sub2 |
|
745 | 745 | |
|
746 | 746 | $ hg archive -S -r 'wdir()' ../wdir2 |
|
747 | 747 | $ diff -r . ../wdir2 | egrep -v '\.hg$|^Common subdirectories:' |
|
748 | 748 | Only in ../wdir2: .hg_archival.txt |
|
749 | 749 | Only in .: .hglf |
|
750 | 750 | Only in .: foo |
|
751 | 751 | Only in ./sub1/sub2: large.bin |
|
752 | 752 | Only in ./sub1/sub2: test.txt |
|
753 | 753 | Only in ./sub1/sub2: untracked.txt |
|
754 | 754 | Only in ./sub1/sub2: x.txt |
|
755 | 755 | $ find ../wdir2 -type f | sort |
|
756 | 756 | ../wdir2/.hg_archival.txt |
|
757 | 757 | ../wdir2/.hgsub |
|
758 | 758 | ../wdir2/.hgsubstate |
|
759 | 759 | ../wdir2/large.bin |
|
760 | 760 | ../wdir2/main |
|
761 | 761 | ../wdir2/sub1/.hgsub |
|
762 | 762 | ../wdir2/sub1/.hgsubstate |
|
763 | 763 | ../wdir2/sub1/sub1 |
|
764 | 764 | ../wdir2/sub1/sub2/folder/test.txt |
|
765 | 765 | ../wdir2/sub1/sub2/large.dat |
|
766 | 766 | ../wdir2/sub1/sub2/sub2 |
|
767 | 767 | $ hg status -S -mac -n | sort |
|
768 | 768 | .hgsub |
|
769 | 769 | .hgsubstate |
|
770 | 770 | large.bin |
|
771 | 771 | main |
|
772 | 772 | sub1/.hgsub |
|
773 | 773 | sub1/.hgsubstate |
|
774 | 774 | sub1/sub1 |
|
775 | 775 | sub1/sub2/folder/test.txt |
|
776 | 776 | sub1/sub2/large.dat |
|
777 | 777 | sub1/sub2/sub2 |
|
778 | 778 | |
|
779 | 779 | $ hg ci -Sqm 'forget testing' |
|
780 | 780 | |
|
781 | 781 | Test 'wdir()' modified file archiving with largefiles |
|
782 | 782 | $ echo 'mod' > main |
|
783 | 783 | $ echo 'mod' > large.bin |
|
784 | 784 | $ echo 'mod' > sub1/sub2/large.dat |
|
785 | 785 | $ hg archive -S -r 'wdir()' ../wdir3 |
|
786 | 786 | $ diff -r . ../wdir3 | egrep -v '\.hg$|^Common subdirectories' |
|
787 | 787 | Only in ../wdir3: .hg_archival.txt |
|
788 | 788 | Only in .: .hglf |
|
789 | 789 | Only in .: foo |
|
790 | 790 | Only in ./sub1/sub2: large.bin |
|
791 | 791 | Only in ./sub1/sub2: test.txt |
|
792 | 792 | Only in ./sub1/sub2: untracked.txt |
|
793 | 793 | Only in ./sub1/sub2: x.txt |
|
794 | 794 | $ find ../wdir3 -type f | sort |
|
795 | 795 | ../wdir3/.hg_archival.txt |
|
796 | 796 | ../wdir3/.hgsub |
|
797 | 797 | ../wdir3/.hgsubstate |
|
798 | 798 | ../wdir3/large.bin |
|
799 | 799 | ../wdir3/main |
|
800 | 800 | ../wdir3/sub1/.hgsub |
|
801 | 801 | ../wdir3/sub1/.hgsubstate |
|
802 | 802 | ../wdir3/sub1/sub1 |
|
803 | 803 | ../wdir3/sub1/sub2/folder/test.txt |
|
804 | 804 | ../wdir3/sub1/sub2/large.dat |
|
805 | 805 | ../wdir3/sub1/sub2/sub2 |
|
806 | 806 | $ hg up -Cq |
|
807 | 807 | |
|
808 | 808 | Test issue4330: commit a directory where only normal files have changed |
|
809 | 809 | $ touch foo/bar/large.dat |
|
810 | 810 | $ hg add --large foo/bar/large.dat |
|
811 | 811 | $ hg ci -m 'add foo/bar/large.dat' |
|
812 | 812 | $ touch a.txt |
|
813 | 813 | $ touch a.dat |
|
814 | 814 | $ hg add -v foo/bar/abc a.txt a.dat |
|
815 | 815 | adding a.dat as a largefile |
|
816 | 816 | adding a.txt |
|
817 | 817 | adding foo/bar/abc (glob) |
|
818 | 818 | $ hg ci -m 'dir commit with only normal file deltas' foo/bar |
|
819 | 819 | $ hg status |
|
820 | 820 | A a.dat |
|
821 | 821 | A a.txt |
|
822 | 822 | |
|
823 | 823 | Test a directory commit with a changed largefile and a changed normal file |
|
824 | 824 | $ echo changed > foo/bar/large.dat |
|
825 | 825 | $ echo changed > foo/bar/abc |
|
826 | 826 | $ hg ci -m 'dir commit with normal and lf file deltas' foo |
|
827 | 827 | $ hg status |
|
828 | 828 | A a.dat |
|
829 | 829 | A a.txt |
|
830 | 830 | |
|
831 | 831 | $ hg ci -m "add a.*" |
|
832 | 832 | $ hg mv a.dat b.dat |
|
833 | 833 | $ hg mv foo/bar/abc foo/bar/def |
|
834 | 834 | $ hg status -C |
|
835 | 835 | A b.dat |
|
836 | 836 | a.dat |
|
837 | 837 | A foo/bar/def |
|
838 | 838 | foo/bar/abc |
|
839 | 839 | R a.dat |
|
840 | 840 | R foo/bar/abc |
|
841 | 841 | |
|
842 | 842 | $ hg ci -m "move large and normal" |
|
843 | 843 | $ hg status -C --rev '.^' --rev . |
|
844 | 844 | A b.dat |
|
845 | 845 | a.dat |
|
846 | 846 | A foo/bar/def |
|
847 | 847 | foo/bar/abc |
|
848 | 848 | R a.dat |
|
849 | 849 | R foo/bar/abc |
|
850 | 850 | |
|
851 | 851 | |
|
852 | 852 | $ echo foo > main |
|
853 | 853 | $ hg ci -m "mod parent only" |
|
854 | 854 | $ hg init sub3 |
|
855 | 855 | $ echo "sub3 = sub3" >> .hgsub |
|
856 | 856 | $ echo xyz > sub3/a.txt |
|
857 | 857 | $ hg add sub3/a.txt |
|
858 | 858 | $ hg ci -Sm "add sub3" |
|
859 | 859 | committing subrepository sub3 |
|
860 | 860 | $ cat .hgsub | grep -v sub3 > .hgsub1 |
|
861 | 861 | $ mv .hgsub1 .hgsub |
|
862 | 862 | $ hg ci -m "remove sub3" |
|
863 | 863 | |
|
864 | 864 | $ hg log -r "subrepo()" --style compact |
|
865 | 865 | 0 7f491f53a367 1970-01-01 00:00 +0000 test |
|
866 | 866 | main import |
|
867 | 867 | |
|
868 | 868 | 1 ffe6649062fe 1970-01-01 00:00 +0000 test |
|
869 | 869 | deep nested modif should trigger a commit |
|
870 | 870 | |
|
871 | 871 | 2 9bb10eebee29 1970-01-01 00:00 +0000 test |
|
872 | 872 | add test.txt |
|
873 | 873 | |
|
874 | 874 | 3 7c64f035294f 1970-01-01 00:00 +0000 test |
|
875 | 875 | add large files |
|
876 | 876 | |
|
877 | 877 | 4 f734a59e2e35 1970-01-01 00:00 +0000 test |
|
878 | 878 | forget testing |
|
879 | 879 | |
|
880 | 880 | 11 9685a22af5db 1970-01-01 00:00 +0000 test |
|
881 | 881 | add sub3 |
|
882 | 882 | |
|
883 | 883 | 12[tip] 2e0485b475b9 1970-01-01 00:00 +0000 test |
|
884 | 884 | remove sub3 |
|
885 | 885 | |
|
886 | 886 | $ hg log -r "subrepo('sub3')" --style compact |
|
887 | 887 | 11 9685a22af5db 1970-01-01 00:00 +0000 test |
|
888 | 888 | add sub3 |
|
889 | 889 | |
|
890 | 890 | 12[tip] 2e0485b475b9 1970-01-01 00:00 +0000 test |
|
891 | 891 | remove sub3 |
|
892 | 892 | |
|
893 | 893 | $ hg log -r "subrepo('bogus')" --style compact |
|
894 | 894 | |
|
895 | 895 | |
|
896 | 896 | Test .hgsubstate in the R state |
|
897 | 897 | |
|
898 | 898 | $ hg rm .hgsub .hgsubstate |
|
899 | 899 | \r (no-eol) (esc) |
|
900 | 900 | deleting [=====================> ] 1/2\r (no-eol) (esc) |
|
901 | 901 | deleting [===========================================>] 2/2\r (no-eol) (esc) |
|
902 | 902 | \r (no-eol) (esc) |
|
903 | 903 | $ hg ci -m 'trash subrepo tracking' |
|
904 | 904 | |
|
905 | 905 | $ hg log -r "subrepo('re:sub\d+')" --style compact |
|
906 | 906 | 0 7f491f53a367 1970-01-01 00:00 +0000 test |
|
907 | 907 | main import |
|
908 | 908 | |
|
909 | 909 | 1 ffe6649062fe 1970-01-01 00:00 +0000 test |
|
910 | 910 | deep nested modif should trigger a commit |
|
911 | 911 | |
|
912 | 912 | 2 9bb10eebee29 1970-01-01 00:00 +0000 test |
|
913 | 913 | add test.txt |
|
914 | 914 | |
|
915 | 915 | 3 7c64f035294f 1970-01-01 00:00 +0000 test |
|
916 | 916 | add large files |
|
917 | 917 | |
|
918 | 918 | 4 f734a59e2e35 1970-01-01 00:00 +0000 test |
|
919 | 919 | forget testing |
|
920 | 920 | |
|
921 | 921 | 11 9685a22af5db 1970-01-01 00:00 +0000 test |
|
922 | 922 | add sub3 |
|
923 | 923 | |
|
924 | 924 | 12 2e0485b475b9 1970-01-01 00:00 +0000 test |
|
925 | 925 | remove sub3 |
|
926 | 926 | |
|
927 | 927 | 13[tip] a68b2c361653 1970-01-01 00:00 +0000 test |
|
928 | 928 | trash subrepo tracking |
|
929 | 929 | |
|
930 | 930 | |
|
931 | 931 | Restore the trashed subrepo tracking |
|
932 | 932 | |
|
933 | 933 | $ hg rollback -q |
|
934 | 934 | $ hg update -Cq . |
|
935 | 935 | |
|
936 | 936 | Interaction with extdiff, largefiles and subrepos |
|
937 | 937 | |
|
938 | 938 | $ hg --config extensions.extdiff= pdiff -S |
|
939 | 939 | |
|
940 | 940 | $ hg --config extensions.extdiff= pdiff -r '.^' -S |
|
941 | 941 | \r (no-eol) (esc) |
|
942 | 942 | archiving [ ] 0/2\r (no-eol) (esc) |
|
943 | 943 | archiving [====================> ] 1/2\r (no-eol) (esc) |
|
944 | 944 | archiving [==========================================>] 2/2\r (no-eol) (esc) |
|
945 | 945 | \r (no-eol) (esc) |
|
946 | 946 | \r (no-eol) (esc) |
|
947 | 947 | archiving (sub1) [ <=> ] 0\r (no-eol) (esc) |
|
948 | 948 | \r (no-eol) (esc) |
|
949 | 949 | \r (no-eol) (esc) |
|
950 | archiving (sub1/sub2) [ <=> ] 0\r (no-eol) (esc) | |
|
950 | archiving (sub1/sub2) [ <=> ] 0\r (no-eol) (glob) (esc) | |
|
951 | 951 | \r (no-eol) (esc) |
|
952 | 952 | \r (no-eol) (esc) |
|
953 | 953 | archiving (sub3) [ <=> ] 0\r (no-eol) (esc) |
|
954 | 954 | \r (no-eol) (esc) |
|
955 | 955 | \r (no-eol) (esc) |
|
956 | 956 | archiving [ ] 0/2\r (no-eol) (esc) |
|
957 | 957 | archiving [====================> ] 1/2\r (no-eol) (esc) |
|
958 | 958 | archiving [==========================================>] 2/2\r (no-eol) (esc) |
|
959 | 959 | \r (no-eol) (esc) |
|
960 | 960 | \r (no-eol) (esc) |
|
961 | 961 | archiving (sub1) [ <=> ] 0\r (no-eol) (esc) |
|
962 | 962 | \r (no-eol) (esc) |
|
963 | 963 | \r (no-eol) (esc) |
|
964 | archiving (sub1/sub2) [ <=> ] 0\r (no-eol) (esc) | |
|
964 | archiving (sub1/sub2) [ <=> ] 0\r (no-eol) (glob) (esc) | |
|
965 | 965 | \r (no-eol) (esc) |
|
966 | 966 | diff -Nru cloned.*/.hgsub cloned/.hgsub (glob) |
|
967 | 967 | --- cloned.*/.hgsub * (glob) |
|
968 | 968 | +++ cloned/.hgsub * (glob) |
|
969 | 969 | @@ -1,2 +1* @@ (glob) |
|
970 | 970 | sub1 = ../sub1 |
|
971 | 971 | -sub3 = sub3 |
|
972 | 972 | diff -Nru cloned.*/.hgsubstate cloned/.hgsubstate (glob) |
|
973 | 973 | --- cloned.*/.hgsubstate * (glob) |
|
974 | 974 | +++ cloned/.hgsubstate * (glob) |
|
975 | 975 | @@ -1,2 +1* @@ (glob) |
|
976 | 976 | 7a36fa02b66e61f27f3d4a822809f159479b8ab2 sub1 |
|
977 | 977 | -b1a26de6f2a045a9f079323693614ee322f1ff7e sub3 |
|
978 | 978 | [1] |
|
979 | 979 | |
|
980 | 980 | $ hg --config extensions.extdiff= pdiff -r 0 -r '.^' -S |
|
981 | 981 | \r (no-eol) (esc) |
|
982 | 982 | archiving [ ] 0/3\r (no-eol) (esc) |
|
983 | 983 | archiving [=============> ] 1/3\r (no-eol) (esc) |
|
984 | 984 | archiving [===========================> ] 2/3\r (no-eol) (esc) |
|
985 | 985 | archiving [==========================================>] 3/3\r (no-eol) (esc) |
|
986 | 986 | \r (no-eol) (esc) |
|
987 | 987 | \r (no-eol) (esc) |
|
988 | 988 | archiving (sub1) [ ] 0/1\r (no-eol) (esc) |
|
989 | 989 | archiving (sub1) [===================================>] 1/1\r (no-eol) (esc) |
|
990 | 990 | \r (no-eol) (esc) |
|
991 | 991 | \r (no-eol) (esc) |
|
992 | archiving (sub1/sub2) [ ] 0/1\r (no-eol) (esc) | |
|
993 | archiving (sub1/sub2) [==============================>] 1/1\r (no-eol) (esc) | |
|
992 | archiving (sub1/sub2) [ ] 0/1\r (no-eol) (glob) (esc) | |
|
993 | archiving (sub1/sub2) [==============================>] 1/1\r (no-eol) (glob) (esc) | |
|
994 | 994 | \r (no-eol) (esc) |
|
995 | 995 | \r (no-eol) (esc) |
|
996 | 996 | archiving [ ] 0/8\r (no-eol) (esc) |
|
997 | 997 | archiving [====> ] 1/8\r (no-eol) (esc) |
|
998 | 998 | archiving [=========> ] 2/8\r (no-eol) (esc) |
|
999 | 999 | archiving [===============> ] 3/8\r (no-eol) (esc) |
|
1000 | 1000 | archiving [====================> ] 4/8\r (no-eol) (esc) |
|
1001 | 1001 | archiving [=========================> ] 5/8\r (no-eol) (esc) |
|
1002 | 1002 | archiving [===============================> ] 6/8\r (no-eol) (esc) |
|
1003 | 1003 | archiving [====================================> ] 7/8\r (no-eol) (esc) |
|
1004 | 1004 | archiving [==========================================>] 8/8\r (no-eol) (esc) |
|
1005 | 1005 | \r (no-eol) (esc) |
|
1006 | 1006 | \r (no-eol) (esc) |
|
1007 | 1007 | archiving (sub1) [ ] 0/1\r (no-eol) (esc) |
|
1008 | 1008 | archiving (sub1) [===================================>] 1/1\r (no-eol) (esc) |
|
1009 | 1009 | \r (no-eol) (esc) |
|
1010 | 1010 | \r (no-eol) (esc) |
|
1011 | archiving (sub1/sub2) [ ] 0/3\r (no-eol) (esc) | |
|
1012 | archiving (sub1/sub2) [=========> ] 1/3\r (no-eol) (esc) | |
|
1013 | archiving (sub1/sub2) [===================> ] 2/3\r (no-eol) (esc) | |
|
1014 | archiving (sub1/sub2) [==============================>] 3/3\r (no-eol) (esc) | |
|
1011 | archiving (sub1/sub2) [ ] 0/3\r (no-eol) (glob) (esc) | |
|
1012 | archiving (sub1/sub2) [=========> ] 1/3\r (no-eol) (glob) (esc) | |
|
1013 | archiving (sub1/sub2) [===================> ] 2/3\r (no-eol) (glob) (esc) | |
|
1014 | archiving (sub1/sub2) [==============================>] 3/3\r (no-eol) (glob) (esc) | |
|
1015 | 1015 | \r (no-eol) (esc) |
|
1016 | 1016 | \r (no-eol) (esc) |
|
1017 | 1017 | archiving (sub3) [ ] 0/1\r (no-eol) (esc) |
|
1018 | 1018 | archiving (sub3) [===================================>] 1/1\r (no-eol) (esc) |
|
1019 | 1019 | \r (no-eol) (esc) |
|
1020 | 1020 | diff -Nru cloned.*/.hglf/b.dat cloned.*/.hglf/b.dat (glob) |
|
1021 | 1021 | --- cloned.*/.hglf/b.dat * (glob) |
|
1022 | 1022 | +++ cloned.*/.hglf/b.dat * (glob) |
|
1023 | 1023 | @@ -*,0 +1* @@ (glob) |
|
1024 | 1024 | +da39a3ee5e6b4b0d3255bfef95601890afd80709 |
|
1025 | 1025 | diff -Nru cloned.*/.hglf/foo/bar/large.dat cloned.*/.hglf/foo/bar/large.dat (glob) |
|
1026 | 1026 | --- cloned.*/.hglf/foo/bar/large.dat * (glob) |
|
1027 | 1027 | +++ cloned.*/.hglf/foo/bar/large.dat * (glob) |
|
1028 | 1028 | @@ -*,0 +1* @@ (glob) |
|
1029 | 1029 | +2f6933b5ee0f5fdd823d9717d8729f3c2523811b |
|
1030 | 1030 | diff -Nru cloned.*/.hglf/large.bin cloned.*/.hglf/large.bin (glob) |
|
1031 | 1031 | --- cloned.*/.hglf/large.bin * (glob) |
|
1032 | 1032 | +++ cloned.*/.hglf/large.bin * (glob) |
|
1033 | 1033 | @@ -*,0 +1* @@ (glob) |
|
1034 | 1034 | +7f7097b041ccf68cc5561e9600da4655d21c6d18 |
|
1035 | 1035 | diff -Nru cloned.*/.hgsub cloned.*/.hgsub (glob) |
|
1036 | 1036 | --- cloned.*/.hgsub * (glob) |
|
1037 | 1037 | +++ cloned.*/.hgsub * (glob) |
|
1038 | 1038 | @@ -1* +1,2 @@ (glob) |
|
1039 | 1039 | sub1 = ../sub1 |
|
1040 | 1040 | +sub3 = sub3 |
|
1041 | 1041 | diff -Nru cloned.*/.hgsubstate cloned.*/.hgsubstate (glob) |
|
1042 | 1042 | --- cloned.*/.hgsubstate * (glob) |
|
1043 | 1043 | +++ cloned.*/.hgsubstate * (glob) |
|
1044 | 1044 | @@ -1* +1,2 @@ (glob) |
|
1045 | 1045 | -fc3b4ce2696f7741438c79207583768f2ce6b0dd sub1 |
|
1046 | 1046 | +7a36fa02b66e61f27f3d4a822809f159479b8ab2 sub1 |
|
1047 | 1047 | +b1a26de6f2a045a9f079323693614ee322f1ff7e sub3 |
|
1048 | 1048 | diff -Nru cloned.*/foo/bar/def cloned.*/foo/bar/def (glob) |
|
1049 | 1049 | --- cloned.*/foo/bar/def * (glob) |
|
1050 | 1050 | +++ cloned.*/foo/bar/def * (glob) |
|
1051 | 1051 | @@ -*,0 +1* @@ (glob) |
|
1052 | 1052 | +changed |
|
1053 | 1053 | diff -Nru cloned.*/main cloned.*/main (glob) |
|
1054 | 1054 | --- cloned.*/main * (glob) |
|
1055 | 1055 | +++ cloned.*/main * (glob) |
|
1056 | 1056 | @@ -1* +1* @@ (glob) |
|
1057 | 1057 | -main |
|
1058 | 1058 | +foo |
|
1059 | 1059 | diff -Nru cloned.*/sub1/.hgsubstate cloned.*/sub1/.hgsubstate (glob) |
|
1060 | 1060 | --- cloned.*/sub1/.hgsubstate * (glob) |
|
1061 | 1061 | +++ cloned.*/sub1/.hgsubstate * (glob) |
|
1062 | 1062 | @@ -1* +1* @@ (glob) |
|
1063 | 1063 | -c57a0840e3badd667ef3c3ef65471609acb2ba3c sub2 |
|
1064 | 1064 | +c77908c81ccea3794a896c79e98b0e004aee2e9e sub2 |
|
1065 | 1065 | diff -Nru cloned.*/sub1/sub2/folder/test.txt cloned.*/sub1/sub2/folder/test.txt (glob) |
|
1066 | 1066 | --- cloned.*/sub1/sub2/folder/test.txt * (glob) |
|
1067 | 1067 | +++ cloned.*/sub1/sub2/folder/test.txt * (glob) |
|
1068 | 1068 | @@ -*,0 +1* @@ (glob) |
|
1069 | 1069 | +subfolder |
|
1070 | 1070 | diff -Nru cloned.*/sub1/sub2/sub2 cloned.*/sub1/sub2/sub2 (glob) |
|
1071 | 1071 | --- cloned.*/sub1/sub2/sub2 * (glob) |
|
1072 | 1072 | +++ cloned.*/sub1/sub2/sub2 * (glob) |
|
1073 | 1073 | @@ -1* +1* @@ (glob) |
|
1074 | 1074 | -sub2 |
|
1075 | 1075 | +modified |
|
1076 | 1076 | diff -Nru cloned.*/sub3/a.txt cloned.*/sub3/a.txt (glob) |
|
1077 | 1077 | --- cloned.*/sub3/a.txt * (glob) |
|
1078 | 1078 | +++ cloned.*/sub3/a.txt * (glob) |
|
1079 | 1079 | @@ -*,0 +1* @@ (glob) |
|
1080 | 1080 | +xyz |
|
1081 | 1081 | [1] |
|
1082 | 1082 | |
|
1083 | 1083 | $ echo mod > sub1/sub2/sub2 |
|
1084 | 1084 | $ hg --config extensions.extdiff= pdiff -S |
|
1085 | 1085 | \r (no-eol) (esc) |
|
1086 | 1086 | archiving (sub1) [ <=> ] 0\r (no-eol) (esc) |
|
1087 | 1087 | \r (no-eol) (esc) |
|
1088 | 1088 | \r (no-eol) (esc) |
|
1089 | archiving (sub1/sub2) [ ] 0/1\r (no-eol) (esc) | |
|
1090 | archiving (sub1/sub2) [==============================>] 1/1\r (no-eol) (esc) | |
|
1089 | archiving (sub1/sub2) [ ] 0/1\r (no-eol) (glob) (esc) | |
|
1090 | archiving (sub1/sub2) [==============================>] 1/1\r (no-eol) (glob) (esc) | |
|
1091 | 1091 | \r (no-eol) (esc) |
|
1092 | 1092 | --- */cloned.*/sub1/sub2/sub2 * (glob) |
|
1093 | 1093 | +++ */cloned/sub1/sub2/sub2 * (glob) |
|
1094 | 1094 | @@ -1* +1* @@ (glob) |
|
1095 | 1095 | -modified |
|
1096 | 1096 | +mod |
|
1097 | 1097 | [1] |
|
1098 | 1098 | |
|
1099 | 1099 | $ cd .. |
General Comments 0
You need to be logged in to leave comments.
Login now