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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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.
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.
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.
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.
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.
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.
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.
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.
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.
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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.
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.
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
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
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
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
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
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
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
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.
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
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
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
Martin von Zweigbergk <martinvonz@google.com> [Tue, 05 Feb 2019 09:44:22 -0800] rev 41604
scmutil: delete now-unused origpath() (API)
It has been replaced by backuppath().
Differential Revision: https://phab.mercurial-scm.org/D5860
Martin von Zweigbergk <martinvonz@google.com> [Tue, 05 Feb 2019 09:43:34 -0800] rev 41603
subrepo: migrate to scmutil.backuppath()
This has a test impact. It seems to me to be for the better.
Differential Revision: https://phab.mercurial-scm.org/D5859
Martin von Zweigbergk <martinvonz@google.com> [Mon, 04 Feb 2019 21:31:18 -0800] rev 41602
resolve: migrate to scmutil.backuppath()
Differential Revision: https://phab.mercurial-scm.org/D5858
Martin von Zweigbergk <martinvonz@google.com> [Mon, 04 Feb 2019 21:19:05 -0800] rev 41601
merge: migrate to scmutil.backuppath()
Differential Revision: https://phab.mercurial-scm.org/D5857
Martin von Zweigbergk <martinvonz@google.com> [Mon, 04 Feb 2019 21:14:37 -0800] rev 41600
filemerge: migrate to scmutil.backuppath()
Differential Revision: https://phab.mercurial-scm.org/D5856
Martin von Zweigbergk <martinvonz@google.com> [Mon, 04 Feb 2019 21:10:17 -0800] rev 41599
mq: migrate to scmutil.backuppath()
Differential Revision: https://phab.mercurial-scm.org/D5855
Martin von Zweigbergk <martinvonz@google.com> [Mon, 04 Feb 2019 21:00:58 -0800] rev 41598
largefiles: migrate to scmutil.backuppath()
It seems unnecessary to convert the paths here back to repo-relative
paths, but I'll leave that for someone else to clean up.
Differential Revision: https://phab.mercurial-scm.org/D5854
Martin von Zweigbergk <martinvonz@google.com> [Tue, 05 Feb 2019 11:14:07 -0800] rev 41597
revert: migrate to scmutil.backuppath()
Differential Revision: https://phab.mercurial-scm.org/D5853
Martin von Zweigbergk <martinvonz@google.com> [Mon, 04 Feb 2019 20:49:45 -0800] rev 41596
shelve: fix broken backup of conflicting untracked file
Differential Revision: https://phab.mercurial-scm.org/D5852
Martin von Zweigbergk <martinvonz@google.com> [Mon, 04 Feb 2019 20:46:33 -0800] rev 41595
scmutil: introduce a new backuppath() to replace origpath()
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
Martin von Zweigbergk <martinvonz@google.com> [Mon, 04 Feb 2019 09:21:40 -0800] rev 41594
tests: demonstrate broken unshelve when backing up untracked file
Differential Revision: https://phab.mercurial-scm.org/D5850
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