Yuya Nishihara <yuya@tcha.org> [Mon, 29 Feb 2016 17:54:03 +0900] rev 28871
parser: move alias declaration parser to common rule-set class
The original _parsealiasdecl() function is split into common _builddecl()
and revset-specific _parsealiasdecl(). And the original _parsealiasdecl()
call is temporarily replaced by rules._builddecl(), which should be eliminated
later.
The doctests are mostly ported by using the dummy parse(), but the test for
'foo bar' is kept in _parsealiasdecl() as it checks if "pos != len(decl)" is
working. Also, 'foo($1)' test is added to make sure the alias tokenizer can
handle '$1' symbol, which is the only reason why we need _parsealiasdecl().
Yuya Nishihara <yuya@tcha.org> [Sun, 03 Apr 2016 16:55:23 +0900] rev 28870
parser: add stub class that will host alias parsing and expansion
This class will keep syntax rules that are necessary to parse and expand
aliases. The implementations will be extracted from the revset module. In
order to make the porting easier, this class keeps parsedecl and parsedefn
separately, which will be unified later. Also, getlist and funcnode will
be refactored by future patches for better handling of the template aliases.
The following public functions will be added:
aliasrules.build(decl, defn) -> aliasobj
parse decl and defn into an object that keeps alias name, arguments
and replacement tree.
aliasrules.buildmap(aliasitems) -> aliasdict
helper to build() a dict of alias objects from a list of (decl, defn)
aliasrules.expand(aliasdict, tree) -> tree
expand aliases in tree recursively
Because these functions aren't introduced by this series, there would remain
a few wrapper functions in the revset module. These ugly wrappers should be
eliminated by the next series.
This class is considered an inheritable namespace, which will host only
class/static methods. That's because it won't have no object-scope variables.
I'm not a big fan of using class as a syntax sugar, but I admit it can improve
code readability at some level. So let's give it a try.
Yuya Nishihara <yuya@tcha.org> [Mon, 29 Feb 2016 17:43:39 +0900] rev 28869
revset: narrow scope of "except ParseError" block in _parsealiasdecl()
This helps to factor out a common function. "if True" will be removed soon.
Kostia Balytskyi <ikostia@fb.com> [Tue, 12 Apr 2016 04:06:50 -0700] rev 28868
obsstore: move delete function from obsstore class to repair module
Since one of the original patches was accepted already and people on the
mailing list still have suggestions as to how this should be improved, I'm
implementing those suggestions in the following patches (this and the ones that
might follow).
Kostia Balytskyi <ikostia@fb.com> [Tue, 12 Apr 2016 03:40:53 -0700] rev 28867
debugobsolete: style fixes to debugobsolete that slipped from original commit
Matt Mackall <mpm@selenic.com> [Wed, 09 Mar 2016 10:47:33 -0500] rev 28866
import: document --exact behavior in more detail
Adrian Buehlmann <adrian@cadifra.com> [Mon, 11 Apr 2016 19:46:50 +0200] rev 28865
util: add doctest to datestr()
Florent Gallaire <fgallaire@gmail.com> [Tue, 12 Apr 2016 00:30:28 +0200] rev 28864
date: fix boundary check of negative integer
Jun Wu <quark@fb.com> [Sun, 10 Apr 2016 22:00:34 +0100] rev 28863
chg: server exited with code 0 without being connectable is an error
Before this patch, if the server started by chg has exited with code 0 without
creating a connectable unix domain socket at the specified address, chg will
exit with code 0, which is not the correct behavior. It can happen, for
example, CHGHG is set to /bin/true.
This patch addresses the issue by checking the exit code of the server and
printing a new error message if the server exited normally but cannot be
reached.
Oleg Afanasyev <olegaf@fb.com> [Fri, 08 Apr 2016 23:33:28 -0700] rev 28862
shelve: refactor directory name into constant
Shelve directory name extracted into constant to avoid typos/duplication.