Thu, 14 Feb 2019 18:28:27 +0530 copies: return True instead of filename as it is expected to return boolean
Sushil khanchi <sushilkhanchi97@gmail.com> [Thu, 14 Feb 2019 18:28:27 +0530] rev 41724
copies: return True instead of filename as it is expected to return boolean As the function documentation says this function should True if we hit a match and False otherwise. And I see that we are not using that returned filename anywhere. Differential Revision: https://phab.mercurial-scm.org/D5964
Mon, 11 Feb 2019 19:41:37 +0300 narrow: fix command name in error messsage
Pulkit Goyal <pulkit@yandex-team.ru> [Mon, 11 Feb 2019 19:41:37 +0300] rev 41723
narrow: fix command name in error messsage Differential Revision: https://phab.mercurial-scm.org/D5982
Fri, 15 Feb 2019 14:43:31 -0500 templatekw: add a {negrev} keyword
Jordi Gutiérrez Hermoso <jordigh@octave.org> [Fri, 15 Feb 2019 14:43:31 -0500] rev 41722
templatekw: add a {negrev} keyword Revision numbers are getting much maligned for two reasons: they are too long in large repos and users get confused by their local-only nature. It just occurred to me that negative revision numbers avoid both of those problems. Since negative revision numbers change whenever the repo changes, it's much more obvious that they are a local-only convenience. Additionally, for the recent commits that we usually care about the most, negative revision numbers are always near zero. This commit adds a negrev templatekw to more easily expose negative revision numbers. It's not easy to reliably produce this output with existing keywords due to hidden commits while at the same time ensuring good performance.
Sun, 17 Feb 2019 22:39:12 -0500 tests: correct the remaining fallout from recent path style changes on Windows
Matt Harbison <matt_harbison@yahoo.com> [Sun, 17 Feb 2019 22:39:12 -0500] rev 41721
tests: correct the remaining fallout from recent path style changes on Windows Per @martinvonz, `ui.slash` set by the test runner is now capable of playing a more active role.[1] I verified that both of these work by setting `ui.slash` to False, but these changes seem cleaner. The problem with check-perf-code.py was that the proper imports were not being whitelisted due to '\' vs '/'. [1] https://www.mercurial-scm.org/pipermail/mercurial-devel/2019-February/128701.html
Wed, 13 Feb 2019 18:34:08 -0800 templates: adding a config() function for template customization
rdamazio@google.com [Wed, 13 Feb 2019 18:34:08 -0800] rev 41720
templates: adding a config() function for template customization This allows templates to be written such that users can customize them easily, or that they can be customized based on other configuration of the system. For enterprise deployments, we often have complex template aliases, and right now the only way individual users can customize those is by replacing the whole template alias (which means they won't get company-wide updates to it anymore, plus most users don't want to have to get a complex template right). With this change, they can just set a config option which feeds into our templates for common changes (e.g. whether to limit commit descriptions to the width of their terminal or not). To work around the issue of having to register the config options, I declared a dedicated section [templateconfig] for these options to be dynamically declared. They can still reference any other config option that's registered elsewhere. I only did string, bool and int at this time - list and date would add other complications with parsing the default so I'll leave that as an exercise to the reader :) Differential Revision: https://phab.mercurial-scm.org/D5959
Thu, 31 Jan 2019 20:11:16 +0300 changegroup: don't try to prune manifest nodes if not ellipses
Pulkit Goyal <pulkit@yandex-team.ru> [Thu, 31 Jan 2019 20:11:16 +0300] rev 41719
changegroup: don't try to prune manifest nodes if not ellipses In non-ellipses case, the number of manifest nodes can be very big, and finding whether one of them can be pruned or not is very costly. For each node, we try to find the rev and the linkrev, which is expensive. Sending bit more manifest nodes seems better and much faster here. On our internal repository, this saves around 5 seconds on `hg tracked --addinclude <some_path>` on a narrow repo with ellipses disabled. Differential Revision: https://phab.mercurial-scm.org/D5782
Mon, 11 Feb 2019 16:34:48 +0300 branchmap: improve doc about BranchMapCache class
Pulkit Goyal <pulkit@yandex-team.ru> [Mon, 11 Feb 2019 16:34:48 +0300] rev 41718
branchmap: improve doc about BranchMapCache class It was confusing that we are having two different branchcache and BranchMapCache classes. The doc in BranchMapCache class was not much helpful to understand the difference. This patch improves the doc there. Differential Revision: https://phab.mercurial-scm.org/D5933
Mon, 04 Feb 2019 19:46:57 +0100 rust: itering less on MissingAncestors.bases for max()
Georges Racinet <georges.racinet@octobus.net> [Mon, 04 Feb 2019 19:46:57 +0100] rev 41717
rust: itering less on MissingAncestors.bases for max() Instead of iterating on the whole `self.bases` each time to find its max, we keep the latter in a separate member attribute and keep it up to date in `add_bases()` On a perfdiscovery done on PyPy, with repos prepared with `contrib/discovery-helper.sh 50 100`, this gives a slight improvement (around 0.5% on wall time, but 10% on CPU) before: ! wall 0.172801 comb 0.180000 user 0.180000 sys 0.000000 (median of 541) after: ! wall 0.171798 comb 0.160000 user 0.160000 sys 0.000000 (median of 551) (perf command run time upped because of bigger variability during this test). Differential Revision: https://phab.mercurial-scm.org/D5945
Tue, 05 Feb 2019 10:28:32 +0100 rust: stop putting NULL_REVISION in MissingAncestors.bases
Georges Racinet <georges.racinet@octobus.net> [Tue, 05 Feb 2019 10:28:32 +0100] rev 41716
rust: stop putting NULL_REVISION in MissingAncestors.bases As noted in initial review of MissingAncestors, adding NULL_REVISION in constructor in case the given `bases` is empty wasn't really useful, yet it's been kept for identity with the Python implementation Differential Revision: https://phab.mercurial-scm.org/D5944
Mon, 04 Feb 2019 12:04:59 +0100 rust: less set lookups in MissingAncestors
Georges Racinet <georges.racinet@octobus.net> [Mon, 04 Feb 2019 12:04:59 +0100] rev 41715
rust: less set lookups in MissingAncestors using the return values of HashSet::remove(), we can factor pairs of `contains()/remove()` into a single `remove()`. On a perfdiscovery run done on the PyPy repository, prepared with contrib/discovery-helper.sh 50 100, I do get a modest improvement with this (mean of medians of three runs is better by 2%) Sample readings, before this change: ! wall 0.175609 comb 0.180000 user 0.180000 sys 0.000000 (median of 58) With this change: ! wall 0.171662 comb 0.180000 user 0.170000 sys 0.010000 (median of 60) Differential Revision: https://phab.mercurial-scm.org/D5943
Mon, 04 Feb 2019 11:39:28 +0100 rust: less set lookups in AncestorsIterator
Georges Racinet <georges.racinet@octobus.net> [Mon, 04 Feb 2019 11:39:28 +0100] rev 41714
rust: less set lookups in AncestorsIterator This uses the boolean return of `HashSet::insert()` to factor pairs of contains()/insert() into a single insert() On the mozilla-central repository (450k changesets), I get about a bit more than 10% better medians in perfancestors (taking the mean of three runs) Best run for parent changeset: ! wall 0.106474 comb 0.110000 user 0.110000 sys 0.000000 (median of 93) Best run for this changeset: ! wall 0.093191 comb 0.090000 user 0.090000 sys 0.000000 (median of 100) Differential Revision: https://phab.mercurial-scm.org/D5942
Fri, 15 Feb 2019 17:36:57 +0300 obsutil: don't assume leftctx and rightctx repo as same
Pulkit Goyal <pulkit@yandex-team.ru> [Fri, 15 Feb 2019 17:36:57 +0300] rev 41713
obsutil: don't assume leftctx and rightctx repo as same Backed out changeset 520514af2d93. hgsubversion can pass leftctx and rightctx which are instances of two different repositories. This was making tests fail on hgsubversion with 4.9. The two different instances are: (Pdb) p rightctx.repo() <filteredrepo:served <hgsubversion.svnrepo.svnlocalrepo object at 0x7fe29d296d10>> (Pdb) p leftctx.repo() <filteredrepo:visible <hgsubversion.svnrepo.svnlocalrepo object at 0x7fe29d494590>> Differential Revision: https://phab.mercurial-scm.org/D5968
Fri, 15 Feb 2019 13:46:30 -0800 tests: add more wildcards to test-extdiff.t
Gregory Szorc <gregory.szorc@gmail.com> [Fri, 15 Feb 2019 13:46:30 -0800] rev 41712
tests: add more wildcards to test-extdiff.t The diff tool (which is `echo`) runs in the background and output order can therefore be non-deterministic. We need to glob over the file names to account for this. Differential Revision: https://phab.mercurial-scm.org/D5976
Fri, 15 Feb 2019 13:22:01 -0800 url: don't pass strict argument on Python 3
Gregory Szorc <gregory.szorc@gmail.com> [Fri, 15 Feb 2019 13:22:01 -0800] rev 41711
url: don't pass strict argument on Python 3 The argument was removed in Python 3.4. Differential Revision: https://phab.mercurial-scm.org/D5975
Fri, 15 Feb 2019 13:16:07 -0800 url: always use str for proxy configuration
Gregory Szorc <gregory.szorc@gmail.com> [Fri, 15 Feb 2019 13:16:07 -0800] rev 41710
url: always use str for proxy configuration Previously, proxies didn't work on Python 3 for various reasons. First, the keys to the "proxies" dict are fed into a `setattr(self, "%s_open", ...)` call and passing bytestrings results in setting an oddly named attribute due to the b'' in %s formatting. This resulted in "http_open" and "https_open" not being properly overridden and proxies not being used. Second, the standard library was expecting proxy URLs to be str. And various operations (including our custom code in url.py) would fail to account for the str/bytes mismatch. This commit normalizes everything to str and adjusts our proxy code in url.py to account for the presence of str on Python 3. Differential Revision: https://phab.mercurial-scm.org/D5952
Tue, 12 Feb 2019 14:29:56 -0800 py3: port tinyproxy.py to work with Python 3
Gregory Szorc <gregory.szorc@gmail.com> [Tue, 12 Feb 2019 14:29:56 -0800] rev 41709
py3: port tinyproxy.py to work with Python 3 There were various str/bytes mismatches in the code. This caused the proxy server to misbehave at run-time. The manifestation was typically premature socket disconnect from the perspective of the client. Differential Revision: https://phab.mercurial-scm.org/D5951
Tue, 12 Feb 2019 12:13:56 -0800 url: always access req._tunnel_host
Gregory Szorc <gregory.szorc@gmail.com> [Tue, 12 Feb 2019 12:13:56 -0800] rev 41708
url: always access req._tunnel_host The getattr() was there to handle Python versions before 2.6, which lacked this attribute. We /might/ be able to further delete some code here. However, the behavior here is extremely hard to follow because large parts of this code duplicate code from the Python standard library and it is difficult to understand what is actually needed. Differential Revision: https://phab.mercurial-scm.org/D5950
Fri, 15 Feb 2019 13:07:07 -0800 tests: double escape \ in test-import-eol.t and test-mq-eol.t
Gregory Szorc <gregory.szorc@gmail.com> [Fri, 15 Feb 2019 13:07:07 -0800] rev 41707
tests: double escape \ in test-import-eol.t and test-mq-eol.t The shell eats the \\. Differential Revision: https://phab.mercurial-scm.org/D5974
Fri, 15 Feb 2019 13:05:01 -0800 tests: use raw string in test-impexp-branch.t
Gregory Szorc <gregory.szorc@gmail.com> [Fri, 15 Feb 2019 13:05:01 -0800] rev 41706
tests: use raw string in test-impexp-branch.t On first glance, the escaping of \s seems correct. However, the shell eats the escape and we're left with '\s` in the written file. Let's use a raw string so we don't have to double escape. Differential Revision: https://phab.mercurial-scm.org/D5973
Mon, 11 Feb 2019 16:27:20 +0100 phabricator: make user searches case-insensitive
Julien Cristau <jcristau@mozilla.com> [Mon, 11 Feb 2019 16:27:20 +0100] rev 41705
phabricator: make user searches case-insensitive User names in conduit are case insensitive, but when looking for "FOO" it would return "foo" instead and we'd think the user didn't exist. So lower case both the query and the response when comparing them. Differential Revision: https://phab.mercurial-scm.org/D5934
Fri, 15 Feb 2019 11:31:17 -0800 exchange: raise error.Abort instead of ValueError
Gregory Szorc <gregory.szorc@gmail.com> [Fri, 15 Feb 2019 11:31:17 -0800] rev 41704
exchange: raise error.Abort instead of ValueError Raising ValueError results in an uncaught exception and a traceback being printed. In the context of servers, it can result in an HTTP 500 and an exception being logged in the error log. I don't think this is proper behavior. The bundle2 code paths have a mechanism for translating an error.Abort into an error message reported to the clients. I think we should use that instead. This commit replaces some ValueError with Abort so that servers can error more gracefully. Differential Revision: https://phab.mercurial-scm.org/D5972
Fri, 15 Feb 2019 11:42:54 -0800 tests: remove -q from test-lfs-serve.t
Gregory Szorc <gregory.szorc@gmail.com> [Fri, 15 Feb 2019 11:42:54 -0800] rev 41703
tests: remove -q from test-lfs-serve.t This will make it easier to observe a behavior change in the next commit. Differential Revision: https://phab.mercurial-scm.org/D5971
Wed, 13 Feb 2019 16:58:24 -0500 chistedit: use magenta for current line as in crecord (issue6071)
Jordi Gutiérrez Hermoso <jordigh@octave.org> [Wed, 13 Feb 2019 16:58:24 -0500] rev 41702
chistedit: use magenta for current line as in crecord (issue6071) It was inconsistent in the UI to have different way to show the current line.
Thu, 14 Feb 2019 20:57:26 +0530 chistedit: improve proper username in histedit curses interface
Akshit Jain <Akshjain.jain74@gmail.com> [Thu, 14 Feb 2019 20:57:26 +0530] rev 41701
chistedit: improve proper username in histedit curses interface in changeset section (issue6072) Differential Revision: https://phab.mercurial-scm.org/D5967
Thu, 14 Feb 2019 10:41:47 -0500 crecord: remove obsolete version check
Jordi Gutiérrez Hermoso <jordigh@octave.org> [Thu, 14 Feb 2019 10:41:47 -0500] rev 41700
crecord: remove obsolete version check An internal function shouldn't be checking compatibility with Mercurial versions.
Wed, 13 Feb 2019 16:02:44 -0500 histedit: remove "chistedit" mention from interface
Jordi Gutiérrez Hermoso <jordigh@octave.org> [Wed, 13 Feb 2019 16:02:44 -0500] rev 41699
histedit: remove "chistedit" mention from interface "chisted" is internal jargon. The end user should not need to be aware that it's different from histedit.
Wed, 13 Feb 2019 18:17:42 +0530 revset: improve documentation on expectsize()
Navaneeth Suresh <navaneeths1998@gmail.com> [Wed, 13 Feb 2019 18:17:42 +0530] rev 41698
revset: improve documentation on expectsize() This is a follow-up patch to D5813. It improves the documentation of `expectsize(set, size)`. Differential Revision: https://phab.mercurial-scm.org/D5953
Wed, 13 Feb 2019 12:09:36 -0800 scmutil: fix a comment that doesn't match the code
Martin von Zweigbergk <martinvonz@google.com> [Wed, 13 Feb 2019 12:09:36 -0800] rev 41697
scmutil: fix a comment that doesn't match the code Differential Revision: https://phab.mercurial-scm.org/D5956
Thu, 14 Feb 2019 13:16:36 -0800 remotefilelog: remove strkwargs()
Gregory Szorc <gregory.szorc@gmail.com> [Thu, 14 Feb 2019 13:16:36 -0800] rev 41696
remotefilelog: remove strkwargs() The previous commit activated previously unused code paths on Python 3 and revealed that we were calling strkwargs() on a dict that already had str keys. The only caller of _forceprefetch() is _adjustlinknode() a few lines up and the static commonlogkwargs dict features str keys. Differential Revision: https://phab.mercurial-scm.org/D5958
Wed, 13 Feb 2019 16:31:20 -0800 remotefilelog: use raw strings when looking for variable names
Gregory Szorc <gregory.szorc@gmail.com> [Wed, 13 Feb 2019 16:31:20 -0800] rev 41695
remotefilelog: use raw strings when looking for variable names Keys in self.__dict__ and vars() are always str. So we need to use raw strings to ensure lookups work on Python 3. # skip-blame just r'' prefixes Differential Revision: https://phab.mercurial-scm.org/D5957
Thu, 10 Jan 2019 18:25:18 +0100 rust-cpython: binding for headrevs()
Georges Racinet <georges.racinet@octobus.net> [Thu, 10 Jan 2019 18:25:18 +0100] rev 41694
rust-cpython: binding for headrevs() This uses the core `dagops::retain_heads` to give a Rust implementation to `mercurial.dagop.headrevs`. Testing happens for now from `test-rust-ancestors.py` (for quick and minimal change), but it'd made more sense to put the binary index data elsewhere and to create a new test python module
Wed, 16 Jan 2019 16:05:27 +0100 rust-cpython: moved py_set() utility to conversion module
Georges Racinet <georges.racinet@octobus.net> [Wed, 16 Jan 2019 16:05:27 +0100] rev 41693
rust-cpython: moved py_set() utility to conversion module We're still hoping to get rid of it eventually, but we're going to need it from outside the `ancestors` module before that.
Sun, 02 Dec 2018 16:19:22 +0100 rust: translated random test of missingancestors
Georges Racinet <gracinet@anybox.fr> [Sun, 02 Dec 2018 16:19:22 +0100] rev 41692
rust: translated random test of missingancestors This is a Rust implementation of the random DAG generator and related incrementalmissingancestors tests against a naive brute force implementation. It is provided as an integration test, so that it won't run by default if any unit test fails. In case of a failed example, all needed information for reproduction is included in the panic message, (this is how `test_remove_ancestors_from_case1()` has been generated), as well as the random seed. The whole test is rerunnable by passing the random seed in the TEST_RANDOM_SEED environment variable. The other parameters (numbers of iterations) can be passed in the TEST_MISSING_ANCESTORS environment variable. An alternative would have been to expose to Python MissingAncestors<VecGraphs> but that would have meant pollution of the release build used from Python, whereas we do it in this changeset within the tests submodule Differential Revision: https://phab.mercurial-scm.org/D5417
Tue, 12 Feb 2019 13:46:38 -0800 debugpathcopies: fix typo in synopsis
Martin von Zweigbergk <martinvonz@google.com> [Tue, 12 Feb 2019 13:46:38 -0800] rev 41691
debugpathcopies: fix typo in synopsis Differential Revision: https://phab.mercurial-scm.org/D5949
Tue, 12 Feb 2019 13:42:42 -0800 debugrename: don't require at least one path
Martin von Zweigbergk <martinvonz@google.com> [Tue, 12 Feb 2019 13:42:42 -0800] rev 41690
debugrename: don't require at least one path I don't see a reason that it needs to require a path. Most commands match everything when no paths are given, but here you have to do something like `hg debugrename -r . .` (from the repo root) to match everything. Differential Revision: https://phab.mercurial-scm.org/D5948
Tue, 12 Feb 2019 11:27:27 -0800 revlog: use iterbytestr()
Gregory Szorc <gregory.szorc@gmail.com> [Tue, 12 Feb 2019 11:27:27 -0800] rev 41689
revlog: use iterbytestr() Otherwise we iterate over integers in Python 3 and the character compare fails. Differential Revision: https://phab.mercurial-scm.org/D5947
Sun, 10 Feb 2019 22:41:51 -0800 commit: respect ui.relative-paths
Martin von Zweigbergk <martinvonz@google.com> [Sun, 10 Feb 2019 22:41:51 -0800] rev 41688
commit: respect ui.relative-paths The command usually doesn't print any paths, but there are some warnings and verbose messages that includes paths. Differential Revision: https://phab.mercurial-scm.org/D5939
Sun, 10 Feb 2019 22:21:45 -0800 resolve: slightly simplify join expression by joining with empty strings
Martin von Zweigbergk <martinvonz@google.com> [Sun, 10 Feb 2019 22:21:45 -0800] rev 41687
resolve: slightly simplify join expression by joining with empty strings Differential Revision: https://phab.mercurial-scm.org/D5938
Sun, 10 Feb 2019 22:18:19 -0800 resolve: respect ui.relative-paths also for warning messages
Martin von Zweigbergk <martinvonz@google.com> [Sun, 10 Feb 2019 22:18:19 -0800] rev 41686
resolve: respect ui.relative-paths also for warning messages I guess this should have been part of 72a9aacff645 (resolve: respect ui.relative-paths, 2019-01-29). Differential Revision: https://phab.mercurial-scm.org/D5937
Mon, 11 Feb 2019 09:40:24 -0800 addremove: respect ui.relative-paths
Martin von Zweigbergk <martinvonz@google.com> [Mon, 11 Feb 2019 09:40:24 -0800] rev 41685
addremove: respect ui.relative-paths I previously changed these code paths while trying to not change any behavior to avoid inconsistencies between them in the intermediate commits. They're now all ready to be switched over to respecting ui.relative-paths. Differential Revision: https://phab.mercurial-scm.org/D5936
Mon, 11 Feb 2019 09:12:23 -0800 windows: use util.localpath for repo-relative paths in getuipathfn()
Martin von Zweigbergk <martinvonz@google.com> [Mon, 11 Feb 2019 09:12:23 -0800] rev 41684
windows: use util.localpath for repo-relative paths in getuipathfn() Now that we have a single place that translates from internal path representation (slash-separated) to UI representation (i.e. scmutil.getuipathfn()), let's switch that over to using util.localpath for absolute paths. I don't expect any test impact on Windows because we still respect ui.slash, which is set by the test runner. As Yuya pointed out, a997163e7fae (status: extract helper for producing relative or absolute path for UI, 2019-01-29) accidentally changed to slash-separated paths on Windows because it used used to use repo.pathto(f, cwd='') (which calls util.localpath()) and after that patch it just prints the filename without any transformation. This patch should fix that regression. Differential Revision: https://phab.mercurial-scm.org/D5935
Tue, 12 Feb 2019 17:10:31 -0500 walkchangerevs: obey allfiles parameter when taking the slow path
Jordi Gutiérrez Hermoso <jordigh@octave.org> [Tue, 12 Feb 2019 17:10:31 -0500] rev 41683
walkchangerevs: obey allfiles parameter when taking the slow path When walkchangerevs sees that there's a pattern, it hits the slow path. The slow path in turn reverts to the old dumb grep behaviour of only looking at files changed at each revision. Therefore, a command such as hg grep -l --all-files '.*' 'glob:**' would show you all the nonempty files touched by the current revision. This modifies that behaviour to look at the manifest at each revision instead of the changed files in case that --all-files was requested.
Fri, 08 Feb 2019 18:26:35 +0100 test: stabilize test-wireproto-exchangev2.t flaky output
Boris Feld <boris.feld@octobus.net> [Fri, 08 Feb 2019 18:26:35 +0100] rev 41682
test: stabilize test-wireproto-exchangev2.t flaky output When running the test suite with multiple processes, we often get flaky outputs, like here: https://ci.octobus.net/job/MercurialPy2/267/console ``` - received frame(size=0; request=1; stream=2; streamflags=; type=command-response; flags=eos) add changeset cd2534766bec add changeset e96ae20f4188 add changeset caa2a465451d + received frame(size=0; request=1; stream=2; streamflags=; type=command-response; flags=eos) ``` Instead of simply sorting the clone and pull output, I saved the output in a separate file and checked the `received frame` messages on one side and then the rest of the output on the other side. This way we conserve the order of messages as it seems important. Differential Revision: https://phab.mercurial-scm.org/D5897
Mon, 04 Feb 2019 14:29:03 -0800 zsh: fix `hg resolve` completion when in a subdirectory (issue6067)
Kyle Lippincott <spectral@google.com> [Mon, 04 Feb 2019 14:29:03 -0800] rev 41681
zsh: fix `hg resolve` completion when in a subdirectory (issue6067) Differential Revision: https://phab.mercurial-scm.org/D5836
Sun, 03 Feb 2019 19:10:39 +0530 revset: add expectsize to check the size of a set
Navaneeth Suresh <navaneeths1998@gmail.com> [Sun, 03 Feb 2019 19:10:39 +0530] rev 41680
revset: add expectsize to check the size of a set `expectsize(<set>, <int>)` revset fails if `<set>` is not exactly `<int>` elements. `expectsize(<set>, <min>:<max>)` revset fails if `<set>` is not exactly between `<min>` and `<max>` inclusive. This then allows an alias for `hg next` to be `update -r one(children(.))` with sane failure behavior, and also makes some other scripting tasks a little less difficult. (Summary from WeShouldDoThat) Differential Revision: https://phab.mercurial-scm.org/D5813
Mon, 11 Feb 2019 11:18:37 -0500 merge with stable
Augie Fackler <augie@google.com> [Mon, 11 Feb 2019 11:18:37 -0500] rev 41679
merge with stable
Mon, 11 Feb 2019 15:41:08 +0300 branchmap: decode a label only once
Pulkit Goyal <pulkit@yandex-team.ru> [Mon, 11 Feb 2019 15:41:08 +0300] rev 41678
branchmap: decode a label only once This moves decoding of a label out of for loop. Minor speed up expected in cases when one branch has multiple heads. For example: someone using bookmarks as branches and hence ending up with multiple heads on default branch. Differential Revision: https://phab.mercurial-scm.org/D5932
Mon, 11 Feb 2019 15:34:35 +0300 branchmap: move __init__ up in branchcache class
Pulkit Goyal <pulkit@yandex-team.ru> [Mon, 11 Feb 2019 15:34:35 +0300] rev 41677
branchmap: move __init__ up in branchcache class Making __init__ the first function defined helps understanding the class much better. Differential Revision: https://phab.mercurial-scm.org/D5931
Sat, 09 Feb 2019 22:50:53 -0800 match: delete unused root and cwd arguments from {always,never,exact}() (API)
Martin von Zweigbergk <martinvonz@google.com> [Sat, 09 Feb 2019 22:50:53 -0800] rev 41676
match: delete unused root and cwd arguments from {always,never,exact}() (API) Differential Revision: https://phab.mercurial-scm.org/D5930
Sun, 10 Feb 2019 14:35:36 -0800 match: delete unused root and cwd arguments to constructors (API)
Martin von Zweigbergk <martinvonz@google.com> [Sun, 10 Feb 2019 14:35:36 -0800] rev 41675
match: delete unused root and cwd arguments to constructors (API) Most matchers no longer need the root and cwd arguments. patternmatcher and includematcher still need the root argument for subincludes. Differential Revision: https://phab.mercurial-scm.org/D5929
Sun, 10 Feb 2019 21:33:21 -0800 dirstate: call and cache os.getcwd() in constructor
Martin von Zweigbergk <martinvonz@google.com> [Sun, 10 Feb 2019 21:33:21 -0800] rev 41674
dirstate: call and cache os.getcwd() in constructor I'm about to make scmutil.matchfiles() not pass the root and cwd paths to match.exact(), since they no longer have any effect. That turned out to have the surprising effect of making some tests (test-rebase-scenario-global.t and test-removeemptydirs.t) crash when the working directory was removed. The problem was that my patch removed the call to repo.getcwd(), which caused the current working directory to not be cached in the dirstate as early as it was before. This patch fixes that by caching the current working directory in the dirstate constructor. Differential Revision: https://phab.mercurial-scm.org/D5928
Sun, 10 Feb 2019 14:16:37 -0800 cleanup: prefer matchmod.{always,never}() over accessing matchers directly
Martin von Zweigbergk <martinvonz@google.com> [Sun, 10 Feb 2019 14:16:37 -0800] rev 41673
cleanup: prefer matchmod.{always,never}() over accessing matchers directly We have these factory methods so we should use them. Differential Revision: https://phab.mercurial-scm.org/D5927
Sun, 10 Feb 2019 14:16:33 -0800 match: allow passing in badfn to always() and never()
Martin von Zweigbergk <martinvonz@google.com> [Sun, 10 Feb 2019 14:16:33 -0800] rev 41672
match: allow passing in badfn to always() and never() So that no callers are required to access the matchers themselves. Differential Revision: https://phab.mercurial-scm.org/D5926
Sun, 10 Feb 2019 14:04:08 -0800 py3: use raw strings and %d for formatting
Gregory Szorc <gregory.szorc@gmail.com> [Sun, 10 Feb 2019 14:04:08 -0800] rev 41671
py3: use raw strings and %d for formatting Before the string compares on Python 3 failed because we were comparing bytes to str. Using raw strings ensures we are always comparing str. While we're here, also use %d to format integers. Differential Revision: https://phab.mercurial-scm.org/D5925
Thu, 31 Jan 2019 15:35:51 -0800 diff: make --stat respect ui.relative-paths
Martin von Zweigbergk <martinvonz@google.com> [Thu, 31 Jan 2019 15:35:51 -0800] rev 41670
diff: make --stat respect ui.relative-paths It would have been easy to make all diffs respect ui.relative-paths, but we don't want that since it makes the diff invalid. Perhaps it makes sense to do that with --noprefix since the point of that is to make paths that are easy to copy&paste, and the diff is already invalid anyway. But this patch just makes the --stat version respect the config option. The --stat view is not even close to a valid diff, so I think it makes sense to show the paths in more human-friendly form. Differential Revision: https://phab.mercurial-scm.org/D5896
Sat, 09 Feb 2019 23:48:19 -0800 match: delete unused argument "listsubrepos" from _buildmatch()
Martin von Zweigbergk <martinvonz@google.com> [Sat, 09 Feb 2019 23:48:19 -0800] rev 41669
match: delete unused argument "listsubrepos" from _buildmatch() Seems to have been unused since 9f9ffe5f687c (match: compose 'set:' pattern as matcher, 2018-06-10). Differential Revision: https://phab.mercurial-scm.org/D5924
Sat, 09 Feb 2019 16:46:11 -0800 match: delete unused rel() (API)
Martin von Zweigbergk <martinvonz@google.com> [Sat, 09 Feb 2019 16:46:11 -0800] rev 41668
match: delete unused rel() (API) Differential Revision: https://phab.mercurial-scm.org/D5923
Sat, 09 Feb 2019 16:43:20 -0800 largefiles: get cwd and relative paths from repo instead of matcher
Martin von Zweigbergk <martinvonz@google.com> [Sat, 09 Feb 2019 16:43:20 -0800] rev 41667
largefiles: get cwd and relative paths from repo instead of matcher As far as I can tell, the matcher returned from matchandpats() got its cwd from the context object, which in turn got it from the repo, so this should be equivalent. Differential Revision: https://phab.mercurial-scm.org/D5922
Sat, 09 Feb 2019 14:37:58 -0800 scmutil: remove special handling of pats==("",) in matchandpats() (API)
Martin von Zweigbergk <martinvonz@google.com> [Sat, 09 Feb 2019 14:37:58 -0800] rev 41666
scmutil: remove special handling of pats==("",) in matchandpats() (API) I don't know under what circumstances we used to pass that value, but we don't seem to do it now. Differential Revision: https://phab.mercurial-scm.org/D5921
Fri, 08 Feb 2019 13:33:40 -0800 scmutil: respect ui.relative-paths in default match.badfn
Martin von Zweigbergk <martinvonz@google.com> [Fri, 08 Feb 2019 13:33:40 -0800] rev 41665
scmutil: respect ui.relative-paths in default match.badfn We should probably be passing in a uipathfn here instead, so the caller can get consistent output (between match.badfn and whatever else it prints). I think we should ideally remove the badfn from the matcher completely, but that's a different story. This patch is at least not making it worse. Differential Revision: https://phab.mercurial-scm.org/D5916
Fri, 08 Feb 2019 13:00:28 -0800 cmdutil: migrate previously missed instances to uipathfn
Martin von Zweigbergk <martinvonz@google.com> [Fri, 08 Feb 2019 13:00:28 -0800] rev 41664
cmdutil: migrate previously missed instances to uipathfn I seem to have missed these two instances in 15f63ac122ea (files: respect ui.relative-paths, 2019-01-29) and 7068c6b0114b (revert: respect ui.relative-paths, 2019-02-05). Differential Revision: https://phab.mercurial-scm.org/D5915
Fri, 08 Feb 2019 13:54:20 -0800 cat: respect ui.relative-paths for "skipping missing subrepository"
Martin von Zweigbergk <martinvonz@google.com> [Fri, 08 Feb 2019 13:54:20 -0800] rev 41663
cat: respect ui.relative-paths for "skipping missing subrepository" Differential Revision: https://phab.mercurial-scm.org/D5914
Fri, 08 Feb 2019 13:51:29 -0800 addremove: use uipathfn instead of m.rel() for recorded similatity message
Martin von Zweigbergk <martinvonz@google.com> [Fri, 08 Feb 2019 13:51:29 -0800] rev 41662
addremove: use uipathfn instead of m.rel() for recorded similatity message When no path arguments are given to addremove, it generally prints absolute paths. However, before this patch, we would always print the "recording removal of foo as rename to bar (78% similar)" message with relative paths. Differential Revision: https://phab.mercurial-scm.org/D5913
Thu, 07 Feb 2019 14:22:11 -0800 forget: use relative paths for --interactive
Martin von Zweigbergk <martinvonz@google.com> [Thu, 07 Feb 2019 14:22:11 -0800] rev 41661
forget: use relative paths for --interactive Seems more consistent. Differential Revision: https://phab.mercurial-scm.org/D5912
Fri, 08 Feb 2019 13:20:46 -0800 automv: respect ui.relative-paths
Martin von Zweigbergk <martinvonz@google.com> [Fri, 08 Feb 2019 13:20:46 -0800] rev 41660
automv: respect ui.relative-paths Differential Revision: https://phab.mercurial-scm.org/D5910
Fri, 08 Feb 2019 13:27:54 -0800 debugwalk: avoid match.rel() and use repo.pathto() instead
Martin von Zweigbergk <martinvonz@google.com> [Fri, 08 Feb 2019 13:27:54 -0800] rev 41659
debugwalk: avoid match.rel() and use repo.pathto() instead I'm about to delete match.rel() Differential Revision: https://phab.mercurial-scm.org/D5909
Fri, 08 Feb 2019 13:27:26 -0800 match: delete unused abs() (API)
Martin von Zweigbergk <martinvonz@google.com> [Fri, 08 Feb 2019 13:27:26 -0800] rev 41658
match: delete unused abs() (API) Differential Revision: https://phab.mercurial-scm.org/D5908
Fri, 08 Feb 2019 13:00:05 -0800 copy: respect ui.relative-paths in copy/rename
Martin von Zweigbergk <martinvonz@google.com> [Fri, 08 Feb 2019 13:00:05 -0800] rev 41657
copy: respect ui.relative-paths in copy/rename Differential Revision: https://phab.mercurial-scm.org/D5907
Fri, 08 Feb 2019 12:00:44 -0800 match: delete unused uipath() and _uipathrelative (API)
Martin von Zweigbergk <martinvonz@google.com> [Fri, 08 Feb 2019 12:00:44 -0800] rev 41656
match: delete unused uipath() and _uipathrelative (API) Differential Revision: https://phab.mercurial-scm.org/D5906
Fri, 08 Feb 2019 11:56:39 -0800 diff: respect ui.relative-paths for warning about path outside --root
Martin von Zweigbergk <martinvonz@google.com> [Fri, 08 Feb 2019 11:56:39 -0800] rev 41655
diff: respect ui.relative-paths for warning about path outside --root I set legacyrelativevalue=True rather than being based on what patterns the user passed (as the current match.uipath() does). I think it simply doesn't really matter for this message (there are not even any tests for it). Differential Revision: https://phab.mercurial-scm.org/D5905
Thu, 07 Feb 2019 23:29:14 -0800 largefiles: use uipathfn instead of match.{rel,uipath}() (API)
Martin von Zweigbergk <martinvonz@google.com> [Thu, 07 Feb 2019 23:29:14 -0800] rev 41654
largefiles: use uipathfn instead of match.{rel,uipath}() (API) All callers now pass in a uipathfn, so we can just use that instead of choosing the right match function. This also means that when we make add/remove respect ui.relative-paths, it will work for largefiles too. Differential Revision: https://phab.mercurial-scm.org/D5904
Fri, 08 Feb 2019 13:08:01 -0800 forget: pass around uipathfn and use instead of m.rel() (API)
Martin von Zweigbergk <martinvonz@google.com> [Fri, 08 Feb 2019 13:08:01 -0800] rev 41653
forget: pass around uipathfn and use instead of m.rel() (API) Differential Revision: https://phab.mercurial-scm.org/D5911
Thu, 07 Feb 2019 23:25:39 -0800 addremove: pass around uipathfn and use instead of m.uipath() (API)
Martin von Zweigbergk <martinvonz@google.com> [Thu, 07 Feb 2019 23:25:39 -0800] rev 41652
addremove: pass around uipathfn and use instead of m.uipath() (API) Differential Revision: https://phab.mercurial-scm.org/D5903
Thu, 07 Feb 2019 23:19:33 -0800 remove: pass around uipathfn and use instead of m.rel() (API)
Martin von Zweigbergk <martinvonz@google.com> [Thu, 07 Feb 2019 23:19:33 -0800] rev 41651
remove: pass around uipathfn and use instead of m.rel() (API) Same as previous commit, but now for remove. Differential Revision: https://phab.mercurial-scm.org/D5902
Thu, 07 Feb 2019 11:15:30 -0800 add: pass around uipathfn and use instead of m.rel() (API)
Martin von Zweigbergk <martinvonz@google.com> [Thu, 07 Feb 2019 11:15:30 -0800] rev 41650
add: pass around uipathfn and use instead of m.rel() (API) For now, the uipathfn we pass around always prints relative paths just like before, so this should have no effect. Well, there's one little change: I also made the "skipping missing subrepository: %s\n" message relative. Differential Revision: https://phab.mercurial-scm.org/D5901
Fri, 08 Feb 2019 10:32:48 -0800 subrepo: (mostly) use relative path in "skipping missing subrepository"
Martin von Zweigbergk <martinvonz@google.com> [Fri, 08 Feb 2019 10:32:48 -0800] rev 41649
subrepo: (mostly) use relative path in "skipping missing subrepository" This is consistent with the other messages printed by these functions. Note that addremove is a little different and prints absolute (aka repo-relative) paths if no argument was given. Differential Revision: https://phab.mercurial-scm.org/D5900
Fri, 08 Feb 2019 10:19:30 -0800 subrepo: use relative path for "already tracked" message
Martin von Zweigbergk <martinvonz@google.com> [Fri, 08 Feb 2019 10:19:30 -0800] rev 41648
subrepo: use relative path for "already tracked" message From 932de135041f (subrepo: warn when adding already tracked files in gitsubrepo, 2015-02-27): The file is printed with abs() to be consistent with how it is printed in workingctx, even though that is inconsistent with how added files are printed in verbose mode. However, a few year later, the same author wrote 7008f6819002 (context: name files relative to cwd in warning messages, 2017-07-11) and now it's inconsistent. This fixes that inconsistency. Differential Revision: https://phab.mercurial-scm.org/D5899
Wed, 06 Feb 2019 23:56:59 -0800 diff: make `hg diff --root=subrepo` work
Martin von Zweigbergk <martinvonz@google.com> [Wed, 06 Feb 2019 23:56:59 -0800] rev 41647
diff: make `hg diff --root=subrepo` work The root prefix is currently stripped before adding the subrepo prefix. It seems to me that if you run `hg diff --root=subrepo` and a subrepo/ path is visited (say "subrepo/foo"), then the path generated for the diff would initially be just "foo" and we then fail (if the developer warning is active) to strip the "subrepo/" from the path. It seems like we should first add the prefix in order to produce a path that's relative to the top-level repo, and then we can remove the root prefix from that. There are no tests for this, it seems, and I don't care enough to add one. Differential Revision: https://phab.mercurial-scm.org/D5895
Wed, 06 Feb 2019 23:12:56 -0800 patch: replace "prefix" and "relroot" arguments by "pathfn" (API)
Martin von Zweigbergk <martinvonz@google.com> [Wed, 06 Feb 2019 23:12:56 -0800] rev 41646
patch: replace "prefix" and "relroot" arguments by "pathfn" (API) The two arguments serve a very similar purpose: "relroot" is stripped from the front of the path, and then "prefix" (a subrepo path) is added (also to the front). Passing in a function that does that is more generic and will make it easier to respect ui.relative-paths in later patches (don't worry, I'm not going to respect that option for regular patches, only for --stat). I'm deliberately not calling it "uipathfn", because it's generally for producing valid diffs (including when prefix is non-empty), so things like using backslash on Windows is not an option. Differential Revision: https://phab.mercurial-scm.org/D5894
Sat, 09 Feb 2019 01:24:32 +0100 test: use `printenv.py --line` in `test-static-http.t`
Boris Feld <boris.feld@octobus.net> [Sat, 09 Feb 2019 01:24:32 +0100] rev 41645
test: use `printenv.py --line` in `test-static-http.t` This makes the output easier to update and read.
Sat, 09 Feb 2019 01:24:19 +0100 test: use `printenv.py --line` in `test-ssh.t`
Boris Feld <boris.feld@octobus.net> [Sat, 09 Feb 2019 01:24:19 +0100] rev 41644
test: use `printenv.py --line` in `test-ssh.t` This makes the output easier to update and read.
Sat, 09 Feb 2019 01:23:49 +0100 test: use `printenv.py --line` in `test-ssh-bundle1.t`
Boris Feld <boris.feld@octobus.net> [Sat, 09 Feb 2019 01:23:49 +0100] rev 41643
test: use `printenv.py --line` in `test-ssh-bundle1.t` This makes the output easier to update and read.
Sat, 09 Feb 2019 01:23:29 +0100 test: use `printenv.py --line` in `test-push-http.t`
Boris Feld <boris.feld@octobus.net> [Sat, 09 Feb 2019 01:23:29 +0100] rev 41642
test: use `printenv.py --line` in `test-push-http.t` This makes the output easier to update and read.
Sat, 09 Feb 2019 01:22:20 +0100 test: use `printenv.py --line` in `test-https.t`
Boris Feld <boris.feld@octobus.net> [Sat, 09 Feb 2019 01:22:20 +0100] rev 41641
test: use `printenv.py --line` in `test-https.t` This makes the output easier to update and read.
Sat, 09 Feb 2019 01:20:35 +0100 test: use `printenv.py --line` in `test-http-bundle1.t`
Boris Feld <boris.feld@octobus.net> [Sat, 09 Feb 2019 01:20:35 +0100] rev 41640
test: use `printenv.py --line` in `test-http-bundle1.t` This makes the output easier to update and read.
Sat, 09 Feb 2019 01:20:03 +0100 test: use `printenv.py --line` in `test-hook.t`
Boris Feld <boris.feld@octobus.net> [Sat, 09 Feb 2019 01:20:03 +0100] rev 41639
test: use `printenv.py --line` in `test-hook.t` This makes the output easier to update and read.
Sat, 09 Feb 2019 01:19:43 +0100 test: use `printenv.py --line` in `test-bundle2-multiple-changegroups.t`
Boris Feld <boris.feld@octobus.net> [Sat, 09 Feb 2019 01:19:43 +0100] rev 41638
test: use `printenv.py --line` in `test-bundle2-multiple-changegroups.t` This makes the output easier to update and read.
Sat, 09 Feb 2019 01:19:15 +0100 test: use `printenv.py --line` in `test-bundle.t`
Boris Feld <boris.feld@octobus.net> [Sat, 09 Feb 2019 01:19:15 +0100] rev 41637
test: use `printenv.py --line` in `test-bundle.t` This makes the output easier to update and read.
Thu, 07 Feb 2019 23:41:44 -0800 debugignore: respect ui.relative-paths
Martin von Zweigbergk <martinvonz@google.com> [Thu, 07 Feb 2019 23:41:44 -0800] rev 41636
debugignore: respect ui.relative-paths Not because I care about this, but I want to get rid of match.uipath() and it's easier to respect the config than not. Differential Revision: https://phab.mercurial-scm.org/D5898
Fri, 08 Feb 2019 13:31:26 -0800 annotate: respect ui.relative-paths for "binary file" message
Martin von Zweigbergk <martinvonz@google.com> [Fri, 08 Feb 2019 13:31:26 -0800] rev 41635
annotate: respect ui.relative-paths for "binary file" message Differential Revision: https://phab.mercurial-scm.org/D5917
Fri, 08 Feb 2019 23:29:07 -0800 remotefilelog: replace matchandpats() by match()
Martin von Zweigbergk <martinvonz@google.com> [Fri, 08 Feb 2019 23:29:07 -0800] rev 41634
remotefilelog: replace matchandpats() by match() It doesn't seem like replacing "pats" was useful here. Replacing ("",) by [] doesn't seem like it would make a difference and glob-expansion only happens on Windows. It seem like we should just pass the patterns on to orig() unmodified. Differential Revision: https://phab.mercurial-scm.org/D5920
Thu, 31 Jan 2019 12:49:22 -0800 blackbox: test that track=* works to log everything
Kyle Lippincott <spectral@google.com> [Thu, 31 Jan 2019 12:49:22 -0800] rev 41633
blackbox: test that track=* works to log everything Differential Revision: https://phab.mercurial-scm.org/D5784
Thu, 31 Jan 2019 11:55:02 -0800 blackbox: test that unsetting track disables blackbox logging
Kyle Lippincott <spectral@google.com> [Thu, 31 Jan 2019 11:55:02 -0800] rev 41632
blackbox: test that unsetting track disables blackbox logging Differential Revision: https://phab.mercurial-scm.org/D5783
Thu, 07 Feb 2019 10:20:57 -0800 subrepo: adjust subrepo prefix before calling subrepo.archive() (API)
Martin von Zweigbergk <martinvonz@google.com> [Thu, 07 Feb 2019 10:20:57 -0800] rev 41631
subrepo: adjust subrepo prefix before calling subrepo.archive() (API) Differential Revision: https://phab.mercurial-scm.org/D5887
Thu, 07 Feb 2019 09:52:36 -0800 subrepo: adjust subrepo prefix before calling subrepo.diff() (API)
Martin von Zweigbergk <martinvonz@google.com> [Thu, 07 Feb 2019 09:52:36 -0800] rev 41630
subrepo: adjust subrepo prefix before calling subrepo.diff() (API) Differential Revision: https://phab.mercurial-scm.org/D5886
Thu, 07 Feb 2019 10:01:55 -0800 subrepo: adjust subrepo prefix before calling subrepo.addremove() (API)
Martin von Zweigbergk <martinvonz@google.com> [Thu, 07 Feb 2019 10:01:55 -0800] rev 41629
subrepo: adjust subrepo prefix before calling subrepo.addremove() (API) Differential Revision: https://phab.mercurial-scm.org/D5885
Thu, 07 Feb 2019 09:59:27 -0800 subrepo: adjust subrepo prefix before calling subrepo.add() (API)
Martin von Zweigbergk <martinvonz@google.com> [Thu, 07 Feb 2019 09:59:27 -0800] rev 41628
subrepo: adjust subrepo prefix before calling subrepo.add() (API) Differential Revision: https://phab.mercurial-scm.org/D5884
Thu, 07 Feb 2019 09:52:22 -0800 subrepo: adjust subrepo prefix before calling subrepo.forget() (API)
Martin von Zweigbergk <martinvonz@google.com> [Thu, 07 Feb 2019 09:52:22 -0800] rev 41627
subrepo: adjust subrepo prefix before calling subrepo.forget() (API) Differential Revision: https://phab.mercurial-scm.org/D5883
Thu, 07 Feb 2019 09:40:37 -0800 subrepo: adjust subrepo prefix before calling subrepo.removefiles() (API)
Martin von Zweigbergk <martinvonz@google.com> [Thu, 07 Feb 2019 09:40:37 -0800] rev 41626
subrepo: adjust subrepo prefix before calling subrepo.removefiles() (API) That's what we do with the matcher so it seems more consistent. Differential Revision: https://phab.mercurial-scm.org/D5882
Thu, 07 Feb 2019 09:46:36 -0800 subrepo: avoid calculating subrepo prefix twice for cat() (API)
Martin von Zweigbergk <martinvonz@google.com> [Thu, 07 Feb 2019 09:46:36 -0800] rev 41625
subrepo: avoid calculating subrepo prefix twice for cat() (API) Differential Revision: https://phab.mercurial-scm.org/D5881
Thu, 07 Feb 2019 16:43:42 +0300 py3: make sure __repr__ returns str
Pulkit Goyal <pulkit@yandex-team.ru> [Thu, 07 Feb 2019 16:43:42 +0300] rev 41624
py3: make sure __repr__ returns str No test fails but I found it while debugging test-commit-interactive-curses.t failure. # skip-blame because just r'' prefix Differential Revision: https://phab.mercurial-scm.org/D5878
Thu, 07 Feb 2019 16:44:43 +0300 py3: use bytes.startswith() instead of comparing with bytes[0]
Pulkit Goyal <pulkit@yandex-team.ru> [Thu, 07 Feb 2019 16:44:43 +0300] rev 41623
py3: use bytes.startswith() instead of comparing with bytes[0] This is because bytes[0] will return the ascii value and comparison will fail. This makes test-commit-interactive-curses.t pass on Python 3. Differential Revision: https://phab.mercurial-scm.org/D5879
Fri, 08 Feb 2019 22:57:26 -0800 match: remove unused "exact" argument (API)
Martin von Zweigbergk <martinvonz@google.com> [Fri, 08 Feb 2019 22:57:26 -0800] rev 41622
match: remove unused "exact" argument (API) It seems that all callers use match.exact() instead of match.match(exact=True). Differential Revision: https://phab.mercurial-scm.org/D5919
Fri, 08 Feb 2019 23:03:42 -0800 tests: replace match.match(exact=True) by match.exact()
Martin von Zweigbergk <martinvonz@google.com> [Fri, 08 Feb 2019 23:03:42 -0800] rev 41621
tests: replace match.match(exact=True) by match.exact() Differential Revision: https://phab.mercurial-scm.org/D5918
Wed, 06 Feb 2019 22:52:49 -0800 patch: accept second matcher that applies only to copy sources (API)
Martin von Zweigbergk <martinvonz@google.com> [Wed, 06 Feb 2019 22:52:49 -0800] rev 41620
patch: accept second matcher that applies only to copy sources (API) See previous patch for motivation. Differential Revision: https://phab.mercurial-scm.org/D5893
Wed, 06 Feb 2019 17:46:20 -0800 patch: let caller pass in root-filtering matcher (API)
Martin von Zweigbergk <martinvonz@google.com> [Wed, 06 Feb 2019 17:46:20 -0800] rev 41619
patch: let caller pass in root-filtering matcher (API) The --root option to `hg diff` does two things: * Shows paths relative to the given root * Filters paths by the given root, including copy sources The root argument is passed through down to patch.diff(). I feel like we can make patch.diff() more generic by not passing down the root argument, but instead pass: * A function for taking a repo-relative path and printing it. I want to reuse this for showing cwd-relative paths later. This is the actual motivation for this patch. * A matcher that's already been filtered by the root argument * A second matcher that filters the copy sources This is one step towards that. Differential Revision: https://phab.mercurial-scm.org/D5892
Wed, 06 Feb 2019 17:27:43 -0800 patch: pass in context objects into diffhunks() (API)
Martin von Zweigbergk <martinvonz@google.com> [Wed, 06 Feb 2019 17:27:43 -0800] rev 41618
patch: pass in context objects into diffhunks() (API) It's a pretty low-level function and having the contexts in patch.diff() makes future patches easier. Differential Revision: https://phab.mercurial-scm.org/D5891
Thu, 07 Feb 2019 21:48:50 +0300 convert: handle exec bit removal while converting to svn
Nikita Slyusarev <nslus@yandex-team.com> [Thu, 07 Feb 2019 21:48:50 +0300] rev 41617
convert: handle exec bit removal while converting to svn Subversion `putcommit` method checks original file's executablity to decide if executable property should be removed from svn. It is checked right after writing file contents. Content writing is implemented using `vfs.write` and vfs seems to remove exec bit, at least in some cases. This leads to executability checks being ineffective. If cset contains only this ignored exec bit removal, conversion stops with an error, because it fails to to compose svn commit properly. This fix moves exec bit checking so that it's performed before dumping file contents. Added test to check executable bit removal.
Thu, 07 Feb 2019 18:57:54 +0300 convert: handle empty intial commits while converting to svn
Nikita Slyusarev <nslus@yandex-team.com> [Thu, 07 Feb 2019 18:57:54 +0300] rev 41616
convert: handle empty intial commits while converting to svn Svn commit generation code skips empty commits, returning the parent. Skipping the root commit must return None instead. Added test to check skipping of empty commits.
Mon, 21 Jan 2019 17:37:33 +0000 branchmap: encapsulate cache updating in the map itself
Martijn Pieters <mj@octobus.net> [Mon, 21 Jan 2019 17:37:33 +0000] rev 41615
branchmap: encapsulate cache updating in the map itself Rather than have a repository update the cache, move handling of cache updates into the branchmap module, in the form of a custom mapping class. This makes later performance improvements easier to handle too. Differential Revision: https://phab.mercurial-scm.org/D5638
Thu, 07 Feb 2019 11:08:54 +0100 tests: fix regression tests failing on CentOS 7 stable
Mathias De Mare <mathias.de_mare@nokia.com> [Thu, 07 Feb 2019 11:08:54 +0100] rev 41614
tests: fix regression tests failing on CentOS 7 Differential Revision: https://phab.mercurial-scm.org/D5877
Thu, 07 Feb 2019 09:12:01 +0100 packaging: modify rc detection to work with X.Yrc instead of X.Y-rc stable
Mathias De Mare <mathias.de_mare@nokia.com> [Thu, 07 Feb 2019 09:12:01 +0100] rev 41613
packaging: modify rc detection to work with X.Yrc instead of X.Y-rc rc detection on CentOS failed without this change, resulting in upgrades from 4.9rc to 4.9 not working (4.9rc was considered more recent than 4.9). Differential Revision: https://phab.mercurial-scm.org/D5876
Thu, 07 Feb 2019 21:16:25 -0800 context: replace repeated "self._repo.dirstate" by "ds" variable
Martin von Zweigbergk <martinvonz@google.com> [Thu, 07 Feb 2019 21:16:25 -0800] rev 41612
context: replace repeated "self._repo.dirstate" by "ds" variable Differential Revision: https://phab.mercurial-scm.org/D5889
Thu, 07 Feb 2019 21:48:24 -0800 context: delete unused undelete()
Martin von Zweigbergk <martinvonz@google.com> [Thu, 07 Feb 2019 21:48:24 -0800] rev 41611
context: delete unused undelete() Maybe it's been unused since c8e2a5ea7062 (mq: avoid data loss upon qfold + qmv (issue3058), 2011-10-20), maybe not. Differential Revision: https://phab.mercurial-scm.org/D5888
Wed, 06 Feb 2019 22:32:50 -0800 diffordiffstat: avoid looking up contexts twice
Martin von Zweigbergk <martinvonz@google.com> [Wed, 06 Feb 2019 22:32:50 -0800] rev 41610
diffordiffstat: avoid looking up contexts twice I'm not worried about performance; this is just simpler. Differential Revision: https://phab.mercurial-scm.org/D5890
Thu, 07 Feb 2019 17:04:15 +0100 fsmonitor: rename new verbose config knob
Boris Feld <boris.feld@octobus.net> [Thu, 07 Feb 2019 17:04:15 +0100] rev 41609
fsmonitor: rename new verbose config knob The config knob was introduced in this release cycle under the old extension name, rename it before it is part of a release. Differential Revision: https://phab.mercurial-scm.org/D5880
Wed, 06 Feb 2019 23:41:36 -0500 tests: stabilize test-extdiff.t on Windows
Matt Harbison <matt_harbison@yahoo.com> [Wed, 06 Feb 2019 23:41:36 -0500] rev 41608
tests: stabilize test-extdiff.t on Windows The test harness only wanted to drop the (windows !) lines, which also means the actual output matched the (no-windows !) lines. So drop those annotations too. I suspect if the output of the affected tests was actually collected on Windows, things were quoted because TEMPDIR contained a `~` in MSYS. Typically that happens when the username is 9 (8?) or more characters. I explicitly set TEMP and TMP to something short like "C:\temp" to avoid this, because otherwise there are a bunch of failures like this in other tests.
Wed, 06 Feb 2019 22:30:49 -0500 lfs: disable all authentication except Basic for HTTP(S) connections
Matt Harbison <matt_harbison@yahoo.com> [Wed, 06 Feb 2019 22:30:49 -0500] rev 41607
lfs: disable all authentication except Basic for HTTP(S) connections I ran into a problem pushing to an old Apache server- the normal outgoing traffic occurred, the Batch API request and response occurred, and then things suddenly halted. 5 minutes later, a 500 was returned, and the server log had a timeout reading 32K from `self._req.bodyfh` in hgweb.request.sendresponse(). Watching in WireShark, the Batch API got a 401, retried properly, then proceeded to PUT the blob (without authentication headers). This got a 401, but the client never retried with authentication. Worse, the blob was sent over the wire in the failed attempt. This kills digests for both the Batch API and the Transfer API. While in theory we could have the Batch API provide external URLs to a place that supports Basic Authentication, the LFS spec actually calls out using Basic Authentication[1]. It's not clear to me if they've been able to shoehorn in other methods. But let's keep it simple until somebody needs it. If we only had to support python2, we could just not add the handler for digest authentication. However in python3, AbstractBasicAuthHandler raises ValueError if it sees a scheme other than Basic. So we need to intercept all other schemes before it gets to that point. # no-check-commit because of urllib2.OpenerDirector foo_bar calling conventions [1] https://github.com/git-lfs/git-lfs/blob/master/docs/api/authentication.md
Wed, 30 Jan 2019 16:21:30 -0800 locate: respect ui.relative-paths
Martin von Zweigbergk <martinvonz@google.com> [Wed, 30 Jan 2019 16:21:30 -0800] rev 41606
locate: respect ui.relative-paths Differential Revision: https://phab.mercurial-scm.org/D5875
Tue, 05 Feb 2019 10:30:05 -0800 revert: respect ui.relative-paths
Martin von Zweigbergk <martinvonz@google.com> [Tue, 05 Feb 2019 10:30:05 -0800] rev 41605
revert: respect ui.relative-paths Differential Revision: https://phab.mercurial-scm.org/D5874
(0) -30000 -10000 -3000 -1000 -120 +120 +1000 +3000 tip