Skip to content
Snippets Groups Projects
  1. Sep 01, 2014
    • David Soria Parra's avatar
      rebase: add a deprecated -i/--interactive flag · d5b04ee8ecf7
      David Soria Parra authored
      A common mistake can be to type 'hg rebase -i' to discover interactive history
      editing. We add a -i/--interactive flag as discussed in the sprint and deprecate
      it right away, but hint people using it to use histedit instead.
      d5b04ee8ecf7
  2. Aug 16, 2014
    • Katsunori FUJIWARA's avatar
      rebase: change "editform" to distinguish merge commits from others · d0d3e5c6eb3c
      Katsunori FUJIWARA authored
      "editform" argument for "getcommiteditor" is decided according to the
      format below:
      
        EXTENSION[.COMMAND][.ROUTE]
      
        - EXTENSION: name of extension
        - COMMAND: name of command, if there are two or more commands in EXTENSION
        - ROUTE: name of route, if there are two or more routes in COMMAND
      
      This patch newly adds "merge" as ROUTE, to distinguish merge commits
      from other.
      
      This patch passes bool as "ctxorbool" to "mergeeditform", because
      working context has always 2 parents at this point. Dropping the
      second parent of non-merging commits is executed in "concludenode".
      
      Unlike other patches in this series (e.g. for "hg commit"), this patch
      doesn't add "normal.normal"/"normal.merge" style ROUTEs, because there
      is no "merge" case in "collapse" ROUTE.
      d0d3e5c6eb3c
  3. Aug 15, 2014
  4. Aug 05, 2014
    • Pierre-Yves David's avatar
      rebase: do not retract phase boundary by hand · 021becbf024a
      Pierre-Yves David authored
      We rely on the internal mechanism to commit the changeset in the right phase.
      This similar to what the mq extension is doing.
      
      This is an important change as we plan to includes phase movement within the
      transaction. Avoiding phase movement from high-level code will avoid the
      burden of transaction handling. It is also important to limit the need for
      transaction handling as this limits the odds of people messing up. Most common
      expected mess-up is code using a different transaction for changeset creation
      and phase adjustment.
      021becbf024a
  5. Aug 02, 2014
    • Katsunori FUJIWARA's avatar
      rebase: pass 'editform' argument to 'cmdutil.getcommiteditor' · 3646716b11a7
      Katsunori FUJIWARA authored
      This patch passes 'editform' argument according to the format below:
      
        EXTENSION[.COMMAND][.ROUTE]
      
        - EXTENSION: name of extension
        - COMMAND: name of command, if there are two or more commands in EXTENSION
        - ROUTE: name of route, if there are two or more routes in COMMAND
      
      In this patch:
      
        - COMMAND is omitted
        - 'normal' and 'collapse' are used as ROUTE
      3646716b11a7
  6. Jul 02, 2014
  7. Jun 07, 2014
    • durin42's avatar
      rebase: fix bug that caused transitive copy records to disappear (issue4192) · 2ba6c9b4e0eb
      durin42 authored
      The defect was that copies were always duplicated against the target
      revision, rather than the first parent of the revision being
      rebased. This produced nominally correct results if changes were
      rebased one at a time (or with --collapse), but was wrong if we
      rebased a sequence of changesets which contained a sequence of copies.
      2ba6c9b4e0eb
  8. May 08, 2014
    • Durham Goode's avatar
      rebase: specify custom conflict marker labels for rebase (BC) · 3b40e32e88c3
      Durham Goode authored
      Changes rebase conflict markers to say 'source' and 'dest' instead of
      'local' and 'other'.  This ends up looking like:
      
        one
        <<<<<<< dest:   a3e5c7fd master - bob: "A commit to master"
        master
        =======
        mine
        >>>>>>> source: c7fda3e5 - durham: "A commit to my feature branch"
        three
      3b40e32e88c3
  9. May 10, 2014
    • Katsunori FUJIWARA's avatar
      rebase: use "getcommiteditor()" instead of explicit editor choice · 5b70ece79ea7
      Katsunori FUJIWARA authored
      This patch also enhances "test-rebase-scenario-global.t", because "hg
      rebase" hasn't been explicitly tested around editor invocation and
      "--edit" option.
      
      In the other hand, this patch doesn't enhance tests in "hg rebase
      --collapse" case, because it is already tested in
      "test-rebase-collapse.t".
      5b70ece79ea7
  10. May 01, 2014
  11. Apr 23, 2014
  12. Nov 26, 2013
  13. Mar 19, 2014
  14. Mar 18, 2014
    • Matt Mackall's avatar
      merge with stable · efbf15979538
      Matt Mackall authored
      efbf15979538
    • Katsunori FUJIWARA's avatar
      rebase: use "commitforceeditor" instead of "ui.edit()" for "--collapse" · 95aab23a806b
      Katsunori FUJIWARA authored
      Before this patch, "rebase --collapse --edit" without "--message" and
      "--logfile" invokes editor twice unexpectedly:
      
        1. explicit "ui.edit()" invocation in rebase extension itself
      
        2. indirect invocation in "localrepository.commit()" with "editor =
           commitforceeditor" assigned by "--edit" option
      
      This patch uses indirect "commitforceeditor" invocation instead of
      "ui.edit()" for "--collapse" without "--message" and "--logfile" to:
      
        - suppress redundant the former invocation
        - ensure editor invocation even when "--edit" is not specified
      95aab23a806b
  15. Feb 13, 2014
    • Simon Heimberg's avatar
      rebase: do not raise an UnboundLocalError when called wrong (issue4106) · 9155257e6330
      Simon Heimberg authored
      When the base is not found, we should not raise a traceback about a not defined
      variable. This hides the real problem: the function rebasenode was (probably)
      called wrong.
      
      An AssertionError is raised to highlight that the caller of the function did
      something wrong.
      
      An alternative approach is to only assign None to the variable "base" and let
      the merge mechanism raise an abort message. This was the behaviour for this
      case before ad9db007656f. But the only known case for this problem is when an
      extension calls this function wrong. An AssertionError makes this clearer than
      an abort message. When a different case is detected, the behaviour can be
      improved then.
      9155257e6330
  16. Feb 20, 2014
  17. Feb 15, 2014
  18. Jan 30, 2014
  19. Jan 23, 2014
  20. Nov 16, 2013
  21. Nov 17, 2013
    • Mads Kiilerich's avatar
      rebase: improve error message for --base being empty or causing emptiness · dc5157841361
      Mads Kiilerich authored
      Before it just said 'nothing to rebase'.
      
      Now 'if "base" is an empty set:
        abort: empty "base" revision set - can't compute rebase set
      
      If the set of changesets to rebase can't be found from "base", it will fail as
      before but with more explanation of what the problem was.
      
      The name of the "base" option is not obvious - it is more like "samples
      identifying the branch to rebase". The error messages for problems with the
      specified "base" value will use that term and might thus also not be obvious,
      but at least they are consistent with the option name. The name "base" will not
      be used if the base only was specified implicitly as the working directory
      parent.
      dc5157841361
    • Mads Kiilerich's avatar
      rebase: improve error message for empty --source set · 3bff26f67169
      Mads Kiilerich authored
      Before, it just said 'nothing to rebase' in this case. Now, it aborts
      mentioning the reason: 'empty "source" revision set'.
      
      Specifying revisions that cannot be rebased is a 'soft' error, but specifying
      an empty set deserves an abort that explains exactly what the problem is.
      3bff26f67169
  22. Nov 16, 2013
    • Mads Kiilerich's avatar
      rebase: improve error message for empty --rev set · a259f7b488ab
      Mads Kiilerich authored
      Before, it just said 'nothing to rebase' in this case. Now, it aborts
      mentioning the reason: 'empty "rev" revision set'.
      
      Specifying revisions that cannot be rebased is a 'soft' error, but specifying
      an empty set deserves an abort that explains exactly what the problem is.
      a259f7b488ab
  23. Nov 02, 2013
    • Durham Goode's avatar
      rebase: fix working copy location after a --collapse (issue4080) · ea81f8b2364e
      Durham Goode authored
      Rebasing with --collapse would leave the working copy on the parent of the
      collapsed commit, instead of on the collapsed commit.  This fixes that.  Also
      fixes a few tests that already covered this area but had bad data.
      
      This also fixes issue3716 where bookmarks are not kept across rebases with
      --collapse. I updated the test to cover that case as well.
      ea81f8b2364e
  24. Nov 05, 2013
    • Durham Goode's avatar
      rebase: fix rebase aborts when 'tip-1' is public (issue4082) · 7d5e7799a29f
      Durham Goode authored
      When aborting a rebase where tip-1 is public, rebase would fail to undo the merge
      state. This caused unexpected dirstate parents and also caused unshelve to
      become unabortable (since it uses rebase under the hood).
      
      The problem was that rebase uses -2 as a marker rev, and when it checked for
      immutableness during the abort, -2 got resolved to the second to last entry in
      the phase cache.
      
      Adds a test for the fix. Add exception to phase code to prevent this in the
      future.
      7d5e7799a29f
  25. Oct 26, 2013
  26. Oct 30, 2013
  27. Oct 23, 2013
  28. Oct 24, 2013
  29. Oct 23, 2013
  30. Oct 14, 2013
    • Pierre-Yves David's avatar
      rebase: preserve active bookmark when not at head (issue3813) · 0f99747202f9
      Pierre-Yves David authored
      Now that the working directory parent is preserved, we can preserve the active
      bookmark too.
      0f99747202f9
    • Pierre-Yves David's avatar
      rebase: preserve working directory parent (BC) · 9c78ed396075
      Pierre-Yves David authored
      Prior to this changeset, rebase always left the working directory as a parent of
      the last rebased changeset. The is dubious when, before the rebase, the working
      directory was not a parent of the tip most rebased changeset.
      
      With this changeset, we move the working directory back to its original parent.
      If the original parent was rebased, we use it's successors.
      
      This is a step toward solving issue3813 (rebase loses active bookmark if it's
      not on a head)
      9c78ed396075
  31. Oct 01, 2013
  32. Oct 02, 2013
  33. Sep 30, 2013
    • Katsunori FUJIWARA's avatar
      rebase: catch RepoLookupError at restoring rebase state for summary · e7fa36d2ad3a
      Katsunori FUJIWARA authored
      Before this patch, "hg summary" may fail, when there is inconsistent
      rebase state: for example, the root of rebase destination revisions
      recorded in rebase state file is already stripped manually.
      
      Mercurial earlier than 2.7 allows users to do anything other than
      starting new rebase, even though current rebase is not finished or
      aborted yet. So, such inconsistent rebase states may be left and
      forgotten in repositories.
      
      This patch catches RepoLookupError at restoring rebase state for
      summary hook, and treat such state as "broken".
      2.7.2
      e7fa36d2ad3a
    • Katsunori FUJIWARA's avatar
      rebase: catch RepoLookupError at restoring rebase state for abort/continue · 577f4c562d52
      Katsunori FUJIWARA authored
      Before this patch, "rebase --abort"/"--continue" may fail, when rebase
      state is inconsistent: for example, the root of rebase destination
      revisions recorded in rebase state file is already stripped manually.
      
      Mercurial earlier than 2.7 allows users to do anything other than
      starting new rebase, even though current rebase is not finished or
      aborted yet. So, such inconsistent rebase states may be left and
      forgotten in repositories.
      
      This patch catches RepoLookupError at restoring rebase state for
      abort/continue, and treat such state as "broken".
      577f4c562d52
  34. Sep 20, 2013
    • Siddharth Agarwal's avatar
      rebase: remove bailifchanged check from pullrebase (BC) · 7805cb8030e0
      Siddharth Agarwal authored
      This saves us a relatively superfluous status check for pull --rebase (if
      rebase runs, it'll check for a clean working directory anyway), and brings hg
      pull --rebase closer to hg pull && hg rebase.
      
      This is a behavior change because pull --rebase with a dirty working directory
      will now abort after performing the pull rather than before.
      7805cb8030e0
Loading