Skip to content
Snippets Groups Projects
  1. Nov 05, 2017
  2. Nov 13, 2017
    • Boris Feld's avatar
      test-pattern: register the current the bundle2 capabilities string · c4ec72a1
      Boris Feld authored
      The bundle capabilites are sent with every getbundle ssh connection. Every time
      the protocol is updated, that string is altered. We get the part about bundle2
      string replaced by $USUAL_BUNDLE2_CAPS$ so that we only have to change the
      substitution whenever this happens.
      c4ec72a1
  3. Nov 05, 2017
    • Boris Feld's avatar
      test-pattern: register current the bundlecaps string · b4767ae6
      Boris Feld authored
      The bundle capabilites sent with every getbundle commands. Every time the
      protocol is updated, that string is altered. We get that string replace by
      $USUAL_BUNDLE_CAPS$ so that we only have to change the substitution whenever
      this happens.
      b4767ae6
    • Boris Feld's avatar
      test-pattern: substitute common compression list · 3abdd7da
      Boris Feld authored
      The compression list as to be matched with a glob because zstd might not be part
      of the option. By using a substitution for these, we won't have to re-glob them
      over and over.
      3abdd7da
    • Boris Feld's avatar
      run-tests: allow to register any arbitrary pattern for replacement · 4fb489a9
      Boris Feld authored
      We add a 'common-pattern.py' file that allow to define extra pattern. This seems
      a cleaner approach than editing the 'run-test.py' file over and over. In
      addition allowing arbitrary pattern registration will also help extension.
      
      The format used is a python file is picked out of convenience defining a list of
      tuple in 'substitutions' variable. This is picked out of convenience since it is
      dead simple to implement.
      
      The end goal is to register more pattern for Mercurial test. There are multiple
      common patterns that change over time. That impact is annoying. Using pattern
      emplacement for them would be handy.
      
      The next patches will define all the needed patterns and the last patch will
      mass-update the tests outputs as it was easier to do in a single pass.
      4fb489a9
  4. Nov 17, 2017
  5. Nov 16, 2017
    • Kyle Lippincott's avatar
      run-tests: fix TESTDIR if testdescs are absolute paths · 57d56f60
      Kyle Lippincott authored
      Commit a18eef03d879 made TESTDIR be the location of the arguments that were
      passed to run-tests.py instead of just PWD.  It assumed that these tests were
      specified using relative paths, so if pwd was /tmp/foo, and the first argument
      was /tmp/baz, it would set TESTDIR to /tmp/foo//tmp/baz.
      
      Differential Revision: https://phab.mercurial-scm.org/D1433
      57d56f60
    • Anton Shestakov's avatar
      hgweb: show commit phase if it's not public · a1de4ffa
      Anton Shestakov authored
      In spartan theme phase is shown on its own table row, because there's no single
      line of "tags". Everywhere else phase is prepended to the list of "tags" of a
      changeset. Its element has a purple-ish color in gitweb and monoblue, and a
      dotted line under it and no color in paper and coal (as these themes are frugal
      with colors).
      
      This patch intentionally doesn't touch graph, because it needs a rewrite. I'll
      get to it pretty soon and in the process will add phase and everything that's
      still coming (e.g. obsolescence and instabilities).
      
      .. feature::
      
         hgweb now displays phases of non-public changesets
      a1de4ffa
  6. Nov 15, 2017
    • Anton Shestakov's avatar
      hgweb: move changeset "tags" to a template in map file (paper and coal) · 9acc0360
      Anton Shestakov authored
      This patch puts all these changeset "tags" into one template shared everywhere
      in paper and coal themes. But it should be noted that some of the templates had
      different sets of tags, in some cases it was intended, in others - most likely
      not.
      
      First, what's up with all these different ways to get changeset's branch. There
      are actually 3 ways to do it in hgweb, they can all be seen in this patch;
      "branches", "inbranch" and "branch". They are all lists that consist of 1 or 0
      items:
      
      - "branches" has ctx.branch() if current changeset is the tip of that branch
      - "inbranch" has ctx.branch() if current changeset is _not_ the tip of that
        branch and the branch is not "default"
      - "branch" aka "changesetbranch" has ctx.branch() if the branch is not
        "default"
      
      The majority of cases (7 vs 2 + /graph) in paper theme used only option 3,
      which meant that "default" was never displayed. But other parts of the theme
      disagreed with this and used option 1 and option 2 together. For example, the
      default view (log) displays "default" on the branch tip (can be seen right
      about now on m-s.o/repo/hg), but it disappears when you click on the commit.
      
      Also, using option 3 alone meant that there was no way to tell if a changeset
      is the tip of its branch or not (it was always assumed that it's not, see how
      some css classes change from "branchname" to the correct "branchhead" in tests)
      -- so the two different css styles that exist in paper just for this were
      underused.
      
      I think this patch improves the situation, even though it changes the old (even
      if inconsistent) behavior. The new behavior matches that of gitweb and
      monoblue.
      9acc0360
    • Anton Shestakov's avatar
  7. Oct 26, 2017
  8. Nov 14, 2017
    • Denis Laxalde's avatar
      rebase: exclude descendants of obsoletes w/o a successor in dest (issue5300) · a68c3420
      Denis Laxalde authored
      .. feature::
      
         Let 'hg rebase' avoid content-divergence by skipping obsolete
         changesets (and their descendants) when they are present in the rebase
         set along with one of their successors but none of their successors is
         in destination.
      
      In the following example, when trying to rebase 3:: onto 2, the rebase
      will abort with "this rebase will cause divergence from: 4":
      
          o  7 f
          |
          | o  6 e
          | |
          | o  5 d'
          | |
          x |  4 d (rewritten as 5)
          |/
          o  3 c
          |
          | o  2 x
          | |
          o |  1 b
          |/
          o  0 a
      
      By excluding obsolete changesets without a successor in destination (4
      in the example above) and their descendants, we make rebase work in this
      case, thus giving:
      
          o  11 e
          |
          o  10 d'
          |
          o  9 c
          |
          o  8 b
          |
          | o  7 f
          | |
          | | x  6 e (rewritten using rebase as 11)
          | | |
          | | x  5 d' (rewritten using rebase as 10)
          | | |
          | x |  4 d
          | |/
          | x  3 c (rewritten using rebase as 9)
          | |
          o |  2 x
          | |
          | x  1 b (rewritten using rebase as 8)
          |/
          o  0 a
      
      where branch 4:: is left behind while branch 5:: is rebased as expected.
      
      The rationale is that users may not be interested in rebasing orphan
      changesets when specifying a rebase set that include them but would
      still want "stable" ones to be rebased. Currently, the user is suggested
      to allow divergence (but probably does not want it) or they must specify
      a rebase set excluding problematic changesets (which might be a bit
      cumbersome). The approach proposed here corresponds to "Option 2" in
      https://www.mercurial-scm.org/wiki/CEDRebase.
      
      
      We extend _computeobsoletenotrebased() so that it also return a set of
      obsolete changesets in rebase set without a successor in destination but
      with at least one successor in rebase set. This
      'obsoletewithoutsuccessorindestination' is then stored as an attribute
      of rebaseruntime and used in _performrebasesubset() to:
      
      * filter out descendants of these changesets from the revisions to
        rebase;
      * issue a message about these revisions being skipped.
      
      This only occurs if 'evolution.allowdivergence' option is off and
      'rebaseskipobsolete' is on.
      a68c3420
  9. Nov 11, 2017
  10. Nov 06, 2017
  11. Nov 11, 2017
  12. Oct 31, 2017
  13. Nov 11, 2017
  14. Oct 15, 2017
  15. Nov 10, 2017
  16. Oct 19, 2017
    • Boris Feld's avatar
      obsfate: makes successorsetverb takes the markers as argument · b81ad5b7
      Boris Feld authored
      Right now, successorsetverb only needs successors to compute the verb. But we
      will want use additional information (effect-flags and operation) in the near
      future to compute a better verb.
      
      Add the markers parameter now so extensions (like Evolve) could wrap the
      function and start experimenting around better obsfate verbs.
      
      As successorsetverb now takes both successorset and markers parameters, rename
      it to obsfateverb, successorsetandmarkersverb was too long.
      
      Differential Revision: https://phab.mercurial-scm.org/D1191
      b81ad5b7
  17. Nov 03, 2017
  18. Nov 07, 2017
  19. Oct 21, 2017
  20. Nov 07, 2017
    • Gregory Szorc's avatar
      subrepo: use per-type config options to enable subrepos · 1a314176
      Gregory Szorc authored
      We change subrepos.allowed from a list of allowed subrepo types to
      a combination of a master switch and per-type boolean flag.
      
      If the master switch is set, subrepos can be disabled wholesale.
      
      If subrepos are globally enabled, then per-type options are
      consulted. Mercurial repos are enabled by default. Everything else
      is disabled by default.
      1a314176
  21. Nov 05, 2017
    • Yuya Nishihara's avatar
      subrepo: disable git and svn subrepos by default (BC) (SEC) · 846942fd
      Yuya Nishihara authored
      We have a security issue with git subrepos. I'm not sure if svn subrepo is
      vulnerable, but it seems not 100% safe to allow writing arbitrary data into
      a metadata directory. So for now, only hg subrepo is enabled by default.
      
      Maybe we should improve the help to describe why git/svn subrepos are
      disabled.
      846942fd
    • Yuya Nishihara's avatar
      subrepo: extend config option to disable subrepos by type (SEC) · 828cf35f
      Yuya Nishihara authored
      This allows us to minimize the behavior change introduced by the next patch.
      
      I have no idea which config style is preferred in UX POV, but I decided to
      get things done.
      
       a) list: 'allowed = hg, git, svn'
       b) sub option: 'allowed.hg = True' or 'allowed:hg = True'
       c) per-type action: 'hg = allow', 'git = abort'
      828cf35f
    • Yuya Nishihara's avatar
      subrepo: add config option to reject any subrepo operations (SEC) · 5e27afed
      Yuya Nishihara authored
      This is an alternative workaround for the issue5730.
      
      Perhaps this is the simplest way of disabling subrepo operations. It does
      nothing clever, but just aborts if Mercurial starts accessing to a subrepo.
      
      I think Greg's patch is more useful since it allows us to at least check
      out the parent repository. However, that would be confusing if the default
      is flipped to checkout=False and subrepos are silently ignored.
      
      I don't like the config name 'allowed', but I couldn't get any better name.
      5e27afed
  22. Nov 03, 2017
  23. Oct 19, 2017
  24. Nov 03, 2017
    • Denis Laxalde's avatar
      revert: do not reverse hunks in interactive when REV is not parent (issue5096) · 3649c3f2
      Denis Laxalde authored
      And introduce a new "apply" operation verb for this case as suggested in
      issue5096. This replaces the no longer used "revert" operation.
      
      In interactive revert, when reverting to something else that the parent
      revision, display an "apply this change" message with a diff that is not
      reversed.
      
      The rationale is that `hg revert -i -r REV` will show hunks of the diff from
      the working directory to REV and prompt the user to select them for applying
      (to working directory). This contradicts dcc56e10c23b in which it was
      decided to have the "direction" of prompted hunks reversed. Later on
      [1], there was a broad consensus (but no decision) towards the "as to
      be applied direction". Now that --interactive is no longer experimental
      (5910db5d1913), it's time to switch and thus we drop no longer used
      "experimental.revertalternateinteractivemode" configuration option.
      
      [1]: https://www.mercurial-scm.org/pipermail/mercurial-devel/2016-November/090142.html
      
      
      .. feature::
      
        When interactive revert is run against a revision other than the working
        directory parent, the diff shown is the diff to *apply* to the working directory,
        rather than the diff to *discard* from the working copy. This is in line with
        related user experiences with `git` and appears to be less confusing with
        `ui.interface=curses`.
      3649c3f2
    • Matthieu Laneuville's avatar
  25. Oct 21, 2017
  26. Aug 02, 2017
    • Matthieu Laneuville's avatar
      run-tests: $TESTDIR can be something else than $PWD · a18eef03
      Matthieu Laneuville authored
      $TESTDIR is expected to be the directory were the test lives, and is often used
      to reference helper functions. However, it is now set to $PWD at test invocation
      time, so if `run-tests.py` is called from another folder, the test will fail.
      
      The solution is to force $TESTDIR to be the base directory of the test itself,
      irrespective of where the runner is called from.
      a18eef03
  27. Nov 01, 2017
  28. Oct 30, 2017
Loading