Skip to content
Snippets Groups Projects
  1. Nov 08, 2020
    • sliquister's avatar
      strip: move into core · d7a508a75d72
      sliquister authored
      As discussed at the 5.2 sprint, replace strip extension by a core
      command, debugstrip.  Obviously, the extension stays for backwards
      compatibility.
      
      As an implementation note, I moved the strip file as is into core,
      which is not done elsewhere, AFAIK. I could have inlined it into
      debugcommands, but that doesn't sound great.
      
      Differential Revision: https://phab.mercurial-scm.org/D9285
      d7a508a75d72
  2. Oct 12, 2020
  3. Sep 18, 2020
  4. Jan 29, 2020
  5. Aug 01, 2019
    • Pierre-Yves David's avatar
      test: use a more verbose output in the test · 90d8a2a42d5c
      Pierre-Yves David authored
      While debugging some test failure, I released the test never checks if the
      relevant changesets were preserved. So I am updating the test from `hg parents`
      usage to `hg log -G` with a special template. This increase the area covered by
      the test and clarify the test failures.
      90d8a2a42d5c
  6. Jul 15, 2019
  7. Jun 08, 2019
    • Taapas Agrawal's avatar
      statecheck: added support for STATES · 12243f15d53e
      Taapas Agrawal authored
      This removes `STATES` from `state.py` and adds support to
      `statecheck` class to handle its features.
      `getrepostate()` function is modified accordingly.
      
      This adds a method 'cmdutil.addunfinished()' for appending to
      the unfinishedstate list so as to keep 'merge' and 'bisect' at the last.
      
      This also makes two separate message formats for `checkunfinished()` and
      `getrepostate()` as there were previously present.
      
      Results of test changed are shown.
      
      Differential Revision: https://phab.mercurial-scm.org/D6503
      12243f15d53e
  8. Jun 17, 2019
  9. Jun 14, 2019
  10. Oct 17, 2018
  11. Sep 26, 2018
    • Boris Feld's avatar
      cleanupnodes: drop special casing around prune markers (API) · 1857f50a9643
      Boris Feld authored
      The `cleanupnodes` has logic to skip the creation of "prune" markers if the
      changeset is already obsolete. This feels strange and gets in the way of code
      changes to tracks folds. Now that callers no longer request such prune, we can
      drop this logic.
      
      In many cases, pruning through cleanupnodes should be replaced by internal
      phase usage.
      1857f50a9643
  12. Aug 29, 2018
    • Boris Feld's avatar
      phase: report number of non-public changeset alongside the new range · 89630d0b3e23
      Boris Feld authored
      When interacting with non-publishing repository or bundle, it is useful to
      have some information about the phase of the changeset we just pulled.
      
      This changeset updates the "new changesets MIN:MAX" output to also includes
      phases information for non-public changesets. Displaying extra data about
      non-public changesets means the output for exchange with publishing repository
      (the default) is unaffected.
      89630d0b3e23
  13. Jul 05, 2018
  14. May 08, 2018
  15. Apr 04, 2018
    • Gregory Szorc's avatar
      tests: conditionalize tests for various repo features · 7542e97c7867
      Gregory Szorc authored
      Working my down the long tail of test failures due to the simple
      store.
      
      We're now down to 38 failures with the simple store.
      
      Differential Revision: https://phab.mercurial-scm.org/D3096
      7542e97c7867
    • Gregory Szorc's avatar
      simplestore: use a custom store for the simple store repo · c2c8962a9465
      Gregory Szorc authored
      Before, we used the default store, which was based on fncache
      and dotencode. After attempting to port tests to work with the
      simple store, I realized that fncache was more trouble than it is
      worth.
      
      This commit implements a proper store type for the simple repo -
      one that isn't based off fncache.
      
      This causes a number of new test failures because of tests
      expecting the full fncache store filename encoding. I may
      extend the store format in a subsequent commit to take the
      filename encoding parts of fncache that we can take
      (basically everything except hash encoding, since that isn't
      reversible). But for now, let's use encoded store.
      
      As part of this, we implement proper requirements support for
      repos created with the simple store. This should have been
      done from the beginning, as a requirement is needed to lock
      out clients that don't understand a storage format.
      
      A new hghave feature advertising the presence of fncache in repos
      has been added. Most tests touching the fncache are now conditional
      on that feature.
      
      Other tests have added the optional repo requirement to output.
      
      Differential Revision: https://phab.mercurial-scm.org/D3095
      c2c8962a9465
    • Gregory Szorc's avatar
      tests: conditionalize tests based on presence of revlogs for files · cbc4425e81b5
      Gregory Szorc authored
      ~85 tests don't like our non-revlog file store for various reasons.
      
      This commit introduces hghave functionality for declaring and querying
      repository features. By default, we assume repositories have
      revlog-based file storage. But if the HGREPOFEATURES environment
      variable is set, we can override the default set of repository
      features. If you run the test harness with our simplestorerepo
      extension and an environment variable set to the proper value, you
      can override the hghave defaults to agree with simplestorerepo's
      version of reality.
      
      Various tests have been modified so behavior dependent on revlog-based
      file storage is marked as such.
      
      This fixes a handful of test failures with our custom file storage
      extension. But dozens remain. The point of this commit is to demonstrate
      how tests will need to be modified to account for custom storage
      implementations.
      
      TBH, I'm not convinced hghave is the proper layer for repository
      feature detection. I /think/ we'll eventually want something in
      run-tests.py itself. But that would require inventing a new primitive
      in the test harness. This is all very alpha at the moment. So I think
      hghave is an acceptable place to hang this feature detection. I think
      the right time to be thinking about integrating this into run-tests.py
      is *after* we have a stable alternate storage implementation in core.
      For now, let's try to make progress towards the idea of an alternate
      storage backend.
      
      Differential Revision: https://phab.mercurial-scm.org/D3030
      cbc4425e81b5
  16. Apr 03, 2018
    • Gregory Szorc's avatar
      tests: use `hg unbundle` instead of `hg pull` in some tests · 5d10f41ddcc4
      Gregory Szorc authored
      `hg pull <bundle>` uses the special "bundlerepo" repository. The
      bundlerepo code makes many assumptions about the storage of
      repositories. It will be difficult to teach bundlerepo to use
      non-revlog storage before a better storage interface is established.
      
      Many test failures using our "simple store" are related to
      bundlerepo: the simple store just isn't compatible with bundlerepo
      because of storage assumptions in bundlerepo.
      
      In order to mitigate the impact of bundlerepo on our code base,
      this commit changes various tests to use `hg unbundle` instead
      of `hg pull`. This bypasses the bundlerepo code.
      
      Tests exercising exchange functionality have not been altered, as
      they should be using `hg pull` and going through the bundlerepo
      code paths.
      
      Differential Revision: https://phab.mercurial-scm.org/D3059
      5d10f41ddcc4
  17. Apr 04, 2018
  18. Feb 21, 2018
    • Boris Feld's avatar
      bundle: include advisory rev branch cache part in bundle2 bundle · b89a7ef29013
      Boris Feld authored
      `hg bundle` command producing bundle2 will now include an optional part
      containing the revision-branch cache data.
      
      The data sent are mostly nodes so it is quite compact.  The goal of the
      rev-branch-cache is to speed up branch map computation, especially when the
      branchmap gets invalidated so we send data for all exchanged changesets. In
      addition, computing the relevant heads to send in case of partial pulling would
      be challenging.
      
      As a reminder, the rev branch cache data significantly speed up branch
      computation. Having it around provides a small speedup to pull/clone and much
      higher tolerance to branch map cache invalidation that might happens from later
      commands.
      
      On the Mercurial repository, computing the visible branchmap from scratch move
      from 2.00 seconds to 0.34s (a -83% speedup).
      
      Using this new part, Unbundling the full Mercurial repository moves from 25.736
      seconds to 24.030 seconds (around -7% speedup). The bundle size increase is
      around 3% (from 22.43 MB to 23.13MB)
      
      
      On an half a million revision repository with twenty thousand
      branches, computing the branchmap moves from 75 seconds to 45 second (-40%) if
      the caches is used.
      
      A bundle containing 50 000 changesets in such repository get a 0.5% size
      increase from such part for a -3% unbundling time speedup.
      b89a7ef29013
  19. Jan 18, 2018
  20. Jan 15, 2018
    • Martin von Zweigbergk's avatar
      evolution: report new unstable changesets · 1a09dad8b85a
      Martin von Zweigbergk authored
      This adds a transaction summary callback that reports the number of
      new orphan, content-divergent and phase-divergent changesets.
      
      The code for reporting it is based on the code from the evolve
      extension, but simplified a bit. It simply counts the numbers for each
      kind of instability before and after the transaction. That's obviously
      not very efficient, but it's easy to reason about, so I'm doing this
      as a first step that can make us quite confident about the test case
      changes. We can optimize it later and make sure that the tests are not
      affected. The code has been used in the evolve extension for a long
      time and has apparently been sufficiently fast, so it doesn't seem
      like a pressing issue.
      
      Unlike the evolve extension's version of this report, this version
      applies to all commands (or all transactions run as part of any
      command, to be exact).
      
      Differential Revision: https://phab.mercurial-scm.org/D1867
      1a09dad8b85a
  21. Dec 22, 2017
  22. Dec 11, 2017
    • Matt Harbison's avatar
      tests: remove (glob) annotations that were only for '\' matches · 4441705b7111
      Matt Harbison authored
      # skip-blame because this was mechanically rewritten the following script.  I
      ran it on both *.t and *.py, but none of the *.py changes were proper.  All *.t
      ones appear to be, and they run without addition failures on both Windows and
      Linux.
      
        import argparse
        import os
        import re
      
        ap = argparse.ArgumentParser()
        ap.add_argument('path', nargs='+')
        opts = ap.parse_args()
      
        globre = re.compile(r'^(.*) \(glob\)(.*)$')
      
        for p in opts.path:
            tmp = p + '.tmp'
            with open(p, 'rb') as src, open(tmp, 'wb') as dst:
                for line in src:
                    m = globre.match(line)
                    if not m or '$LOCALIP' in line or '*' in line:
                        dst.write(line)
                        continue
                    if '?' in line[:-3] or ('?' in line[:-3] and line[-3:] != '(?)'):
                        dst.write(line)
                        continue
                    dst.write(m.group(1) + m.group(2) + '\n')
            os.unlink(p)
            os.rename(tmp, p)
      4441705b7111
  23. Nov 01, 2017
  24. Oct 17, 2017
  25. Oct 12, 2017
    • Denis Laxalde's avatar
      transaction-summary: show the range of new revisions upon pull/unbundle (BC) · eb586ed5d8ce
      Denis Laxalde authored
      Upon pull or unbundle, we display a message with the range of new revisions
      fetched. This revision range could readily be used after a pull to look out
      what's new with 'hg log'. The algorithm takes care of filtering "obsolete"
      revisions that might be present in transaction's "changes" but should not be
      displayed to the end user.
      eb586ed5d8ce
  26. Oct 05, 2017
  27. Oct 03, 2017
    • Saurabh Singh's avatar
      test-strip: make test compatible with chg · 40b6d25ed2d5
      Saurabh Singh authored
      The test was using reposetup which had the logic for stripping
      commits. This leads to a situation where if the reposetup was called twice for
      an extension (which can happen with chg running), the stripped node would not
      be found the second time. Therefore, this commit changes the test to put the
      stripping logic inside commands instead of the reposetup. This ensures that the
      stripping logic is invoked only when the command is invoked and thus, avoids
      any problems.
      
      Test Plan:
      Ran the test 'test-strip.t' with and without the '--chg' option.
      
      Differential Revision: https://phab.mercurial-scm.org/D928
      40b6d25ed2d5
  28. Sep 15, 2017
    • Martin von Zweigbergk's avatar
      obsmarker: track operation by default · ecc96506c49d
      Martin von Zweigbergk authored
      We added support for including the operation responsible for creating
      the obsmarker in 3546a771e376 (obsolete: add operation metadata to
      rebase/amend/histedit obsmarkers, 2017-05-09). However, soon
      thereafter, in f432897a9f49 (obsmarker: add an experimental flag
      controlling "operation" recording, 2017-05-20), it was hidden behind a
      config that was off by default. It seems unlikely that people will
      manually turn it on, and obsmarkers/evolution as a whole is still
      experimental anyway, so let's turn on the tracking by default.
      
      Differential Revision: https://phab.mercurial-scm.org/D722
      ecc96506c49d
  29. Sep 18, 2017
  30. Sep 14, 2017
    • Martin von Zweigbergk's avatar
      repair: preserve phase also when not using generaldelta (issue5678) · 91f0677dc920
      Martin von Zweigbergk authored
      It seems like we used to pick the oldest possible version of the
      changegroup to use for bundles created by the repair module (used
      e.g. by "hg strip" and for temporary bundles by "hg rebase"). I tried
      to preserve that behavior when I created the changegroup.safeversion()
      method in 3b2ac2115464 (changegroup: introduce safeversion(),
      2016-01-19).
      
      However, we have recently chagned our minds and decided that these
      commands are only used locally and downgrades are unlikely. That
      decicion allowed us to start adding obsmarker and phase information to
      these bundles. However, as the bug report shows, it means we get
      different behavior e.g. when generaldelta is not enabled (because when
      it was enabled, it forced us to use bundle2). The commit that actually
      caused the reported bug was 8e3021fd1a44 (strip: include phases in
      bundle (BC), 2017-06-15).
      
      So, since we now depend on having more information in the bundles,
      let's make sure we instead pick the newest possible changegroup
      version.
      
      Differential Revision: https://phab.mercurial-scm.org/D715
      91f0677dc920
    • Martin von Zweigbergk's avatar
      tests: add test for issue5678 · b5d7e7d5c573
      Martin von Zweigbergk authored
      In addition to a test case for the direct problem described in the bug
      report, this also adds a test case showing how obsmarkers can also get
      lost when not using generaldelta.
      
      Differential Revision: https://phab.mercurial-scm.org/D714
      b5d7e7d5c573
  31. Aug 23, 2017
  32. Aug 22, 2017
Loading