- Feb 05, 2019
-
-
Martin von Zweigbergk authored
Differential Revision: https://phab.mercurial-scm.org/D5852
-
Martin von Zweigbergk authored
Unlike most functions in our codebase, origpath() takes a path that is relative to cwd. This commit introduces a replacement for origpath(). The new function takes a path that is relative to the repo root. There is a lot of duplication between the two, but I intend to remove origpath() within the next few commits, so it won't be a maintenance burden. origpath() is also a little weird in that it returns either a a cwd-relative path or an absolute path. It needs to be able to return a path outside the repo, so it makes sense that it can return an absolute path. However, it would be simpler to always return an absolute path. The new function does that. Differential Revision: https://phab.mercurial-scm.org/D5851
-
- Feb 04, 2019
-
-
Martin von Zweigbergk authored
Differential Revision: https://phab.mercurial-scm.org/D5850
-
- Feb 06, 2019
-
-
Martin von Zweigbergk authored
Same as previous commit, but for subrepo. Differential Revision: https://phab.mercurial-scm.org/D5873
-
Martin von Zweigbergk authored
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 authored
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
-
- Feb 05, 2019
-
-
Matt Harbison authored
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 authored
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 authored
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 authored
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 authored
Most tools on Windows are in Program Files, and not necessarily on PATH.
-
Matt Harbison authored
We had 4 copy/pastes of this, and no coverage for http digests (which are currently broken on py3).
-
- Feb 03, 2019
-
-
Ludovic Chabant authored
-
- Feb 05, 2019
-
-
Martin von Zweigbergk authored
Differential Revision: https://phab.mercurial-scm.org/D5869
-
Martin von Zweigbergk authored
Differential Revision: https://phab.mercurial-scm.org/D5868
-
Martin von Zweigbergk authored
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 authored
Differential Revision: https://phab.mercurial-scm.org/D5866
-
Martin von Zweigbergk authored
Differential Revision: https://phab.mercurial-scm.org/D5865
-
- Feb 02, 2019
-
-
Martin von Zweigbergk authored
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
-
- Jan 29, 2019
-
-
Martin von Zweigbergk authored
Differential Revision: https://phab.mercurial-scm.org/D5801
-
- Feb 02, 2019
-
-
Martin von Zweigbergk authored
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
-
- Feb 05, 2019
-
-
Pulkit Goyal authored
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 authored
# skip-blame because just b'' prefixes Differential Revision: https://phab.mercurial-scm.org/D5863
-
Pulkit Goyal authored
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 authored
This will make py3 buildbot green again. Differential Revision: https://phab.mercurial-scm.org/D5861
-
Martin von Zweigbergk authored
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 authored
Differential Revision: https://phab.mercurial-scm.org/D5848
-
- Feb 04, 2019
-
-
Martin von Zweigbergk authored
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
-
- Jan 21, 2019
-
-
Martijn Pieters authored
- 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 authored
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 authored
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
-
- Feb 04, 2019
-
-
Gregory Szorc authored
This avoids a SyntaxWarning in Python 3.8 due to invalid \ escapes. Differential Revision: https://phab.mercurial-scm.org/D5817
-
- Jan 27, 2019
-
-
Yuya Nishihara authored
Now a range expression is parsed by a relation function itself since the upper layer have no knowledge about the default first/last bounds.
-
Yuya Nishihara authored
Even though this wouldn't be any useful in followlines(), it helps to unify range processing.
-
Yuya Nishihara authored
It's getting common. As a first step, this patch adds getintrange() and makes followlines() use it. I wanted to unify the error messages to make the function interface simple, but I failed to phrase it briefly.
-
- Jan 31, 2019
-
-
Kyle Lippincott authored
Previously, when doing `commit -i`, we respected `diff.ignorews` and other whitespace-related settings, which is probably unexpected. The primary reason for this is to support hgext.record's commandline options, it's probably accidental that the `[diff]` settings were also considered. See comments on issue6042 and D5490. This can cause problems (issue5839, issue6042). It is assumed by the author that the `[diff]` section is primarily for *viewing* diffs, and that it is unlikely what people intend when attempting to commit or revert. With this change, if a user wants the behavior, they can clone their `[diff]` settings to `commands.commit.interactive.<setting>`. This is thus a mild BC change, but one I suspect is not going to be relied on by anyone. Note: while doing a partial commit/revert, we do not know what command the user is actually running. This means that the split extension, which ends up calling into this code, will respect the `commands.commit.interactive.<setting>` settings, and not a hypothetical `commands.split.interactive.<setting>`. This *also* means that setting `commands.commit.interactive.ignoreblanklines`, for example, will still cause issue5839. Considering the highly unlikely chance that a user actually sets `commands.commit.interactive.<setting>`, the author deems this risk acceptable. Differential Revision: https://phab.mercurial-scm.org/D5834
-
Kyle Lippincott authored
In a future commit, I want to make it possible to have the diff options pulled from (as an example) `commands.commit.interactive.ignorews`; previously we only supported this for customizable sections (so this would have needed a `commit-interactive` section and been named `commit-interactive.ignorews`, which felt a bit weird. Differential Revision: https://phab.mercurial-scm.org/D5833
-
Kyle Lippincott authored
We already have 'annotate' and 'diff' that use the same set of options, and I want to add more in a followup commit, so I'm attempting to reduce maintenance burden and duplication by making it possible to register all of them at once. Differential Revision: https://phab.mercurial-scm.org/D5832
-
- Jan 29, 2019
-
-
Kyle Lippincott authored
Previously, we respected options like `diff.ignoreblanklines` and `diff.ignorews`. This can cause problems when the user is attempting to actually commit the blank line change. Specifically, the split extension can get into an infinite loop because it detects that the working copy is not clean, but when we get the diff we don't see the changes, so it just skips popping up the chunk selection flow, saying there's no changes to record. These options are primarily meant for viewing diffs; it is highly unlikely that someone is actually intending to add extraneous whitespace and have it ignored if they attempt to interactively commit (but *not* ignored if they non-interactively commit). Differential Revision: https://phab.mercurial-scm.org/D5744
-
- Feb 04, 2019
-
-
Gregory Szorc authored
These are warnings from upstream test code. Let's just acknowledge them for now. These should go away in a future python-zstandard release :) Differential Revision: https://phab.mercurial-scm.org/D5846
-