- Mar 29, 2016
-
-
Katsunori FUJIWARA authored
This patch also adds test for filter 'svnisodate' and 'svnutcdate' for safety, because there is no test using them, yet.
-
Katsunori FUJIWARA authored
Using decorator can localize changes for adding (or removing) a template filter function in source code. This patch also removes leading ":FILTER:" part in help document of each filters, because using templatefilter makes it useless. This patch uses not 'filter' but 'templatefilter' as a decorator name, because the former name hides Python built-in one, even though the latter is a little redundant in 'templatefilters.py'.
-
Katsunori FUJIWARA authored
This patch also adds loadfilter() to templatefilters, because this combination helps to figure out how they cooperate with each other. Listing up loadfilter() in dispatch.extraloaders causes implicit loading template filter functions at loading (3rd party) extension. This change requires that "templatefilter" attribute of (3rd party) extension is registrar.templatefilter or so.
-
- Feb 14, 2016
-
-
Yuya Nishihara authored
This function is now much simpler than before. Inlining small functions helps to extract a reusable alias processor.
-
Yuya Nishihara authored
Since _parsealiasdefn() rejects unknown alias arguments, _checkaliasarg() is unnecessary. New test is added to make sure unknown '$n' symbols are rejected.
-
Yuya Nishihara authored
In short, this patch moves the hack from tokenizedefn() to _relabelaliasargs(), which is called after parsing. This change aims to eliminate tight dependency on the revset tokenizer. Before this patch, we had to rewrite an alias argument to a pseudo function: "$1" -> "_aliasarg('$1')" ('symbol', '$1') -> ('function', ('symbol', '_aliasarg'), ('string', '$1')) This was because the tokenizer must generate tokens that are syntactically valid. By moving the process to the parsing phase, we can assign a unique tag to an alias argument. ('symbol', '$1') -> ('_aliasarg', '$1') Since new _aliasarg node never be generated from a user input, we no longer have to verify a user input at findaliases(). The test for _aliasarg("$1") is removed as it is syntactically valid and should pass the parsing phase.
-
Yuya Nishihara authored
I'm going to refactor the alias processing functions. We need '_aliasarg' tag to limit the scope of the alias expansion, but it wasn't covered by the test. This patch adds the test that should fail if '_aliasarg' were 'symbol'. This is the first half of the second part of the "template alias" series. The whole series will consist of the following parts: 1. make parsed template tree to be compatible with parser functions (1d461ee26e1b and 73d01cba5810) 2. refactor alias processing to be less dependent on revset module (1/2 in this series) 3. extract reusable component to parser module 4. clean up it 5. extend it to support template syntax 6. add debugging/testing functions of template aliases 7. add alias expansion routine to templater
-
- Mar 27, 2016
-
-
Yuya Nishihara authored
Before this patch, the first and last characters were stripped from ui.logtemplate and template.* if they were the same. It could lead to a strange result as quotes are optional. See the test for example.
-
- Mar 29, 2016
-
-
Laurent Charignon authored
Before this patch, rebase --continue would crash when trying to resume a rebase of obsolete revisions whose successors were in the destination. This patch adds logic to recompute the mapping when rebase is resumed. This patch also adds a test that showcased the crash before the code change.
-
Laurent Charignon authored
This patch extracts the error handling code path to go in a separate function. In the next patch we will able to reuse this logic and avoid duplicated code.
-
Katsunori FUJIWARA authored
-
Katsunori FUJIWARA authored
This patch makes messages at updating to the closed head usual form for Mercurial as below: one line description of the problem with no period (a suggestion about how to move forward or get more info)
-
Pulkit Goyal authored
-
Pulkit Goyal authored
-
Pulkit Goyal authored
-
Pulkit Goyal authored
-
Pulkit Goyal authored
-
Pulkit Goyal authored
-
Pulkit Goyal authored
-
Pulkit Goyal authored
-
timeless authored
-
- Mar 28, 2016
-
-
timeless authored
-
- Mar 29, 2016
-
-
Martin von Zweigbergk authored
Change 1e28ec9744bf (changegroup: move chunk extraction into a getchunks method of unbundle10, 2014-04-10) extracted some code to a getchunks() method and copied a comment about the changegroup format to the new method. The copy that remains in the old place, doesn't make much sense there, so let's remove it.
-
Martin von Zweigbergk authored
As reported by pyflakes
-
Matt Mackall authored
-
- Mar 26, 2016
-
-
Martin von Zweigbergk authored
When using treemanifests, only changegroup3 bundles can be created. However, there is currently no way of requesting a changegroup3 bundle, so we run into an assertion in changegroup.getbundler() when trying to get a changroup2 bundler. Let's avoid the traceback and print a short error message instead.
-
- Mar 25, 2016
-
-
Martin von Zweigbergk authored
The functions already have a lot in common, but were structured a little differently.
-
Martin von Zweigbergk authored
This also makes the "version" argument explicit (never relies on getlocalchangegroupraw()'s default), which I think is a good thing.
-
- Mar 28, 2016
-
-
Martin von Zweigbergk authored
writebundle() writes a bundle2 bundle or a plain changegroup1. Imagine away the "2" in "bundle2.py" for a moment and this change should makes sense. The bundle wraps the changegroup, so it makes sense that it knows about it. Another sign that this is correct is that the delayed import of bundle2 in changegroup goes away. I'll leave it for another time to remove the "2" in "bundle2.py" (alternatively, extract a new bundle.py from it).
-
- Mar 29, 2016
-
-
Matt Mackall authored
-
Matt Mackall authored
-
- Mar 23, 2016
-
-
Mateusz Kwapich authored
CVE-2016-3069 (5/5) Before recent refactoring we were not escaping calls to git at all which made such injections possible. Let's have a test for that to avoid this problem in the future. Reported by Blake Burkhart.
-
Mateusz Kwapich authored
CVE-2016-3069 (4/5)
-
Mateusz Kwapich authored
CVE-2016-3069 (3/5)
-
Mateusz Kwapich authored
CVE-2016-3069 (2/5) One test output changed because we were ignoring git return code in numcommits before.
-
Mateusz Kwapich authored
CVE-2016-3069 (1/5) To avoid shell injection and for the sake of simplicity let's use the common.commandline for calling git.
-
- Mar 21, 2016
-
-
Mateusz Kwapich authored
CVE-2016-3068 (1/1) Git's git-remote-ext remote helper provides an ext:: URL scheme that allows running arbitrary shell commands. This feature allows implementing simple git smart transports with a single shell shell command. However, git submodules could clone arbitrary URLs specified in the .gitmodules file. This was reported as CVE-2015-7545 and fixed in git v2.6.1. However, if a user directly clones a malicious ext URL, the git client will still run arbitrary shell commands. Mercurial is similarly effected. Mercurial allows specifying git repositories as subrepositories. Git ext:: URLs can be specified as Mercurial subrepositories allowing arbitrary shell commands to be run on `hg clone ...`. The Mercurial community would like to thank Blake Burkhart for reporting this issue. The description of the issue is copied from Blake's report. This commit changes submodules to pass the GIT_ALLOW_PROTOCOL env variable to git commands with the same list of allowed protocols that git submodule is using. When the GIT_ALLOW_PROTOCOL env variable is already set, we just pass it to git without modifications.
-
- Mar 17, 2016
-
-
Matt Mackall authored
CVE-2016-3630 (2/2) This addresses part of a vulnerability in binary delta application.
-
Matt Mackall authored
CVE-2016-3630 (1/2) This addresses part of a vulnerability in application of binary deltas.
-
- Mar 28, 2016
-
-
Matt Mackall authored
-