Show More
@@ -257,3 +257,4 b' 71bd09bebbe36a09569cbfb388f371433360056b' | |||||
257 | 136902b3a95db38854ebaf5198a627641065c2ea 0 iQHNBAABCgA3FiEEH2b4zfZU6QXBHaBhoR4BzQ4F2VYFAmWgHCIZHGFscGhhcmVAcmFwaGFlbGdvbWVzLmRldgAKCRChHgHNDgXZVtVFDACX0F3mxc9xtIlaQaze8z9LnTg0dluNZiuM2C74o9jdVW5Jq+jhF7HjiGxRr2D5a/RhaPHg3bgRSf3Pjm0js9XSE0D9+HHZW3t29M37ShgknA2g9N1kADXkrg5frdOHYfa9tqhyWp78Vupydkh08iK4/5Prb/EPrDF3+GXwOJcIJ7xo4aQ7MVjwAzQkbUjzVqDd4x4HCRsT1jzUetnzuPXB6nWXcM521wbQjD9s4PceaAFPNyYXnckuSaNribSyCU6t3IqgMSxIr73khijc3+yCFHyTznEa3fNI7gp1VJygi69Ukt18YWJOG/dm0GGHvKunQUKcYFAAX2FY7NnQAqI/zqUDyg2vHE3ufy/F2tmNbpOnVuOz2/YYlIcTSF4llyt80IB89WrfdwTZqNUfZcwPgFG8ajW5v/jHvic5DZSxvDfmCvNIxhtOoz8BVZMXi3DzDOMbT20D9leCcBwmHoFYNAZC/z4QwkrXFgrbFiy27Sj5LqFqO1hlY3NVpk01F2w= |
|
257 | 136902b3a95db38854ebaf5198a627641065c2ea 0 iQHNBAABCgA3FiEEH2b4zfZU6QXBHaBhoR4BzQ4F2VYFAmWgHCIZHGFscGhhcmVAcmFwaGFlbGdvbWVzLmRldgAKCRChHgHNDgXZVtVFDACX0F3mxc9xtIlaQaze8z9LnTg0dluNZiuM2C74o9jdVW5Jq+jhF7HjiGxRr2D5a/RhaPHg3bgRSf3Pjm0js9XSE0D9+HHZW3t29M37ShgknA2g9N1kADXkrg5frdOHYfa9tqhyWp78Vupydkh08iK4/5Prb/EPrDF3+GXwOJcIJ7xo4aQ7MVjwAzQkbUjzVqDd4x4HCRsT1jzUetnzuPXB6nWXcM521wbQjD9s4Pce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7mwiRu7oK74xqLbHAks+vMnShTsl0r4XQUhi82Oka6cpt/Fh6gEjpvIkkAf9DiwGHzhqEJao+hh3lkumKyQmBu5UOUhiN7B0/8LT/o2lt2FR64uQPl8lAfLpMBDDbanvy9OQcZDtFym8TxT56oWc2JlGwFgjhoa2LvoSeRkX8sTABBPDmfa6sdzoJoE0CTSqYwcn0j39pkTnCFX7Ku9KAIi+1OlVWVYYlz1KbeajGqwdCgCkjJE/Mz5glvJqSbzh+0Gw3T4NYBCcXPnwmUShLMxprG1V7l19r8DkfG2KYOSw57l2VJ+nVhq6m+3MAqr58k6EcHqI= |
@@ -273,3 +273,4 b' 71bd09bebbe36a09569cbfb388f371433360056b' | |||||
273 | 136902b3a95db38854ebaf5198a627641065c2ea 6.6.2 |
|
273 | 136902b3a95db38854ebaf5198a627641065c2ea 6.6.2 | |
274 | 3fd1efb3ad124e6686c0fb66e6943cd8aeea5681 6.6.3 |
|
274 | 3fd1efb3ad124e6686c0fb66e6943cd8aeea5681 6.6.3 | |
275 | d1d48d18db37106b801ef6cb90955536458e7ffc 6.7rc0 |
|
275 | d1d48d18db37106b801ef6cb90955536458e7ffc 6.7rc0 | |
|
276 | c9ceb4f6025690167bdb245e530de6bac8baae95 6.7 |
@@ -8,7 +8,7 b'' | |||||
8 |
|
8 | |||
9 | "Don't use a chainsaw to cut your food!" |
|
9 | "Don't use a chainsaw to cut your food!" | |
10 |
|
10 | |||
11 |
The chainsaw |
|
11 | The chainsaw is a collection of commands that are so much geared towards a | |
12 | specific use case in a specific context or environment that they are totally |
|
12 | specific use case in a specific context or environment that they are totally | |
13 | inappropriate and **really dangerous** in other contexts. |
|
13 | inappropriate and **really dangerous** in other contexts. | |
14 |
|
14 | |||
@@ -21,25 +21,20 b' variable (see :hg:`help scripting`).' | |||||
21 |
|
21 | |||
22 | import shutil |
|
22 | import shutil | |
23 |
|
23 | |||
24 |
from |
|
24 | from ..i18n import _ | |
25 |
from |
|
25 | from .. import ( | |
26 | cmdutil, |
|
26 | cmdutil, | |
27 | commands, |
|
27 | commands, | |
28 | error, |
|
28 | error, | |
29 | localrepo, |
|
29 | localrepo, | |
30 | registrar, |
|
30 | registrar, | |
31 | ) |
|
31 | ) | |
32 |
from |
|
32 | from ..utils import ( | |
33 | urlutil, |
|
33 | urlutil, | |
34 | ) |
|
34 | ) | |
35 |
|
35 | |||
36 | cmdtable = {} |
|
36 | cmdtable = {} | |
37 | command = registrar.command(cmdtable) |
|
37 | command = registrar.command(cmdtable) | |
38 | # Note for extension authors: ONLY specify testedwith = 'ships-with-hg-core' for |
|
|||
39 | # extensions which SHIP WITH MERCURIAL. Non-mainline extensions should |
|
|||
40 | # be specifying the version(s) of Mercurial they are tested with, or |
|
|||
41 | # leave the attribute unspecified. |
|
|||
42 | testedwith = b'ships-with-hg-core' |
|
|||
43 |
|
38 | |||
44 |
|
39 | |||
45 | @command( |
|
40 | @command( |
@@ -6,11 +6,12 b'' | |||||
6 | # GNU General Public License version 2 or any later version. |
|
6 | # GNU General Public License version 2 or any later version. | |
7 |
|
7 | |||
8 | from .i18n import _ |
|
8 | from .i18n import _ | |
9 | from .admin import verify |
|
9 | from .admin import chainsaw, verify | |
10 | from . import error, registrar, transaction |
|
10 | from . import error, registrar, transaction | |
11 |
|
11 | |||
12 |
|
12 | |||
13 | table = {} |
|
13 | table = {} | |
|
14 | table.update(chainsaw.command._table) | |||
14 | command = registrar.command(table) |
|
15 | command = registrar.command(table) | |
15 |
|
16 | |||
16 |
|
17 |
@@ -880,7 +880,7 b' class revbranchcache:' | |||||
880 |
|
880 | |||
881 | if self._names: |
|
881 | if self._names: | |
882 | try: |
|
882 | try: | |
883 |
if repo.ui.configbool(b' |
|
883 | if repo.ui.configbool(b'storage', b'revbranchcache.mmap'): | |
884 | with repo.cachevfs(_rbcrevs) as fp: |
|
884 | with repo.cachevfs(_rbcrevs) as fp: | |
885 | data = util.buffer(util.mmapread(fp)) |
|
885 | data = util.buffer(util.mmapread(fp)) | |
886 | else: |
|
886 | else: |
@@ -583,6 +583,11 b' default-type = "list_type"' | |||||
583 |
|
583 | |||
584 | [[items]] |
|
584 | [[items]] | |
585 | section = "devel" |
|
585 | section = "devel" | |
|
586 | name = "lock-wait-sync-file" | |||
|
587 | default = "" | |||
|
588 | ||||
|
589 | [[items]] | |||
|
590 | section = "devel" | |||
586 | name = "persistent-nodemap" |
|
591 | name = "persistent-nodemap" | |
587 | default = false |
|
592 | default = false | |
588 | documentation = """When true, revlogs use a special reference version of the \ |
|
593 | documentation = """When true, revlogs use a special reference version of the \ | |
@@ -1160,6 +1165,19 b' name = "[^:]*:required"' | |||||
1160 | default = false |
|
1165 | default = false | |
1161 | generic = true |
|
1166 | generic = true | |
1162 |
|
1167 | |||
|
1168 | ||||
|
1169 | # The format section is dedicated to control of the repository on disk format | |||
|
1170 | # and constraints. | |||
|
1171 | # | |||
|
1172 | # A format change affects which data is expected to be stored in the repository | |||
|
1173 | # and how. It impacts other client whichever their version are, format change | |||
|
1174 | # often comes with an associated entry in the requirements. | |||
|
1175 | # | |||
|
1176 | # The option are usually in the form `use-xxx-yyy` (with xxx-yy the feature name). | |||
|
1177 | # | |||
|
1178 | # To configure details of how the repository is accessed, without affect the | |||
|
1179 | # repository formats, see the `storage section`. | |||
|
1180 | ||||
1163 | [[items]] |
|
1181 | [[items]] | |
1164 | section = "format" |
|
1182 | section = "format" | |
1165 | name = "bookmarks-in-store" |
|
1183 | name = "bookmarks-in-store" | |
@@ -2102,6 +2120,15 b' name = "missingwarning"' | |||||
2102 | default = true |
|
2120 | default = true | |
2103 | experimental = true |
|
2121 | experimental = true | |
2104 |
|
2122 | |||
|
2123 | ||||
|
2124 | # The "storage" section house config options that change how the repository | |||
|
2125 | # data are accessed by the current process but does not affects the on disk | |||
|
2126 | # format. They can also adjust how the storage is computed, but without affect | |||
|
2127 | # compatibility wither other clients. | |||
|
2128 | # | |||
|
2129 | # For deeper format change, see the `format` section. | |||
|
2130 | ||||
|
2131 | ||||
2105 | [[items]] |
|
2132 | [[items]] | |
2106 | section = "storage" |
|
2133 | section = "storage" | |
2107 | name = "dirstate-v2.slow-path" |
|
2134 | name = "dirstate-v2.slow-path" | |
@@ -2110,6 +2137,11 b' experimental = true # experimental as l' | |||||
2110 |
|
2137 | |||
2111 | [[items]] |
|
2138 | [[items]] | |
2112 | section = "storage" |
|
2139 | section = "storage" | |
|
2140 | name = "revbranchcache.mmap" | |||
|
2141 | default = true | |||
|
2142 | ||||
|
2143 | [[items]] | |||
|
2144 | section = "storage" | |||
2113 | name = "new-repo-backend" |
|
2145 | name = "new-repo-backend" | |
2114 | default = "revlogv1" |
|
2146 | default = "revlogv1" | |
2115 | experimental = true |
|
2147 | experimental = true | |
@@ -2913,8 +2945,3 b' section = "blackbox"' | |||||
2913 | name = "date-format" |
|
2945 | name = "date-format" | |
2914 | default = "" |
|
2946 | default = "" | |
2915 | in_core_extension = "blackbox" |
|
2947 | in_core_extension = "blackbox" | |
2916 |
|
||||
2917 | [[items]] |
|
|||
2918 | section = "format" |
|
|||
2919 | name = "mmap-revbranchcache" |
|
|||
2920 | default = false |
|
@@ -1563,7 +1563,6 b' class curseschunkselector:' | |||||
1563 | def sigwinchhandler(self, n, frame): |
|
1563 | def sigwinchhandler(self, n, frame): | |
1564 | """handle window resizing""" |
|
1564 | """handle window resizing""" | |
1565 | try: |
|
1565 | try: | |
1566 | curses.endwin() |
|
|||
1567 | self.xscreensize, self.yscreensize = scmutil.termsize(self.ui) |
|
1566 | self.xscreensize, self.yscreensize = scmutil.termsize(self.ui) | |
1568 | self.statuswin.resize(self.numstatuslines, self.xscreensize) |
|
1567 | self.statuswin.resize(self.numstatuslines, self.xscreensize) | |
1569 | self.numpadlines = self.getnumlinesdisplayed(ignorefolding=True) + 1 |
|
1568 | self.numpadlines = self.getnumlinesdisplayed(ignorefolding=True) + 1 | |
@@ -1694,7 +1693,6 b' smaller changesets. the following are va' | |||||
1694 |
|
1693 | |||
1695 | curses.raw() |
|
1694 | curses.raw() | |
1696 | curses.def_prog_mode() |
|
1695 | curses.def_prog_mode() | |
1697 | curses.endwin() |
|
|||
1698 | self.commenttext = self.ui.edit(self.commenttext, self.ui.username()) |
|
1696 | self.commenttext = self.ui.edit(self.commenttext, self.ui.username()) | |
1699 | curses.cbreak() |
|
1697 | curses.cbreak() | |
1700 | self.stdscr.refresh() |
|
1698 | self.stdscr.refresh() |
@@ -3072,6 +3072,9 b' class localrepository:' | |||||
3072 | warntimeout = self.ui.configint(b"ui", b"timeout.warn") |
|
3072 | warntimeout = self.ui.configint(b"ui", b"timeout.warn") | |
3073 | # internal config: ui.signal-safe-lock |
|
3073 | # internal config: ui.signal-safe-lock | |
3074 | signalsafe = self.ui.configbool(b'ui', b'signal-safe-lock') |
|
3074 | signalsafe = self.ui.configbool(b'ui', b'signal-safe-lock') | |
|
3075 | sync_file = self.ui.config(b'devel', b'lock-wait-sync-file') | |||
|
3076 | if not sync_file: | |||
|
3077 | sync_file = None | |||
3075 |
|
3078 | |||
3076 | l = lockmod.trylock( |
|
3079 | l = lockmod.trylock( | |
3077 | self.ui, |
|
3080 | self.ui, | |
@@ -3083,6 +3086,7 b' class localrepository:' | |||||
3083 | acquirefn=acquirefn, |
|
3086 | acquirefn=acquirefn, | |
3084 | desc=desc, |
|
3087 | desc=desc, | |
3085 | signalsafe=signalsafe, |
|
3088 | signalsafe=signalsafe, | |
|
3089 | devel_wait_sync_file=sync_file, | |||
3086 | ) |
|
3090 | ) | |
3087 | return l |
|
3091 | return l | |
3088 |
|
3092 |
@@ -115,6 +115,7 b' def trylock(ui, vfs, lockname, timeout, ' | |||||
115 |
|
115 | |||
116 | This function is responsible to issue warnings and or debug messages about |
|
116 | This function is responsible to issue warnings and or debug messages about | |
117 | the held lock while trying to acquires it.""" |
|
117 | the held lock while trying to acquires it.""" | |
|
118 | devel_wait_file = kwargs.pop("devel_wait_sync_file", None) | |||
118 |
|
119 | |||
119 | def printwarning(printer, locker): |
|
120 | def printwarning(printer, locker): | |
120 | """issue the usual "waiting on lock" message through any channel""" |
|
121 | """issue the usual "waiting on lock" message through any channel""" | |
@@ -150,6 +151,11 b' def trylock(ui, vfs, lockname, timeout, ' | |||||
150 | l._trylock() |
|
151 | l._trylock() | |
151 | break |
|
152 | break | |
152 | except error.LockHeld as inst: |
|
153 | except error.LockHeld as inst: | |
|
154 | if devel_wait_file is not None: | |||
|
155 | # create the file to signal we are waiting | |||
|
156 | with open(devel_wait_file, 'w'): | |||
|
157 | pass | |||
|
158 | ||||
153 | if delay == debugidx: |
|
159 | if delay == debugidx: | |
154 | printwarning(ui.debug, inst.locker) |
|
160 | printwarning(ui.debug, inst.locker) | |
155 | if delay == warningidx: |
|
161 | if delay == warningidx: |
@@ -468,10 +468,10 b' def geteffectflag(source, successors):' | |||||
468 |
|
468 | |||
469 | # Check if other meta has changed |
|
469 | # Check if other meta has changed | |
470 | changeextra = changectx.extra().items() |
|
470 | changeextra = changectx.extra().items() | |
471 |
ctxmeta = |
|
471 | ctxmeta = sorted(filter(metanotblacklisted, changeextra)) | |
472 |
|
472 | |||
473 | sourceextra = source.extra().items() |
|
473 | sourceextra = source.extra().items() | |
474 |
srcmeta = |
|
474 | srcmeta = sorted(filter(metanotblacklisted, sourceextra)) | |
475 |
|
475 | |||
476 | if ctxmeta != srcmeta: |
|
476 | if ctxmeta != srcmeta: | |
477 | effects |= METACHANGED |
|
477 | effects |= METACHANGED |
@@ -703,6 +703,7 b' class phasecache:' | |||||
703 | return set() |
|
703 | return set() | |
704 |
|
704 | |||
705 | # search for affected high phase changesets and roots |
|
705 | # search for affected high phase changesets and roots | |
|
706 | seen = set(new_revs) | |||
706 | push = heapq.heappush |
|
707 | push = heapq.heappush | |
707 | pop = heapq.heappop |
|
708 | pop = heapq.heappop | |
708 | parents = cl.parentrevs |
|
709 | parents = cl.parentrevs | |
@@ -735,9 +736,11 b' class phasecache:' | |||||
735 | # higher phases |
|
736 | # higher phases | |
736 | delroots.add(current) |
|
737 | delroots.add(current) | |
737 | # schedule a walk down if needed |
|
738 | # schedule a walk down if needed | |
738 | if p1_phase > targetphase: |
|
739 | if p1_phase > targetphase and p1 not in seen: | |
|
740 | seen.add(p1) | |||
739 | push(revs, -p1) |
|
741 | push(revs, -p1) | |
740 | if p2_phase > targetphase: |
|
742 | if p2_phase > targetphase and p2 not in seen: | |
|
743 | seen.add(p2) | |||
741 | push(revs, -p2) |
|
744 | push(revs, -p2) | |
742 | if p1_phase < targetphase and p2_phase < targetphase: |
|
745 | if p1_phase < targetphase and p2_phase < targetphase: | |
743 | new_target_roots.add(current) |
|
746 | new_target_roots.add(current) |
@@ -1,7 +1,4 b'' | |||||
1 |
= Mercurial 6.7 |
|
1 | = Mercurial 6.7 = | |
2 |
|
||||
3 | /!\ These are **tentative** release notes for the upcoming Mercurial 6.7. |
|
|||
4 | Anything can be added or removed before the actual release. |
|
|||
5 |
|
2 | |||
6 | As usual, a *lot* of patches don't make it to this list. |
|
3 | As usual, a *lot* of patches don't make it to this list. | |
7 |
|
4 | |||
@@ -20,6 +17,7 b" As usual, a *lot* of patches don't make " | |||||
20 | * annotate: limit output to range of lines |
|
17 | * annotate: limit output to range of lines | |
21 | * unbundle: faster computation of changed heads |
|
18 | * unbundle: faster computation of changed heads | |
22 | * Large improvements of some of the phases code (23950e39281f) |
|
19 | * Large improvements of some of the phases code (23950e39281f) | |
|
20 | * rust-filepatterns: export glob_to_re function | |||
23 |
|
21 | |||
24 | == New Experimental Features == |
|
22 | == New Experimental Features == | |
25 |
|
23 | |||
@@ -41,6 +39,11 b" As usual, a *lot* of patches don't make " | |||||
41 | * cext: fix potential memory leaks of list items appended with PyList_Append |
|
39 | * cext: fix potential memory leaks of list items appended with PyList_Append | |
42 | * doc: document that labels must have a dot in them to have an effect |
|
40 | * doc: document that labels must have a dot in them to have an effect | |
43 | * debugformat: fix formatting for compression level |
|
41 | * debugformat: fix formatting for compression level | |
|
42 | * obsutil: sort metadata before comparing in geteffectflag() | |||
|
43 | * crecord: drop calls to `curses.endwin()` | |||
|
44 | * rust-index: don't use mutable borrow for head-diff computation | |||
|
45 | * rust-index: don't use mutable borrow to computed filtered heads | |||
|
46 | ||||
44 |
|
47 | |||
45 | == Backwards Compatibility Changes == |
|
48 | == Backwards Compatibility Changes == | |
46 |
|
49 |
@@ -73,7 +73,7 b' pub enum PatternSyntax {' | |||||
73 | } |
|
73 | } | |
74 |
|
74 | |||
75 | /// Transforms a glob pattern into a regex |
|
75 | /// Transforms a glob pattern into a regex | |
76 | fn glob_to_re(pat: &[u8]) -> Vec<u8> { |
|
76 | pub fn glob_to_re(pat: &[u8]) -> Vec<u8> { | |
77 | let mut input = pat; |
|
77 | let mut input = pat; | |
78 | let mut res: Vec<u8> = vec![]; |
|
78 | let mut res: Vec<u8> = vec![]; | |
79 | let mut group_depth = 0; |
|
79 | let mut group_depth = 0; |
@@ -737,14 +737,11 b' impl RegexMatcher {' | |||||
737 | } |
|
737 | } | |
738 | } |
|
738 | } | |
739 |
|
739 | |||
740 | /// Returns a function that matches an `HgPath` against the given regex |
|
740 | /// Return a `RegexBuilder` from a bytes pattern | |
741 | /// pattern. |
|
|||
742 | /// |
|
741 | /// | |
743 | /// This can fail when the pattern is invalid or not supported by the |
|
742 | /// This works around the fact that even if it works on byte haysacks, | |
744 | /// underlying engine (the `regex` crate), for instance anything with |
|
743 | /// [`regex::bytes::Regex`] still uses UTF-8 patterns. | |
745 | /// back-references. |
|
744 | pub fn re_bytes_builder(pattern: &[u8]) -> regex::bytes::RegexBuilder { | |
746 | #[logging_timer::time("trace")] |
|
|||
747 | fn re_matcher(pattern: &[u8]) -> PatternResult<RegexMatcher> { |
|
|||
748 | use std::io::Write; |
|
745 | use std::io::Write; | |
749 |
|
746 | |||
750 | // The `regex` crate adds `.*` to the start and end of expressions if there |
|
747 | // The `regex` crate adds `.*` to the start and end of expressions if there | |
@@ -764,7 +761,18 b' fn re_matcher(pattern: &[u8]) -> Pattern' | |||||
764 | // # Safety |
|
761 | // # Safety | |
765 | // This is safe because we escaped all non-ASCII bytes. |
|
762 | // This is safe because we escaped all non-ASCII bytes. | |
766 | let pattern_string = unsafe { String::from_utf8_unchecked(escaped_bytes) }; |
|
763 | let pattern_string = unsafe { String::from_utf8_unchecked(escaped_bytes) }; | |
767 |
|
|
764 | regex::bytes::RegexBuilder::new(&pattern_string) | |
|
765 | } | |||
|
766 | ||||
|
767 | /// Returns a function that matches an `HgPath` against the given regex | |||
|
768 | /// pattern. | |||
|
769 | /// | |||
|
770 | /// This can fail when the pattern is invalid or not supported by the | |||
|
771 | /// underlying engine (the `regex` crate), for instance anything with | |||
|
772 | /// back-references. | |||
|
773 | #[logging_timer::time("trace")] | |||
|
774 | fn re_matcher(pattern: &[u8]) -> PatternResult<RegexMatcher> { | |||
|
775 | let re = re_bytes_builder(pattern) | |||
768 | .unicode(false) |
|
776 | .unicode(false) | |
769 | // Big repos with big `.hgignore` will hit the default limit and |
|
777 | // Big repos with big `.hgignore` will hit the default limit and | |
770 | // incur a significant performance hit. One repo's `hg status` hit |
|
778 | // incur a significant performance hit. One repo's `hg status` hit |
@@ -854,7 +854,7 b' impl Index {' | |||||
854 | ) -> PyResult<PyObject> { |
|
854 | ) -> PyResult<PyObject> { | |
855 | let begin = begin.extract::<BaseRevision>(py)?; |
|
855 | let begin = begin.extract::<BaseRevision>(py)?; | |
856 | let end = end.extract::<BaseRevision>(py)?; |
|
856 | let end = end.extract::<BaseRevision>(py)?; | |
857 |
let index = & |
|
857 | let index = &*self.index(py).borrow(); | |
858 | let begin = |
|
858 | let begin = | |
859 | Self::check_revision(index, UncheckedRevision(begin - 1), py)?; |
|
859 | Self::check_revision(index, UncheckedRevision(begin - 1), py)?; | |
860 | let end = Self::check_revision(index, UncheckedRevision(end - 1), py)?; |
|
860 | let end = Self::check_revision(index, UncheckedRevision(end - 1), py)?; | |
@@ -873,7 +873,7 b' impl Index {' | |||||
873 | py: Python, |
|
873 | py: Python, | |
874 | filtered_revs: &PyObject, |
|
874 | filtered_revs: &PyObject, | |
875 | ) -> PyResult<PyObject> { |
|
875 | ) -> PyResult<PyObject> { | |
876 |
let index = & |
|
876 | let index = &*self.index(py).borrow(); | |
877 | let filtered_revs = rev_pyiter_collect(py, filtered_revs, index)?; |
|
877 | let filtered_revs = rev_pyiter_collect(py, filtered_revs, index)?; | |
878 |
|
878 | |||
879 | if let Some(new_heads) = index |
|
879 | if let Some(new_heads) = index |
@@ -2,8 +2,8 b'' | |||||
2 |
|
2 | |||
3 | #if mmap |
|
3 | #if mmap | |
4 | $ cat <<EOF >> $HGRCPATH |
|
4 | $ cat <<EOF >> $HGRCPATH | |
5 |
> [ |
|
5 | > [storage] | |
6 |
> mmap |
|
6 | > revbranchcache.mmap=true | |
7 | > EOF |
|
7 | > EOF | |
8 | #endif |
|
8 | #endif | |
9 |
|
9 |
@@ -5,11 +5,6 b' Tests for the admin::chainsaw-update com' | |||||
5 | setup |
|
5 | setup | |
6 | ===== |
|
6 | ===== | |
7 |
|
7 | |||
8 | $ cat >> $HGRCPATH << EOF |
|
|||
9 | > [extensions] |
|
|||
10 | > chainsaw= |
|
|||
11 | > EOF |
|
|||
12 |
|
||||
13 | $ hg init src |
|
8 | $ hg init src | |
14 | $ cd src |
|
9 | $ cd src | |
15 | $ echo 1 > root |
|
10 | $ echo 1 > root |
@@ -288,7 +288,9 b' print only the last 10 lines, since we a' | |||||
288 | preserved (since setprocname isn't available on py3 and pure version, |
|
288 | preserved (since setprocname isn't available on py3 and pure version, | |
289 | the 10th-most-recent line is different when using py3): |
|
289 | the 10th-most-recent line is different when using py3): | |
290 |
|
290 | |||
291 | $ cat log/server.log.1 log/server.log | tail -10 | filterlog |
|
291 | (the "worker process exited" line is matched independently as it order is unstable with the "exiting" line, the worker might exit before the server decide to exit). | |
|
292 | ||||
|
293 | $ cat log/server.log.1 log/server.log | tail -10 | grep -v "worker process exited" | filterlog | |||
292 | YYYY/MM/DD HH:MM:SS (PID)> confighash = ... mtimehash = ... (no-setprocname !) |
|
294 | YYYY/MM/DD HH:MM:SS (PID)> confighash = ... mtimehash = ... (no-setprocname !) | |
293 | YYYY/MM/DD HH:MM:SS (PID)> forked worker process (pid=...) |
|
295 | YYYY/MM/DD HH:MM:SS (PID)> forked worker process (pid=...) | |
294 | YYYY/MM/DD HH:MM:SS (PID)> setprocname: ... (setprocname !) |
|
296 | YYYY/MM/DD HH:MM:SS (PID)> setprocname: ... (setprocname !) | |
@@ -298,8 +300,9 b' the 10th-most-recent line is different w' | |||||
298 | YYYY/MM/DD HH:MM:SS (PID)> setenv: ... |
|
300 | YYYY/MM/DD HH:MM:SS (PID)> setenv: ... | |
299 | YYYY/MM/DD HH:MM:SS (PID)> confighash = ... mtimehash = ... |
|
301 | YYYY/MM/DD HH:MM:SS (PID)> confighash = ... mtimehash = ... | |
300 | YYYY/MM/DD HH:MM:SS (PID)> validate: [] |
|
302 | YYYY/MM/DD HH:MM:SS (PID)> validate: [] | |
|
303 | YYYY/MM/DD HH:MM:SS (PID)> $TESTTMP/extreload/chgsock/server-... is not owned, exiting. | |||
|
304 | $ cat log/server.log.1 log/server.log | tail -10 | grep "worker process exited" | filterlog | |||
301 | YYYY/MM/DD HH:MM:SS (PID)> worker process exited (pid=...) |
|
305 | YYYY/MM/DD HH:MM:SS (PID)> worker process exited (pid=...) | |
302 | YYYY/MM/DD HH:MM:SS (PID)> $TESTTMP/extreload/chgsock/server-... is not owned, exiting. |
|
|||
303 |
|
306 | |||
304 | global data mutated by schems |
|
307 | global data mutated by schems | |
305 | ----------------------------- |
|
308 | ----------------------------- |
@@ -3,6 +3,7 b' Show all commands except debug commands' | |||||
3 | abort |
|
3 | abort | |
4 | add |
|
4 | add | |
5 | addremove |
|
5 | addremove | |
|
6 | admin::chainsaw-update | |||
6 | admin::verify |
|
7 | admin::verify | |
7 | annotate |
|
8 | annotate | |
8 | archive |
|
9 | archive | |
@@ -66,6 +67,7 b' Show all commands that start with "a"' | |||||
66 | abort |
|
67 | abort | |
67 | add |
|
68 | add | |
68 | addremove |
|
69 | addremove | |
|
70 | admin::chainsaw-update | |||
69 | admin::verify |
|
71 | admin::verify | |
70 | annotate |
|
72 | annotate | |
71 | archive |
|
73 | archive | |
@@ -260,6 +262,7 b' Show all commands + options' | |||||
260 | abort: dry-run |
|
262 | abort: dry-run | |
261 | add: include, exclude, subrepos, dry-run |
|
263 | add: include, exclude, subrepos, dry-run | |
262 | addremove: similarity, subrepos, include, exclude, dry-run |
|
264 | addremove: similarity, subrepos, include, exclude, dry-run | |
|
265 | admin::chainsaw-update: purge-unknown, purge-ignored, rev, source, dest, initial-clone-minimal | |||
263 | admin::verify: check, option |
|
266 | admin::verify: check, option | |
264 | annotate: rev, follow, no-follow, text, user, file, date, number, changeset, line-number, skip, line-range, ignore-all-space, ignore-space-change, ignore-blank-lines, ignore-space-at-eol, include, exclude, template |
|
267 | annotate: rev, follow, no-follow, text, user, file, date, number, changeset, line-number, skip, line-range, ignore-all-space, ignore-space-change, ignore-blank-lines, ignore-space-at-eol, include, exclude, template | |
265 | archive: no-decode, prefix, rev, type, subrepos, include, exclude |
|
268 | archive: no-decode, prefix, rev, type, subrepos, include, exclude |
@@ -5,9 +5,12 b' regular equivalent. Test would fail if g' | |||||
5 | implementation of parentdelta: third manifest revision would be fully |
|
5 | implementation of parentdelta: third manifest revision would be fully | |
6 | inserted due to big distance from its paren revision (zero). |
|
6 | inserted due to big distance from its paren revision (zero). | |
7 |
|
7 | |||
|
8 | (We disable the revlog compression to avoid the annoying instability in the chunk size that depends on the compressors implementation) | |||
|
9 | ||||
8 | $ cat << EOF >> $HGRCPATH |
|
10 | $ cat << EOF >> $HGRCPATH | |
9 | > [format] |
|
11 | > [format] | |
10 | > sparse-revlog = no |
|
12 | > sparse-revlog = no | |
|
13 | > revlog-compression = none | |||
11 | > EOF |
|
14 | > EOF | |
12 |
|
15 | |||
13 | $ hg init repo --config format.generaldelta=no --config format.usegeneraldelta=no |
|
16 | $ hg init repo --config format.generaldelta=no --config format.usegeneraldelta=no | |
@@ -138,12 +141,12 b' Test revlog.optimize-delta-parent-choice' | |||||
138 |
|
141 | |||
139 | - Verify non-aggressive merge uses p1 (commit 1) as delta parent |
|
142 | - Verify non-aggressive merge uses p1 (commit 1) as delta parent | |
140 | $ hg merge -q 0 |
|
143 | $ hg merge -q 0 | |
141 | $ hg commit -q -m merge |
|
144 | $ hg commit -q -m merge --config storage.revlog.optimize-delta-parent-choice=no | |
142 | $ hg debugdeltachain -m |
|
145 | $ hg debugdeltachain -m | |
143 | rev p1 p2 chain# chainlen prev delta |
|
146 | rev p1 p2 chain# chainlen prev delta | |
144 | 0 -1 -1 1 1 -1 base |
|
147 | 0 -1 -1 1 1 -1 base | |
145 |
1 -1 -1 |
|
148 | 1 -1 -1 2 1 -1 base | |
146 |
2 1 0 |
|
149 | 2 1 0 2 2 1 p1 | |
147 |
|
150 | |||
148 | $ hg strip -q -r . --config extensions.strip= |
|
151 | $ hg strip -q -r . --config extensions.strip= | |
149 |
|
152 | |||
@@ -154,7 +157,7 b' Test revlog.optimize-delta-parent-choice' | |||||
154 | $ hg debugdeltachain -m |
|
157 | $ hg debugdeltachain -m | |
155 | rev p1 p2 chain# chainlen prev delta |
|
158 | rev p1 p2 chain# chainlen prev delta | |
156 | 0 -1 -1 1 1 -1 base |
|
159 | 0 -1 -1 1 1 -1 base | |
157 |
1 -1 -1 |
|
160 | 1 -1 -1 2 1 -1 base | |
158 | 2 1 0 1 2 0 p2 |
|
161 | 2 1 0 1 2 0 p2 | |
159 |
|
162 | |||
160 | Test that strip bundle use bundle2 |
|
163 | Test that strip bundle use bundle2 | |
@@ -266,13 +269,13 b' test maxdeltachainspan' | |||||
266 | 46 45 -1 3 29 45 p1 58 1334 1671 1.25262 1671 0 0.00000 |
|
269 | 46 45 -1 3 29 45 p1 58 1334 1671 1.25262 1671 0 0.00000 | |
267 | 47 46 -1 3 30 46 p1 58 1380 1729 1.25290 1729 0 0.00000 |
|
270 | 47 46 -1 3 30 46 p1 58 1380 1729 1.25290 1729 0 0.00000 | |
268 | 48 47 -1 3 31 47 p1 58 1426 1787 1.25316 1787 0 0.00000 |
|
271 | 48 47 -1 3 31 47 p1 58 1426 1787 1.25316 1787 0 0.00000 | |
269 |
49 5 -1 4 1 -1 base |
|
272 | 49 5 -1 4 1 -1 base 317 316 317 1.00316 317 0 0.00000 | |
270 |
50 49 -1 4 2 49 p1 58 362 |
|
273 | 50 49 -1 4 2 49 p1 58 362 375 1.03591 375 0 0.00000 | |
271 | 51 17 -1 4 3 50 prev 3?? 5?? 6?? 1.0???? 6?? 0 0.00000 (glob) |
|
274 | 51 17 -1 5 1 -1 base 595 594 595 1.00168 595 0 0.00000 | |
272 |
52 51 -1 |
|
275 | 52 51 -1 5 2 51 p1 58 640 653 1.02031 653 0 0.00000 | |
273 |
53 52 -1 |
|
276 | 53 52 -1 6 1 -1 base 0 0 0 0.00000 0 0 0.00000 | |
274 |
54 53 -1 |
|
277 | 54 53 -1 7 1 -1 base 641 640 641 1.00156 641 0 0.00000 | |
275 |
$ hg clone --pull source-repo --config experimental.maxdeltachainspan=2 |
|
278 | $ hg clone --pull source-repo --config experimental.maxdeltachainspan=2900 relax-chain --config format.generaldelta=yes | |
276 | requesting all changes |
|
279 | requesting all changes | |
277 | adding changesets |
|
280 | adding changesets | |
278 | adding manifests |
|
281 | adding manifests | |
@@ -332,12 +335,12 b' test maxdeltachainspan' | |||||
332 | 46 45 -1 3 29 45 p1 58 1334 1671 1.25262 1671 0 0.00000 |
|
335 | 46 45 -1 3 29 45 p1 58 1334 1671 1.25262 1671 0 0.00000 | |
333 | 47 46 -1 3 30 46 p1 58 1380 1729 1.25290 1729 0 0.00000 |
|
336 | 47 46 -1 3 30 46 p1 58 1380 1729 1.25290 1729 0 0.00000 | |
334 | 48 47 -1 3 31 47 p1 58 1426 1787 1.25316 1787 0 0.00000 |
|
337 | 48 47 -1 3 31 47 p1 58 1426 1787 1.25316 1787 0 0.00000 | |
335 |
49 5 -1 |
|
338 | 49 5 -1 1 7 5 p1 58 316 389 1.23101 2857 2468 6.34447 | |
336 |
50 49 -1 4 |
|
339 | 50 49 -1 4 1 -1 base 363 362 363 1.00276 363 0 0.00000 | |
337 |
51 17 -1 |
|
340 | 51 17 -1 5 1 -1 base 595 594 595 1.00168 595 0 0.00000 | |
338 |
|
|
341 | 52 51 -1 5 2 51 p1 58 640 653 1.02031 653 0 0.00000 | |
339 | 53 52 -1 6 1 -1 base 0 0 0 0.00000 0 0 0.00000 |
|
342 | 53 52 -1 6 1 -1 base 0 0 0 0.00000 0 0 0.00000 | |
340 |
54 53 -1 7 1 -1 base |
|
343 | 54 53 -1 7 1 -1 base 641 640 641 1.00156 641 0 0.00000 | |
341 | $ hg clone --pull source-repo --config experimental.maxdeltachainspan=0 noconst-chain --config format.usegeneraldelta=yes --config storage.revlog.reuse-external-delta-parent=no |
|
344 | $ hg clone --pull source-repo --config experimental.maxdeltachainspan=0 noconst-chain --config format.usegeneraldelta=yes --config storage.revlog.reuse-external-delta-parent=no | |
342 | requesting all changes |
|
345 | requesting all changes | |
343 | adding changesets |
|
346 | adding changesets | |
@@ -403,4 +406,4 b' test maxdeltachainspan' | |||||
403 | 51 17 -1 2 13 17 p1 58 594 739 1.24411 2642 1903 2.57510 |
|
406 | 51 17 -1 2 13 17 p1 58 594 739 1.24411 2642 1903 2.57510 | |
404 | 52 51 -1 2 14 51 p1 58 640 797 1.24531 2700 1903 2.38770 |
|
407 | 52 51 -1 2 14 51 p1 58 640 797 1.24531 2700 1903 2.38770 | |
405 | 53 52 -1 4 1 -1 base 0 0 0 0.00000 0 0 0.00000 |
|
408 | 53 52 -1 4 1 -1 base 0 0 0 0.00000 0 0 0.00000 | |
406 |
54 53 -1 5 1 -1 base |
|
409 | 54 53 -1 5 1 -1 base 641 640 641 1.00156 641 0 0.00000 |
@@ -412,6 +412,9 b' Test short command list with verbose opt' | |||||
412 |
|
412 | |||
413 | abort abort an unfinished operation (EXPERIMENTAL) |
|
413 | abort abort an unfinished operation (EXPERIMENTAL) | |
414 | add add the specified files on the next commit |
|
414 | add add the specified files on the next commit | |
|
415 | admin::chainsaw-update, admin::chainsawupdate | |||
|
416 | pull and update to a given revision, no matter what, | |||
|
417 | (EXPERIMENTAL) | |||
415 | annotate, blame |
|
418 | annotate, blame | |
416 | show changeset information by line for each file |
|
419 | show changeset information by line for each file | |
417 | clone make a copy of an existing repository |
|
420 | clone make a copy of an existing repository | |
@@ -2535,6 +2538,13 b' Dish up an empty repo; serve it cold.' | |||||
2535 | add the specified files on the next commit |
|
2538 | add the specified files on the next commit | |
2536 | </td></tr> |
|
2539 | </td></tr> | |
2537 | <tr><td> |
|
2540 | <tr><td> | |
|
2541 | <a href="/help/admin::chainsaw-update"> | |||
|
2542 | admin::chainsaw-update | |||
|
2543 | </a> | |||
|
2544 | </td><td> | |||
|
2545 | pull and update to a given revision, no matter what, (EXPERIMENTAL) | |||
|
2546 | </td></tr> | |||
|
2547 | <tr><td> | |||
2538 | <a href="/help/annotate"> |
|
2548 | <a href="/help/annotate"> | |
2539 | annotate |
|
2549 | annotate | |
2540 | </a> |
|
2550 | </a> |
@@ -2038,6 +2038,10 b' help/ shows help topics' | |||||
2038 | "topic": "add" |
|
2038 | "topic": "add" | |
2039 | }, |
|
2039 | }, | |
2040 | { |
|
2040 | { | |
|
2041 | "summary": "pull and update to a given revision, no matter what, (EXPERIMENTAL)", | |||
|
2042 | "topic": "admin::chainsaw-update" | |||
|
2043 | }, | |||
|
2044 | { | |||
2041 | "summary": "show changeset information by line for each file", |
|
2045 | "summary": "show changeset information by line for each file", | |
2042 | "topic": "annotate" |
|
2046 | "topic": "annotate" | |
2043 | }, |
|
2047 | }, |
@@ -49,15 +49,32 b' Test that raising an exception in the re' | |||||
49 |
|
49 | |||
50 | One process waiting for another |
|
50 | One process waiting for another | |
51 |
|
51 | |||
52 | $ cat > hooks.py << EOF |
|
52 | $ SYNC_FILE_LOCKED="$TESTTMP/sync-file-locked" | |
53 | > import time |
|
53 | $ export SYNC_FILE_LOCKED | |
54 | > def sleepone(**x): time.sleep(1) |
|
54 | $ SYNC_FILE_TRYING_LOCK="$TESTTMP/sync-file-trying-lock" | |
55 | > def sleephalf(**x): time.sleep(0.5) |
|
55 | $ export SYNC_FILE_TRYING_LOCK | |
|
56 | $ cat << EOF > locker.sh | |||
|
57 | > $RUNTESTDIR/testlib/wait-on-file 10 $SYNC_FILE_TRYING_LOCK $SYNC_FILE_LOCKED; | |||
|
58 | > EOF | |||
|
59 | $ cat << EOF > waiter.sh | |||
|
60 | > $RUNTESTDIR/testlib/wait-on-file 10 $SYNC_FILE_LOCKED; | |||
56 | > EOF |
|
61 | > EOF | |
|
62 | $ clean_sync() { | |||
|
63 | > rm -f "$SYNC_FILE_LOCKED" | |||
|
64 | > rm -f "$SYNC_FILE_TRYING_LOCK" | |||
|
65 | > } | |||
|
66 | ||||
|
67 | ||||
|
68 | $ clean_sync | |||
57 | $ echo b > b/b |
|
69 | $ echo b > b/b | |
58 | $ hg -R b ci -A -m b --config hooks.precommit="python:`pwd`/hooks.py:sleepone" > stdout & |
|
70 | $ hg -R b ci -A -m b \ | |
59 | $ hg -R b up -q --config ui.timeout.warn=0 --config hooks.pre-update="python:`pwd`/hooks.py:sleephalf" \ |
|
71 | > --config hooks.precommit="sh $TESTTMP/locker.sh" \ | |
60 | > > preup-stdout 2>preup-stderr |
|
72 | > > stdout & | |
|
73 | $ hg -R b up -q \ | |||
|
74 | > --config ui.timeout.warn=0 \ | |||
|
75 | > --config hooks.pre-update="sh $TESTTMP/waiter.sh" \ | |||
|
76 | > --config devel.lock-wait-sync-file="$SYNC_FILE_TRYING_LOCK" \ | |||
|
77 | > > preup-stdout 2> preup-stderr | |||
61 | $ wait |
|
78 | $ wait | |
62 | $ cat preup-stdout |
|
79 | $ cat preup-stdout | |
63 | $ cat preup-stderr |
|
80 | $ cat preup-stderr | |
@@ -68,11 +85,16 b' One process waiting for another' | |||||
68 |
|
85 | |||
69 | On processs waiting on another, warning after a long time. |
|
86 | On processs waiting on another, warning after a long time. | |
70 |
|
87 | |||
|
88 | $ clean_sync | |||
71 | $ echo b > b/c |
|
89 | $ echo b > b/c | |
72 | $ hg -R b ci -A -m b --config hooks.precommit="python:`pwd`/hooks.py:sleepone" > stdout & |
|
90 | $ hg -R b ci -A -m b \ | |
73 | $ hg -R b up -q --config hooks.pre-update="python:`pwd`/hooks.py:sleephalf" \ |
|
91 | > --config hooks.precommit="sh $TESTTMP/locker.sh" \ | |
74 | > --config ui.timeout.warn=250 \ |
|
92 | > > stdout & | |
75 | > > preup-stdout 2>preup-stderr |
|
93 | $ hg -R b up -q \ | |
|
94 | > --config hooks.pre-update="sh $TESTTMP/waiter.sh" \ | |||
|
95 | > --config devel.lock-wait-sync-file="$SYNC_FILE_TRYING_LOCK" \ | |||
|
96 | > --config ui.timeout.warn=250 \ | |||
|
97 | > > preup-stdout 2> preup-stderr | |||
76 | $ wait |
|
98 | $ wait | |
77 | $ cat preup-stdout |
|
99 | $ cat preup-stdout | |
78 | $ cat preup-stderr |
|
100 | $ cat preup-stderr | |
@@ -81,11 +103,16 b' On processs waiting on another, warning ' | |||||
81 |
|
103 | |||
82 | On processs waiting on another, warning disabled. |
|
104 | On processs waiting on another, warning disabled. | |
83 |
|
105 | |||
|
106 | $ clean_sync | |||
84 | $ echo b > b/d |
|
107 | $ echo b > b/d | |
85 | $ hg -R b ci -A -m b --config hooks.precommit="python:`pwd`/hooks.py:sleepone" > stdout & |
|
108 | $ hg -R b ci -A -m b \ | |
86 | $ hg -R b up -q --config hooks.pre-update="python:`pwd`/hooks.py:sleephalf" \ |
|
109 | > --config hooks.precommit="sh $TESTTMP/locker.sh" \ | |
87 | > --config ui.timeout.warn=-1 \ |
|
110 | > > stdout & | |
88 | > > preup-stdout 2>preup-stderr |
|
111 | $ hg -R b up -q \ | |
|
112 | > --config hooks.pre-update="sh $TESTTMP/waiter.sh" \ | |||
|
113 | > --config devel.lock-wait-sync-file="$SYNC_FILE_TRYING_LOCK" \ | |||
|
114 | > --config ui.timeout.warn=-1 \ | |||
|
115 | > > preup-stdout 2>preup-stderr | |||
89 | $ wait |
|
116 | $ wait | |
90 | $ cat preup-stdout |
|
117 | $ cat preup-stdout | |
91 | $ cat preup-stderr |
|
118 | $ cat preup-stderr | |
@@ -96,14 +123,19 b' check we still print debug output' | |||||
96 |
|
123 | |||
97 | On processs waiting on another, warning after a long time (debug output on) |
|
124 | On processs waiting on another, warning after a long time (debug output on) | |
98 |
|
125 | |||
|
126 | $ clean_sync | |||
99 |
|
|
127 | $ echo b > b/e | |
100 | $ hg -R b ci -A -m b --config hooks.precommit="python:`pwd`/hooks.py:sleepone" > stdout & |
|
128 | $ hg -R b ci -A -m b \ | |
101 | $ hg -R b up --config hooks.pre-update="python:`pwd`/hooks.py:sleephalf" \ |
|
129 | > --config hooks.precommit="sh $TESTTMP/locker.sh" \ | |
102 | > --config ui.timeout.warn=250 --debug\ |
|
130 | > > stdout & | |
103 | > > preup-stdout 2>preup-stderr |
|
131 | $ hg -R b up \ | |
|
132 | > --config hooks.pre-update="sh $TESTTMP/waiter.sh" \ | |||
|
133 | > --config devel.lock-wait-sync-file="$SYNC_FILE_TRYING_LOCK" \ | |||
|
134 | > --config ui.timeout.warn=250 --debug \ | |||
|
135 | > > preup-stdout 2>preup-stderr | |||
104 | $ wait |
|
136 | $ wait | |
105 | $ cat preup-stdout |
|
137 | $ cat preup-stdout | |
106 | calling hook pre-update: hghook_pre-update.sleephalf |
|
138 | running hook pre-update: sh $TESTTMP/waiter.sh | |
107 | waiting for lock on working directory of b held by process '*' on host '*' (glob) |
|
139 | waiting for lock on working directory of b held by process '*' on host '*' (glob) | |
108 | got lock after * seconds (glob) |
|
140 | got lock after * seconds (glob) | |
109 | 0 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
141 | 0 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
@@ -113,14 +145,19 b' On processs waiting on another, warning ' | |||||
113 |
|
145 | |||
114 | On processs waiting on another, warning disabled, (debug output on) |
|
146 | On processs waiting on another, warning disabled, (debug output on) | |
115 |
|
147 | |||
|
148 | $ clean_sync | |||
116 |
|
|
149 | $ echo b > b/f | |
117 | $ hg -R b ci -A -m b --config hooks.precommit="python:`pwd`/hooks.py:sleepone" > stdout & |
|
150 | $ hg -R b ci -A -m b \ | |
118 | $ hg -R b up --config hooks.pre-update="python:`pwd`/hooks.py:sleephalf" \ |
|
151 | > --config hooks.precommit="sh $TESTTMP/locker.sh" \ | |
119 | > --config ui.timeout.warn=-1 --debug\ |
|
152 | > > stdout & | |
120 | > > preup-stdout 2>preup-stderr |
|
153 | $ hg -R b up \ | |
|
154 | > --config hooks.pre-update="sh $TESTTMP/waiter.sh" \ | |||
|
155 | > --config devel.lock-wait-sync-file="$SYNC_FILE_TRYING_LOCK" \ | |||
|
156 | > --config ui.timeout.warn=-1 --debug\ | |||
|
157 | > > preup-stdout 2>preup-stderr | |||
121 | $ wait |
|
158 | $ wait | |
122 | $ cat preup-stdout |
|
159 | $ cat preup-stdout | |
123 | calling hook pre-update: hghook_pre-update.sleephalf |
|
160 | running hook pre-update: sh $TESTTMP/waiter.sh | |
124 | waiting for lock on working directory of b held by process '*' on host '*' (glob) |
|
161 | waiting for lock on working directory of b held by process '*' on host '*' (glob) | |
125 | got lock after * seconds (glob) |
|
162 | got lock after * seconds (glob) | |
126 | 0 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
163 | 0 files updated, 0 files merged, 0 files removed, 0 files unresolved |
@@ -1,5 +1,15 b'' | |||||
1 | #require serve ssl |
|
1 | #require serve ssl | |
2 |
|
2 | |||
|
3 | $ wait_log() { | |||
|
4 | > pattern="$1" | |||
|
5 | > for s in $TESTDIR/seq.py 10; do | |||
|
6 | > if grep "$pattern" $TESTTMP/log > /dev/null ; then | |||
|
7 | > break | |||
|
8 | > fi | |||
|
9 | > sleep 1 | |||
|
10 | > done | |||
|
11 | > } | |||
|
12 | ||||
3 | Set up SMTP server: |
|
13 | Set up SMTP server: | |
4 |
|
14 | |||
5 | $ CERTSDIR="$TESTDIR/sslcerts" |
|
15 | $ CERTSDIR="$TESTDIR/sslcerts" | |
@@ -47,6 +57,7 b' we are able to load CA certs:' | |||||
47 | (?i)abort: .*?certificate.verify.failed.* (re) |
|
57 | (?i)abort: .*?certificate.verify.failed.* (re) | |
48 | [255] |
|
58 | [255] | |
49 |
|
59 | |||
|
60 | $ wait_log "ssl error:" | |||
50 | $ cat ../log |
|
61 | $ cat ../log | |
51 | * ssl error: * (glob) |
|
62 | * ssl error: * (glob) | |
52 | $ : > ../log |
|
63 | $ : > ../log | |
@@ -62,6 +73,7 b' we are able to load CA certs:' | |||||
62 | (?i)abort: .*?certificate.verify.failed.* (re) |
|
73 | (?i)abort: .*?certificate.verify.failed.* (re) | |
63 | [255] |
|
74 | [255] | |
64 |
|
75 | |||
|
76 | $ wait_log "ssl error:" | |||
65 | $ cat ../log |
|
77 | $ cat ../log | |
66 | * ssl error: * (glob) |
|
78 | * ssl error: * (glob) | |
67 | $ : > ../log |
|
79 | $ : > ../log | |
@@ -83,6 +95,7 b' Without certificates:' | |||||
83 | (see https://mercurial-scm.org/wiki/SecureConnections for how to configure Mercurial to avoid this error or set hostsecurity.localhost:fingerprints=sha256:20:de:b3:ad:b4:cd:a5:42:f0:74:41:1c:a2:70:1e:da:6e:c0:5c:16:9e:e7:22:0f:f1:b7:e5:6e:e4:92:af:7e to trust this server) |
|
95 | (see https://mercurial-scm.org/wiki/SecureConnections for how to configure Mercurial to avoid this error or set hostsecurity.localhost:fingerprints=sha256:20:de:b3:ad:b4:cd:a5:42:f0:74:41:1c:a2:70:1e:da:6e:c0:5c:16:9e:e7:22:0f:f1:b7:e5:6e:e4:92:af:7e to trust this server) | |
84 | [150] |
|
96 | [150] | |
85 |
|
97 | |||
|
98 | $ wait_log "no hello:" | |||
86 | $ cat ../log |
|
99 | $ cat ../log | |
87 | connection from * (glob) |
|
100 | connection from * (glob) | |
88 | no hello: b'' |
|
101 | no hello: b'' | |
@@ -143,6 +156,7 b' With invalid certificates:' | |||||
143 | (?i)abort: .*?certificate.verify.failed.* (re) |
|
156 | (?i)abort: .*?certificate.verify.failed.* (re) | |
144 | [255] |
|
157 | [255] | |
145 |
|
158 | |||
|
159 | $ wait_log "ssl error:" | |||
146 | $ cat ../log |
|
160 | $ cat ../log | |
147 | * ssl error: * (glob) |
|
161 | * ssl error: * (glob) | |
148 | $ : > ../log |
|
162 | $ : > ../log |
General Comments 0
You need to be logged in to leave comments.
Login now