- May 28, 2018
-
-
Boris Feld authored
Shelve is currently sub-contracting some of its work to the rebase extension. In order to make shelve more independent and flexible we would like shelve to handle the parent alignment directly. This changeset takes on the next step, handling the abort process. Same as for --abort. It turns out we have all the necessary bits in the `shelvestate` file. So we do not need anything from the interrupted rebase. Differential Revision: https://phab.mercurial-scm.org/D3689
-
Boris Feld authored
Shelve is currently sub-contracting some of its work to the rebase extension. In order to make shelve more independent and flexible we would like shelve to handle the parent alignment directly. This change starts with the simplest bits, handling the abort process. It turns out we have all the necessary bits in the `shelvestate` file. So we do not need anything from the interrupted rebase. As a nice side effect, a test about missing `shelverebasestate` state file now behave better. Differential Revision: https://phab.mercurial-scm.org/D3688
-
Boris Feld authored
The rebasestate is a lower level implementation details that we are trying to remove. Differential Revision: https://phab.mercurial-scm.org/D3687
-
- May 13, 2018
-
-
Gregory Szorc authored
We currently have make boilerplate for each instance of a distro's release. This is redundant, annoying to maintain, and prone to errors. This commit defines variables holding available releases for various distros. We then iterate through the list and dynamically define make targets. Differential Revision: https://phab.mercurial-scm.org/D3761
-
- May 12, 2018
-
-
Gregory Szorc authored
Now that Docker image building is implemented in Python and we can perform template substitution in memory, we don't need to write out produced Dockerfiles to disk. Differential Revision: https://phab.mercurial-scm.org/D3760
-
- May 13, 2018
-
-
Gregory Szorc authored
I want to do some more advanced things with Docker in upcoming commits. Trying to do that with shell scripts will be a bit too painful for my liking. Implementing things in Python will be vastly simpler in the long run. This commit essentially ports dockerlib.sh to a Python script. dockerdeb and dockerrpm have been ported to use the new hg-docker script. hg-docker requires Python 3. I've only tested on Python 3.5. Unlike the local packaging scripts which may need to run on old distros, the Docker packaging scripts don't have these constraints. So I think it is acceptable to require Python 3.5. As part of the transition, the Docker image tags changed slightly. I don't think that's a big deal: the Docker image names are effectively arbitrary and are a means to an end to achieve running commands in Docker containers. The code for resolving the Dockerfile content allows substituting values passed as arguments. This will be used in a subsequent commit. Differential Revision: https://phab.mercurial-scm.org/D3759
-
- May 12, 2018
-
-
Gregory Szorc authored
Previously, dockerlib.sh appended some commands to create a "build" user in each Docker image. The resulting Docker images could be inconsistent depending on the execution environment and base image. With this change, we explicitly create our custom user and group as the first action in each Dockerfile. The user always has user:group 1000:1000 and all built images are consistent. We also create a home directory for the user under /build. This directory is currently ignored. As part of this, we stop setting the DBUILDUSER variable in dockerlib.sh and instead set it in the respective scripts that call it. This is in preparation for further refactoring of dockerlib.sh. Differential Revision: https://phab.mercurial-scm.org/D3758
-
- Jun 14, 2018
-
-
Pulkit Goyal authored
When the commad we are running, introduces new instabilities, we show a message like `5 new orphan changesets`, `2 new content-divergent changesets`, `1 new phase-divergent changesets` etc which is very nice. Now taking a step ahead, we want users to show how to fix them too. Something like: `5 new orphan changesets (run 'hg evolve' to resolve/stabilize them)` `2 new content-divergent changesets (run 'hg evolve --content-divergent' to resolve them)` and maybe telling user a way to understand more about those new instabilities like `hg evolve --list` or `hg log -r 'orphan()'` something like that. The idea came from issue5855 which I want to fix because fixing that will result in a nice UI. Taking the construction logic out will allow extensions like evolve (maybe rebase too) to wrap that and add information about how to resolve and how to understand the instability more. Differential Revision: https://phab.mercurial-scm.org/D3734
-
- Jun 25, 2018
-
-
Sune Foldager authored
Windows doesn't support line buffering, treating it as fully buffered. This causes output of slow commands to stutter. We use unbuffered instead.
-
- May 25, 2018
-
-
Pulkit Goyal authored
This patch introduces a new --abort flag to `hg graft` command which aborts an interrupted graft and rollbacks to the state before graft. The behavior when some of grafted changeset get's published while interrupted graft or we have new descendants on grafted changesets is same as that of rebase which is warn the user, don't strip and abort the abort the graft. Tests are added for the new flag. .. feature:: `hg graft` now has a `--abort` flag which aborts the interrupted graft and rollbacks to state before the graft. Differential Revision: https://phab.mercurial-scm.org/D3754
-
- Jun 14, 2018
-
-
Pulkit Goyal authored
This will make upcoming patch where we introduce a new elif for the abort case more readable. Also added a new line before the if-else starts. Differential Revision: https://phab.mercurial-scm.org/D3752
-
Pulkit Goyal authored
This patch starts storing the new nodes formed during the ongoing graft operation in the graftstate. We need the list of new nodes formed while implmenting `graft --abort` which will strip out the new nodes. Differential Revision: https://phab.mercurial-scm.org/D3751
-
Yuya Nishihara authored
Before, an empty tag "" was inserted in place of "tip", resulting in double spaces.
-
Yuya Nishihara authored
This utilizes the pass-by-name nature of template arguments.
-
Yuya Nishihara authored
The primary use case is to filter out "tip" from a list of tags.
-
- Jun 17, 2018
-
-
Yuya Nishihara authored
Broken at f9c426385853. bool(python_value) shouldn't be used here since an integer 0 has to be truthy for backward compatibility.
-
- Jun 18, 2018
-
-
Yuya Nishihara authored
Otherwise symbolsused() would fail if a named template is specified with -T.
-
- Jun 25, 2018
-
-
Pulkit Goyal authored
This makes the test pass on Python 3. # skip-blame because just b'' prefixes. Differential Revision: https://phab.mercurial-scm.org/D3832
-
- Jun 24, 2018
-
-
Pulkit Goyal authored
Before this patch, when running test-debugcommands.t, we get a TypeError because NoneType can't be converted into bytes. This patch uses stringutil.pprint() to print the ui._colormode. We are now close to getting test-debugcommands.t passing on Python 3. Differential Revision: https://phab.mercurial-scm.org/D3831
-
- Jun 23, 2018
-
-
Sushil Khanchi authored
In dry-run mode, if there is no conflict return 0, if any then return 1 Differential Revision: https://phab.mercurial-scm.org/D3829
-
- Mar 24, 2017
-
-
Matt Harbison authored
-
Matt Harbison authored
-
- Jun 21, 2018
-
-
Yuya Nishihara authored
We no longer need them since the engine is instantiated in __init__().
-
Yuya Nishihara authored
The engine-level cache was effectively disabled at 48289eafb37d "templater: drop extension point of engine classes (API)" by mistake, which made template rendering quite slow. Spotted by Martin von Zweigbergk.
-
Yuya Nishihara authored
This avoids reference cycle in the subsequent patch: templater -> _proc -> templater.load -> templater The templater class will be a thin wrapper around the loader and the engine.
-
- Jun 16, 2018
-
-
Yuya Nishihara authored
So that we can specify templater tests as test-template-*. (original) $ wc -l test-command-template.t test-template-* 5041 test-command-template.t 23 test-template-filters.t 5064 total (at this patch) $ wc -l test-template-* 1088 test-template-basic.t 1376 test-template-functions.t 1195 test-template-keywords.t 1760 test-template-map.t 5419 total
-
Yuya Nishihara authored
-
Yuya Nishihara authored
-
Yuya Nishihara authored
I decided to not split filters and functions into two test files since we sometimes reimplement a filter as a function.
-
Yuya Nishihara authored
test-command-template.t is one of the slowest tests. Let's split it into 4 files of manageable size.
-
- Jun 21, 2018
-
-
Martin von Zweigbergk authored
As Yuya noted in the review of D3818, passing in targetphase=phases.draft would result in advancing the phase boundary of a secret-phase parent. We never pass targetphase=phases.draft so far, but it's a bug waiting to happen. I tried to refactor it so max(parentphase, X) happened in one place, but I couldn't come up with good variables names and I ended up with a "newphase = max(newphase, parentphase)" line, which made the whole block not look any better to me. Differential Revision: https://phab.mercurial-scm.org/D3824
-
- Jun 16, 2018
-
-
Sushil Khanchi authored
Differential Revision: https://phab.mercurial-scm.org/D3756
-
- Jun 08, 2018
-
-
Yuya Nishihara authored
It checks if ctx will be used in template since loading ctx per revision could take extra 10-100msec in total depending on the number of tags.
-
Yuya Nishihara authored
This allows us to create ctx objects only if necessary. I tried another idea which is to populate ctx from 'repo' and 'node' value on demand. It worked, but seemed unnecessarily complicated. So I chose a simpler one. The datafields argument is a space-separated string for consistency with fm.write() API.
-
- Jun 14, 2018
-
-
Yuya Nishihara authored
-
Yuya Nishihara authored
-
- Jun 21, 2018
-
-
Martin von Zweigbergk authored
-
- Jun 19, 2018
-
-
Yuya Nishihara authored
Since a75d24539aba "convert: fix convert dropping p2 contents during filemap merge", wctx is not always a committablectx because the convert extension passes in repo[n] as wctx. If wctx is a committed changeset, its manifest dict shouldn't be mutated reflecting to the working directory.
-
Martin von Zweigbergk authored
With this change, hg split will preserve the phase of the commit that is being split, ignoring the phases.new-commit setting. Previously, we would use whatever phases.new-commit was set to (unless our parent was secret, then we would be secret even if phases.new-commit=draft). Now, splitting a draft commit with phases.new-commit=secret does not cause the new commits to become secret, and splitting a secret commit with phases.new-commit=draft and a draft parent does not cause the new commits to become draft. Test cases and commit message taken from Kyle Lippincott's D2016 (thanks!). Differential Revision: https://phab.mercurial-scm.org/D3819
-
Martin von Zweigbergk authored
We have had multiple bugs where the phase wasn't correctly carried forward to a rewritten changeset (for example: phabricator, split, evolve, fix). Handling the phase update in cleanupnodes() makes it less likely to happen again, especially once we have made it fix the phase by default (perhaps in the next release cycle). This patch also updates all applicable callers so we get some testing of it. Note that rebase and histedit can't be fixed yet because they call cleanupnodes() only at the end and the phase may have been changed by the user when the rebase/histedit was interrupted (due to merge conflicts). I think we should make them write one commit at a time (as it already does), along with associated obsmarkers, bookmark moves, etc. When that's done, we can switch them over to cleanupnodes(). Differential Revision: https://phab.mercurial-scm.org/D3818
-