Skip to content
Snippets Groups Projects
  1. Oct 15, 2015
  2. Oct 13, 2015
    • Christian Delahousse's avatar
      rebase: properly abort when destination is public (issue4896) · e9b3d523f2e6
      Christian Delahousse authored
      After rebasing a set of changes onto a public changeset and having the first one
      be skipped, if you try to abort, the operation fails. This fix adds a check to
      disallow the target rev into the dstates list within the abort function. This
      list is checked for immutable states before the rest of abort does its thing.
      e9b3d523f2e6
  3. Oct 14, 2015
  4. Oct 13, 2015
    • Ryan McElroy's avatar
      rebase: factor out nothing to rebase return code · 66dc39cd7d06
      Ryan McElroy authored
      A rebase call that results in nothing to rebase might be considered successful
      in some contexts. This factors out the return code from places where hg
      determines that there is nothing to rebase, so an extenion might change this
      return code to be something that would allow scripts to run without seeing this
      as an error.
      66dc39cd7d06
    • Christian Delahousse's avatar
      rebase: added comments · 07db7e95c464
      Christian Delahousse authored
      Added comments describing the state variable and constants used throughout the
      rebase extension
      07db7e95c464
  5. Oct 08, 2015
    • Pierre-Yves David's avatar
      error: get Abort from 'error' instead of 'util' · 56b2bcea2529
      Pierre-Yves David authored
      The home of 'Abort' is 'error' not 'util' however, a lot of code seems to be
      confused about that and gives all the credit to 'util' instead of the
      hardworking 'error'. In a spirit of equity, we break the cycle of injustice and
      give back to 'error' the respect it deserves. And screw that 'util' poser.
      
      For great justice.
      56b2bcea2529
  6. Oct 06, 2015
  7. Sep 30, 2015
  8. Sep 24, 2015
  9. Sep 15, 2015
    • Laurent Charignon's avatar
      rebase: don't rebase obsolete commit whose successor is already rebased · 92409f8dff5d
      Laurent Charignon authored
      This patch avoids unnecessary conflicts to resolve during rebase for the users
      of changeset evolution.
      
      This patch modifies rebase to skip obsolete commits if they are being rebased on
      their successors.
      It introduces a new rebase state 'revprecursor' for these revisions that are
      being skipped and a new message to inform the user of what is happening.
      This feature is gated behind the config flag experimental.rebaseskipobsolete
      
      When an obsolete commit is skipped, the output is:
      not rebasing 14:9ad579b4a5de "I", already in destination as 17:fc37a630c901 "K"
      92409f8dff5d
  10. Sep 17, 2015
  11. Sep 01, 2015
    • liscju's avatar
      rebase: fix warning about ignoring tool option on rebase continue (issue4698) · 927c0d84e09f
      liscju authored
      Before this patch rebase --continue with specified --tool option outputs
      warnings "tool option will be ignored". It is false statement because
      in case of any merge conflicts it uses specified tool to resolve it.
      
      This patch makes this warning appears only when user specified --tool
      when running rebase --abort , in this case tool doesn't have any
      sense
      927c0d84e09f
  12. Aug 11, 2015
    • Pierre-Yves David's avatar
      rebase: lock the repo during the full rebase operation · 563ea14c62d4
      Pierre-Yves David authored
      Running `hg pull --rebase` would move bookmarks without any repository locking.
      So we now lock the repository. For good measure and avoiding sneaky race
      conditions, we lock the repository for the whole operation.
      
      There is no code change besides the indentation.
      563ea14c62d4
  13. Jun 24, 2015
    • Gregory Szorc's avatar
      global: mass rewrite to use modern exception syntax · 328739ea70c3
      Gregory Szorc authored
      Python 2.6 introduced the "except type as instance" syntax, replacing
      the "except type, instance" syntax that came before. Python 3 dropped
      support for the latter syntax. Since we no longer support Python 2.4 or
      2.5, we have no need to continue supporting the "except type, instance".
      
      This patch mass rewrites the exception syntax to be Python 2.6+ and
      Python 3 compatible.
      
      This patch was produced by running `2to3 -f except -w -n .`.
      328739ea70c3
  14. Jun 01, 2015
    • Jordi Gutiérrez Hermoso's avatar
      phases: rewrite "immutable changeset" to "public changeset" · d298805fb639
      Jordi Gutiérrez Hermoso authored
      The phrase "cannot edit immutable changeset" is kind of tautological.
      Of course unchangeable things can't be changed. We instead mention
      "public" and provide a hint so that we can point to the actual
      problem. Even in cases where some operation other than edition cannot
      be performed, "public" gives the root cause that results in the
      "immutable" effect.
      
      There is a precedent for saying "public" instead of "immutable", for
      example, in `hg commit --amend`.
      d298805fb639
  15. Apr 28, 2015
    • Augie Fackler's avatar
      extensions: document that `testedwith = 'internal'` is special · 80c5b2666a96
      Augie Fackler authored
      Extension authors (notably at companies using hg) have been
      cargo-culting the `testedwith = 'internal'` bit from hg's own
      extensions, which then defeats our "file bugs over here" logic in
      dispatch. Let's be more aggressive about trying to give extension
      authors a hint about what testedwith should say.
      80c5b2666a96
  16. May 15, 2015
  17. May 14, 2015
  18. May 10, 2015
    • Jordi Gutiérrez Hermoso's avatar
      rebase: clear merge when aborting before any rebasing (issue4661) · bd98d073a34f
      Jordi Gutiérrez Hermoso authored
      The check of the inrebase function was not correct, and it failed to
      consider the situation in which nothing has been rebased yet, *and*
      the working dir had been updated away from the initial revision.
      
      But this is easy to fix. Given the rebase state, we know exactly where
      we should be standing: on the first unrebased commit. We check that
      instead. I also took the liberty to rename the function, as "inrebase"
      doesn't really describe the situation: we could still be in a rebase
      state yet the user somehow forcibly updated to a different revision.
      
      We also check that we're in a merge state, since an interrupted merge
      is the only "safe" way to interrupt a rebase. If the rebase got
      interrupted by power loss or whatever (so there's no merge state),
      it's still safer to not blow away the working directory.
      bd98d073a34f
  19. May 12, 2015
  20. May 07, 2015
    • Katsunori FUJIWARA's avatar
      rebase: use dirstateguard instead of dirstate.invalidate · c8a97fa742b7
      Katsunori FUJIWARA authored
      Before this patch, "rebase.concludenode()" uses "dirstate.invalidate()"
      as a kind of "restore .hg/dirstate to the original status" during a failure.
      
      But it just discards changes in memory, and doesn't actually restore
      ".hg/dirstate". Then, it can't work as expected, if "dirstate.write()"
      is executed while processing.
      
      This patch uses "dirstateguard" instead of "dirstate.invalidate()" to
      restore ".hg/dirstate" during a failure even if "dirstate.write()" is
      executed before a failure.
      
      This patch also removes "beginparentchage()" and "endparentchange()",
      because "dirstateguard" makes them useless.
      
      This is a part of preparations to fix the issue that the recent (in
      memory) dirstate isn't visible to external processes (e.g. "precommit"
      hook).
      
      After this patch, the changed dirstate becomes visible to external
      "precommit" hooks during "hg rebase" in "test-largefiles-misc.t",
      because "dirstateguard()" writes it out. But this content isn't yet
      correct, because:
      
        - "normal3" should be marked as "A"(dded) at committing
      
          It is newly added in the changeset being rebased.
      
        - but it is marked as "M"(odified)
      
          The result of "repo.setparents()" after "dirstateguard()" isn't
          yet written out before "precommit". So, merging is still in
          progress for "hg status" in it.
      
          This causes marking the file newly added on "other" branch as "A".
      
      This will be fixed by subsequent patch.
      c8a97fa742b7
  21. Apr 14, 2015
    • Ryan McElroy's avatar
      bookmarks: rename bookmarkcurrent to activebookmark (API) · a02d293a1079
      Ryan McElroy authored
      Today, the terms 'active' and 'current' are interchangeably used throughout the
      codebase in reference to the active bookmark (the bookmark that will be updated
      with the next commit). This leads to confusion among developers and users.
      This patch is part of a series to standardize the usage to 'active' throughout
      the mercurial codebase and user interface.
      a02d293a1079
    • Ryan McElroy's avatar
      bookmarks: rename setcurrent to activate (API) · e0b0fbd47491
      Ryan McElroy authored
      Today, the terms 'active' and 'current' are interchangeably used throughout the
      codebase in reference to the active bookmark (the bookmark that will be updated
      with the next commit). This leads to confusion among developers and users.
      This patch is part of a series to standardize the usage to 'active' throughout
      the mercurial codebase and user interface.
      e0b0fbd47491
    • Ryan McElroy's avatar
      bookmarks: rename unsetcurrent to deactivate (API) · 08ec11e3ae4c
      Ryan McElroy authored
      Today, the terms 'active' and 'current' are interchangeably used throughout the
      codebase in reference to the active bookmark (the bookmark that will be updated
      with the next commit). This leads to confusion among developers and users.
      This patch is part of a series to standardize the usage to 'active' throughout
      the mercurial codebase and user interface.
      08ec11e3ae4c
  22. Apr 28, 2015
    • Gregory Szorc's avatar
      rebase: don't forward "source" argument to rebase (issue4633) · 4ec40a4db64a
      Gregory Szorc authored
      `hg pull` takes an optional "source" argument to define the path/url to
      pull from. Under some circumstances, this option could get proxied to
      rebase and interpretted as the --source argument to rebase, leading to
      unexpected behavior.
      
      In my local environment, "source" always appears in "opts" in
      pullrebase. However, when attempting to write a test, I couldn't reproduce
      this. Instead, the source is being captured as a positional argument in
      "args." I suspect an interaction between **kwargs and an extension is to
      blame for the differences in behavior. This is why no test has been
      written.
      
      I have tested behavior locally and the patch has the intended
      side-effect of making `hg pull --rebase` work again.
      4ec40a4db64a
  23. Apr 13, 2015
  24. Jan 27, 2015
    • Pierre-Yves David's avatar
      rebase: ensure rebase revision remains visible (issue4504) · 8a544fb645bb
      Pierre-Yves David authored
      Before this changeset rebase was getting very confused if any revision in the
      rebase set became hidden. This was fairly easy to achieve if a rebased revision
      was made visible by the working copy location. The rebase process would update
      somewhere else and the revision would become hidden.
      
      To work around this issue, we ensure rebased revisions remain visible for the
      whole process.
      
      This is a simple change suitable for stable. More subtle usage of unfiltered
      repository in rebase may solve this issue more cleanly.
      8a544fb645bb
  25. Jan 18, 2015
  26. Jan 15, 2015
    • Angel Ezquerra's avatar
      localrepo: remove all external users of localrepo.opener · 7cc77030c557
      Angel Ezquerra authored
      This change touches every module in which repository.opener was being used, and
      changes it for the equivalent repository.vfs. This is meant to make it easier
      to split the repository.vfs into several separate vfs.
      
      It should now be possible to remove localrepo.opener.
      7cc77030c557
  27. Jan 04, 2015
    • Mads Kiilerich's avatar
      rebase: clarify comment about merge ancestor when rebasing merges · c51d6c043bb1
      Mads Kiilerich authored
      The code for picking a merge ancestor when rebasing merges had a long and
      incorrect comment.
      
      The comment would perhaps have been fine as commit message but does
      not make the code more readable or maintainable and is a bad
      substitute for correct and readable code.
      
      The correct essense of the comment is quite trivial: a merge of an ancestor of
      the rebase destination and an 'outside' revision can be rebased as if it was a
      linear change, using 'destination ancestor parent' as base and pretty much
      ignoring the 'outside' revision.
      
      The code path where the comment is placed is however also used for other kinds
      of merge rebases. The comment is thus not really correct and not helpful. I
      think it would be better to drop the comment and rewrite the code.
      c51d6c043bb1
  28. Oct 11, 2012
    • kiilerix's avatar
      rebase: show a note for updated mq patches · de143427c499
      kiilerix authored
      It deserves more than a debug message. Show a note like:
      
        updating mq patch p0.patch to 5:9ecc820b1737
      
      The message could also refer to "qrefresh" instead. Same same.
      de143427c499
  29. Dec 10, 2014
  30. Dec 09, 2014
  31. Dec 02, 2014
    • Pierre-Yves David's avatar
      rebase: handle revtodo as a special value when storing/restoring state · 9972758ab4c5
      Pierre-Yves David authored
      Revtodo happens to share its value with nullrev, but this is an implementation
      details, so we move away from it.
      
      After this changeset one can successfully change the values for all
      the constants and the tests still pass, but doing so would require more
      refactoring if we want to avoid breaking backward compatibility on the
      state file.
      9972758ab4c5
Loading