##// END OF EJS Templates
branching: merge stable into default
Raphaël Gomès -
r52065:77b86226 merge default
parent child Browse files
Show More
@@ -253,3 +253,4 b' 5a8b5420103937fca97c584c5162178eed828ada'
253 253 c083d9776cb2fb6056715b2988d1ea48055f3162 0 iQHNBAABCgA3FiEEH2b4zfZU6QXBHaBhoR4BzQ4F2VYFAmVI+lgZHGFscGhhcmVAcmFwaGFlbGdvbWVzLmRldgAKCRChHgHNDgXZVu9jC/0c3oGNY1FweOc6CQGNTGWQL4NLROgLNi4YuGlN+QLnjO5pFsfqVXXHeySz4jnBF8u1bYEnnkKIUOUAEz171e/AEpzTxNMA//hK4JJk9zVfesb+wbXh3JwMHdQPLYF0/ZMUgW1vkxCvh4pqSmYjOSgYTqGe2wJfgUd4P3CxucUf7KoWYfFN2GpPxhDAGYsiu36beWuBaMdjTq9NieVGpwOZzSZ4dx+Rg19pEUgb0qQoOGRyBc+RjNEoAeNldcvQFg8J+YJbpjKrg61oe86wqA+9t3J/k/JDfMiSMqIYe4h1uIM2/rhcnt+EynZQBWrch4q8L5Kkvu0DkEc2AkpWoTgp6EksRw4tTk31RLqV+hi4klAFH1PSWCu+EyMFWcUNdQ+Lpy+cICxL7+P9kjx05MbU2cRWitf3q/hBBP4r3drLlsFlC+SPbq/zFfoRnjnmClOLth3oEgHuVNu4cdvzJGffTBmO+wiCixvZPkrDlnrhDnvQB0wWkmz3El8GqkxYic0=
254 254 27055614b68538576fb0439007009acf93fe0a49 0 iQHNBAABCgA3FiEEH2b4zfZU6QXBHaBhoR4BzQ4F2VYFAmVKXukZHGFscGhhcmVAcmFwaGFlbGdvbWVzLmRldgAKCRChHgHNDgXZVg5UDACTnRyxApQMQLaRX9khRB6E5XkSJqpR3wqXr5yMLaqgaUGzUUaupA8zTjWoIDM730V1hWliWinQGD/3XA7qUQ31VALRQq8PlvzMEkSz0NB2IDBU6uHdhNAkZQeYm7qJwpzCIuPs/diVm97oUJr0+Y7KJKV7ZxUtZ1bEBHq/FUgyVnLkVQJd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cmVAcmFwaGFlbGdvbWVzLmRldgAKCRChHgHNDgXZVrr4C/9UvrFMEo1DOzFP6RpGDnRUEl6ejUBy2cjQ1HXCLZV8zYQxpBK9dMqoLwjv1FKgIwCXEJCWs0qedCZgJ0fd5xZnVPIfb6FzziWYhK3MNUAAzb2ptXrYNUpCGpPyLmaC8YinP+3XmGLkUA4en5Ff1C5aVxQfUgb/FXJQjseBlRXpPxasOs3zKYN1xJXJsJzapqeEI5NJNrjIbwvbFCCr/uPe7FgT65kvcn4SSuGUO2Bg9jMPKiWritJQ83Mdzzw0eJGsKduF2ZTo4R4h1C2z0VdGWtNLg5nXaJT1ZxcsvjJDIfWA/Ds/b/EiMzPL5pHk230/kBbyu/1Q6A+Riy2J1zQLSt5FeRssOEXZD4jCQ/Xs9zptttFTDu7rorcSE+tis8GybGvFgX7JzTcBout6/QfUovpaXuu3IUwaS1U0gaTxKbjnEXZqVY1w4RkdUnhEm42RBlMsa9/TBbgkFacvWMi70VDDATJMPh7dQSi1fylSiYD2HEySAnaBxXU5aPfefbQ=
@@ -269,3 +269,4 b' 5a8b5420103937fca97c584c5162178eed828ada'
269 269 c083d9776cb2fb6056715b2988d1ea48055f3162 6.5.3
270 270 27055614b68538576fb0439007009acf93fe0a49 6.6rc0
271 271 26c57e7a0890b96e2c473b394de380d6753c9230 6.6
272 71bd09bebbe36a09569cbfb388f371433360056b 6.6.1
@@ -973,11 +973,10 b' def perftags(ui, repo, **opts):'
973 973 "clear_cache_on_disk",
974 974 _default_clear_on_disk_tags_cache,
975 975 )
976 clear_fnodes_fn = getattr(
977 tags,
978 "clear_cache_fnodes",
979 _default_clear_on_disk_tags_fnodes_cache,
980 )
976 if getattr(tags, 'clear_cache_fnodes_is_working', False):
977 clear_fnodes_fn = tags.clear_cache_fnodes
978 else:
979 clear_fnodes_fn = _default_clear_on_disk_tags_fnodes_cache
981 980 clear_fnodes_rev_fn = getattr(
982 981 tags,
983 982 "forget_fnodes",
@@ -986,7 +985,7 b' def perftags(ui, repo, **opts):'
986 985
987 986 clear_revs = []
988 987 if clear_fnode_revs:
989 clear_revs.extends(scmutil.revrange(repo, clear_fnode_revs))
988 clear_revs.extend(scmutil.revrange(repo, clear_fnode_revs))
990 989
991 990 if update_last:
992 991 revset = b'last(all(), %d)' % update_last
@@ -1926,7 +1926,9 b' def querydrev(ui, spec):'
1926 1926 raise error.Abort(_(b'unknown symbol: %s') % tree[1])
1927 1927 elif op in {b'and_', b'add', b'sub'}:
1928 1928 assert len(tree) == 3
1929 return getattr(operator, op)(walk(tree[1]), walk(tree[2]))
1929 return getattr(operator, pycompat.sysstr(op))(
1930 walk(tree[1]), walk(tree[2])
1931 )
1930 1932 elif op == b'group':
1931 1933 return walk(tree[1])
1932 1934 elif op == b'ancestors':
@@ -1859,7 +1859,7 b" if __name__ == '__main__':"
1859 1859 info = ServiceInfo(
1860 1860 b"_http._tcp.local.",
1861 1861 b"My Service Name._http._tcp.local.",
1862 socket.inet_aton(b"127.0.0.1"),
1862 socket.inet_aton("127.0.0.1"),
1863 1863 1234,
1864 1864 0,
1865 1865 0,
@@ -783,6 +783,7 b' class _InnerRevlog:'
783 783
784 784 def split_inline(self, tr, header, new_index_file_path=None):
785 785 """split the data of an inline revlog into an index and a data file"""
786 assert self._delay_buffer is None
786 787 existing_handles = False
787 788 if self._writinghandles is not None:
788 789 existing_handles = True
@@ -1165,14 +1166,15 b' class _InnerRevlog:'
1165 1166 elif len(self.index) == 0:
1166 1167 self._orig_index_file = self.index_file
1167 1168 self.index_file = self._divert_index()
1168 self._segmentfile.filename = self.index_file
1169 1169 assert self._orig_index_file is not None
1170 1170 assert self.index_file is not None
1171 1171 if self.opener.exists(self.index_file):
1172 1172 self.opener.unlink(self.index_file)
1173 1173 return self.index_file
1174 1174 else:
1175 self._segmentfile._delay_buffer = self._delay_buffer = []
1175 self._delay_buffer = []
1176 if self.inline:
1177 self._segmentfile._delay_buffer = self._delay_buffer
1176 1178 return None
1177 1179
1178 1180 def write_pending(self):
@@ -1192,10 +1194,13 b' class _InnerRevlog:'
1192 1194 ifh.seek(0, os.SEEK_END)
1193 1195 ifh.write(b"".join(self._delay_buffer))
1194 1196 any_pending = True
1195 self._segmentfile._delay_buffer = self._delay_buffer = None
1197 self._delay_buffer = None
1198 if self.inline:
1199 self._segmentfile._delay_buffer = self._delay_buffer
1200 else:
1201 assert self._segmentfile._delay_buffer is None
1196 1202 self._orig_index_file = self.index_file
1197 1203 self.index_file = pending_index_file
1198 self._segmentfile.filename = self.index_file
1199 1204 return self.index_file, any_pending
1200 1205
1201 1206 def finalize_pending(self):
@@ -1221,7 +1226,6 b' class _InnerRevlog:'
1221 1226 )
1222 1227 self.index_file = self._orig_index_file
1223 1228 self._orig_index_file = None
1224 self._segmentfile.filename = self.index_file
1225 1229 else:
1226 1230 msg = b"not delay or divert found on this revlog"
1227 1231 raise error.ProgrammingError(msg)
@@ -1305,6 +1309,10 b' class revlog:'
1305 1309 trypending=False,
1306 1310 try_split=False,
1307 1311 canonical_parent_order=True,
1312 data_config=None,
1313 delta_config=None,
1314 feature_config=None,
1315 may_inline=True, # may inline new revlog
1308 1316 ):
1309 1317 """
1310 1318 create a revlog object
@@ -1330,6 +1338,7 b' class revlog:'
1330 1338 self.postfix = postfix
1331 1339 self._trypending = trypending
1332 1340 self._try_split = try_split
1341 self._may_inline = may_inline
1333 1342 self.opener = opener
1334 1343 if persistentnodemap:
1335 1344 self._nodemap_file = nodemaputil.get_nodemap_file(self)
@@ -1337,19 +1346,25 b' class revlog:'
1337 1346 assert target[0] in ALL_KINDS
1338 1347 assert len(target) == 2
1339 1348 self.target = target
1340 if b'feature-config' in self.opener.options:
1349 if feature_config is not None:
1350 self.feature_config = feature_config.copy()
1351 elif b'feature-config' in self.opener.options:
1341 1352 self.feature_config = self.opener.options[b'feature-config'].copy()
1342 1353 else:
1343 1354 self.feature_config = FeatureConfig()
1344 1355 self.feature_config.censorable = censorable
1345 1356 self.feature_config.canonical_parent_order = canonical_parent_order
1346 if b'data-config' in self.opener.options:
1357 if data_config is not None:
1358 self.data_config = data_config.copy()
1359 elif b'data-config' in self.opener.options:
1347 1360 self.data_config = self.opener.options[b'data-config'].copy()
1348 1361 else:
1349 1362 self.data_config = DataConfig()
1350 1363 self.data_config.check_ambig = checkambig
1351 1364 self.data_config.mmap_large_index = mmaplargeindex
1352 if b'delta-config' in self.opener.options:
1365 if delta_config is not None:
1366 self.delta_config = delta_config.copy()
1367 elif b'delta-config' in self.opener.options:
1353 1368 self.delta_config = self.opener.options[b'delta-config'].copy()
1354 1369 else:
1355 1370 self.delta_config = DeltaConfig()
@@ -1401,7 +1416,9 b' class revlog:'
1401 1416 elif b'revlogv2' in opts:
1402 1417 new_header = REVLOGV2
1403 1418 elif b'revlogv1' in opts:
1404 new_header = REVLOGV1 | FLAG_INLINE_DATA
1419 new_header = REVLOGV1
1420 if self._may_inline:
1421 new_header |= FLAG_INLINE_DATA
1405 1422 if b'generaldelta' in opts:
1406 1423 new_header |= FLAG_GENERALDELTA
1407 1424 elif b'revlogv0' in self.opener.options:
@@ -72,11 +72,16 b' def v1_censor(rl, tr, censornode, tombst'
72 72 radix=rl.radix,
73 73 postfix=b'tmpcensored',
74 74 censorable=True,
75 data_config=rl.data_config,
76 delta_config=rl.delta_config,
77 feature_config=rl.feature_config,
78 may_inline=rl._inline,
75 79 )
76 newrl._format_version = rl._format_version
77 newrl._format_flags = rl._format_flags
78 newrl.delta_config.general_delta = rl.delta_config.general_delta
79 newrl._parse_index = rl._parse_index
80 # inline splitting will prepare some transaction work that will get
81 # confused by the final file move. So if there is a risk of not being
82 # inline at the end, we prevent the new revlog to be inline in the first
83 # place.
84 assert not (newrl._inline and not rl._inline)
80 85
81 86 for rev in rl.revs():
82 87 node = rl.node(rev)
@@ -122,7 +127,10 b' def v1_censor(rl, tr, censornode, tombst'
122 127 tr.addbackup(rl._datafile, location=b'store')
123 128
124 129 rl.opener.rename(newrl._indexfile, rl._indexfile)
125 if not rl._inline:
130 if newrl._inline:
131 assert rl._inline
132 else:
133 assert not rl._inline
126 134 rl.opener.rename(newrl._datafile, rl._datafile)
127 135
128 136 rl.clearcaches()
@@ -916,9 +916,13 b' def clear_cache_on_disk(repo):'
916 916 repo.cachevfs.tryunlink(_filename(repo))
917 917
918 918
919 # a small attribute to help `hg perf::tags` to detect a fixed version.
920 clear_cache_fnodes_is_working = True
921
922
919 923 def clear_cache_fnodes(repo):
920 924 """function used by the perf extension to clear "file node cache"""
921 repo.cachevfs.tryunlink(_filename(repo))
925 repo.cachevfs.tryunlink(_fnodescachefile)
922 926
923 927
924 928 def forget_fnodes(repo, revs):
@@ -686,8 +686,9 b' if pycompat.iswindows:'
686 686 # we can't use close_fds *and* redirect stdin. I'm not sure that we
687 687 # need to because the detached process has no console connection.
688 688
689 stdin = None
690
689 691 try:
690 stdin = None
691 692 if stdin_bytes is not None:
692 693 stdin = pycompat.unnamedtempfile()
693 694 stdin.write(stdin_bytes)
@@ -1,3 +1,16 b''
1 = Mercurial 6.6.1 =
2
3 The first two patches fix aborted transactions that could happen since 6.6.
4
5 * revlog: avoid exposing delayed index entry too widely in non-inline revlog
6 * revlog: avoid wrongly updating the data file location on "divert"
7 * tests: do not fail tests in a state with uncommitted .py file removal
8 * perf-tags: fix the --clear-fnode-cache-rev code
9 * perf-tags: fix clear_cache_fnodes to actually clear that cache
10 * censor: fix things around inlining
11 * Various Python 3 cleanups
12 * Various Windows test suite fixes
13
1 14 = Mercurial 6.6 =
2 15
3 16 As usual, a *lot* of patches don't make it to this list.
@@ -170,6 +170,7 b' substitutions = ['
170 170 br'Cannot assign requested address',
171 171 br'Can\'t assign requested address',
172 172 # FormatMessage(WSAEADDRNOTAVAIL)
173 br'The requested address is not valid in its context',
173 174 ),
174 175 }
175 176
@@ -294,22 +294,40 b' Can re-add file after being deleted + ce'
294 294 $ hg cat -r "$H2^^^" target | head -n 10
295 295 Tainted file now super sanitized
296 296
297 Can censor after revlog has expanded to no longer permit inline storage
297 Can censor enough revision to move back to inline storage
298 298
299 $ for x in `"$PYTHON" $TESTDIR/seq.py 0 50000`
300 > do
301 > echo "Password: hunter$x" >> target
302 > done
299 $ hg debugrevlogstats | grep target
300 rev-count data-size inl type target
301 8 ??? no file target (glob) (revlogv2 !)
302 8 ??? yes file target (glob) (revlogv1 !)
303 $ cat /dev/rand?m | dd status=none count=200 | f --hexdump > target
303 304 $ hg ci -m 'add 100k passwords'
304 305 $ H2=`hg id --debug -i`
305 306 $ C5=$H2
306 307 $ hg revert -r "$H2^" target
307 308 $ hg ci -m 'cleaned 100k passwords'
308 309 $ H2=`hg id --debug -i`
310 $ hg debugrevlogstats | grep target
311 rev-count data-size inl type target
312 10 ?????? no file target (glob)
309 313 $ hg --config extensions.censor= censor -r $C5 target
314
315 The important part is for the censor operation to not crash and the repository
316 to not be corrupted. Right now this involve keeping the revlog split.
317
318 $ hg debugrevlogstats | grep target
319 rev-count data-size inl type target
320 10 ??? no file target (glob)
310 321 $ hg cat -r $C5 target | head -n 10
311 322 $ hg cat -r $H2 target | head -n 10
312 323 fresh start
324 $ hg verify
325 checking changesets
326 checking manifests
327 crosschecking files in changesets and manifests
328 checking files
329 checking dirstate
330 checked 12 changesets with 13 changes to 2 files
313 331
314 332 Repo with censored nodes can be cloned and cloned nodes are censored
315 333
@@ -341,7 +359,7 b' Repo cloned before tainted content intro'
341 359 adding manifests
342 360 adding file changes
343 361 added 11 changesets with 11 changes to 2 files (+1 heads)
344 new changesets 186fb27560c3:683e4645fded
362 new changesets * (glob)
345 363 (run 'hg heads' to see heads, 'hg merge' to merge)
346 364 $ hg update 4
347 365 2 files updated, 0 files merged, 0 files removed, 0 files unresolved
@@ -401,7 +419,7 b' Censored nodes can be bundled up and unb'
401 419 adding manifests
402 420 adding file changes
403 421 added 2 changesets with 2 changes to 2 files (+1 heads)
404 new changesets 075be80ac777:dcbaf17bf3a1 (2 drafts)
422 new changesets * (glob)
405 423 (run 'hg heads .' to see heads, 'hg merge' to merge)
406 424 $ hg cat -r $REV target | head -n 10
407 425 $ hg cat -r $CLEANREV target | head -n 10
@@ -458,7 +476,7 b' Censored nodes can be imported on top of'
458 476 adding manifests
459 477 adding file changes
460 478 added 6 changesets with 5 changes to 2 files (+1 heads)
461 new changesets efbe78065929:683e4645fded (6 drafts)
479 new changesets * (glob)
462 480 (run 'hg heads .' to see heads, 'hg merge' to merge)
463 481 $ hg update $H2
464 482 2 files updated, 0 files merged, 0 files removed, 0 files unresolved
@@ -1,4 +1,4 b''
1 #require test-repo hg10
1 #require test-repo hg32
2 2
3 3 $ . "$TESTDIR/helpers-testrepo.sh"
4 4 $ import_checker="$TESTDIR"/../contrib/import-checker.py
@@ -14,12 +14,12 b' these may expose other cycles.'
14 14 Known-bad files are excluded by -X as some of them would produce unstable
15 15 outputs, which should be fixed later.
16 16
17 NOTE: the `hg locate` command here only works on files that are known to
17 NOTE: the `hg files` command here only works on files that are known to
18 18 Mercurial. If you add an import of a new file and haven't yet `hg add`ed it, you
19 19 will likely receive warnings about a direct import.
20 20
21 $ testrepohg locate 'set:**.py or grep(r"^#!.*?python")' \
22 > 'tests/**.t' \
21 $ testrepohg files 'set:**.py or grep(r"^#!.*?python")' \
22 > 'glob:tests/**.t' \
23 23 > -X hgweb.cgi \
24 24 > -X setup.py \
25 25 > -X contrib/automation/ \
@@ -72,7 +72,7 b' Try corrupting the cache'
72 72
73 73 Create local tag with long name:
74 74
75 $ T=`hg identify --debug --id`
75 $ T=`hg identify -r . -T '{node}'`
76 76 $ hg tag -l "This is a local tag with a really long name!"
77 77 $ hg tags
78 78 tip 0:acb14030fe0a
General Comments 0
You need to be logged in to leave comments. Login now