Thu, 09 Mar 2017 15:38:00 -0800 formatter: set _first on formatter, not ui
Martin von Zweigbergk <martinvonz@google.com> [Thu, 09 Mar 2017 15:38:00 -0800] rev 31307
formatter: set _first on formatter, not ui The _first field is used for tracking when to emit a separator between items. It seems like it's clearly formatter state, not ui state, so let's move it there.
Fri, 10 Mar 2017 23:07:20 -0800 rebase: unhide original working directory node as well (issue5219)
Martin von Zweigbergk <martinvonz@google.com> [Fri, 10 Mar 2017 23:07:20 -0800] rev 31306
rebase: unhide original working directory node as well (issue5219) By including the working directory revision at the start of rebase in the repo._rebaseset, we make sure it's not hidden when we update back to it at the end of the rebase. This feels like abusing the set a bit given its name (_rebaseset), but I couldn't think of another name that's clearly better.
Fri, 10 Mar 2017 23:06:31 -0800 rebase: pass in a regular set to _setrebasesetvisibility()
Martin von Zweigbergk <martinvonz@google.com> [Fri, 10 Mar 2017 23:06:31 -0800] rev 31305
rebase: pass in a regular set to _setrebasesetvisibility() Trivial refactoring to simplify the next patch.
Wed, 01 Feb 2017 09:18:44 -0800 tests: demonstrate broken rebase from obsolete commit
Martin von Zweigbergk <martinvonz@google.com> [Wed, 01 Feb 2017 09:18:44 -0800] rev 31304
tests: demonstrate broken rebase from obsolete commit This shows the bug I reported in issue 5219.
Wed, 01 Mar 2017 16:19:41 -0800 treemanifest: make node reuse match flat manifest behavior
Durham Goode <durham@fb.com> [Wed, 01 Mar 2017 16:19:41 -0800] rev 31303
treemanifest: make node reuse match flat manifest behavior In a flat manifest, a node with the same content but different parents is still considered a new node. In the current tree manifests however, if the content is the same, we ignore the parents entirely and just reuse the existing node. In our external treemanifest extension, we want to allow having one treemanifest for every flat manifests, as a way of easeing the migration to treemanifests. To make this possible, let's change the root node treemanifest behavior to match the behavior for flat manifests, so we can have a 1:1 relationship. While this sounds like a BC breakage, it's not actually a state users can normally get in because: A) you can't make empty commits, and B) even if you try to make an empty commit (by making a commit then amending it's changes away), the higher level commit logic in localrepo.commitctx() forces the commit to use the original p1 manifest node if no files were changed. So this would only affect extensions and automation that reached passed the normal localrepo.commit() logic straight into the manifest logic.
Fri, 10 Mar 2017 17:37:39 -0500 help: update help.internalstable for new censor docs
Augie Fackler <augie@google.com> [Fri, 10 Mar 2017 17:37:39 -0500] rev 31302
help: update help.internalstable for new censor docs
Fri, 10 Mar 2017 16:54:41 -0500 parsers: drop old nonnormalentries method
Augie Fackler <augie@google.com> [Fri, 10 Mar 2017 16:54:41 -0500] rev 31301
parsers: drop old nonnormalentries method This is okay to do because the Python will fall back transparently if the method is missing.
Fri, 10 Mar 2017 16:53:00 -0500 parsers: avoid leak of nonnset and otherpset
Augie Fackler <augie@google.com> [Fri, 10 Mar 2017 16:53:00 -0500] rev 31300
parsers: avoid leak of nonnset and otherpset Py_BuildValue increments the refcount, rather than stealing the reference, which I missed in code review.
Thu, 09 Mar 2017 20:33:29 -0800 sslutil: issue warning when [hostfingerprint] is used
Gregory Szorc <gregory.szorc@gmail.com> [Thu, 09 Mar 2017 20:33:29 -0800] rev 31299
sslutil: issue warning when [hostfingerprint] is used Mercurial 3.9 added the [hostsecurity] section, which is better than [hostfingerprints] in every way. One of the ways that [hostsecurity] is better is that it supports SHA-256 and SHA-512 fingerprints, not just SHA-1 fingerprints. The world is moving away from SHA-1 because it is borderline secure. Mercurial should be part of that movement. This patch adds a warning when a valid SHA-1 fingerprint from the [hostfingerprints] section is being used. The warning informs users to switch to [hostsecurity]. It even prints the config option they should set. It uses the SHA-256 fingerprint because recommending a SHA-1 fingerprint in 2017 would be ill-advised. The warning will print itself on every connection to a server until it is fixed. There is no way to suppress the warning. I admit this is annoying. But given the security implications of sticking with SHA-1, I think this is justified. If this patch is accepted, I'll likely send a follow-up to start warning on SHA-1 certificates in [hostsecurity] as well. Then sometime down the road, we can drop support for SHA-1 fingerprints. Credit for this idea comes from timeless in issue 5466.
Thu, 09 Mar 2017 19:59:52 -0800 setup: use setuptools on Windows (issue5400)
Gregory Szorc <gregory.szorc@gmail.com> [Thu, 09 Mar 2017 19:59:52 -0800] rev 31298
setup: use setuptools on Windows (issue5400) We've had a long, complicated history with setuptools. We want to make it the universal default. But when we do, it breaks things. `python setup.py build` is broken on Windows today. Forcing the use of setuptools via FORCE_SETUPTOOLS=1 unbreaks things. Since the previous bustage with making setuptools the default was on !Windows, it seems safe to move ahead with the setuptools transition on Windows. So this patch does that.
Thu, 09 Mar 2017 19:41:40 -0800 schemes: use br'' literal to define bytes regexp
Yuya Nishihara <yuya@tcha.org> [Thu, 09 Mar 2017 19:41:40 -0800] rev 31297
schemes: use br'' literal to define bytes regexp
Thu, 09 Mar 2017 12:55:48 +0900 help: fix layout of pre-formatted text
Yuya Nishihara <yuya@tcha.org> [Thu, 09 Mar 2017 12:55:48 +0900] rev 31296
help: fix layout of pre-formatted text
Thu, 09 Mar 2017 11:01:03 +0900 help: fix example of revs() fileset
Yuya Nishihara <yuya@tcha.org> [Thu, 09 Mar 2017 11:01:03 +0900] rev 31295
help: fix example of revs() fileset
Fri, 05 Aug 2016 14:24:53 +0200 filecache: make 'join' abstract
Pierre-Yves David <pierre-yves.david@ens-lyon.org> [Fri, 05 Aug 2016 14:24:53 +0200] rev 31294
filecache: make 'join' abstract All subclasses redefine this method, so we can make it abstract.
Wed, 08 Mar 2017 16:43:16 -0800 filecache: explicitly test 'repofilecache'
Pierre-Yves David <pierre-yves.david@ens-lyon.org> [Wed, 08 Mar 2017 16:43:16 -0800] rev 31293
filecache: explicitly test 'repofilecache' The tests is actually about testing a repofilecache (it uses a fake repo). We make this clear to prevent blockers while cleaning theses API.
Fri, 05 Aug 2016 14:25:21 +0200 repofilecache: directly use 'repo.vfs.join'
Pierre-Yves David <pierre-yves.david@ens-lyon.org> [Fri, 05 Aug 2016 14:25:21 +0200] rev 31292
repofilecache: directly use 'repo.vfs.join' The 'vfs' attribute already have all methods we need, the value of going through the repository for this is low. so we removes it.
Fri, 05 Aug 2016 14:23:58 +0200 repofilecache: define a 'join' method
Pierre-Yves David <pierre-yves.david@ens-lyon.org> [Fri, 05 Aug 2016 14:23:58 +0200] rev 31291
repofilecache: define a 'join' method We are about to turn the 'join' method of the base class Abstract, so we need on to be defined in the localrepo. The ultimate goal here is to be able to stop relying for the 'localrepo' class to have a 'join' methods (there is above one hundred methods on 'localrepo'. This change make te 'repo' file cache have its own code so that we can prepare this change to the repostory class. explicite join
Mon, 06 Mar 2017 18:42:36 -0500 wix: add censor docs to installer script
Augie Fackler <augie@google.com> [Mon, 06 Mar 2017 18:42:36 -0500] rev 31290
wix: add censor docs to installer script Spotted by Matt Harbison.
Mon, 23 Jan 2017 20:17:24 -0500 internals: add some brief documentation about censor
Augie Fackler <augie@google.com> [Mon, 23 Jan 2017 20:17:24 -0500] rev 31289
internals: add some brief documentation about censor
Thu, 09 Mar 2017 15:10:27 -0800 localrepo: rename proxycls to filteredrepo
Jun Wu <quark@fb.com> [Thu, 09 Mar 2017 15:10:27 -0800] rev 31288
localrepo: rename proxycls to filteredrepo When debugging in a Python shell, the type of "repo" is "proxycls", which could confuse new people. In [1]: repo Out[1]: <mercurial.localrepo.proxycls at 0x7f65d4b976d0> Let's rename it to "filteredrepo" to make it clearer.
Wed, 08 Mar 2017 17:35:20 -0800 dirstate: track otherparent files same as nonnormal
Durham Goode <durham@fb.com> [Wed, 08 Mar 2017 17:35:20 -0800] rev 31287
dirstate: track otherparent files same as nonnormal Calling dirstate.setparents() is expensive in a large repo because it iterates over every file in the dirstate. It does so to undo any merge state or otherparent state files. Merge state files are already covered by dirstate._nonnormalset, so we just need to track otherparent files in a similar manner to avoid the full iteration here. Fixing this shaves 20-25% off histedit in large repos. I tested this by adding temporary debug logic to verify that the old files processed in the loop matched the new files processed in the loop and running the test suite.
Mon, 06 Mar 2017 09:28:33 +0100 hgweb: use patch.diffhunks in webutil.diffs to simplify the algorithm
Denis Laxalde <denis.laxalde@logilab.fr> [Mon, 06 Mar 2017 09:28:33 +0100] rev 31286
hgweb: use patch.diffhunks in webutil.diffs to simplify the algorithm Function patch.diffhunks yields items for a "block" (i.e. a file) as a whole so take advantage of this to simplify the algorithm and avoid parsing diff lines to determine whether we're starting a new "block" or not. Thus we drop to external block counter and rely on diffhunks iterations instead. We also take advantage of the fact that patch.diffhunks() yields *lines* of hunks (instead of a string) to avoid building a list that is ''.join-ed into a string that is then split. As lines in 'header' returned by patch.diffhunks() have no trailing new line, we need to insert it ourselves to match template expectations.
Mon, 06 Mar 2017 09:44:39 +0100 hgweb: start enumerate at 1 in webutil.diffs's inner function prettyprintlines
Denis Laxalde <denis.laxalde@logilab.fr> [Mon, 06 Mar 2017 09:44:39 +0100] rev 31285
hgweb: start enumerate at 1 in webutil.diffs's inner function prettyprintlines
Fri, 03 Mar 2017 17:20:11 +0100 patch: add a diffhunks function yielding (diffheaders, hunks)
Denis Laxalde <denis.laxalde@logilab.fr> [Fri, 03 Mar 2017 17:20:11 +0100] rev 31284
patch: add a diffhunks function yielding (diffheaders, hunks) trydiff function now yield (header, hunks) tuple that are processed by diffhunks(). Then diff() is a wrapper around diffhunks().
Fri, 03 Mar 2017 17:46:40 +0100 mdiff: let unidiff return (diffheader, hunks)
Denis Laxalde <denis.laxalde@logilab.fr> [Fri, 03 Mar 2017 17:46:40 +0100] rev 31283
mdiff: let unidiff return (diffheader, hunks) This will be used to make it possible to filter diff hunks based on this range information. Now unidiff returns a 'hunks' generator that yield tuple (hunkrange, hunklines) coming from _unidiff() with 'newline at end of file' processing.
Fri, 03 Mar 2017 17:46:28 +0100 mdiff: extract a checknonewline inner function in unidiff()
Denis Laxalde <denis.laxalde@logilab.fr> [Fri, 03 Mar 2017 17:46:28 +0100] rev 31282
mdiff: extract a checknonewline inner function in unidiff()
Fri, 03 Mar 2017 13:51:22 +0100 mdiff: distinguish diff headers from hunks in unidiff()
Denis Laxalde <denis.laxalde@logilab.fr> [Fri, 03 Mar 2017 13:51:22 +0100] rev 31281
mdiff: distinguish diff headers from hunks in unidiff() Let unidiff return the list of headers it produces (lines '--- <original>' and '+++ <new>') apart from diff hunks. In patch.diff(), we combine headers generated there (not specific to unified format) with those from unidiff(). By returning a list of header lines, we do not append new lines in datetag inner function of unidiff() so that all header lines are '\n'.join-ed in a similar way.
Fri, 03 Mar 2017 16:17:17 +0100 test: end printed diff "hunks" with an empty string in test-context.py
Denis Laxalde <denis.laxalde@logilab.fr> [Fri, 03 Mar 2017 16:17:17 +0100] rev 31280
test: end printed diff "hunks" with an empty string in test-context.py So that the resulting diff is correct and does not include a spurious empty line between lines "diff --git a/foo b/foo" and "--- a/foo".
Thu, 02 Mar 2017 17:22:46 +0100 mdiff: let _unidiff yield hunks as (<range information>, <hunk lines>)
Denis Laxalde <denis.laxalde@logilab.fr> [Thu, 02 Mar 2017 17:22:46 +0100] rev 31279
mdiff: let _unidiff yield hunks as (<range information>, <hunk lines>) Now _unidiff yields each hunk lines packed into a tuple with the "range information" `(s1, l1, s2, l2)` that is used to build the typical hunk header '@@ -s1,l1 +s2,l2 @@'. This will be used to make it possible to filter diff hunks based on this range information. The new "range information" is ignored in unidiff() (only caller of _unidiff) for now.
Mon, 09 Jan 2017 09:34:39 +0100 mdiff: turn the comment above _unidiff into a docstring
Denis Laxalde <denis.laxalde@logilab.fr> [Mon, 09 Jan 2017 09:34:39 +0100] rev 31278
mdiff: turn the comment above _unidiff into a docstring
(0) -30000 -10000 -3000 -1000 -300 -100 -50 -30 +30 +50 +100 +300 +1000 +3000 +10000 tip