Thu, 05 Apr 2018 14:03:33 -0700 context: make repo[<filtered binary nodeid>] match node
Martin von Zweigbergk <martinvonz@google.com> [Thu, 05 Apr 2018 14:03:33 -0700] rev 37386
context: make repo[<filtered binary nodeid>] match node If you pass in a binary nodeid of a filtered node to repo.__getitem__, it would run through this code: try: self._node = changeid self._rev = repo.changelog.rev(changeid) return except error.FilteredLookupError: raise except LookupError: pass However, repo.changelog.rev() would raise a FilteredLookupError, not FilteredRepoLookupError. Instead, we would hit the "except LookupError" and continue, trying to interpret the nodeid as a bookmark etc. The end result would be an error like this: abort: unknown revision 'ddadbd7c40ef8b8ad6d0d01a7a842092fc431798'! After this patch, it would instead be: abort: 00changelog.i@ddadbd7c40ef8b8ad6d0d01a7a842092fc431798: filtered node! This only happens when we get a binary nodeid, which means it's not string directly from the user, so it would be a programming error if it happened. It's therefore a little hard to test (I checked test-context.py, but it doesn't use obsmarkers). It looks like this has been wrong ever since dc25ed84bee8 (changectx: issue a FilteredRepoLookupError when applicable, 2014-10-15). Differential Revision: https://phab.mercurial-scm.org/D3144
Thu, 05 Apr 2018 00:04:09 -0700 context: move handling of filtering error to revsymbol() (API)
Martin von Zweigbergk <martinvonz@google.com> [Thu, 05 Apr 2018 00:04:09 -0700] rev 37385
context: move handling of filtering error to revsymbol() (API) When changectx's constructor runs into various Filtered*Error, it creates an exception with a hint about using --hidden. This only makes sense when the revision was provided by the user (if we get e.g. a FilteredLookupError from repo[p1], then it's instead a programming error). Thus, I'm moving the handling into revsymbol(). Also changed "unfilteredrepo[changeid]" to "revsymbol(unfilteredrepo, changeid)" as part of the move. Differential Revision: https://phab.mercurial-scm.org/D3143
Thu, 05 Apr 2018 17:56:24 +0530 py3: whitelist 13 new passing tests
Pulkit Goyal <7895pulkit@gmail.com> [Thu, 05 Apr 2018 17:56:24 +0530] rev 37384
py3: whitelist 13 new passing tests Some tests were passing before the series too. Differential Revision: https://phab.mercurial-scm.org/D3133
Thu, 05 Apr 2018 16:47:44 +0530 py3: convert user value to bytes by b'' prefix
Pulkit Goyal <7895pulkit@gmail.com> [Thu, 05 Apr 2018 16:47:44 +0530] rev 37383
py3: convert user value to bytes by b'' prefix This makes test-journal* pass on Python 3.5. # skip-blame beacuse just b'' prefix Differential Revision: https://phab.mercurial-scm.org/D3125
Thu, 05 Apr 2018 10:13:01 -0400 util: whitelist apfs for hardlink support
Augie Fackler <augie@google.com> [Thu, 05 Apr 2018 10:13:01 -0400] rev 37382
util: whitelist apfs for hardlink support Seems to work fine for me. Differential Revision: https://phab.mercurial-scm.org/D3134
Thu, 05 Apr 2018 11:33:36 -0700 mq: avoid a silly conversion from binary nodeid to hex
Martin von Zweigbergk <martinvonz@google.com> [Thu, 05 Apr 2018 11:33:36 -0700] rev 37381
mq: avoid a silly conversion from binary nodeid to hex We generally deal with binary nodeids in code. In this case the hex nodeid was passed to strip.checksubstate() where it was passed to repo.__getitem__, which of course accepts a binary nodeid. Differential Revision: https://phab.mercurial-scm.org/D3141
Thu, 05 Apr 2018 12:36:44 -0700 narrow: remove unused "cacheprop" stuff
Martin von Zweigbergk <martinvonz@google.com> [Thu, 05 Apr 2018 12:36:44 -0700] rev 37380
narrow: remove unused "cacheprop" stuff This is unused since D3046. I didn't even notice it then, but tests still pass so I hope it's still handled safely. Differential Revision: https://phab.mercurial-scm.org/D3142
Tue, 03 Apr 2018 14:11:43 -0700 tests: disable infinitepush tests for simple store
Gregory Szorc <gregory.szorc@gmail.com> [Tue, 03 Apr 2018 14:11:43 -0700] rev 37379
tests: disable infinitepush tests for simple store Infinitepush relies heavily on bundles and bundlerepo. As such, it won't be easy to make compatible with alternate storage backends at this time. Let's disable the tests when running with our simple store. Differential Revision: https://phab.mercurial-scm.org/D3062
Thu, 05 Apr 2018 11:01:42 -0700 rebase: remove unnecessary and incorrect handling of nullid
Martin von Zweigbergk <martinvonz@google.com> [Thu, 05 Apr 2018 11:01:42 -0700] rev 37378
rebase: remove unnecessary and incorrect handling of nullid We used to write a nullid as hex to the rebase state file and interpret it as the "todo" state (value -1). However, when reading it, we compared the string value to (binary) nullid, which would of course not match. AFAICT, it still worked because when the read nodeid did not match nullid (which, again, it didn't), we'd use the normal path which did repo[<hex nullid>].rev(), and that also happens to return -1. It seems to have been this way ever since 9972758ab4c5 (rebase: handle revtodo as a special value when storing/restoring state, 2014-12-02). Differential Revision: https://phab.mercurial-scm.org/D3140
Thu, 05 Apr 2018 10:13:45 -0700 rebase: convert "oldrev" to revnum earlier
Martin von Zweigbergk <martinvonz@google.com> [Thu, 05 Apr 2018 10:13:45 -0700] rev 37377
rebase: convert "oldrev" to revnum earlier It was done in 3 places before, now just 1. Differential Revision: https://phab.mercurial-scm.org/D3139
Thu, 05 Apr 2018 10:12:10 -0700 rebase: make "destnode" consistently a revnum and rename it to "destrev"
Martin von Zweigbergk <martinvonz@google.com> [Thu, 05 Apr 2018 10:12:10 -0700] rev 37376
rebase: make "destnode" consistently a revnum and rename it to "destrev" Differential Revision: https://phab.mercurial-scm.org/D3138
Thu, 05 Apr 2018 08:28:12 -0700 bookmarks: drop always-None argument from calculateupdate()
Martin von Zweigbergk <martinvonz@google.com> [Thu, 05 Apr 2018 08:28:12 -0700] rev 37375
bookmarks: drop always-None argument from calculateupdate() Thanks to Yuya for noticing. Differential Revision: https://phab.mercurial-scm.org/D3135
Tue, 03 Apr 2018 09:58:16 -0700 narrow: move manifestlog overrides to core
Martin von Zweigbergk <martinvonz@google.com> [Tue, 03 Apr 2018 09:58:16 -0700] rev 37374
narrow: move manifestlog overrides to core With this and the previous patch, I couldn't measure any significant difference from `hg files -r .` in a FireFox repo with 65k files. I tried with both a flat-manifest and a tree-manifest version of it. Neither had the narrow extension enabled. Differential Revision: https://phab.mercurial-scm.org/D3046
Mon, 02 Apr 2018 23:46:04 -0700 narrow: move manifestrevlog overrides to core
Martin von Zweigbergk <martinvonz@google.com> [Mon, 02 Apr 2018 23:46:04 -0700] rev 37373
narrow: move manifestrevlog overrides to core Differential Revision: https://phab.mercurial-scm.org/D3045
Tue, 03 Apr 2018 00:13:02 -0700 narrow: move excludeddir and related classes to core
Martin von Zweigbergk <martinvonz@google.com> [Tue, 03 Apr 2018 00:13:02 -0700] rev 37372
narrow: move excludeddir and related classes to core Differential Revision: https://phab.mercurial-scm.org/D3044
Thu, 05 Apr 2018 17:29:32 +0530 py3: add missing b'' prefix in mdiff.py
Pulkit Goyal <7895pulkit@gmail.com> [Thu, 05 Apr 2018 17:29:32 +0530] rev 37371
py3: add missing b'' prefix in mdiff.py Transformer won't add b'' prefix because that value is already have a r'' prefix. # skip-blame because just b'' prefix Differential Revision: https://phab.mercurial-scm.org/D3132
Thu, 05 Apr 2018 17:15:52 +0530 py3: fix error string with bytestr() on repr()d value
Pulkit Goyal <7895pulkit@gmail.com> [Thu, 05 Apr 2018 17:15:52 +0530] rev 37370
py3: fix error string with bytestr() on repr()d value Differential Revision: https://phab.mercurial-scm.org/D3131
Thu, 05 Apr 2018 17:14:11 +0530 py3: suppress output from f.write() function class
Pulkit Goyal <7895pulkit@gmail.com> [Thu, 05 Apr 2018 17:14:11 +0530] rev 37369
py3: suppress output from f.write() function class We need to suppress them because the output is not present on Python 2 Differential Revision: https://phab.mercurial-scm.org/D3130
Thu, 05 Apr 2018 17:13:09 +0530 py3: use pycompat.byteskwargs() in tests/autodiff.py
Pulkit Goyal <7895pulkit@gmail.com> [Thu, 05 Apr 2018 17:13:09 +0530] rev 37368
py3: use pycompat.byteskwargs() in tests/autodiff.py Differential Revision: https://phab.mercurial-scm.org/D3129
Thu, 05 Apr 2018 17:00:15 +0530 py3: suppress the output of open() using `and None`
Pulkit Goyal <7895pulkit@gmail.com> [Thu, 05 Apr 2018 17:00:15 +0530] rev 37367
py3: suppress the output of open() using `and None` This patch suppresses the output of open() on Python 3 as it does not return any output on Python 2. This makes test-diffstat.t pass on Python 3.5 Differential Revision: https://phab.mercurial-scm.org/D3128
Thu, 05 Apr 2018 16:56:34 +0530 py3: return bytes from util.removeauth()
Pulkit Goyal <7895pulkit@gmail.com> [Thu, 05 Apr 2018 16:56:34 +0530] rev 37366
py3: return bytes from util.removeauth() util.hidepassword() also returns bytes and we should deal in bytes as much as possible. This makes test-logexchange.t pass on Python 3.5 Differential Revision: https://phab.mercurial-scm.org/D3127
Thu, 05 Apr 2018 16:54:56 +0530 py3: use bytes instead of str in instance()
Pulkit Goyal <7895pulkit@gmail.com> [Thu, 05 Apr 2018 16:54:56 +0530] rev 37365
py3: use bytes instead of str in instance() We deal internally with bytes, so we should check whether the remote is a bytes or not. Differential Revision: https://phab.mercurial-scm.org/D3126
Thu, 05 Apr 2018 16:46:34 +0530 py3: use pycompat.bytestr in test-journal.t
Pulkit Goyal <7895pulkit@gmail.com> [Thu, 05 Apr 2018 16:46:34 +0530] rev 37364
py3: use pycompat.bytestr in test-journal.t Differential Revision: https://phab.mercurial-scm.org/D3124
Wed, 04 Apr 2018 23:55:47 -0700 hgweb: don't include hidden revisions in /filelog/ view
Martin von Zweigbergk <martinvonz@google.com> [Wed, 04 Apr 2018 23:55:47 -0700] rev 37363
hgweb: don't include hidden revisions in /filelog/ view This is a very crude way of doing it, but it seems to be working well enough. The number of entries on the page won't be the usual maximum number per page, but this is good enough for me. Differential Revision: https://phab.mercurial-scm.org/D3122
Thu, 05 Apr 2018 00:00:48 -0700 tests: show that hgweb contains hidden revisions in /filelog/ view
Martin von Zweigbergk <martinvonz@google.com> [Thu, 05 Apr 2018 00:00:48 -0700] rev 37362
tests: show that hgweb contains hidden revisions in /filelog/ view Note that these entries contain the summary line of the hidden commit, which is a bit a privacy issue to display. Also note that the links from the entries take you to a page that says: An error occurred while processing your request: filtered revision '2d32257e1109' (not in 'served' subset) Differential Revision: https://phab.mercurial-scm.org/D3121
Wed, 04 Apr 2018 09:03:17 -0700 convert: use repo.lookup() for converting to nodeid
Martin von Zweigbergk <martinvonz@google.com> [Wed, 04 Apr 2018 09:03:17 -0700] rev 37361
convert: use repo.lookup() for converting to nodeid This is a list of revs that come from the CLI (opts['rev']). Perhaps we should allow any revset, but I'll leave that for someone else to improve if they care. Differential Revision: https://phab.mercurial-scm.org/D3089
Wed, 04 Apr 2018 22:36:21 -0700 extdatasource: use revsymbol() for converting to node
Martin von Zweigbergk <martinvonz@google.com> [Wed, 04 Apr 2018 22:36:21 -0700] rev 37360
extdatasource: use revsymbol() for converting to node It's unclear what we want to support here. Perhaps it should just be nodeids? It doesn't make much sense to share revnums between repos, and bookmarks are probably too unstable. I used scmutil.revsymbol() to preserve the current behavior. We can change later if we want to. Differential Revision: https://phab.mercurial-scm.org/D3088
Wed, 04 Apr 2018 15:13:32 -0700 bookmarks: calculateupdate() returns a bookmark, not a rev
Martin von Zweigbergk <martinvonz@google.com> [Wed, 04 Apr 2018 15:13:32 -0700] rev 37359
bookmarks: calculateupdate() returns a bookmark, not a rev This changes the inaccurate/unclear documentation and also changes the code so "node" now contains a binary nodeid. Differential Revision: https://phab.mercurial-scm.org/D3087
Wed, 04 Apr 2018 10:13:08 -0700 pull: pass rev to check out as integer to postincoming()
Martin von Zweigbergk <martinvonz@google.com> [Wed, 04 Apr 2018 10:13:08 -0700] rev 37358
pull: pass rev to check out as integer to postincoming() I don't know if there's ever been a need for it to be a string (it's been like that since 02f40b2ece3f (commands: use rev from remote repo when updating as part of a pull, 2009-10-21)). I'm soon going to require it to be an integer, so let's fix this first. Differential Revision: https://phab.mercurial-scm.org/D3086
Thu, 05 Apr 2018 14:21:37 +0530 children: support specifying revision by revset
Martin von Zweigbergk <martinvonz@google.com> [Thu, 05 Apr 2018 14:21:37 +0530] rev 37357
children: support specifying revision by revset Same reason as the previous patch. Differential Revision: https://phab.mercurial-scm.org/D3085
Wed, 04 Apr 2018 15:08:26 -0700 heads: add support for specifying branches by revset
Martin von Zweigbergk <martinvonz@google.com> [Wed, 04 Apr 2018 15:08:26 -0700] rev 37356
heads: add support for specifying branches by revset Before this commit, e.g. "hg heads .^" would fail with: abort: unknown revision '.^'! Like the previous patch, I don't care about the command itself (I don't think I had ever used it before), I'm just cleaning up uses of repo[<string>]. Differential Revision: https://phab.mercurial-scm.org/D3084
Wed, 04 Apr 2018 15:06:32 -0700 perf: make perfmanifest and perfnodelookup work with revsets
Martin von Zweigbergk <martinvonz@google.com> [Wed, 04 Apr 2018 15:06:32 -0700] rev 37355
perf: make perfmanifest and perfnodelookup work with revsets They were using repo[rev], which only works with a single symbol (e.g. "." or "my-bookmark"), not general revsets. Switch them to scmutil.revsingle() so they can also be used with e.g. ".^". I don't actually care about these commands, but I want to remove uses of repo[<string>]. Differential Revision: https://phab.mercurial-scm.org/D3083
(0) -30000 -10000 -3000 -1000 -300 -100 -50 -32 +32 +50 +100 +300 +1000 +3000 +10000 tip