Show More
@@ -26,8 +26,25 b' def compilere(pat, multiline=False):' | |||
|
26 | 26 | return re.compile(pat) |
|
27 | 27 | |
|
28 | 28 | def repquote(m): |
|
29 | t = re.sub(r"\w", "x", m.group('text')) | |
|
30 | t = re.sub(r"[^\s\nx]", "o", t) | |
|
29 | fromc = '.:' | |
|
30 | tochr = 'pq' | |
|
31 | def encodechr(i): | |
|
32 | if i > 255: | |
|
33 | return 'u' | |
|
34 | c = chr(i) | |
|
35 | if c in ' \n': | |
|
36 | return c | |
|
37 | if c.isalpha(): | |
|
38 | return 'x' | |
|
39 | if c.isdigit(): | |
|
40 | return 'n' | |
|
41 | try: | |
|
42 | return tochr[fromc.find(c)] | |
|
43 | except (ValueError, IndexError): | |
|
44 | return 'o' | |
|
45 | t = m.group('text') | |
|
46 | tt = ''.join(encodechr(i) for i in xrange(256)) | |
|
47 | t = t.translate(tt) | |
|
31 | 48 | return m.group('quote') + t + m.group('quote') |
|
32 | 49 | |
|
33 | 50 | def reppython(m): |
@@ -263,6 +280,7 b' pypats = [' | |||
|
263 | 280 | ], |
|
264 | 281 | # warnings |
|
265 | 282 | [ |
|
283 | (r'(^| )pp +xxxxqq[ \n][^\n]', "add two newlines after '.. note::'"), | |
|
266 | 284 | ] |
|
267 | 285 | ] |
|
268 | 286 | |
@@ -449,6 +467,8 b' def checkfile(f, logfunc=_defaultlogger.' | |||
|
449 | 467 | else: |
|
450 | 468 | p, msg = pat |
|
451 | 469 | ignore = None |
|
470 | if i >= nerrs: | |
|
471 | msg = "warning: " + msg | |
|
452 | 472 | |
|
453 | 473 | pos = 0 |
|
454 | 474 | n = 0 |
@@ -456,8 +476,6 b' def checkfile(f, logfunc=_defaultlogger.' | |||
|
456 | 476 | if prelines is None: |
|
457 | 477 | prelines = pre.splitlines() |
|
458 | 478 | postlines = post.splitlines(True) |
|
459 | if i >= nerrs: | |
|
460 | msg = "warning: " + msg | |
|
461 | 479 | |
|
462 | 480 | start = m.start() |
|
463 | 481 | while n < len(postlines): |
@@ -484,6 +502,7 b' def checkfile(f, logfunc=_defaultlogger.' | |||
|
484 | 502 | bl, bu, br = blamecache[n] |
|
485 | 503 | if bl == l: |
|
486 | 504 | bd = '%s@%s' % (bu, br) |
|
505 | ||
|
487 | 506 | errors.append((f, lineno and n + 1, l, msg, bd)) |
|
488 | 507 | result = False |
|
489 | 508 |
@@ -49,6 +49,7 b' Example versioned ``.hgeol`` file::' | |||
|
49 | 49 | native = LF |
|
50 | 50 | |
|
51 | 51 | .. note:: |
|
52 | ||
|
52 | 53 | The rules will first apply when files are touched in the working |
|
53 | 54 | copy, e.g. by updating to null and back to tip to touch all files. |
|
54 | 55 |
@@ -53,6 +53,7 b' Example::' | |||
|
53 | 53 | svn = True |
|
54 | 54 | |
|
55 | 55 | .. note:: |
|
56 | ||
|
56 | 57 | The more specific you are in your filename patterns the less you |
|
57 | 58 | lose speed in huge repositories. |
|
58 | 59 |
@@ -2622,6 +2622,7 b' def guard(ui, repo, *args, **opts):' | |||
|
2622 | 2622 | With arguments, set guards for the named patch. |
|
2623 | 2623 | |
|
2624 | 2624 | .. note:: |
|
2625 | ||
|
2625 | 2626 | Specifying negative guards now requires '--'. |
|
2626 | 2627 | |
|
2627 | 2628 | To set guards on another patch:: |
@@ -17,6 +17,7 b' def share(ui, source, dest=None, noupdat' | |||
|
17 | 17 | history with another repository. |
|
18 | 18 | |
|
19 | 19 | .. note:: |
|
20 | ||
|
20 | 21 | using rollback or extensions that destroy/modify history (mq, |
|
21 | 22 | rebase, etc.) can cause considerable confusion with shared |
|
22 | 23 | clones. In particular, if two shared clones are both updated to |
@@ -51,7 +51,9 b' def strip(ui, repo, revs, update=True, b' | |||
|
51 | 51 | if update: |
|
52 | 52 | checklocalchanges(repo, force=force) |
|
53 | 53 | urev, p2 = repo.changelog.parents(revs[0]) |
|
54 | if p2 != nullid and p2 in [x.node for x in repo.mq.applied]: | |
|
54 | if (util.safehasattr(repo, 'mq') and | |
|
55 | p2 != nullid | |
|
56 | and p2 in [x.node for x in repo.mq.applied]): | |
|
55 | 57 | urev = p2 |
|
56 | 58 | hg.clean(repo, urev) |
|
57 | 59 | repo.dirstate.write() |
@@ -4339,13 +4339,22 b' msgid ""' | |||
|
4339 | 4339 | " Use \"min(outgoing() and ::.)\" or similar revset specification\n" |
|
4340 | 4340 | " instead of --outgoing to specify edit target revision exactly in\n" |
|
4341 | 4341 | " such ambiguous situation. See :hg:`help revsets` for detail about\n" |
|
4342 |
" selecting revisions. |
|
|
4343 | " " | |
|
4342 | " selecting revisions." | |
|
4344 | 4343 | msgstr "" |
|
4345 | 4344 | " Ao invés de --outgoing, use \"min(outgoing() and ::.)\" ou outro\n" |
|
4346 | 4345 | " revset semelhante para especificar com exatidão as revisões a serem\n" |
|
4347 | 4346 | " editadas nessas situações.Veja :hg:`help revsets` para detalhes sobre\n" |
|
4348 |
" seleção de revisões. |
|
|
4347 | " seleção de revisões." | |
|
4348 | ||
|
4349 | msgid "" | |
|
4350 | " Returns 0 on success, 1 if user intervention is required (not only\n" | |
|
4351 | " for intentional \"edit\" command, but also for resolving unexpected\n" | |
|
4352 | " conflicts).\n" | |
|
4353 | " " | |
|
4354 | msgstr "" | |
|
4355 | " Devolve 0 para indicar sucesso, 1 se alguma intervenção do usuário\n" | |
|
4356 | " for necessária (tanto para um comando \"edit\" como para resolver\n" | |
|
4357 | " conflitos inesperados).\n" | |
|
4349 | 4358 | " " |
|
4350 | 4359 | |
|
4351 | 4360 | msgid "source has mq patches applied" |
@@ -5460,18 +5469,18 b' msgstr "altera\xc3\xa7\xc3\xb5es n\xc3\xa3o consolidadas"' | |||
|
5460 | 5469 | |
|
5461 | 5470 | #, python-format |
|
5462 | 5471 | msgid "" |
|
5463 |
" |
|
|
5464 |
"use (l)argefile or keep |
|
|
5465 | msgstr "" | |
|
5466 |
" |
|
|
5472 | "remote turned local normal file %s into a largefile\n" | |
|
5473 | "use (l)argefile or keep (n)ormal file?$$ &Largefile $$ &Normal file" | |
|
5474 | msgstr "" | |
|
5475 | "o remoto transformou o arquivo local normal %s em um largefile\n" | |
|
5467 | 5476 | "usar (l)argefile ou manter como arquivo (n)ormal?$$ &Largefile $$ Arquivo &Normal" |
|
5468 | 5477 | |
|
5469 | 5478 | #, python-format |
|
5470 | 5479 | msgid "" |
|
5471 |
" |
|
|
5472 |
"keep |
|
|
5473 | msgstr "" | |
|
5474 |
" |
|
|
5480 | "remote turned local largefile %s into a normal file\n" | |
|
5481 | "keep (l)argefile or use (n)ormal file?$$ &Largefile $$ &Normal file" | |
|
5482 | msgstr "" | |
|
5483 | "o remoto transformou o largefile local %s em um arquivo normal\n" | |
|
5475 | 5484 | "manter como (l)argefile ou usar um arquivo (n)ormal?$$ &Largefile $$ Arquivo &Normal" |
|
5476 | 5485 | |
|
5477 | 5486 | #, python-format |
@@ -8399,10 +8408,12 b' msgstr ""' | |||
|
8399 | 8408 | " --abort/-a." |
|
8400 | 8409 | |
|
8401 | 8410 | msgid "" |
|
8402 |
" Returns 0 on success, 1 if nothing to rebase |
|
|
8403 | " " | |
|
8404 | msgstr "" | |
|
8405 | " Devolve 0 para indicar sucesso, 1 se não houver nada para rebasear.\n" | |
|
8411 | " Returns 0 on success, 1 if nothing to rebase or there are\n" | |
|
8412 | " unresolved conflicts.\n" | |
|
8413 | " " | |
|
8414 | msgstr "" | |
|
8415 | " Devolve 0 para indicar sucesso, 1 se não houver nada para rebasear\n" | |
|
8416 | " ou se houverem conflitos não resolvidos.\n" | |
|
8406 | 8417 | " " |
|
8407 | 8418 | |
|
8408 | 8419 | msgid "message can only be specified with collapse" |
@@ -19749,8 +19760,8 b' msgstr ""' | |||
|
19749 | 19760 | msgid "Lastly, there is Mercurial's internal format:" |
|
19750 | 19761 | msgstr "E por fim, há um formato interno do Mercurial:" |
|
19751 | 19762 | |
|
19752 |
msgid "- ``11654 |
|
|
19753 |
msgstr "- ``11654 |
|
|
19763 | msgid "- ``1165411109 0`` (Wed Dec 6 13:18:29 2006 UTC)" | |
|
19764 | msgstr "- ``1165411109 0`` (Wed Dec 6 13:18:29 2006 UTC)" | |
|
19754 | 19765 | |
|
19755 | 19766 | msgid "" |
|
19756 | 19767 | "This is the internal representation format for dates. The first number\n" |
@@ -397,6 +397,7 b' def backout(ui, repo, node=None, rev=Non' | |||
|
397 | 397 | changes and the merged result is left uncommitted. |
|
398 | 398 | |
|
399 | 399 | .. note:: |
|
400 | ||
|
400 | 401 | backout cannot be used to fix either an unwanted or |
|
401 | 402 | incorrect merge. |
|
402 | 403 | |
@@ -937,6 +938,7 b' def branch(ui, repo, label=None, **opts)' | |||
|
937 | 938 | """set or show the current branch name |
|
938 | 939 | |
|
939 | 940 | .. note:: |
|
941 | ||
|
940 | 942 | Branch names are permanent and global. Use :hg:`bookmark` to create a |
|
941 | 943 | light-weight bookmark instead. See :hg:`help glossary` for more |
|
942 | 944 | information about named branches and bookmarks. |
@@ -2707,6 +2709,7 b' def diff(ui, repo, *pats, **opts):' | |||
|
2707 | 2709 | Differences between files are shown using the unified diff format. |
|
2708 | 2710 | |
|
2709 | 2711 | .. note:: |
|
2712 | ||
|
2710 | 2713 | diff may generate unexpected results for merges, as it will |
|
2711 | 2714 | default to comparing against the working directory's first |
|
2712 | 2715 | parent changeset if no revisions are specified. |
@@ -2796,6 +2799,7 b' def export(ui, repo, *changesets, **opts' | |||
|
2796 | 2799 | comment. |
|
2797 | 2800 | |
|
2798 | 2801 | .. note:: |
|
2802 | ||
|
2799 | 2803 | export may generate unexpected diff output for merge |
|
2800 | 2804 | changesets, as it will compare the merge changeset against its |
|
2801 | 2805 | first parent only. |
@@ -2928,6 +2932,7 b' def graft(ui, repo, *revs, **opts):' | |||
|
2928 | 2932 | continued with the -c/--continue option. |
|
2929 | 2933 | |
|
2930 | 2934 | .. note:: |
|
2935 | ||
|
2931 | 2936 | The -c/--continue option does not reapply earlier options. |
|
2932 | 2937 | |
|
2933 | 2938 | .. container:: verbose |
@@ -3979,12 +3984,14 b' def log(ui, repo, *pats, **opts):' | |||
|
3979 | 3984 | changed files and full commit message are shown. |
|
3980 | 3985 | |
|
3981 | 3986 | .. note:: |
|
3987 | ||
|
3982 | 3988 | log -p/--patch may generate unexpected diff output for merge |
|
3983 | 3989 | changesets, as it will only compare the merge changeset against |
|
3984 | 3990 | its first parent. Also, only files different from BOTH parents |
|
3985 | 3991 | will appear in files:. |
|
3986 | 3992 | |
|
3987 | 3993 | .. note:: |
|
3994 | ||
|
3988 | 3995 | for performance reasons, log FILE may omit duplicate changes |
|
3989 | 3996 | made on branches and will not show deletions. To see all |
|
3990 | 3997 | changes including duplicates and deletions, use the --removed |
@@ -4652,6 +4659,7 b' def push(ui, repo, dest=None, **opts):' | |||
|
4652 | 4659 | only create a new branch without forcing other changes. |
|
4653 | 4660 | |
|
4654 | 4661 | .. note:: |
|
4662 | ||
|
4655 | 4663 | Extra care should be taken with the -f/--force option, |
|
4656 | 4664 | which will push all new heads on all branches, an action which will |
|
4657 | 4665 | almost always cause confusion for collaborators. |
@@ -4976,6 +4984,7 b' def revert(ui, repo, *pats, **opts):' | |||
|
4976 | 4984 | """restore files to their checkout state |
|
4977 | 4985 | |
|
4978 | 4986 | .. note:: |
|
4987 | ||
|
4979 | 4988 | To check out earlier revisions, you should use :hg:`update REV`. |
|
4980 | 4989 | To cancel an uncommitted merge (and lose your changes), |
|
4981 | 4990 | use :hg:`update --clean .`. |
@@ -5306,6 +5315,7 b' def status(ui, repo, *pats, **opts):' | |||
|
5306 | 5315 | unless explicitly requested with -u/--unknown or -i/--ignored. |
|
5307 | 5316 | |
|
5308 | 5317 | .. note:: |
|
5318 | ||
|
5309 | 5319 | status may appear to disagree with diff if permissions have |
|
5310 | 5320 | changed or a merge has occurred. The standard diff format does |
|
5311 | 5321 | not report permission changes and diff only reports changes |
@@ -151,9 +151,9 b' def _search(web, req, tmpl):' | |||
|
151 | 151 | yield web.repo[r] |
|
152 | 152 | |
|
153 | 153 | searchfuncs = { |
|
154 |
MODE_REVISION: (revsearch, |
|
|
155 |
MODE_KEYWORD: (keywordsearch, |
|
|
156 |
MODE_REVSET: (revsetsearch, |
|
|
154 | MODE_REVISION: (revsearch, 'exact revision search'), | |
|
155 | MODE_KEYWORD: (keywordsearch, 'literal keyword search'), | |
|
156 | MODE_REVSET: (revsetsearch, 'revset expression search'), | |
|
157 | 157 | } |
|
158 | 158 | |
|
159 | 159 | def getsearchmode(query): |
@@ -106,6 +106,12 b' def findliteralblocks(blocks):' | |||
|
106 | 106 | # Partially minimized form: remove space and both |
|
107 | 107 | # colons. |
|
108 | 108 | blocks[i]['lines'][-1] = blocks[i]['lines'][-1][:-3] |
|
109 | elif len(blocks[i]['lines']) == 1 and \ | |
|
110 | blocks[i]['lines'][0].lstrip(' ').startswith('.. ') and \ | |
|
111 | blocks[i]['lines'][0].find(' ', 3) == -1: | |
|
112 | # directive on its onw line, not a literal block | |
|
113 | i += 1 | |
|
114 | continue | |
|
109 | 115 | else: |
|
110 | 116 | # Fully minimized form: remove just one colon. |
|
111 | 117 | blocks[i]['lines'][-1] = blocks[i]['lines'][-1][:-1] |
@@ -375,6 +381,9 b' def addmargins(blocks):' | |||
|
375 | 381 | if (blocks[i]['type'] == blocks[i - 1]['type'] and |
|
376 | 382 | blocks[i]['type'] in ('bullet', 'option', 'field')): |
|
377 | 383 | i += 1 |
|
384 | elif not blocks[i - 1]['lines']: | |
|
385 | # no lines in previous block, do not seperate | |
|
386 | i += 1 | |
|
378 | 387 | else: |
|
379 | 388 | blocks.insert(i, dict(lines=[''], indent=0, type='margin')) |
|
380 | 389 | i += 2 |
@@ -447,6 +456,8 b' def formatblock(block, width):' | |||
|
447 | 456 | indent = ' ' * block['indent'] |
|
448 | 457 | if block['type'] == 'admonition': |
|
449 | 458 | admonition = _admonitiontitles[block['admonitiontitle']] |
|
459 | if not block['lines']: | |
|
460 | return indent + admonition + '\n' | |
|
450 | 461 | hang = len(block['lines'][-1]) - len(block['lines'][-1].lstrip()) |
|
451 | 462 | |
|
452 | 463 | defindent = indent + hang * ' ' |
@@ -625,9 +636,9 b' def parse(text, indent=0, keep=None):' | |||
|
625 | 636 | blocks = splitparagraphs(blocks) |
|
626 | 637 | blocks = updatefieldlists(blocks) |
|
627 | 638 | blocks = updateoptionlists(blocks) |
|
639 | blocks = findadmonitions(blocks) | |
|
628 | 640 | blocks = addmargins(blocks) |
|
629 | 641 | blocks = prunecomments(blocks) |
|
630 | blocks = findadmonitions(blocks) | |
|
631 | 642 | return blocks, pruned |
|
632 | 643 | |
|
633 | 644 | def formatblocks(blocks, width): |
@@ -563,7 +563,7 b' def copyfiles(src, dst, hardlink=None):' | |||
|
563 | 563 | lpt1 lpt2 lpt3 lpt4 lpt5 lpt6 lpt7 lpt8 lpt9'''.split() |
|
564 | 564 | _winreservedchars = ':*?"<>|' |
|
565 | 565 | def checkwinfilename(path): |
|
566 | '''Check that the base-relative path is a valid filename on Windows. | |
|
566 | r'''Check that the base-relative path is a valid filename on Windows. | |
|
567 | 567 | Returns None if the path is ok, or a UI string describing the problem. |
|
568 | 568 | |
|
569 | 569 | >>> checkwinfilename("just/a/normal/path") |
@@ -577,11 +577,19 b' def checkwinfilename(path):' | |||
|
577 | 577 | >>> checkwinfilename("foo/bar/bla:.txt") |
|
578 | 578 | "filename contains ':', which is reserved on Windows" |
|
579 | 579 | >>> checkwinfilename("foo/bar/b\07la.txt") |
|
580 |
"filename contains '\\ |
|
|
580 | "filename contains '\\x07', which is invalid on Windows" | |
|
581 | 581 | >>> checkwinfilename("foo/bar/bla ") |
|
582 | 582 | "filename ends with ' ', which is not allowed on Windows" |
|
583 | 583 | >>> checkwinfilename("../bar") |
|
584 | >>> checkwinfilename("foo\\") | |
|
585 | "filename ends with '\\', which is invalid on Windows" | |
|
586 | >>> checkwinfilename("foo\\/bar") | |
|
587 | "directory name ends with '\\', which is invalid on Windows" | |
|
584 | 588 | ''' |
|
589 | if path.endswith('\\'): | |
|
590 | return _("filename ends with '\\', which is invalid on Windows") | |
|
591 | if '\\/' in path: | |
|
592 | return _("directory name ends with '\\', which is invalid on Windows") | |
|
585 | 593 | for n in path.replace('\\', '/').split('/'): |
|
586 | 594 | if not n: |
|
587 | 595 | continue |
@@ -185,12 +185,20 b'' | |||
|
185 | 185 | $ cat > warning.t <<EOF |
|
186 | 186 | > $ function warnonly { |
|
187 | 187 | > > } |
|
188 | > $ diff -N aaa | |
|
189 | > $ function onwarn {} | |
|
188 | 190 | > EOF |
|
189 | 191 | $ "$check_code" warning.t |
|
190 | 192 | $ "$check_code" --warn warning.t |
|
191 | 193 | warning.t:1: |
|
192 | 194 | > $ function warnonly { |
|
193 | 195 | warning: don't use 'function', use old style |
|
196 | warning.t:3: | |
|
197 | > $ diff -N aaa | |
|
198 | warning: don't use 'diff -N' | |
|
199 | warning.t:4: | |
|
200 | > $ function onwarn {} | |
|
201 | warning: don't use 'function', use old style | |
|
194 | 202 | [1] |
|
195 | 203 | $ cat > raise-format.py <<EOF |
|
196 | 204 | > raise SomeException, message |
@@ -204,3 +212,42 b'' | |||
|
204 | 212 | don't use old-style two-argument raise, use Exception(message) |
|
205 | 213 | [1] |
|
206 | 214 | |
|
215 | $ cat > rst.py <<EOF | |
|
216 | > """problematic rst text | |
|
217 | > | |
|
218 | > .. note:: | |
|
219 | > wrong | |
|
220 | > """ | |
|
221 | > | |
|
222 | > ''' | |
|
223 | > | |
|
224 | > .. note:: | |
|
225 | > | |
|
226 | > valid | |
|
227 | > | |
|
228 | > new text | |
|
229 | > | |
|
230 | > .. note:: | |
|
231 | > | |
|
232 | > also valid | |
|
233 | > ''' | |
|
234 | > | |
|
235 | > """mixed | |
|
236 | > | |
|
237 | > .. note:: | |
|
238 | > | |
|
239 | > good | |
|
240 | > | |
|
241 | > .. note:: | |
|
242 | > plus bad | |
|
243 | > """ | |
|
244 | > EOF | |
|
245 | $ $check_code -w rst.py | |
|
246 | rst.py:3: | |
|
247 | > .. note:: | |
|
248 | warning: add two newlines after '.. note::' | |
|
249 | rst.py:26: | |
|
250 | > .. note:: | |
|
251 | warning: add two newlines after '.. note::' | |
|
252 | [1] | |
|
253 |
@@ -131,6 +131,13 b" Check hgweb's load order:" | |||
|
131 | 131 | |
|
132 | 132 | Check "from __future__ import absolute_import" support for external libraries |
|
133 | 133 | |
|
134 | #if windows | |
|
135 | $ PATHSEP=";" | |
|
136 | #else | |
|
137 | $ PATHSEP=":" | |
|
138 | #endif | |
|
139 | $ export PATHSEP | |
|
140 | ||
|
134 | 141 | $ mkdir $TESTTMP/libroot |
|
135 | 142 | $ echo "s = 'libroot/ambig.py'" > $TESTTMP/libroot/ambig.py |
|
136 | 143 | $ mkdir $TESTTMP/libroot/mod |
@@ -148,9 +155,9 b' Check "from __future__ import absolute_i' | |||
|
148 | 155 | > def extsetup(): |
|
149 | 156 | > print 'ambigabs.s=%s' % ambigabs.s |
|
150 | 157 | > EOF |
|
151 |
$ (PYTHONPATH=$PYTHONPATH |
|
|
158 | $ (PYTHONPATH=${PYTHONPATH}${PATHSEP}${TESTTMP}/libroot; hg --config extensions.loadabs=loadabs.py root) | |
|
152 | 159 | ambigabs.s=libroot/ambig.py |
|
153 | $TESTTMP/a | |
|
160 | $TESTTMP/a (glob) | |
|
154 | 161 | #endif |
|
155 | 162 | |
|
156 | 163 | #if no-py3k |
@@ -163,9 +170,9 b' Check "from __future__ import absolute_i' | |||
|
163 | 170 | > def extsetup(): |
|
164 | 171 | > print 'ambigrel.s=%s' % ambigrel.s |
|
165 | 172 | > EOF |
|
166 |
$ (PYTHONPATH=$PYTHONPATH |
|
|
173 | $ (PYTHONPATH=${PYTHONPATH}${PATHSEP}${TESTTMP}/libroot; hg --config extensions.loadrel=loadrel.py root) | |
|
167 | 174 | ambigrel.s=libroot/mod/ambig.py |
|
168 | $TESTTMP/a | |
|
175 | $TESTTMP/a (glob) | |
|
169 | 176 | #endif |
|
170 | 177 | |
|
171 | 178 | Check absolute/relative import of extension specific modules |
@@ -220,10 +227,10 b' Check absolute/relative import of extens' | |||
|
220 | 227 | (extroot) import extroot: this is extroot.__init__ |
|
221 | 228 | (extroot) from extroot.bar import s: this is extroot.bar |
|
222 | 229 | (extroot) import extroot.bar in func(): this is extroot.bar |
|
223 | $TESTTMP/a | |
|
230 | $TESTTMP/a (glob) | |
|
224 | 231 | |
|
225 | 232 | #if no-py3k |
|
226 |
$ rm |
|
|
233 | $ rm "$TESTTMP"/extroot/foo.* | |
|
227 | 234 | $ cat > $TESTTMP/extroot/foo.py <<EOF |
|
228 | 235 | > # test relative import |
|
229 | 236 | > buf = [] |
@@ -256,7 +263,7 b' Check absolute/relative import of extens' | |||
|
256 | 263 | (extroot) import sub1: this is extroot.sub1.__init__ |
|
257 | 264 | (extroot) from bar import s: this is extroot.bar |
|
258 | 265 | (extroot) import bar in func(): this is extroot.bar |
|
259 | $TESTTMP/a | |
|
266 | $TESTTMP/a (glob) | |
|
260 | 267 | #endif |
|
261 | 268 | |
|
262 | 269 | $ cd .. |
@@ -732,59 +739,59 b' Commands handling multiple repositories ' | |||
|
732 | 739 | $ echo '# enable extension locally' >> src/.hg/hgrc |
|
733 | 740 | $ echo "reposetuptest = $TESTTMP/reposetuptest.py" >> src/.hg/hgrc |
|
734 | 741 | $ hg -R src status |
|
735 | reposetup() for $TESTTMP/reposetup-test/src | |
|
742 | reposetup() for $TESTTMP/reposetup-test/src (glob) | |
|
736 | 743 | |
|
737 | 744 | $ hg clone -U src clone-dst1 |
|
738 | reposetup() for $TESTTMP/reposetup-test/src | |
|
745 | reposetup() for $TESTTMP/reposetup-test/src (glob) | |
|
739 | 746 | $ hg init push-dst1 |
|
740 | 747 | $ hg -q -R src push push-dst1 |
|
741 | reposetup() for $TESTTMP/reposetup-test/src | |
|
748 | reposetup() for $TESTTMP/reposetup-test/src (glob) | |
|
742 | 749 | $ hg init pull-src1 |
|
743 | 750 | $ hg -q -R pull-src1 pull src |
|
744 | reposetup() for $TESTTMP/reposetup-test/src | |
|
751 | reposetup() for $TESTTMP/reposetup-test/src (glob) | |
|
745 | 752 | |
|
746 | 753 | $ echo '[extensions]' >> $HGRCPATH |
|
747 | 754 | $ echo '# disable extension globally and explicitly' >> $HGRCPATH |
|
748 | 755 | $ echo 'reposetuptest = !' >> $HGRCPATH |
|
749 | 756 | $ hg clone -U src clone-dst2 |
|
750 | reposetup() for $TESTTMP/reposetup-test/src | |
|
757 | reposetup() for $TESTTMP/reposetup-test/src (glob) | |
|
751 | 758 | $ hg init push-dst2 |
|
752 | 759 | $ hg -q -R src push push-dst2 |
|
753 | reposetup() for $TESTTMP/reposetup-test/src | |
|
760 | reposetup() for $TESTTMP/reposetup-test/src (glob) | |
|
754 | 761 | $ hg init pull-src2 |
|
755 | 762 | $ hg -q -R pull-src2 pull src |
|
756 | reposetup() for $TESTTMP/reposetup-test/src | |
|
763 | reposetup() for $TESTTMP/reposetup-test/src (glob) | |
|
757 | 764 | |
|
758 | 765 | $ echo '[extensions]' >> $HGRCPATH |
|
759 | 766 | $ echo '# enable extension globally' >> $HGRCPATH |
|
760 | 767 | $ echo "reposetuptest = $TESTTMP/reposetuptest.py" >> $HGRCPATH |
|
761 | 768 | $ hg clone -U src clone-dst3 |
|
762 | reposetup() for $TESTTMP/reposetup-test/src | |
|
763 | reposetup() for $TESTTMP/reposetup-test/clone-dst3 | |
|
769 | reposetup() for $TESTTMP/reposetup-test/src (glob) | |
|
770 | reposetup() for $TESTTMP/reposetup-test/clone-dst3 (glob) | |
|
764 | 771 | $ hg init push-dst3 |
|
765 | reposetup() for $TESTTMP/reposetup-test/push-dst3 | |
|
772 | reposetup() for $TESTTMP/reposetup-test/push-dst3 (glob) | |
|
766 | 773 | $ hg -q -R src push push-dst3 |
|
767 | reposetup() for $TESTTMP/reposetup-test/src | |
|
768 | reposetup() for $TESTTMP/reposetup-test/push-dst3 | |
|
774 | reposetup() for $TESTTMP/reposetup-test/src (glob) | |
|
775 | reposetup() for $TESTTMP/reposetup-test/push-dst3 (glob) | |
|
769 | 776 | $ hg init pull-src3 |
|
770 | reposetup() for $TESTTMP/reposetup-test/pull-src3 | |
|
777 | reposetup() for $TESTTMP/reposetup-test/pull-src3 (glob) | |
|
771 | 778 | $ hg -q -R pull-src3 pull src |
|
772 | reposetup() for $TESTTMP/reposetup-test/pull-src3 | |
|
773 | reposetup() for $TESTTMP/reposetup-test/src | |
|
779 | reposetup() for $TESTTMP/reposetup-test/pull-src3 (glob) | |
|
780 | reposetup() for $TESTTMP/reposetup-test/src (glob) | |
|
774 | 781 | |
|
775 | 782 | $ echo '[extensions]' >> src/.hg/hgrc |
|
776 | 783 | $ echo '# disable extension locally' >> src/.hg/hgrc |
|
777 | 784 | $ echo 'reposetuptest = !' >> src/.hg/hgrc |
|
778 | 785 | $ hg clone -U src clone-dst4 |
|
779 | reposetup() for $TESTTMP/reposetup-test/clone-dst4 | |
|
786 | reposetup() for $TESTTMP/reposetup-test/clone-dst4 (glob) | |
|
780 | 787 | $ hg init push-dst4 |
|
781 | reposetup() for $TESTTMP/reposetup-test/push-dst4 | |
|
788 | reposetup() for $TESTTMP/reposetup-test/push-dst4 (glob) | |
|
782 | 789 | $ hg -q -R src push push-dst4 |
|
783 | reposetup() for $TESTTMP/reposetup-test/push-dst4 | |
|
790 | reposetup() for $TESTTMP/reposetup-test/push-dst4 (glob) | |
|
784 | 791 | $ hg init pull-src4 |
|
785 | reposetup() for $TESTTMP/reposetup-test/pull-src4 | |
|
792 | reposetup() for $TESTTMP/reposetup-test/pull-src4 (glob) | |
|
786 | 793 | $ hg -q -R pull-src4 pull src |
|
787 | reposetup() for $TESTTMP/reposetup-test/pull-src4 | |
|
794 | reposetup() for $TESTTMP/reposetup-test/pull-src4 (glob) | |
|
788 | 795 | |
|
789 | 796 | disabling in command line overlays with all configuration |
|
790 | 797 | $ hg --config extensions.reposetuptest=! clone -U src clone-dst5 |
@@ -827,8 +834,8 b' disabling in command line overlays with ' | |||
|
827 | 834 | $ echo "reposetuptest = $TESTTMP/reposetuptest.py" >> parent/.hg/hgrc |
|
828 | 835 | $ cp parent/.hg/hgrc parent/sub2/.hg/hgrc |
|
829 | 836 | $ hg -R parent status -S -A |
|
830 | reposetup() for $TESTTMP/reposetup-test/parent | |
|
831 | reposetup() for $TESTTMP/reposetup-test/parent/sub2 | |
|
837 | reposetup() for $TESTTMP/reposetup-test/parent (glob) | |
|
838 | reposetup() for $TESTTMP/reposetup-test/parent/sub2 (glob) | |
|
832 | 839 | C .hgsub |
|
833 | 840 | C .hgsubstate |
|
834 | 841 | C sub1/1 |
General Comments 0
You need to be logged in to leave comments.
Login now