- Jun 28, 2017
-
-
Martin von Zweigbergk authored
We were passing it as a revision number in one place and as a context in another. It worked because the only use was in "repo[dest].rev()", but it was confusing. By always passing a revision number, we can also remove that unnecessary lookup.
-
- Jun 26, 2017
-
-
Pierre-Yves David authored
We have a new 'obsutil' module now. We move the high level utility there to bring 'obsolete.py' back to a more reasonable size.
-
- Jun 29, 2017
-
-
Martin von Zweigbergk authored
-
- Jun 27, 2017
-
-
Pierre-Yves David authored
Having a single transaction for rebase means the whole transaction gets rolled back on error. To work around this a small hack has been added to detect merge conflict and commit the work done so far before exiting. This hack works because there is nothing transaction related going on during the merge phase. However, if a hook blocks the rebase to create a changeset, it is too late to commit the work done in the transaction before the problematic changeset was created. This leads to the whole rebase so far being rolled back. Losing merge resolution and other work in the process. (note: rebase state will be fully lost too). Since issue5610 is a pretty serious regression and the next stable release is a couple day away, we are taking the backout route until we can figure out something better to do.
-
Pierre-Yves David authored
In the process of fixing issue5610 in 4.2.2, we are trying to backout cf8ad0e6c0e4. This changeset is making changes that depend on cf8ad0e6c0e4, so we need to back it out first. Since issue5610 is pretty serious regression and the next stable release is a couple of days away, we are taking the backout route until we can figure out something better to do.
-
- Jun 25, 2017
-
-
Jun Wu authored
Previously, rebase assumes the following pattern: rebase: with transaction as tr: # top-level ... tr.__close__ writes rebasestate unlink('rebasestate') However it's possible that "rebase" was called inside a transaction: with transaction as tr1: rebase: with transaction as tr2: # not top-level ... tr2.__close__ does not write rebasestate unlink('rebasestate') tr1.__close__ writes rebasestate That leaves a rebasestate on disk incorrectly. This patch adds "removefilegenerator" to notify transaction code that the state file is no longer needed therefore fixes the issue.
-
- Jun 19, 2017
-
-
Martin von Zweigbergk authored
-
Martin von Zweigbergk authored
-
- Jun 18, 2017
-
-
Martin von Zweigbergk authored
children() is slow
-
- Jun 01, 2017
-
-
Siddharth Agarwal authored
We're calling localrepo.setparents here, not dirstate.setparents. localrepo.setparents calls dirstate.parentchange already.
-
- May 28, 2017
-
-
Martin von Zweigbergk authored
E.g. tags and bookmarks can reveal revisions that would otherwise be hidden. A revision can also be revealed because one if its descendants is visible. Let's use the term "pinned" for the former case (bookmarks etc.).
-
- May 20, 2017
-
-
Pierre-Yves David authored
Recent mailing list discussion made me realised we could clarify these. We make the function "public" to encourage extensions to wrap it and we use a more explicit name that mirror "hideablerevs".
-
- May 14, 2017
-
-
Yuya Nishihara authored
The goal is to get rid of the debugcommands -> commands dependency. Since globalopts is the property of the commands, it's kept in the commands module.
-
- May 18, 2017
-
-
Augie Fackler authored
-
- Jan 09, 2016
-
-
Yuya Nishihara authored
cmdutil.command wasn't a member of the registrar framework only for a historical reason. Let's make that happen. This patch keeps cmdutil.command as an alias for extension compatibility.
-
- May 09, 2017
-
-
Durham Goode authored
By recording what operation created the obsmarker, we can show very intuitive messages to the user in various UIs. For instance, log output could have messages like "Amended as XXX" to show why a commit is old and has an 'x' on it. @ ac28e3 durham / First commit | | o d4afe7 durham | | Second commit | | | x 8e9a5d (Amended as ac28e3) durham |/ First commit |
-
- May 18, 2017
-
-
Jeremy Fitzhardinge authored
If a rebase ends up doing a no-op commit, make sure the merge state is still cleaned up.
-
- Feb 11, 2017
-
-
Martin von Zweigbergk authored
We no longer support Python 2.6, so we can now use set literals.
-
- May 11, 2017
-
-
Martin von Zweigbergk authored
This allows you to do e.g. "hg rebase -d @ -r 'draft()'" even if some drafts are already based off of @. You'd still need to exclude obsolete and troubled revisions, though. We will deal with those cases later. Implemented by treating state[rev]==rev as "no need to rebase". I considered adding another fake revision number like revdone=-6. That would make the code clearer in a few places, but would add extra code in other places. I moved the existing test out of test-rebase-base.t and into a new file and added more tests there, since not all are using --base.
-
- May 12, 2017
-
-
Martin von Zweigbergk authored
The help text for rebase calls it "the destination" (never "target"), so let's use that in messages as well.
-
Martin von Zweigbergk authored
It took me a while to figure out that "target" was actually what's passed to --dest.
-
- Mar 11, 2017
-
-
Martin von Zweigbergk authored
The update statement does not depend on anything in the loop, so just move it before the loop and do it once. There are no cases where update would happen 0 times before (and 1 now); the function returns early in all such cases.
-
- Apr 30, 2017
-
-
Katsunori FUJIWARA authored
There are some paragraphs, which aren't rendered in online help as expected because of indentation and literal blocking issues. - hgext/rebase.py - paragraph before example code ends with ":", which treats subsequent indented paragraphs as normal block => replace ":" with "::" to treat subsequent paragraphs as literal block - help/pager.txt - paragraph before a list of --pager option values ends with "::", which treats subsequent indented paragraphs as literal block => replace "::" with ":" to treat subsequent paragraphs as normal block - the second line of explanation for no/off --pager option value is indented incorrectly (this also causes failure of "make" in doc) => indent correctly - help/revisions.txt - explanation following example code of "[revsetalias]" section isn't suitable for literal block => un-indent explanation paragraph to treat it as normal block - indentation of "For example" before example of tag() revset predicate matching is meaningless - descriptive text for tag() revset predicate matching isn't suitable for literal block => un-indent concatenated two paragraphs to treat them as normal block
-
Katsunori FUJIWARA authored
This configuration example doesn't make rebase require a destination, even though help document wants to show such example.
-
- Mar 30, 2017
-
-
Ryan McElroy authored
Previously, the pull would succeed, but the subsequent rebase would fail due to the rebase.requiredest flag. Now abort earlier with a more useful error message.
-
Ryan McElroy authored
-
- Mar 24, 2017
-
-
Martin von Zweigbergk authored
-
- Mar 12, 2017
-
-
Durham Goode authored
Now that rebasestate is serialized as part of the transaction, the repo state it sees is the version at the end of the transaction, which may have hidden nodes. Therefore, it's possible parts of the rebase commit set are no longer visible by the time the transaction is closing, which causes a filtered revision error in this code. I don't think state serialization should be blocked from accessing commits it knows exist, especially if all it's trying to do is get the hex of them, so let's use an unfiltered repo here. Unfortunately, the only known repro is with the fbamend Facebook extension, so I'm not sure how to repro it in core Mercurial for a test.
-
- Mar 22, 2017
-
-
Martin von Zweigbergk authored
We only have commands.{update,rebase}.requiredest so far. We should clearly ignore those two if HGPLAIN is in effect, and it seems like we should ignore any future config that will be added in [commands] since that is about changing the behavior of commands. Thanks to Yuya for suggesting to centralize the code in ui.py. While at it, remove the unnecessary False values passed to ui.configbool() for the aforementioned config options.
-
- Mar 15, 2017
-
-
Ryan McElroy authored
In some mercurial workflows, the default destination for rebase does not always work well and can lead to confusing behavior. With this flag enabled, every rebase command will require passing an explicit destination, eliminating this confusion.
-
- Mar 19, 2017
-
-
Durham Goode authored
Recently we switched rebases to run the entire rebase inside a single transaction, which dramatically improved the speed of rebases in repos with large working copies. Let's also move the dirstate into a single dirstateguard to get the same benefits. This let's us avoid serializing the dirstate after each commit. In a large repo, rebasing 27 commits is sped up by about 20%. I believe the test changes are because us touching the dirstate gave the transaction something to actually rollback.
-
- Mar 16, 2017
-
-
Jun Wu authored
-
- Mar 15, 2017
-
-
Pierre-Yves David authored
Changeset 361bccce566a removed the mutable default value, but did not explicitly tested for None. Such implicit checking can introduce semantic and performance issue. We move to an explicit check for None as recommended by PEP8: https://www.python.org/dev/peps/pep-0008/#programming-recommendations
-
- Mar 13, 2017
-
-
Gregory Szorc authored
-
- Mar 12, 2017
-
-
kiilerix authored
The named branch of the leaf changeset can be changed by updating to it, setting the branch, and amending. But previously, there was no good way to *just* change the branch of several linear changes. If rebasing changes with another parent to '.', it would pick up a pending branch change up. But when rebasing changes that have the same parent, it would fail with 'nothing to rebase', even when the branch name was set differently. To fix this, allow rebasing to same parent when a branch has been set.
-
- Mar 11, 2017
-
-
kiilerix authored
-
Martin von Zweigbergk authored
-
Martin von Zweigbergk authored
By including the working directory revision at the start of rebase in the repo._rebaseset, we make sure it's not hidden when we update back to it at the end of the rebase. This feels like abusing the set a bit given its name (_rebaseset), but I couldn't think of another name that's clearly better.
-
Martin von Zweigbergk authored
Trivial refactoring to simplify the next patch.
-
- Mar 08, 2017
-
-
Durham Goode authored
Previously, rebasing would open several transaction over the course of rebasing several commits. Opening a transaction can have notable overhead (like copying the dirstate) which can add up when rebasing many commits. This patch adds a single large transaction around the actual commit rebase operation, with a catch for intervention which serializes the current state if we need to drop back to the terminal for user intervention. Amazingly, almost all the tests seem to pass. On large repos with large working copies, this can speed up rebasing 7 commits by 25%. I'd expect the percentage to be a bit larger for rebasing even more commits. There are minor test changes because we're rolling back the entire transaction during unexpected exceptions instead of just stopping mid-rebase, so there's no more backup bundle. It also leave an unknown file in the working copy, since our clean up 'hg update' doesn't delete unknown files.
-