- Nov 23, 2015
-
-
Siddharth Agarwal authored
If detailed conflict markers are enabled and the closing quote gets truncated, editors will often screw syntax highlighting up from that point because they'll see an opening quote and think it's the beginning of a string. In tests, the hashes change because the commit messages of the shelved bundles also change.
-
Siddharth Agarwal authored
At the moment no change/delete conflicts get to this point -- we're going to make that happen in an upcoming patch.
-
Siddharth Agarwal authored
These are meant for use by custom merge drivers that might want to modify the dirstate. Dirstate internal consistency rules require that all removes happen before any adds -- this means that custom merge drivers shouldn't be modifying the dirstate directly.
-
- Nov 16, 2015
-
-
Siddharth Agarwal authored
Some resolutions might lead to pending actions we need to perform in the dirstate -- so perform them.
-
- Nov 21, 2015
-
-
Siddharth Agarwal authored
We're going to use this in resolve in the next patch.
-
- Nov 16, 2015
-
-
Siddharth Agarwal authored
We're going to use this function for a much smaller set of actions in the next patch. It's easier to do this than to backfill the dict we pass in.
-
- Nov 23, 2015
-
-
Augie Fackler authored
Used a class as a namespace, and then wired up a classmethod to return all known constraints. I'm mostly happy with this, even though it's kind of weird for hg.
-
- Nov 17, 2015
-
-
Mateusz Kwapich authored
This is a first (very simple) version of the histedit base action. It works well in common usecases like rebasing the whole stack and spliting the stack. I don't see any obvious edge cases - but probably there is more than one. That's why I want to keep it behind experimental.histeditng config knob for now. I think on knob for all new histedit behaviors is better because we will test all of them together and testers will need to turn it on only once to get all new nice things.
-
- Nov 18, 2015
-
-
Mateusz Kwapich authored
Small helper function for aborting histedit when left with dirty working directory.
-
- Nov 13, 2015
-
-
Mateusz Kwapich authored
For the future 'base' action in histedit we need a verification constraint which will not allow using this action with changes that are currently edited.
-
- Nov 18, 2015
-
-
Mateusz Kwapich authored
Before we can add a 'base' action to histedit need to change verification so that action can specify which steps of verification should run for it. Also it's everything we need for the exec and stop actions implementation. I thought about baking verification into each histedit action (so each of them is responsible for verifying its constraints) but it felt wrong because: - every action would need to know its context (eg. the list of all other actions) - a lot of duplicated work will be added - each action will iterate through all others - the steps of the verification would need to be extracted and named anyway in order to be reused The verifyrules function grows too big now. I plan to refator it in one of the next series.
-
- Nov 13, 2015
-
-
Anton Shestakov authored
Most of the pages in paper (and coal) style show the current revision and its branch, tags and bookmarks. Let's also show all this on file log page.
-
- Nov 20, 2015
-
-
Siddharth Agarwal authored
These queues will always be empty at the moment -- we're going to fill them up in upcoming patches.
-
- Nov 21, 2015
-
-
Siddharth Agarwal authored
We're going to use this to extend the action lists in merge.applyupdates. The somewhat funky return value is to make passing this dict directly into recordactions easier. We're going to exploit that in an upcoming patch.
-
Siddharth Agarwal authored
This eliminates a whole bunch of duplicate code and allows us to update the removed count for change/delete conflicts where the delete action was chosen.
-
Siddharth Agarwal authored
Note that unlike the other functions, this is based on the persistent mergestate.
-
Siddharth Agarwal authored
This will not only allow us to remove a bunch of duplicate code in applyupdates in an upcoming patch, it will also allow the resolve interface to be a lot simpler: it doesn't need to return the dirstate action to applyupdates.
-
Siddharth Agarwal authored
This is a partial backout of an earlier diff -- now that we're storing the results in a dict, we don't actually need this any more.
-
Siddharth Agarwal authored
We're going to need this to compute (a) updated/merged/unresolved counts, and (b) actions to perform on the dirstate.
-
Gregory Szorc authored
Many revset consumers construct changectx instances for each returned result. Add support for benchmarking this to our revset benchmark script. In the future, we might want to have some kind of special syntax in the parsed revset files to engage this mode automatically. This would enable us to load changectxs for revsets that do that in the code and would more accurately benchmark what's actually happening. For now, running all revsets with or without changectxs is sufficient.
-
Gregory Szorc authored
Previously, perfrevset called repo.revs(), which only returns integer revisions. Many revset consumers call repo.set(), which returns changectx instances. Or they obtain a context manually later. Since obtaining changectx instances when evaluating revsets is common, this patch adds support for benchmarking this use case. While we added an if conditional for every benchmark loop, it doesn't appear to matter since revset evaluation dwarfs the cost of a single if.
-
Gregory Szorc authored
revs() doesn't return a list. Also document what its arguments do. Also clarify that set() is just a convenience wrapper around revs().
-
- Nov 23, 2015
-
-
Gregory Szorc authored
There are a lot of functions and variables doing similar things. Document the role and functionality of each to make it easier to grok.
-
- Nov 22, 2015
-
-
Gregory Szorc authored
On demand importing doesn't work with PyPy for some reason. Don't honor requests to enable demand importing when running under PyPy.
-
- Nov 15, 2015
-
-
Gregory Szorc authored
ui.write() has 2 modes: buffered and unbuffered. In buffered mode, we capture output before writing it. This is how changeset printing works, for example. Previously, we were potentially clearing the progress bar for every call to ui.write(). In buffered mode, this clearing was useless because the clearing function would be called again before actually writing the buffered data. This patch stops the useless calling of _progclear() unless we are actually writing data. During changeset printing with the default template, this removes ~6 function calls per changeset, making changeset printing slightly faster. before: 23.76s after: 23.35s delta: -0.41s (98.3% of original)
-
- Nov 23, 2015
-
-
Matt Harbison authored
Windows can't invoke a python script directly, so invoke sh.exe instead. According to sid0, the output changes are due to the fact that 'f' is no longer being passed all of the args that it was, but these changes aren't essential to the test [1]. [1] https://selenic.com/pipermail/mercurial-devel/2015-November/075768.html
-
- Nov 15, 2015
-
-
Gregory Szorc authored
We were computing the quotient and remainder of a division operation separately. The built-in divmod() function allows us to do this with a single function call. Do that.
-
Gregory Szorc authored
Before, we passed the node then subsequently performed a lookup on repo.changelog. We already has the context available, so just pass it in. This does result in a small performance win. But I doubt it will show up anywhere because diff[stat] calculation will dwarf the time spent to create a changectx. Still, we should be creating fewer changectx out of principle.
-
- Nov 22, 2015
-
-
Gregory Szorc authored
Resolving parents requires reading from the changelog, which is a few attributes and function calls away. Parents lookup occurs surprisingly often. Micro optimizing the code to avoid redundant lookups of parents appears to make `hg log` on my Firefox repo a little faster: before: 24.91s after: 23.76s delta: -1.15s (95.4% of original)
-
Gregory Szorc authored
This patch avoids some extra attribute lookups and list mutations. This micro-optimization seems to result in a minor speedup for `hg log` on my Firefox repo: before: 25.35s after: 24.91s delta: -0.44s (98% of original) Not the biggest gain. But every little bit helps.
-
Matt Harbison authored
Without this, C:\path\to\test is converted into C:pathtotest. Since $TESTTMP appears in output, seems to work in some places without quotes, and is also used within a larger quote block (see test-rebase-collapse.t, ~line 160), I'm not sure what a check-code rule would look like (or even if it is feasible).
-
Gregory Szorc authored
PyPy's _lsprof module doesn't export a "profiler_entry" symbol. This patch treats the symbol as optional and falls back to verifying the attribute is present on the first entry in the collected data as part of validation. There is a chance not every entry will contain the requested sort attribute. But, this patch does unbust lsprof on PyPy for the hg commands I've tested, so I assume it is sufficient. It's certainly better than the ImportError we encountered before. As part of the import refactor, I snuck in the addition of absolute_import.
-
- Nov 12, 2015
-
-
Augie Fackler authored
Cleanup performed with clang-format.
-
- Nov 20, 2015
-
-
Laurent Charignon authored
Before this patch we were using the old api bookmarks.write instead of bookmarks.recordchange at the end of rebase operations. We move clearstatus within the transaction to make it easier for extensions that wrap transactions operations.
-
Laurent Charignon authored
We put the code to be indented in the next patch in a "if True:" block to make it easier to review.
-
- Nov 16, 2015
-
-
Matt Harbison authored
The variable uniformly uses '\' separators, so the straight equality check with '/' separating the last component fails. It also doesn't like having the quote appear in the middle of the string when testing.
-
- Nov 09, 2015
-
-
Matt Harbison authored
Starting with 13272104bb07, the output changed on Windows: --- e:/Projects/hg/tests/test-context.py.out +++ e:/Projects/hg/tests/test-context.py.err @@ -1,4 +1,4 @@ -workingfilectx.date = (1000, 0) +workingfilectx.date = (1000L, 0) ASCII : Gr?ezi! Latin-1 : Grⁿezi! UTF-8 : Gr├╝ezi! Since int and long are both 32 bit on Windows, this seems harmless in practice other than the previous test failure.
-
- Nov 16, 2015
-
-
Matt Harbison authored
This was failing with: sh: $TESTTMP/checkvisibility.sh: No such file or directory
-
Matt Harbison authored
The extension was failing to load on Windows because $TESTTMP contains a path component 'test', prefixed by a path separator '\'. That combination ends up converted to "...<tab>est...".
-
Matt Harbison authored
The other invocations aren't quoted, and Windows doesn't like the single quotes: diff --git a/tests/test-ssh.t b/tests/test-ssh.t --- a/tests/test-ssh.t +++ b/tests/test-ssh.t @@ -520,20 +520,8 @@ remote hook failure is attributed to rem $ echo "pretxnchangegroup.fail = python:$TESTTMP/failhook:hook" >> remote/.hg/hgrc $ hg -q --config ui.ssh="python '$TESTDIR/dummyssh'" clone ssh://user@dummy/remote hookout + abort: no suitable response from remote hg! + [255] $ cd hookout + $TESTTMP.sh: line 264: cd: hookout: No such file or directory $ touch hookfailure - $ hg -q commit -A -m 'remote hook failure' ....
-