Martin von Zweigbergk <martinvonz@google.com> [Wed, 06 Feb 2019 15:35:25 -0800] rev 41593
subrepo: always show relative path to .orig backup
Same as previous commit, but for subrepo.
Differential Revision: https://phab.mercurial-scm.org/D5873
Martin von Zweigbergk <martinvonz@google.com> [Wed, 06 Feb 2019 15:26:53 -0800] rev 41592
mq: always show relative path to .orig backup
Same as previous commit, but for mq (I would have folded them, but
test-check-commit doesn't like "revert/mq" as a topic and I couldn't
think of a better one).
Differential Revision: https://phab.mercurial-scm.org/D5872
Martin von Zweigbergk <martinvonz@google.com> [Wed, 06 Feb 2019 14:57:08 -0800] rev 41591
revert: always show relative path to .orig backup
This helps make some future patches easier when I replace origpath()
by another function that works with repo-relative paths (origpath()
works with cwd-relative paths).
Always showing a relative path seems a little more user-friendly and
is more consistent between configured ui.origbackuppath and not. OTOH,
it's annoying if ui.origbackuppath is far outside the repo. This is
just --verbose output, so I don't think it's worth spending much time
on (I've already wasted too many hours on it).
Differential Revision: https://phab.mercurial-scm.org/D5871
Matt Harbison <matt_harbison@yahoo.com> [Tue, 05 Feb 2019 17:02:40 -0500] rev 41590
py3: ensure the HTTP password manager returns strings, not bytes
The digest handler calls into the password manager on its own, and it apparently
expects strings. Perhaps the Basic authentication handler didn't hit this
because of its manual password fetch and format in retry_http_basic_auth().
The `pycompat.bytesurl()` on the user and password just above the first url.py
diff seems unnecessary, because the password proxy in ui is converting to bytes
IIUC.
Matt Harbison <matt_harbison@yahoo.com> [Tue, 05 Feb 2019 16:47:19 -0500] rev 41589
tests: enable HTTP digest testing
I suppose we could spin the client side extension off to a *.py file if it gets
more use. I was basically just looking to avoid killing the server and
relaunching it just to change authentication schemes, because that doesn't
always work on Windows.
The test changes capture the problem with py3.
Matt Harbison <matt_harbison@yahoo.com> [Tue, 05 Feb 2019 16:16:14 -0500] rev 41588
wsgiheaders: make sure __repr__() returns a string
When printing `req.headers` on the server side to debug, it complained that '%b'
needed to take a string, not bytes. Changing '%s' to '%r' caused it to complain
that __repr__ didn't return a string.
Matt Harbison <matt_harbison@yahoo.com> [Tue, 05 Feb 2019 13:32:39 -0500] rev 41587
tests: add code to handle HTTP digests on the server side
It's not hooked up yet. Mostly this was cargoculted and simplified from some
python.org code[1]. It's not trying to test the security as much as it is
trying to make sure that clients are sending out the right data when challenged.
(And they aren't on py3.)
[1] http://svn.python.org/projects/sandbox/trunk/digestauth/digestauth.py
Matt Harbison <matt_harbison@yahoo.com> [Tue, 05 Feb 2019 13:30:48 -0500] rev 41586
run-tests: allow spaces in the --view tool
Most tools on Windows are in Program Files, and not necessarily on PATH.
Matt Harbison <matt_harbison@yahoo.com> [Tue, 05 Feb 2019 09:37:23 -0500] rev 41585
tests: extract the http server authentication extension to a single module
We had 4 copy/pastes of this, and no coverage for http digests (which are
currently broken on py3).
Ludovic Chabant <ludovic@chabant.com> [Sat, 02 Feb 2019 21:58:49 -0800] rev 41584
extdiff: support tools that can be run simultaneously
Matt Harbison <matt_harbison@yahoo.com> [Tue, 05 Feb 2019 20:50:54 -0500] rev 41583
subrepo: avoid false unsafe path detection on Windows
Subrepo paths are not normalized for the OS, so what was happening in the
subsequent root path check was:
root -> $TESTTMP\
issue1852a\sub/repo
util.expandpath(...) -> $TESTTMP\
issue1852a\sub/repo
os.path.realpath(...) -> $TESTTMP\
issue1852a\sub\repo
Martin von Zweigbergk <martinvonz@google.com> [Tue, 05 Feb 2019 11:17:11 -0800] rev 41582
largefiles: use wrappedfunction() in overriderevert()
Differential Revision: https://phab.mercurial-scm.org/D5869
Martin von Zweigbergk <martinvonz@google.com> [Tue, 05 Feb 2019 14:25:11 -0800] rev 41581
largefiles: use wrappedfunction() for "normal files match" in overridecopy()
Differential Revision: https://phab.mercurial-scm.org/D5868
Martin von Zweigbergk <martinvonz@google.com> [Tue, 05 Feb 2019 14:42:13 -0800] rev 41580
largefiles: use wrappedfunction() for match() override in overridecopy()
This reduced the time that the override is in place, but I that it's
correct this way (only for the duration of the orig() call).
Differential Revision: https://phab.mercurial-scm.org/D5867
Martin von Zweigbergk <martinvonz@google.com> [Tue, 05 Feb 2019 14:29:37 -0800] rev 41579
largefiles: use wrappedfunction() for util.copyfile() override
Differential Revision: https://phab.mercurial-scm.org/D5866
Martin von Zweigbergk <martinvonz@google.com> [Tue, 05 Feb 2019 14:15:34 -0800] rev 41578
largefiles: use wrappedfunction() for matchandpats() override in overridelog()
Differential Revision: https://phab.mercurial-scm.org/D5865
Martin von Zweigbergk <martinvonz@google.com> [Fri, 01 Feb 2019 22:52:09 -0800] rev 41577
status: if ui.relative-paths=no, don't use relative paths even with patterns
Without ui.relative-paths or command.status.relative set, you get this
behavior:
hgext$ hg st
M hgext/narrow/narrowrepo.py
hgext$ hg st .
M narrow/narrowrepo.py
hgext$ hg st narrow
M narrow/narrowrepo.py
I think it's surprising that some of those produce relative paths. I
suspect it works that way because "hg st ." was an easy way of getting
relative paths. Perhaps not much thought was given to how it should
behave when the pattern was not ".". It also feels wrong to conflate
the request for relative patterns with matching of of patterns.
Since we can now start fresh and define the behavior of
ui.relative-paths as we want, I suggest we make ui.relative-paths=no
consistently not give relative paths. So that's what this paths starts
doing for `hg status`.
Differential Revision: https://phab.mercurial-scm.org/D5802
Martin von Zweigbergk <martinvonz@google.com> [Tue, 29 Jan 2019 15:49:20 -0800] rev 41576
files: respect ui.relative-paths
Differential Revision: https://phab.mercurial-scm.org/D5801
Martin von Zweigbergk <martinvonz@google.com> [Fri, 01 Feb 2019 22:28:55 -0800] rev 41575
config: introduce a new value for ui.relative-paths getting old behavior
The few places I've modified so far to respect ui.relative-paths have
traditionally defaulted showing the path from the repo root. However,
some commands (at least `hg files`) default to showing paths relative
to the cwd. Let's allow a special value for ui.relative-paths to
preserve the old behavior, so we can use that as default value for
it. I don't expect that anyone would want to set this value, so
perhaps we could have relied on it being unset, but I don't really
like behaviors that can only be achieved by a unset config option.
Differential Revision: https://phab.mercurial-scm.org/D5800
Pulkit Goyal <pulkit@yandex-team.ru> [Tue, 05 Feb 2019 21:31:33 +0300] rev 41574
py3: use pycompat.bytestr() on extra values because it can be int
One such example is {'close': 1} which marks a branch as closed.
This makes test-convert-mtn.t pass on Python 3.
Differential Revision: https://phab.mercurial-scm.org/D5864
Pulkit Goyal <pulkit@yandex-team.ru> [Tue, 05 Feb 2019 21:30:30 +0300] rev 41573
py3: add some b'' prefixes in hgext/convert/monotone.py
# skip-blame because just b'' prefixes
Differential Revision: https://phab.mercurial-scm.org/D5863
Pulkit Goyal <pulkit@yandex-team.ru> [Tue, 05 Feb 2019 21:29:55 +0300] rev 41572
py3: use '%d' for integers instead of '%s'
I think this is the last of these occurences because I have got the test passing
on python3 in a later patch.
Differential Revision: https://phab.mercurial-scm.org/D5862
Pulkit Goyal <pulkit@yandex-team.ru> [Tue, 05 Feb 2019 21:17:46 +0300] rev 41571
py3: add 1 new passing test found by buildbot
This will make py3 buildbot green again.
Differential Revision: https://phab.mercurial-scm.org/D5861
Martin von Zweigbergk <martinvonz@google.com> [Mon, 04 Feb 2019 21:23:44 -0800] rev 41570
merge: don't unnecessarily calculate absolute path
I think this also makes the code clearer (and prepares for a later
patch that replaces origpath()).
Differential Revision: https://phab.mercurial-scm.org/D5849
Martin von Zweigbergk <martinvonz@google.com> [Mon, 04 Feb 2019 21:21:55 -0800] rev 41569
merge: don't unnecessarily calculate backup path
Differential Revision: https://phab.mercurial-scm.org/D5848
Martin von Zweigbergk <martinvonz@google.com> [Sun, 03 Feb 2019 22:49:28 -0800] rev 41568
largefiles: drop "rel" prefix from filename variables
The prefixes were meant to indicate that these paths are repo-relative
as opposed to absolute. However, that's what the majority of paths in
our code base are, so "rel" made me think they were instead
cwd-relative. Let's just drop the prefixes.
Differential Revision: https://phab.mercurial-scm.org/D5847
Martijn Pieters <mj@octobus.net> [Mon, 21 Jan 2019 17:41:59 +0000] rev 41567
branchmap: add some clarifications and clean up flow
- Remove indentation where it is not needed.
- Swap the subset test branches to follow along logically and put the 'empty'
case last.
Differential Revision: https://phab.mercurial-scm.org/D5637
Martijn Pieters <mj@octobus.net> [Mon, 21 Jan 2019 16:37:23 +0000] rev 41566
branchmap: updating triggers a write
Rather than separate updating and writing, create a subclass that doesn't write
on update. This minimises chances we forget to write out updates somewhere.
This also makes refactoring and improving the branchmap functionality easier.
Differential Revision: https://phab.mercurial-scm.org/D5636
Martijn Pieters <mj@octobus.net> [Mon, 21 Jan 2019 16:04:48 +0000] rev 41565
branchmap: make branchcache responsible for reading
Encapsulate reading in a classmethod, to make it clear what kind of object is
being handled.
This is part of a stack of refactoring changes to help performance improvements
down the line.
Differential Revision: https://phab.mercurial-scm.org/D5635
Gregory Szorc <gregory.szorc@gmail.com> [Mon, 04 Feb 2019 09:10:07 -0800] rev 41564
attr: make some docstrings raw strings
This avoids a SyntaxWarning in Python 3.8 due to invalid
\ escapes.
Differential Revision: https://phab.mercurial-scm.org/D5817