Thu, 06 Jun 2019 10:07:14 -0700 copies: separate added/removed files by newline instead of null
Martin von Zweigbergk <martinvonz@google.com> [Thu, 06 Jun 2019 10:07:14 -0700] rev 42427
copies: separate added/removed files by newline instead of null This makes it more consistent with how we encode copies (newline-separated lists of null-separated pairs). This perhaps makes {extras} a little less readable (?) despite avoiding the escaping. I don't know how I feel about this patch. I'm okay with it being queued or dropped. Differential Revision: https://phab.mercurial-scm.org/D6486
Wed, 22 May 2019 09:54:00 -0700 copies: also encode p[12]copies destination as index into "files" list
Martin von Zweigbergk <martinvonz@google.com> [Wed, 22 May 2019 09:54:00 -0700] rev 42426
copies: also encode p[12]copies destination as index into "files" list This is mostly for consistency with the filesaddes/filesremoved fields, but it should also save a bit of space. Differential Revision: https://phab.mercurial-scm.org/D6431
Wed, 05 Jun 2019 11:23:25 +0200 discovery: be more conservative when adjusting the sample size
Pierre-Yves David <pierre-yves.david@octobus.net> [Wed, 05 Jun 2019 11:23:25 +0200] rev 42425
discovery: be more conservative when adjusting the sample size Since 5b34972a0094, the discovery will increase the sample size when it detect a "complex" undecided set. However this detection focussed on the number of roots only, this could regress discovery performance when the undecided set has many roots that eventually get merged into a few heads. To prevent such misbehavior, we adjust the logic to take in account both heads and roots. The sample size will be increased only if both are especially large. Performance testing on the same case as 5b34972a0094, does not show a significant difference.
Thu, 16 May 2019 16:22:20 +0200 rust-dirstate: create dirstate submodule
Raphaël Gomès <rgomes@octobus.net> [Thu, 16 May 2019 16:22:20 +0200] rev 42424
rust-dirstate: create dirstate submodule This change is here to facilitate a future patch that is written in a different file. I expect this module to grow a few different files. Differential Revision: https://phab.mercurial-scm.org/D6389
Wed, 05 Jun 2019 12:51:21 -0400 profiling: show actual time spent in hotpath display
Valentin Gatien-Baron <vgatien-baron@janestreet.com> [Wed, 05 Jun 2019 12:51:21 -0400] rev 42423
profiling: show actual time spent in hotpath display To get, for instance: ... \ 6.6% 4.08s lock.py: __exit__ line 1566: ... | 6.5% 4.01s exchange.py: close line 1191: ... | 6.5% 4.01s transaction.py: _active line 1443: ... | 6.5% 4.01s transaction.py: close line 47: ... | 6.2% 3.84s scmutil.py: wrapped line 529: ... | 6.2% 3.81s localrepo.py: wrapper line 2114: ... | 6.2% 3.81s localrepo.py: updatecaches line 177: ... ... instead of: ... \ 6.6% lock.py: __exit__ line 1566: ... | 6.5% exchange.py: close line 1191: ... | 6.5% transaction.py: _active line 1443: ... | 6.5% transaction.py: close line 47: ... | 6.2% scmutil.py: wrapped line 529: ... | 6.2% localrepo.py: wrapper line 2114: ... | 6.2% localrepo.py: updatecaches line 177: ... ... I find that if it's not displayed, I frequently end up estimating the numbers by hand. Differential Revision: https://phab.mercurial-scm.org/D6477
Wed, 05 Jun 2019 14:29:44 -0700 merge with stable
Martin von Zweigbergk <martinvonz@google.com> [Wed, 05 Jun 2019 14:29:44 -0700] rev 42422
merge with stable
Fri, 31 May 2019 22:37:14 -0700 bookmarks: use correct store for "ambiguity check" stable
Martin von Zweigbergk <martinvonz@google.com> [Fri, 31 May 2019 22:37:14 -0700] rev 42421
bookmarks: use correct store for "ambiguity check" I still don't quite know what the check does, but I clearly got it wrong in 526750cdd02d (bookmarks: keep bookmarks in .hg/store if new config set, 2019-05-15). Just compare with the strings we use in @repofilecache and @storecache. These bugs were then copied to the stable branch in c2b83c957621 (localrepo: grab mixedrepostorecache class from 526750cdd02d, 2019-05-20) and 2338bdea4474 (bookmark: also make bookmark cache depends of the changelog, 2019-05-20). As a result, test-wireproto-exchangev2.t is flaky on both branches. This patch fixes that. Differential Revision: https://phab.mercurial-scm.org/D6469
Wed, 05 Jun 2019 10:18:00 -0400 merge with stable
Augie Fackler <augie@google.com> [Wed, 05 Jun 2019 10:18:00 -0400] rev 42420
merge with stable
Tue, 04 Jun 2019 21:13:35 +0900 root: add template variables pointing to repository directories
Yuya Nishihara <yuya@tcha.org> [Tue, 04 Jun 2019 21:13:35 +0900] rev 42419
root: add template variables pointing to repository directories These paths are useful for GUI applications to detect changes. A GUI process typically monitors .hg and .hg/store directories so that it will be notified on lock/wlock deletion. Alternatively, maybe we can add debugpaths command if we don't want to extend the root command. I'm not sure which will be nicer.
Tue, 04 Jun 2019 20:58:39 +0900 root: add support for -Tformatter option
Yuya Nishihara <yuya@tcha.org> [Tue, 04 Jun 2019 20:58:39 +0900] rev 42418
root: add support for -Tformatter option It's useless right now, but it should just work and I want to add a few more fields.
Thu, 23 May 2019 03:03:36 +0530 narrow: pass the bundle to bundle2.widen_bundle() instead of generating there
Pulkit Goyal <7895pulkit@gmail.com> [Thu, 23 May 2019 03:03:36 +0530] rev 42417
narrow: pass the bundle to bundle2.widen_bundle() instead of generating there This will make the code in narrowwirepeer.py more better for further refactoring. Differential Revision: https://phab.mercurial-scm.org/D6438
Thu, 23 May 2019 02:48:25 +0530 narrow: refactor code around widening complicated by previous patch
Pulkit Goyal <7895pulkit@gmail.com> [Thu, 23 May 2019 02:48:25 +0530] rev 42416
narrow: refactor code around widening complicated by previous patch Previous patch while adding support for using narrow_widen wireproto command, complicated the code a bit. This patch refactors that. Differential Revision: https://phab.mercurial-scm.org/D6437
Wed, 22 May 2019 02:59:48 +0530 narrow: use narrow_widen wireproto command to widen in case of ellipses
Pulkit Goyal <7895pulkit@gmail.com> [Wed, 22 May 2019 02:59:48 +0530] rev 42415
narrow: use narrow_widen wireproto command to widen in case of ellipses Few releases ago, we introduce narrow_widen wireproto command to be used to widen narrow repositories. Before this patch, that was used in non-ellipses cases only. In ellipses cases, we still do exchange.pull() which can pull more data than required. After this patch, the client will first check whether server supports doing ellipses widening using wireproto command or not by checking server's wireproto capability. If the server is upto date and support latest ellipses capability, we call the wireproto command. Otherwise we fallback to exchange.pull() like before. The compat code make sure that things works even if one of the client or server is old. The initial version of this patch does not had this compat code. It's added to help Google release things smoothly internally. I plan to drop the compat code before the upcoming major release. Due to change to wireproto command, the code looks a bit dirty, next patches will clean that up. Differential Revision: https://phab.mercurial-scm.org/D6436
Wed, 05 Jun 2019 10:14:19 -0400 Added signature for changeset c3484ddbdb96 stable
Augie Fackler <raf@durin42.com> [Wed, 05 Jun 2019 10:14:19 -0400] rev 42414
Added signature for changeset c3484ddbdb96
Wed, 05 Jun 2019 10:14:18 -0400 Added tag 5.0.1 for changeset c3484ddbdb96 stable
Augie Fackler <raf@durin42.com> [Wed, 05 Jun 2019 10:14:18 -0400] rev 42413
Added tag 5.0.1 for changeset c3484ddbdb96
Tue, 04 Jun 2019 17:24:35 +0800 merge: correct argument name in docstring
Anton Shestakov <av6@dwimlabs.net> [Tue, 04 Jun 2019 17:24:35 +0800] rev 42412
merge: correct argument name in docstring Differential Revision: https://phab.mercurial-scm.org/D6476
Fri, 31 May 2019 15:28:31 -0700 narrowspec: replace one recursion-avoidance hack with another
Martin von Zweigbergk <martinvonz@google.com> [Fri, 31 May 2019 15:28:31 -0700] rev 42411
narrowspec: replace one recursion-avoidance hack with another When updating the working copy narrowspec, we call context.walk() in order to find which files to update the working copy with. context.walk() calls repo.narrowmatch(). In order to avoid infinite recursion in this case, we have a hack that assigns the new values for repo.narrowpats and repo._narrowmatch. However, doing that of course breaks future invalidation of those properties (they're @storecache'd). Let's instead avoid the infinite recursion by setting a flag on the repo instance when we're updating the working copy. Differential Revision: https://phab.mercurial-scm.org/D6468
Sat, 09 Mar 2019 22:13:06 -0800 merge: simplify initialization of "pas"
Martin von Zweigbergk <martinvonz@google.com> [Sat, 09 Mar 2019 22:13:06 -0800] rev 42410
merge: simplify initialization of "pas" Differential Revision: https://phab.mercurial-scm.org/D6472
Sat, 09 Mar 2019 22:11:27 -0800 merge: reorder some initialization to make more sense
Martin von Zweigbergk <martinvonz@google.com> [Sat, 09 Mar 2019 22:11:27 -0800] rev 42409
merge: reorder some initialization to make more sense This puts the closely related definitions of "pl", "p1", "p2", "pas" close together, and moves the definition of "overwrite" away and closer to where it's first used. Differential Revision: https://phab.mercurial-scm.org/D6471
Wed, 22 May 2019 08:27:02 +0000 rust-dirstate: architecture independence fix
Georges Racinet <georges.racinet@octobus.net> [Wed, 22 May 2019 08:27:02 +0000] rev 42408
rust-dirstate: architecture independence fix Apparently, c_char is u8 on ppc64le and i8 on amd64 Differential Revision: https://phab.mercurial-scm.org/D6473
Tue, 14 May 2019 22:20:10 -0700 context: get filesadded() and filesremoved() from changeset if configured
Martin von Zweigbergk <martinvonz@google.com> [Tue, 14 May 2019 22:20:10 -0700] rev 42407
context: get filesadded() and filesremoved() from changeset if configured This adds the read side for getting the sets of added and removed files from the changeset extras. I timed this command on the hg repo: hg log -T '{rev}\n {files}\n %:{file_mods}\n +{file_adds}\n -{file_dels}\n' It took 1m21s before and 6.4s after. I also used that command to check that the result didn't change compared to calculating the values from the manifests on the fly (it didn't change). In the mozilla-unified repo, the same command run on FIREFOX_BETA_58_END::FIREFOX_BETA_59_END went from 29s to 0.67s. Differential Revision: https://phab.mercurial-scm.org/D6417
Tue, 14 May 2019 22:19:51 -0700 changelog: optionally store added and removed files in changeset extras
Martin von Zweigbergk <martinvonz@google.com> [Tue, 14 May 2019 22:19:51 -0700] rev 42406
changelog: optionally store added and removed files in changeset extras As mentioned in an earlier patch, copies._chain() is used a lot in the changeset-centric version of pathcopies(). It is expensive because it needs to look at the manifest in order to filter out copies whose target file has since been removed. I want to store the sets of added and removed files in the changeset in order to speed that up. This patch does the writing part of that. It could easily be a separate config, but it's currently tied to experimental.copies.write-to since that's the only real use case (it will also make the {file_*} template keywords faster, but I doubt that anyone cares enough about those to write extra metadata for them). The new information is stored in the changeset extras. Since they're always subsets of the changeset's "files" list, they're stored as indexes into that list. I've stored the indexes as stringified ints separated by NUL bytes. The size of 00changelog.d for the hg repo increased in size by 0.28% percent (compared to the size with only copy information in the changesets, which in turn is 0.17% larger than without copy information). We could store only the delta between the indexes and we could store them in binary, but the chosen format is more readable. We could also have implemented this as a cache outside the changelog. One advantage of doing it that way is that we would get the speedups from the {file_*} template keywords also on old repos. Another advantage is that it we can rewrite the cache if we find a bug in how we calculate the set of files. A disadvantage is that it would be more complex. Another is that it would surely use more space. We already write the copy information to the changeset extras, so it seems like a small step to also write these file sets. Differential Revision: https://phab.mercurial-scm.org/D6416
Thu, 18 Apr 2019 13:35:02 -0700 templatekw: make {file_*} compare to both merge parents (issue4292)
Martin von Zweigbergk <martinvonz@google.com> [Thu, 18 Apr 2019 13:35:02 -0700] rev 42405
templatekw: make {file_*} compare to both merge parents (issue4292) This redefines the {file_adds}, {file_dels}, {file_mods} template keywords by getting the lists from the recently introduced context methods instead of getting them from status compared to p1. As mentioned before, these are better defined on merge commits. The total number of files from the three lists now always add up to the number of files in {files}. I timed this command: hg log -r 4.0::5.0 -T '{rev}\n {file_mods}\n {file_adds}\n {file_dels}\n' It went from 7.6s to 5.6s with this patch. So it's actually faster than before. Note that the "files:" field in the bazaar test log output was using "{file_mods}" (not "{files}" as one might think based on the label). Differential Revision: https://phab.mercurial-scm.org/D6369
Fri, 31 May 2019 09:25:51 -0700 narrowspec: use vfs.tryread() instead of reimplementing
Martin von Zweigbergk <martinvonz@google.com> [Fri, 31 May 2019 09:25:51 -0700] rev 42404
narrowspec: use vfs.tryread() instead of reimplementing Note that parseconfig() works well with empty strings. Differential Revision: https://phab.mercurial-scm.org/D6465
Fri, 31 May 2019 13:25:28 -0700 help: remove a superfluous "the" in revlogs text
Martin von Zweigbergk <martinvonz@google.com> [Fri, 31 May 2019 13:25:28 -0700] rev 42403
help: remove a superfluous "the" in revlogs text Differential Revision: https://phab.mercurial-scm.org/D6466
Thu, 08 Mar 2018 11:08:24 -0800 setdiscovery: make progress on most connected groups each roundtrip
Martin von Zweigbergk <martinvonz@google.com> [Thu, 08 Mar 2018 11:08:24 -0800] rev 42402
setdiscovery: make progress on most connected groups each roundtrip Consider history like this: o | o | | | o | | | o |/ o | o | | | o | | | o |/ o | o | | | o | | | o |/ o ~ Assume the left mainline is available in the remote repo and the other commits are only in the local repo. Also imagine that instead of 3 local branches with 3 commits on each, there are 1000 branches (the number of commits on each doesn't matter much here). In such a scenario, the current setdiscovery code will pick a sample size of 200 among these branches and ask the remote which of them it has. However, the discovery for each such branch is completely independent of the discovery for the others -- knowing whether the remote has a commit in one branch doesn't give us any information about the other branches. The discovery will therefore take at least 5 roundtrips (maybe more depending on which commit in each linear chain was sampled). Since the discovery for each branch is independent, there is no reason to let one branch wait for another, so this patch makes it so we sample at least as many commits as there are branches. It may still happen (it's very likely, even) that we get multiple samples from one branch and none from another, but that will even out over a few rounds and I think this is still a big improvement. Because of http header size limits, we still use the old behavior unless experimental.httppostargs=true. I've timed this by running `hg debugdiscovery mozilla-unified --debug` in the mozilla-try repo. Both repos were local. Before this patch, last part of the output was: 2249 total queries in 5276.4859s elapsed time: 5276.652634 seconds heads summary: total common heads: 13 also local heads: 4 also remote heads: 8 both: 4 local heads: 28317 common: 4 missing: 28313 remote heads: 12 common: 8 unknown: 4 local changesets: 2014901 common: 530373 missing: 1484528 common heads: 1dad417c28ad 4a108e94d3e2 4d7ef530fffb 5350524bb654 777e60ca8853 7d97fafba271 9cd2ab4d0029 a55ce37217da d38398e5144e dcc6d7a0dc00 e09297892ada e24ec6070d7b fd559328eaf3 After this patch, the output was (including all the samples, since there were so few now): taking initial sample query 2; still undecided: 1599476, sample size is: 108195 sampling from both directions query 3; still undecided: 810922, sample size is: 194158 sampling from both directions query 4; still undecided: 325882, sample size is: 137302 sampling from both directions query 5; still undecided: 111459, sample size is: 74586 sampling from both directions query 6; still undecided: 26805, sample size is: 23960 sampling from both directions query 7; still undecided: 2549, sample size is: 2528 sampling from both directions query 8; still undecided: 21, sample size is: 21 8 total queries in 24.5064s elapsed time: 24.670051 seconds heads summary: total common heads: 13 also local heads: 4 also remote heads: 8 both: 4 local heads: 28317 common: 4 missing: 28313 remote heads: 12 common: 8 unknown: 4 local changesets: 2014901 common: 530373 missing: 1484528 common heads: 1dad417c28ad 4a108e94d3e2 4d7ef530fffb 5350524bb654 777e60ca8853 7d97fafba271 9cd2ab4d0029 a55ce37217da d38398e5144e dcc6d7a0dc00 e09297892ada e24ec6070d7b fd559328eaf3 Differential Revision: https://phab.mercurial-scm.org/D2647
Tue, 28 May 2019 14:39:26 -0400 help: clarify overlap of revlog header and first revlog entry
Nathan Goldbaum <nathan12343@gmail.com> [Tue, 28 May 2019 14:39:26 -0400] rev 42401
help: clarify overlap of revlog header and first revlog entry Differential Revision: https://phab.mercurial-scm.org/D6449
Wed, 29 May 2019 21:40:41 +0300 py3: fix test-convert-svn-sink.t
Pulkit Goyal <7895pulkit@gmail.com> [Wed, 29 May 2019 21:40:41 +0300] rev 42400
py3: fix test-convert-svn-sink.t In cases where the root commit is empty commit, None will be returned as parents. This was implemented by 2c13e91ede6e. This breaks test on py3 because `b'%s' % None` does not work. It does not matter whether we return `None` or `'None'` as we skipped converting to svn step by doing an early return. So let's return `'None'`. I tried to patch all the users to convert `None` to `'None'`, but there were more users than I expected. I hit 3 of them and decided to fix it this way around. Differential Revision: https://phab.mercurial-scm.org/D6458
Thu, 30 May 2019 13:57:34 -0700 commit: respect --no-edit in combination with --amend
Kyle Lippincott <spectral@google.com> [Thu, 30 May 2019 13:57:34 -0700] rev 42399
commit: respect --no-edit in combination with --amend Differential Revision: https://phab.mercurial-scm.org/D6464
Thu, 30 May 2019 14:14:52 -0700 commit: add test showing that commit --amend --no-edit still shows editor
Kyle Lippincott <spectral@google.com> [Thu, 30 May 2019 14:14:52 -0700] rev 42398
commit: add test showing that commit --amend --no-edit still shows editor Differential Revision: https://phab.mercurial-scm.org/D6463
(0) -30000 -10000 -3000 -1000 -300 -100 -50 -30 +30 +50 +100 +300 +1000 +3000 tip