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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
Martin von Zweigbergk <martinvonz@google.com> [Tue, 03 Apr 2018 23:47:01 -0700] rev 37354
context: use revsymbol() in "merge.preferancestor" code
Differential Revision: https://phab.mercurial-scm.org/D3082
Martin von Zweigbergk <martinvonz@google.com> [Wed, 04 Apr 2018 15:11:43 -0700] rev 37353
wireproto: use repo.lookup() for lookup command
I'm trying to reduce use of repo[<string>] and this seems like an
obvious place to use repo.lookup().
Differential Revision: https://phab.mercurial-scm.org/D3081
Martin von Zweigbergk <martinvonz@google.com> [Wed, 04 Apr 2018 14:57:58 -0700] rev 37352
localrepo: use revsymbol in lookupbranch() too
lookupbranch() takes a string that comes from the CLI, so
scmutil.revsymbol() is appropriate for looking it up.
Differential Revision: https://phab.mercurial-scm.org/D3080
Martin von Zweigbergk <martinvonz@google.com> [Wed, 04 Apr 2018 14:31:09 -0700] rev 37351
localrepo: drop "remote" argument from lookupbranch() (API)
According to `hg grep --all lookupbranch`, the "remote" argument has
never been used ever since it was introduced in
ca739acf1a98
(commands: add more robust support for 'hg log -b' (
issue2078),
2010-04-12).
Differential Revision: https://phab.mercurial-scm.org/D3079
Martin von Zweigbergk <martinvonz@google.com> [Sun, 01 Apr 2018 22:48:32 -0700] rev 37350
revset: use revsymbol() for checking if a symbol is valid
Differential Revision: https://phab.mercurial-scm.org/D3078
Gregory Szorc <gregory.szorc@gmail.com> [Tue, 03 Apr 2018 15:08:14 -0700] rev 37349
tests: disable tests for advanced clone features with simple store
There are a handful of test failures in the simple store with
regards to stream clones. Fixing them will require a lot of
conditional output. Disabling the tests wholesale is easier
at this juncture.
Differential Revision: https://phab.mercurial-scm.org/D3064
Gregory Szorc <gregory.szorc@gmail.com> [Tue, 03 Apr 2018 14:24:14 -0700] rev 37348
tests: skip largefiles and lfs tests when using simple store
Getting these tests to pass is more work than it is worth right
now. Let's punt on it.
Differential Revision: https://phab.mercurial-scm.org/D3063
Gregory Szorc <gregory.szorc@gmail.com> [Tue, 03 Apr 2018 18:23:33 -0700] rev 37347
tests: conditionalize test output for simple store
Differential Revision: https://phab.mercurial-scm.org/D3061
Gregory Szorc <gregory.szorc@gmail.com> [Wed, 04 Apr 2018 11:44:38 -0700] rev 37346
tests: disallow using simple store repo with bundlerepo
bundlerepo is... going to be difficult to port to an alternate
store because it assumes revlogs for storage and essentially
overlays the contents of a bundle onto a fake revlog-like
primitive. It will be a good test case for our eventual new
storage interface.
Refactoring bundlerepo to make it work with non-revlog storage is
going to be a bit of work. So for now, let's refuse to use the
simple store repo when a bundlerepo is in play.
A new test requirement advertising support for treating bundle
files as repo instances has been added. Some tests have been
made conditional on this feature. Additional tests will be
annotated in subsequent commits.
Having positive opt-in to repo features will be simpler in the
long run because it will allow multiple storage backends to
declare feature support and we won't have to annotate each test
with the set of repo backends that are supported. Again, we'll
probably want better integration between repo features and
tests. But this is the easiest we can do at the moment.
Differential Revision: https://phab.mercurial-scm.org/D3060
Gregory Szorc <gregory.szorc@gmail.com> [Wed, 04 Apr 2018 11:31:35 -0700] rev 37345
tests: disable test-revlog-v2 when using simple store
Because the simple store has nothing to do with revlogs.
Differential Revision: https://phab.mercurial-scm.org/D3056
Gregory Szorc <gregory.szorc@gmail.com> [Tue, 03 Apr 2018 18:16:04 -0700] rev 37344
tests: skip filelog damage tests when not using revlogs
Differential Revision: https://phab.mercurial-scm.org/D3042
Gregory Szorc <gregory.szorc@gmail.com> [Tue, 03 Apr 2018 10:04:30 -0700] rev 37343
tests: skip some tests when using simple store
generaldelta is a revlog implementation detail. We don't need to
test it with the simple store.
union repos are heavily revlog based. It should be possible to
run them with alternate stores. But it's not worth the trouble
at this juncture.
Differential Revision: https://phab.mercurial-scm.org/D3040
Gregory Szorc <gregory.szorc@gmail.com> [Wed, 04 Apr 2018 13:21:34 -0700] rev 37342
tests: conditionalize tests based on presence of custom extensions
The test harness supports injecting extensions via --extra-config-opt.
However, if you do this, various tests that print state about loaded
extensions fail.
This commit teaches the test harness to recognize when custom
extensions are loaded so that tests can use feature sniffing to
conditionalize tests based on that.
Differential Revision: https://phab.mercurial-scm.org/D3039
Augie Fackler <augie@google.com> [Wed, 04 Apr 2018 12:16:50 -0700] rev 37341
simplestorerepo: avoid shadowing dict in list comprehension over dict
Caught by pyflakes.
Differential Revision: https://phab.mercurial-scm.org/D3077
Gregory Szorc <gregory.szorc@gmail.com> [Tue, 03 Apr 2018 09:54:20 -0700] rev 37340
narrow: pass node into revlog.revision()
This is one of the few (possibly only) places where we pass an int in
for filelogs. Other revlogs (notably changelog) are very heavy on int
usage. But filelogs are surprisingly node centric. I'd like to
formalize the interface around the use of nodes (at least for
filelogs). So let's switch to a node.
We can't inline revlog.node() because of a check-code rule. I think
that rule is suspect. But it may be for performance reasons with
changelog code. I'd rather not touch it at this time.
Differential Revision: https://phab.mercurial-scm.org/D3043