Skip to content
Snippets Groups Projects
  1. Jan 09, 2021
  2. Oct 12, 2020
  3. Oct 22, 2020
    • Martin von Zweigbergk's avatar
      errors: add config that lets user get more detailed exit codes · 21733e8c
      Martin von Zweigbergk authored
      This adds an experimental config that lets the user get more detailed
      exit codes. For example, there will be a specific error code for
      input/user errors. This is part of
      https://www.mercurial-scm.org/wiki/ErrorCategoriesPlan. I've made the
      config part of tweakdefaults.
      
      I've made the config enabled by default in tests. My reasoning is that
      we want to see that each specific error case gives the right exit code
      and we don't want to duplicate all error cases in the entire test
      suite. It also makes it easy to grep the `.t` files for `[255]` to
      find which cases we have left to fix. The logic for the current exit
      codes is quite simple, so I'm not too worried about regressions
      there. I've added a test case specifically for the "legacy" exit
      codes.
      
      I've set the detailed exit status only for the case of
      `InterventionRequired` and `SystemExit` for now (the cases where we
      currently return something other than 255), just to show that it
      works.
      
      Differential Revision: https://phab.mercurial-scm.org/D9238
      21733e8c
  4. Oct 27, 2020
  5. Feb 21, 2020
  6. Oct 14, 2018
    • Pierre-Yves David's avatar
      debugobsolete: also issue the "new obsmarkers" messsage · 34a46d48
      Pierre-Yves David authored
      We are going to improve the way this message is issued in the core codebase.
      This will make it appears for `hg debugobsolete` too. Since this seems like a
      good idea, we make the output change in a previous changesets to clarify the
      next changeset.
      34a46d48
  7. Jul 17, 2019
    • Taapas Agrawal's avatar
      continue: added support for unshelve · 117437f3
      Taapas Agrawal authored
      This patch adds the support for `ushelve` in `hg continue` plan.
      
      `hgcontinueunshelve()` has been created for independent calls.
      In case an interrupted unshelve is resumed via hg continue the
      shelvedstate needs to be loaded seperately. This has been
      ensured by `_loadunshelvedstate()`
      
      `hgcontinueunshelve()` is then registered as `continuefunc` for state
      detection API.
      
      Results are shown as tests.
      
      Differential Revision: https://phab.mercurial-scm.org/D6652
      117437f3
  8. Jun 29, 2019
    • Taapas Agrawal's avatar
      abort: added support for merge · 3bc400cc
      Taapas Agrawal authored
      This adds support of `hg merge --abort` to `hg abort` plan.
      
      This involves refactoring `hg.merge` into two different
      functions removing the abort logic of `merge` from `hg.merge`
      and then creating a seperate `hg.abortmerge` to handle the
      abort logic so that the abortion of merge can be called
      independently.
      
      `hg.abortmerge` is then registered as `abortfunc` for the
      state detection API so that `commands.abort` can use it to
      deal with an unfinished merge operation.
      
      Results are shown as tests.
      
      Differential Revision: https://phab.mercurial-scm.org/D6588
      3bc400cc
  9. Jun 26, 2019
    • Taapas Agrawal's avatar
      abort: added support for unshelve · 3fb04938
      Taapas Agrawal authored
      This patch adds the support for shelve in `hg abort` plan.
      
      For this the logic to load a `shelvedstate` and the error
      handling for it had been shifted to a seperate function
      `_loadunshelvedstate()`. This returns a tuple with `state` file
      and `opts.`
      
      `hgabortunshelve()` has been created for independent calls.
      In case abortion of `unshelve` is called via `hg abort` the
      `shelvedstate` needs to be loaded seperately. This has been
      ensured by `_loadunshelvedstate()`
      
      `hgabortunshelve()` is then registered as `abortfunc` for state
      detection API.
      
      Results are shown as tests.
      
      Differential Revision: https://phab.mercurial-scm.org/D6579
      3fb04938
  10. Jul 10, 2019
  11. Jul 09, 2019
  12. Jun 28, 2019
  13. Feb 05, 2019
  14. Feb 04, 2019
  15. Dec 05, 2018
  16. Sep 20, 2018
    • Boris Feld's avatar
      shelve: find shelvedctx from bundle even if they are already in the repo · d9ba836f
      Boris Feld authored
      We use the new "duplicates" node tracking to find the tip of the bundle even if
      it already exists in the repository.
      
      Such logic is not supposed to be needed in theory. If the shelve was made using
      internal-phase, we already know its node. Otherwise, the bundle content should
      have been stripped. However, handling it makes the shelve code more robust and
      provide a good example of "revduplicates" usage.
      d9ba836f
  17. Sep 22, 2018
  18. Sep 19, 2018
  19. Jun 06, 2018
    • Boris Feld's avatar
      shelve: no longer strip internal commit when using internal phase · 52dfa1eb
      Boris Feld authored
      When the internal phase is used, the internal commits we create during shelve
      will be automatically hidden, and we don't need to strip them. Avoiding strips
      gives much better performances and is less traumatic for caches.
      
      Test changes are all related to revision numbers increasing more quickly since
      we avoid stripping.
      
      At the end of `test-shelve.t` we now need manually strip the shelve-commit in
      addition to the x.shelve file deletion. This emulates a preexisting shelve
      after a repository upgrade.
      
      Note:
      
          The hidden internal commits confuses rebase a bit as shown by a new test
          added. This will happen when the user have shelve commits on top of a
          changeset to be rebased.
      
          We'll fix this in the next commit. As we still use a backup bundle, rebase
          can just strip the internal changesets and be fine.
      52dfa1eb
  20. May 29, 2018
  21. Aug 31, 2018
  22. Jun 05, 2018
    • Boris Feld's avatar
      shelve: add an "internal" extra · 5f8282f3
      Boris Feld authored
      Keeping shelve changeset around increase the risk of collision with normal
      changesets. To prevent such collision and help with overall clarity, we add an
      'internal' key in extra that mark the changeset as created by "shelve".
      
      Node changes in tests are expected.
      5f8282f3
  23. May 29, 2018
    • Boris Feld's avatar
      shelve: store shelved node in a new data file · da121c9d
      Boris Feld authored
      It is useful for a version of shelve not based on bundle and strip. Having
      more data does not hurt the bundle based case so we introduce it in all cases
      before doing more rework.
      
      We also keep storing the patch using another method.
      
      note: We could have this metadata file list all the file involved in the
      shelve and use that for cleanup. This would be more future proof than having a
      hard-coded list of file to purge. However, this is an adventure for another
      series.
      da121c9d
  24. Jul 16, 2018
  25. Jul 13, 2018
  26. Jun 05, 2018
  27. May 28, 2018
  28. Jun 13, 2018
  29. May 28, 2018
  30. May 29, 2018
  31. May 08, 2018
  32. Apr 14, 2018
  33. Apr 04, 2018
    • Gregory Szorc's avatar
      tests: disallow using simple store repo with bundlerepo · 45a47991
      Gregory Szorc authored
      bundlerepo is... going to be difficult to port to an alternate
      store because it assumes revlogs for storage and essentially
      overlays the contents of a bundle onto a fake revlog-like
      primitive. It will be a good test case for our eventual new
      storage interface.
      
      Refactoring bundlerepo to make it work with non-revlog storage is
      going to be a bit of work. So for now, let's refuse to use the
      simple store repo when a bundlerepo is in play.
      
      A new test requirement advertising support for treating bundle
      files as repo instances has been added. Some tests have been
      made conditional on this feature. Additional tests will be
      annotated in subsequent commits.
      
      Having positive opt-in to repo features will be simpler in the
      long run because it will allow multiple storage backends to
      declare feature support and we won't have to annotate each test
      with the set of repo backends that are supported. Again, we'll
      probably want better integration between repo features and
      tests. But this is the easiest we can do at the moment.
      
      Differential Revision: https://phab.mercurial-scm.org/D3060
      45a47991
  34. Feb 13, 2018
  35. Dec 11, 2017
    • Matt Harbison's avatar
      tests: remove (glob) annotations that were only for '\' matches · 4441705b
      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)
      4441705b
Loading