Sat, 10 Jan 2015 23:18:11 +0900 revset: introduce "_parsealiasdecl" to parse alias declarations strictly
FUJIWARA Katsunori <foozy@lares.dti.ne.jp> [Sat, 10 Jan 2015 23:18:11 +0900] rev 23845
revset: introduce "_parsealiasdecl" to parse alias declarations strictly This patch introduces "_parsealiasdecl" to parse alias declarations strictly. For example, "_parsealiasdecl" can detect problems below, which current implementation can't. - un-closed parenthesis causes being treated as "alias symbol" because all of declarations not in "func(....)" style are recognized as "alias symbol". for example, "foo($1, $2" is treated as the alias symbol. - alias symbol/function names aren't examined whether they are valid as symbol or not for example, "foo bar" can be treated as the alias symbol, but of course such invalid symbol can't be referred in revset. - just splitting argument list by "," causes overlooking syntax problems in the declaration for example, all of invalid declarations below are overlooked: - foo("bar") => taking one argument named as '"bar"' - foo("unclosed) => taking one argument named as '"unclosed' - foo(bar::baz) => taking one argument named as 'bar::baz' - foo(bar($1)) => taking one argument named as 'bar($1)' To decrease complication of patch, current implementation for alias declarations is replaced by "_parsealiasdecl" in the subsequent patch. This patch just introduces it. This patch defines "_parsealiasdecl" not as a method of "revsetalias" class but as a one of "revset" module, because of ease of testing by doctest. This patch factors some helper functions for "tree" out, because: - direct accessing like "if tree[0] == 'func' and len(tree) > 1" decreases readability - subsequent patch (and also existing code paths, in the future) can use them for readability This patch also factors "_tokenizealias" out, because it can be used also for parsing alias definitions strictly.
Sat, 10 Jan 2015 23:18:11 +0900 revset: store full detail into revsetalias.error for error source distinction
FUJIWARA Katsunori <foozy@lares.dti.ne.jp> [Sat, 10 Jan 2015 23:18:11 +0900] rev 23844
revset: store full detail into revsetalias.error for error source distinction Before this patch, any errors in the declaration of revset alias aren't detected at all, and there is no information about error source in the error message. As a part of preparation for parsing alias declarations and definitions more strictly, this patch stores full detail into "revsetalias.error" for error source distinction. This makes raising "Abort" and warning potential errors just use "revsetalias.error" without any message composing.
Sat, 10 Jan 2015 23:18:11 +0900 revset: factor out composing error message for ParseError to reuse
FUJIWARA Katsunori <foozy@lares.dti.ne.jp> [Sat, 10 Jan 2015 23:18:11 +0900] rev 23843
revset: factor out composing error message for ParseError to reuse This patch defines the composing function not in "ParseError" class but in "revset" module, because: - "_()" shouldn't be used in "ParseError", to avoid adding "from i18n import _" i18n" to "error" module - generalizing message composition of"ParseError" for all code paths other than revset isn't the purpose of this patch we should also take care of showing "unexpected leading whitespace" for some code paths, to generalize widely.
Sat, 10 Jan 2015 23:18:11 +0900 revset: make tokenize extensible to parse alias declarations and definitions
FUJIWARA Katsunori <foozy@lares.dti.ne.jp> [Sat, 10 Jan 2015 23:18:11 +0900] rev 23842
revset: make tokenize extensible to parse alias declarations and definitions Before this patch, "tokenize" doesn't recognize the symbol starting with "$" as a valid one. This prevents revset alias declarations and definitions from being parsed with "tokenize", because "$" may be used as the initial letter of alias arguments. BTW, the alias argument name doesn't require leading "$" itself, in fact. But we have to assume that users may use "$" as the initial letter of argument names in their aliases, because examples in "hg help revsets" uses such names for a long time. To make "tokenize" extensible to parse alias declarations and definitions, this patch introduces optional arguments "syminitletters" and "symletters". Giving these sets can change the policy of "valid symbol" in tokenization easily. This patch keeps original examination of letter validity for reviewability, even though there is redundant interchanging between "chr"/"ord" at initialization of "_syminitletters" and "_symletters". At most 256 times examination (per initialization) is cheaper enough than revset evaluation itself. This patch is a part of preparation for parsing alias declarations and definitions more strictly.
Fri, 09 Jan 2015 18:38:02 +0100 largefiles: make linear update set unsure largefiles normal if unchanged
Mads Kiilerich <madski@unity3d.com> [Fri, 09 Jan 2015 18:38:02 +0100] rev 23841
largefiles: make linear update set unsure largefiles normal if unchanged 'hg update' would hash all 'unsure' largefiles before performing the merge. It would update the standins but not detect the very common case where the largefile never had been changed by the user but just had been marked with an invalid dirstate mtime to make sure any changes done by the user in the same second would be detected. The largefile would remain in that state and would have to be hashed again next time even though it still not had been changed. Sad trombone. Instead, for largefiles listed as 'unsure' or 'modified', after updating the standin with the actual hash, mark the largefile as normal if it turns out to not be modified relative to the revision in the parent revision. That will prevent it from being hashed again next time.
Fri, 09 Jan 2015 18:38:02 +0100 debugdirstate: don't hide date field with --nodate, just show 'set'/'unset'
Mads Kiilerich <madski@unity3d.com> [Fri, 09 Jan 2015 18:38:02 +0100] rev 23840
debugdirstate: don't hide date field with --nodate, just show 'set'/'unset' The value of the dirstate date field cannot be used in tests and we thus have to use debugdirstate with --nodate. It is however still very helpful to be able to see whether the date field has been set or still is unset. The absence of that information made it hard to debug some largefile dirstate issues. This change _could_ make the test suite more unstable ... but that would be places where the test suite or the code should be made more stable. (Note: 'unset' with the magic negative sizes is reliable. 'unset' for normal sizes would probably not be reliable, but there is no such occurrences in the test suite and it should thus be reliable.) This output wastes more horizontal space in the --nodate output, but it also makes things simpler that the output format always is the same. It is just a debug command so let's keep it simple.
Fri, 09 Jan 2015 18:38:02 +0100 debugdirstate: simplify date handling after e7ed5d07cc4c used fixed format
Mads Kiilerich <madski@unity3d.com> [Fri, 09 Jan 2015 18:38:02 +0100] rev 23839
debugdirstate: simplify date handling after e7ed5d07cc4c used fixed format
Sun, 11 Jan 2015 23:25:23 -0500 forget: don't report rejected files as forgotten as well
Matt Harbison <matt_harbison@yahoo.com> [Sun, 11 Jan 2015 23:25:23 -0500] rev 23838
forget: don't report rejected files as forgotten as well It seems like a mistake to report a file as forgotten and rejected. The forgotten list doesn't seem to be used by anything in core, so no test changes.
Sun, 11 Jan 2015 23:20:51 -0500 largefiles: enable subrepo support for forget
Matt Harbison <matt_harbison@yahoo.com> [Sun, 11 Jan 2015 23:20:51 -0500] rev 23837
largefiles: enable subrepo support for forget
Tue, 13 Jan 2015 15:07:08 -0800 namespaces: add revset for 'named(namespace)'
Sean Farley <sean.michael.farley@gmail.com> [Tue, 13 Jan 2015 15:07:08 -0800] rev 23836
namespaces: add revset for 'named(namespace)' This patch adds functionality for listing all changesets in a given namespace via the revset language.
Fri, 09 Jan 2015 10:52:14 -0800 bundles: do not overwrite existing backup bundles (BC)
Durham Goode <durham@fb.com> [Fri, 09 Jan 2015 10:52:14 -0800] rev 23835
bundles: do not overwrite existing backup bundles (BC) Previously, a backup bundle could overwrite an existing bundle and cause user data loss. For instance, if you have A<-B<-C and strip B, it produces backup bundle B-backup.hg. If you then hg pull -r B B-backup.hg and strip it again, it overwrites the existing B-backup.hg and C is lost. The fix is to add a hash of all the nodes inside that bundle to the filename. Fixed up existing tests and added a new test in test-strip.t
Mon, 12 Jan 2015 18:01:20 -0700 https: support tls sni (server name indication) for https urls (issue3090)
Alex Orange <crazycasta@gmail.com> [Mon, 12 Jan 2015 18:01:20 -0700] rev 23834
https: support tls sni (server name indication) for https urls (issue3090) SNI is a common way of sharing servers across multiple domains using separate SSL certificates. As of Python 2.7.9 SSLContext has been backported from Python 3. This patch changes sslutil's ssl_wrap_socket to use SSLContext and take a server hostname as and argument. It also changes the url module to make use of this argument. The new code for 2.7.9 achieves it's task by attempting to get the SSLContext object from the ssl module. If this fails the try/except goes back to what was there before with the exception that the ssl_wrap_socket functions take a server_hostname argument that doesn't get used. Assuming the SSLContext exists, the arguments to wrap_socket at the module level are emulated on the SSLContext. The SSLContext is initialized with the specified ssl_version. If certfile is not None load_cert_chain is called with certfile and keyfile. keyfile being None is not a problem, load_cert_chain will simply expect the private key to be in the certificate file. verify_mode is set to cert_reqs. If ca_certs is not None load_verify_locations is called with ca_certs as the cafile. Finally the wrap_socket method of the SSLContext is called with the socket and server hostname. Finally, this fails test-check-commit-hg.t because the "new" function ssl_wrap_socket has underscores in its names and underscores in its arguments. All the underscore identifiers are taken from the other functions and as such can't be changed to match naming conventions.
Wed, 14 Jan 2015 12:50:46 -0800 merge with stable
Matt Mackall <mpm@selenic.com> [Wed, 14 Jan 2015 12:50:46 -0800] rev 23833
merge with stable
Tue, 13 Jan 2015 16:15:02 -0800 unpacker: check the right exception type for 2.4
Matt Mackall <mpm@selenic.com> [Tue, 13 Jan 2015 16:15:02 -0800] rev 23832
unpacker: check the right exception type for 2.4
Sat, 10 Jan 2015 18:00:57 +0800 hgweb: fix diffstat links in paper/changeset.tmpl
Anton Shestakov <engored@ya.ru> [Sat, 10 Jan 2015 18:00:57 +0800] rev 23831
hgweb: fix diffstat links in paper/changeset.tmpl '<a .../>foo</a>' syntax is incorrect, since the first tag just "tries" to close itself and then the actual content follows. It doesn't work, either because web browsers know better than this or because there should be a whitespace before /: '<a />'. So for the hgweb users the links looked normal anyway, but now they are correct in code as well.
Sat, 10 Jan 2015 17:54:24 +0800 hgweb: close <img> elements
Anton Shestakov <engored@ya.ru> [Sat, 10 Jan 2015 17:54:24 +0800] rev 23830
hgweb: close <img> elements Templates declare xhtml doctype, which means, in particular, that the document must also be valid xml. So <img> elements must be closed.
Sat, 10 Jan 2015 17:52:02 +0800 hgweb: close <p> elements
Anton Shestakov <engored@ya.ru> [Sat, 10 Jan 2015 17:52:02 +0800] rev 23829
hgweb: close <p> elements <p> elements can only contain inline elements, so as soon as browser encounters a block element (e.g. block <div>) "inside" a <p>, it puts an implicit </p>. It's better to do this explicitly.
Sat, 10 Jan 2015 17:44:54 +0800 hgweb: close <th> properly in spartan/filelogentry.tmpl
Anton Shestakov <engored@ya.ru> [Sat, 10 Jan 2015 17:44:54 +0800] rev 23828
hgweb: close <th> properly in spartan/filelogentry.tmpl
Sat, 10 Jan 2015 21:36:42 +0900 revset: simplify fullreposet.__and__ to call sort() with boolean flag
Yuya Nishihara <yuya@tcha.org> [Sat, 10 Jan 2015 21:36:42 +0900] rev 23827
revset: simplify fullreposet.__and__ to call sort() with boolean flag Note that sort() takes a boolean flag, so other.sort(reverse) was wrong. It just worked fine because there is a top-level function, reverse().
Sat, 10 Jan 2015 21:31:59 +0900 revset: fix spanset.isascending() to honor sort() or reverse() request stable
Yuya Nishihara <yuya@tcha.org> [Sat, 10 Jan 2015 21:31:59 +0900] rev 23826
revset: fix spanset.isascending() to honor sort() or reverse() request Because spanset.isascending() ignored the ascending flag, the result of "fullreposet() & x" was always sorted in ascending order. The test case is carefully chosen to call fullreposet.__and__.
Tue, 13 Jan 2015 15:08:55 -0500 hghave: we now support Python 2.7.9's ssl for https
Augie Fackler <augie@google.com> [Tue, 13 Jan 2015 15:08:55 -0500] rev 23825
hghave: we now support Python 2.7.9's ssl for https
Tue, 13 Jan 2015 14:15:08 -0500 Makefile.python: try curl if wget fails
Augie Fackler <augie@google.com> [Tue, 13 Jan 2015 14:15:08 -0500] rev 23824
Makefile.python: try curl if wget fails Macs ship with curl and not wget, so this is a nice little tweak for folks testing on OS X.
Tue, 13 Jan 2015 15:15:37 -0500 test-https: glob error messages more so we pass on Python 2.7.9
Augie Fackler <augie@google.com> [Tue, 13 Jan 2015 15:15:37 -0500] rev 23823
test-https: glob error messages more so we pass on Python 2.7.9 Python 2.7.9 cleans up how it stringifies SSL errors, so we have to look only for the important bit (certificate verify failed) rather than looking for specific ssl module goop (which is now unstable).
Mon, 12 Jan 2015 09:46:56 -0800 filelog: fix backwards comment for 'backrevref'
Martin von Zweigbergk <martinvonz@google.com> [Mon, 12 Jan 2015 09:46:56 -0800] rev 23822
filelog: fix backwards comment for 'backrevref'
Mon, 12 Jan 2015 09:49:25 -0800 filelog: remove trailing "form feed" character
Martin von Zweigbergk <martinvonz@google.com> [Mon, 12 Jan 2015 09:49:25 -0800] rev 23821
filelog: remove trailing "form feed" character
Mon, 12 Jan 2015 09:48:05 -0800 filelog: remove unused variable 'lkr'
Martin von Zweigbergk <martinvonz@google.com> [Mon, 12 Jan 2015 09:48:05 -0800] rev 23820
filelog: remove unused variable 'lkr' It's used further down, but it's overwritten before, so it's technically a dead assignment, but unnecessary nevertheless.
Sat, 10 Jan 2015 12:00:03 -0500 branchmap: add seek() to end of file before calling tell() on append open()
Matt Harbison <matt_harbison@yahoo.com> [Sat, 10 Jan 2015 12:00:03 -0500] rev 23819
branchmap: add seek() to end of file before calling tell() on append open() This is similar to 48c232873a54, which was subsequently modified in 19f5dec2d61f for 2.4. Unexpected test changes on Windows occurred without this.
Fri, 09 Jan 2015 22:14:01 -0500 tests: fix test-casefolding.t output for branchcache
Matt Harbison <matt_harbison@yahoo.com> [Fri, 09 Jan 2015 22:14:01 -0500] rev 23818
tests: fix test-casefolding.t output for branchcache This belongs with 7d63398fbfd1. I assume that the failure to read is OK, because there is similar output in test-convert-svn-encoding.t.
(0) -10000 -3000 -1000 -300 -100 -50 -28 +28 +50 +100 +300 +1000 +3000 +10000 tip