Boris Feld <boris.feld@octobus.net> [Fri, 19 May 2017 12:07:41 +0200] rev 32408
ui: add the possiblity to get a date config field
Add the method configdate to read a date from configuration. It uses the
util.rawparsedate refactored earlier to support all standard date formats.
Boris Feld <boris.feld@octobus.net> [Fri, 19 May 2017 12:07:23 +0200] rev 32407
util: refactor util.parsedate to raises ValueError
Split most of util.parsedate in util.rawparsedate and make it raises ValueError instead
of error.Abort.
The util.parsedate function is now just a shell function converting ValueError
to error.Abort for existing users.
I need to parse a date from config in a later patch and use util.rawparsedate
with ui.configwith which expect a convert that raises ValueError.
Martin von Zweigbergk <martinvonz@google.com> [Mon, 22 May 2017 11:08:18 -0700] rev 32406
match: implement __repr__() and update users (API)
fsmonitor and debugignore currently access matcher fields that I would
consider implementation details, namely patternspat, includepat, and
excludepat. Let' instead implement __repr__() and have the few users
use that instead.
Marked (API) because the fields can now be None.
Martin von Zweigbergk <martinvonz@google.com> [Mon, 22 May 2017 10:41:32 -0700] rev 32405
fsmonitor: fix silly "*kwargs" bug in merge.update() override
Everyone knows that it's supposed to be spelled with two asterisks.
It started failing in
fad5e299cfc7 (update: accept --merge to allow
merging across topo branches (
issue5125), 2017-02-13) because until
then there was only one argument that was covered by the kwargs, so
*kwargs or **kwargs both worked (or at least that's what I think with
my limited understanding of Python).
Pulkit Goyal <7895pulkit@gmail.com> [Fri, 19 May 2017 20:06:45 +0530] rev 32404
revset: make `hg log -r 'wdir()^'` work (
issue4905)
This patch catches the WdirUnsupported exception to support wdir()^.
Pulkit Goyal <7895pulkit@gmail.com> [Fri, 19 May 2017 19:12:06 +0530] rev 32403
revlog: raise WdirUnsupported when wdirrev is passed
revlog.parentrevs() is called while evaluating ^ operator in revsets. When wdir
is passed, it raises IndexError. This patch raises WdirUnsupported if wdir is
passed in the function. The error will be caugth in future patches.
Pulkit Goyal <7895pulkit@gmail.com> [Fri, 19 May 2017 19:10:37 +0530] rev 32402
error: add a new exception named WdirUnsupported
This series intents to support wdir() predicate with different operators
like ~, ^.
Currently the storage class don't support wdir(). This exception is introduced
so that it can be raised from places where wdir() is passed and is not
supported and we can catch this where we want to support the predicate.
Also throwing an error at low level and catching at some higher level is better
than using if-else especially for perf.
Martin von Zweigbergk <martinvonz@google.com> [Thu, 18 May 2017 22:20:59 -0700] rev 32401
match: replace icasefsmatch() function by flag to regular match()
match() will soon gain more logic and we don't want to duplicate that
in icasefsmatch(), so merge the two functions instead and use a flag
to get case-insensitive behavior.
Martin von Zweigbergk <martinvonz@google.com> [Thu, 18 May 2017 16:48:02 -0700] rev 32400
match: delete icasefsmatcher now that it's same as matcher
Martin von Zweigbergk <martinvonz@google.com> [Thu, 18 May 2017 15:45:50 -0700] rev 32399
match: pass in normalize() function to matchers
This will let us delete icasefsmatcher.
Martin von Zweigbergk <martinvonz@google.com> [Thu, 18 May 2017 16:05:46 -0700] rev 32398
match: don't print explicitly listed files with wrong case (BC)
On case-insensitive file systems, if file A exists and you try to
remove it (or add, etc.) by specifying a different case, you will see
something like this:
$ hg rm a
removing file A
I honestly found this surprising because it seems to me like it was
explicitly listed by the user. Still, there is a comment in the code
describing it, so it is very clearly intentional. The code was added
in
baa11dde8c0e (match: add a subclass for dirstate normalizing of the
matched patterns, 2015-04-12).
I'm going to do a lot of refactoring to matchers and the feature
mentioned above is going to get in my way. I'm therefore removing it
for the time being and we can hopefully add it back when I'm done.
Martin von Zweigbergk <martinvonz@google.com> [Thu, 18 May 2017 15:25:16 -0700] rev 32397
match: move body of _normalize() to a static function
matcher._normalize() no longer depends on any of the matcher's state,
and making it static will enable further refactoring. Note that the
subdirmatcher subclass calls _normalize(), so we can't remove it
completely.
Martin von Zweigbergk <martinvonz@google.com> [Thu, 18 May 2017 15:11:04 -0700] rev 32396
match: pass 'warn' argument to _normalize() for consistency
No other arguments are passed via the matcher's state, so we should
treat 'warn' the consistently. More importantly, this will let us make
it a static function, which will help with further refactoring.
Martin von Zweigbergk <martinvonz@google.com> [Fri, 12 May 2017 23:11:41 -0700] rev 32395
match: replace match class by match function (API)
The matcher class is getting hard to understand. It will be easier to
follow if we can break it up into simpler matchers that we then
compose. I'm hoping to have one matcher that accepts regular
(non-include) patterns, one for exact file matches, one that always
matches (and maybe one that never does) and then compose them by
intersection and difference.
This patch takes a simple but important step towards that goal by
making match.match() a function (and renaming the matcher class itself
from "match" to "matcher"). The new function will eventually be
responsible for creating the simple matchers and composing them.
icasefsmatcher similarly gets a factory function (called
"icasefsmatch"). I also moved the other factory functions nearby.
Augie Fackler <augie@google.com> [Sun, 21 May 2017 18:36:28 -0400] rev 32394
checklink: degrade gracefully on posix when fs is readonly (
issue5511)
In the unlucky case, checklink tries to make a new file for the
symlink test to target. If the filesystem is readonly (perhaps due to
permissions in a repo owned by someone else) we just report the
filesystem as not supporting symlinks, since the user probably can't
write anyway.
Gregory Szorc <gregory.szorc@gmail.com> [Fri, 19 May 2017 20:14:31 -0700] rev 32393
revlog: remove some revlogNG terminology
RevlogNG is not such a good name when it is no longer the
newest revlog version. Since we'll soon have revlog version 2,
let's remove some references to it.
Gregory Szorc <gregory.szorc@gmail.com> [Fri, 19 May 2017 20:10:50 -0700] rev 32392
revlog: tweak wording and logic for flags validation
First, the logic around the if..elif..elif was subtly wrong
and sub-optimal because all branches would be tested as long as
the revlog was valid. This patch changes things so it behaves like
a switch statement over the revlog version.
While I was here, I also tweaked error strings to make them
consistent and to read better.
Gregory Szorc <gregory.szorc@gmail.com> [Fri, 19 May 2017 20:01:35 -0700] rev 32391
tests: tests for revlog version and flags loading
We didn't have explicit test coverage of these branches.
Better late than never.
Pierre-Yves David <pierre-yves.david@octobus.net> [Sun, 21 May 2017 13:32:07 +0200] rev 32390
perf: allow to clear the obsstore in 'perfvolatilesets'
Loading the obsstore can become a large part of the time necessary to compute
the important volatile set. We add a flag purging all known obsstore related
data.
For example, computing the 'bumped' set currently requires reading the full
obsstore, so timing greatly differ with or without that flag:
Without:
! bumped
! wall 0.005047 comb 0.000000 user 0.000000 sys 0.000000 (best of 446)
With:
! bumped
! wall 0.512367 comb 0.510000 user 0.480000 sys 0.030000 (best of 15)
Pierre-Yves David <pierre-yves.david@octobus.net> [Sun, 21 May 2017 13:49:48 +0200] rev 32389
obsolete: test an important corner case
Receiving markers affecting changeset we'll receives later is legitimate and
not so uncommon case. Working on cache highlighted that this was only testing
in the evolve extension. We add a test for this case in core.
Martin von Zweigbergk <martinvonz@google.com> [Thu, 18 May 2017 22:47:42 -0700] rev 32388
largefiles: replace always() method, not _always field
We will soon have matchers that don't have an _always field, so
largefiles needs to stop assuming that they do. _always is only used
by always(), so we safely replace that method instead.
Augie Fackler <augie@google.com> [Sun, 21 May 2017 02:45:32 -0400] rev 32387
merge with stable
Yuya Nishihara <yuya@tcha.org> [Sun, 21 May 2017 13:41:01 +0900] rev 32386
cext: mark constant variables
Yuya Nishihara <yuya@tcha.org> [Sun, 21 May 2017 13:35:19 +0900] rev 32385
cext: move util.h to cext tree
Since util.h isn't useful in plain C module, it should be placed in CPython
extension directory.