Skip to content
Snippets Groups Projects
  1. Aug 23, 2017
  2. Aug 30, 2017
  3. Aug 29, 2017
    • Denis Laxalde's avatar
      tag: use filtered repo when creating new tags (issue5539) · 2d80e078
      Denis Laxalde authored
      When pruning a changeset that added a tag and then adding another tag, the
      "pruned" tag gets restored. This is because the tag creation step (tags._tag()
      call in tags.tag()) is currently done on the unfiltered repo. This behavior
      has been there from 7977d35df13b which backs out b08af8f0ac01 with no clear
      reason but caution on unthought situations at that time. In this changeset, we
      pass the filtered repo to tags._tag(), preventing "pruned" tags to reappear.
      This somehow restores b08af8f0ac01, though now we arguably have a valid use
      case for.
      2d80e078
  4. Aug 21, 2017
  5. Aug 30, 2017
  6. Aug 25, 2017
  7. Aug 20, 2017
    • Jun Wu's avatar
      revset: remove order information from tree (API) · 1b28525e
      Jun Wu authored
      Keeping `order` in tree makes AST operation harder. And there could be
      invalid cases if trees could be generated and compounded freely, like:
      
        SetA(order=define) & SetB(order=define)
                                        ^^^^^^ couldn't be satisfied
      
      This patch changes the code to calculate order on the fly, during tree
      traversal. Optimization of reordering `and` arguments is preserved by
      introducing a new internal operation `flipand`.
      
      .. api::
      
         revset.stringset() now takes 'order' as the last argument.
      
      Differential Revision: https://phab.mercurial-scm.org/D451
      1b28525e
  8. Aug 29, 2017
    • Jun Wu's avatar
      revset: drop optimization about reordering "or" set elements · 72b5f4d5
      Jun Wu authored
      The reordering optimization is more important for "and" than "or", given the
      implementation details about "addset" and "filteredset" - reordering "or"
      may help "__contains__" test but not iteration, reordering "and" could help
      both. We are going to simplify the tree to remove ordering information.
      Removing "or" reordering optimization would make things simpler.
      
      This effectively reverts c63cb2d10d6d. It tracks back to the "orset"
      function added by the initial commit of revset (c9ce8ecd6ca1).
      
      In the future, we might consider optimization at runtime (ex. do reordering
      and rewrites inside "orset").
      
      Differential Revision: https://phab.mercurial-scm.org/D561
      72b5f4d5
  9. Aug 30, 2017
  10. Aug 27, 2017
    • Jun Wu's avatar
      rebase: move working parent and bookmark for obsoleted revs (BC) · 9422107a
      Jun Wu authored
      Previously, obsoleted revs with successors in destination are completely
      ignored. That caused some inconvenience when working copy is obsoleted. Most
      commands avoid working copy being obsoleted, but `hg pull` is an exception.
      
      This patch makes rebase able to move bookmarks or working parent for those
      obsoleted revs. It does so by keeping the obsoleted revs in `state` and
      marking them as "skipped, rebased to desired destination" during run-time.
      
      This reverts part of the behavior change of 3b7cb3d17137 and D24.
      
      Differential Revision: https://phab.mercurial-scm.org/D527
      9422107a
  11. Aug 30, 2017
  12. Aug 22, 2017
    • Jun Wu's avatar
      rebase: sort destmap topologically · 32528419
      Jun Wu authored
      Previously rebase source and destination could not overlap. But with the
      multi-destination support, source and destination could reasonably partially
      overlap. That requires another topological sort on `{sourcerev: destrev}`
      graph (destmap). This patch implements that.
      
      If a revision's destination is itself, the error message gets changed from
      "source is ancestor of destination" to "source and destination form a
      cycle". Not marking as BC since automation should depend on exit code, not
      error message.
      
      Differential Revision: https://phab.mercurial-scm.org/D470
      32528419
  13. Aug 30, 2017
    • Jun Wu's avatar
      rebase: initial support for multiple destinations · 5e83a8fe
      Jun Wu authored
      This patch defines `SRC` (a single source revision) and `ALLSRC` (all source
      revisions) to be valid names in  `--dest` revset if `--src` or `--rev` is
      used. So destination could be defined differently according to source
      revisions. The names are capitalized to make it clear they are "dynamically
      defined", distinguishable from normal revsets (Thanks Augie for the
      suggestion).
      
      This is useful, for example, `-r 'orphan()' -d 'calc-dest(SRC)'` to solve
      instability, which seems to be a highly wanted feature.
      
      The feature is not completed, namely if `-d` overlaps with `-r`, things
      could go wrong. A later patch will handle that case.
      
      The feature is also gated by `experimental.rebase.multidest` config option
      which is default off.
      
      Differential Revision: https://phab.mercurial-scm.org/D469
      5e83a8fe
  14. Aug 11, 2017
    • Jun Wu's avatar
      rebase: change internal format to support destination map · af609bb3
      Jun Wu authored
      A later patch will add multiple destination support. This patch changes
      internal state and the rebase state file format to support that. But the
      external interface still only supports single destination.
      
      A test was added to make sure rebase still supports legacy state file.
      
      The new state file is incompatible with old clients. We had done similar
      state file format change before: 5eac7ab59b95, 92409f8dff5d, and 72412afe4c28. The state
      file is transient, so the impact of incompatibility is limited. Besides,
      the old client won't support multiple destinations anyway so it does not
      really make sense to make the file format compatible with them.
      
      Differential Revision: https://phab.mercurial-scm.org/D348
      af609bb3
    • Jun Wu's avatar
      rebase: rewrite _computeobsoletenotrebased · ba9d5d48
      Jun Wu authored
      The old code stores successors of all related nodes together, which works
      fine if destination is unique. A future patch would make destination
      non-unique so let's change the implementation to test successors for
      rebaseset separately.
      
      Differential Revision: https://phab.mercurial-scm.org/D347
      ba9d5d48
  15. Aug 22, 2017
  16. Aug 28, 2017
  17. Aug 17, 2017
  18. Jul 03, 2017
    • Boris Feld's avatar
      template: better prune support in obsfate · 98fa777c
      Boris Feld authored
      successorssets don't returns good results for pruned commit, add a workaround
      for simple cases.
      
      A proper fix would require a large rework of successorssets algorithm, I will
      send a separate series for this refactoring.
      98fa777c
    • Boris Feld's avatar
      template: compute dates in obsfatedate · c35c0f54
      Boris Feld authored
      Extract the dates from obsmarkers. Compute the min and max date from the
      obsmarker range list.
      c35c0f54
    • Boris Feld's avatar
      template: compute user in obsfateusers · 38f08eab
      Boris Feld authored
      Extract, deduplicate users informations from obs markers in order to display
      them.
      
      Print all users for the moment, we might want to display users only in verbose
      mode later.
      38f08eab
    • Boris Feld's avatar
      template: compute verb in obsfateverb · 3d0f8918
      Boris Feld authored
      Add a template function obsfateverb which use the markers information to
      compute a better obsfate verb.
      
      The current logic behind the obsfate verb is simple for the moment:
      
      - If the successorsets is empty, the changeset has been pruned, for example:
      
          Obsfate: pruned
      
      - If the successorsets length is 1, the changeset has been rewritten without
        divergence, for example:
      
          Obsfate: rewritten as 2:337fec4d2edc, 3:f257fde29c7a
      
      - If the successorsets length is more than 1, the changeset has diverged, for
        example:
      
          Obsfate: split as 2:337fec4d2edc, 3:f257fde29c7a
      
      As the divergence might occurs on a subset of successors, we might see some
      successors twice:
      
          Obsfate: split as 9:0b997eb7ceee, 5:dd800401bd8c, 10:eceed8f98ffc; split
          as 8:b18bc8331526, 5:dd800401bd8c, 10:eceed8f98ffc
      3d0f8918
  19. Aug 22, 2017
Loading