Skip to content
Snippets Groups Projects
  1. Feb 04, 2019
  2. Dec 05, 2018
  3. Sep 20, 2018
    • Boris Feld's avatar
      shelve: find shelvedctx from bundle even if they are already in the repo · d9ba836fc234
      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.
      d9ba836fc234
  4. Sep 22, 2018
  5. Sep 19, 2018
  6. Jun 06, 2018
    • Boris Feld's avatar
      shelve: no longer strip internal commit when using internal phase · 52dfa1eb0ad4
      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.
      52dfa1eb0ad4
  7. May 29, 2018
  8. Aug 31, 2018
  9. Jun 05, 2018
    • Boris Feld's avatar
      shelve: add an "internal" extra · 5f8282f368b2
      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.
      5f8282f368b2
  10. May 29, 2018
    • Boris Feld's avatar
      shelve: store shelved node in a new data file · da121c9dc0f2
      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.
      da121c9dc0f2
  11. Jul 16, 2018
  12. Jul 13, 2018
  13. Jun 05, 2018
  14. May 28, 2018
  15. Jun 13, 2018
  16. May 28, 2018
  17. May 29, 2018
  18. May 08, 2018
  19. Apr 14, 2018
  20. Apr 04, 2018
    • Gregory Szorc's avatar
      tests: disallow using simple store repo with bundlerepo · 45a4799174a1
      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
      45a4799174a1
  21. Feb 13, 2018
  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. Dec 03, 2017
    • Matt Harbison's avatar
      tests: add a substitution for ENOENT/ERROR_FILE_NOT_FOUND messages · feecfefeba25
      Matt Harbison authored
      Automatic replacement seems better than trying to figure out a check-code rule.
      I didn't bother looking to see why the error message and file name is reversed
      in the annotate and histedit tests, based on Windows or not.
      
      I originally had this as a list of tuples, conditional on the platform.  But
      there are a couple of 'No such file or directory' messages emitted by Mercurial
      itself, so unconditional is required for stability.  There are also several
      variants of what I assume is 'connection refused' and 'unknown host' in
      test-clone.t and test-clonebundles.t for Docker, FreeBSD jails, etc.  Yes, these
      are handled by (re) tags, but maybe it would be better to capture those strings
      in order to avoid whack-a-mole in future tests.  All of this points to using a
      dictionary containing one or more strings-to-be-replaced values.
      feecfefeba25
  24. Sep 28, 2017
    • Boris Feld's avatar
      config: use 'experimental.evolution.create-markers' · 1644623ab096
      Boris Feld authored
      Extract 'experimental.evolution' = createmarkers as
      'experimental.evolution.createmarkers'.
      
      We keep the new option in the 'experimental.evolution' namespace in order to
      stay coherent with other options ('experimental.evolution.bundle-obsmarker'
      and 'experimental.evolution.track-operation') ease the renaming as possibly
      'evolution.createmarkers'.
      
      Differential Revision: https://phab.mercurial-scm.org/D1149
      1644623ab096
  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. Sep 16, 2017
  27. Sep 11, 2017
    • Mark Thomas's avatar
      scmutil: don't append .orig to backups in origbackuppath (BC) · 9e4f82bc2b0b
      Mark Thomas authored
      When ui.origbackuppath is set, .orig files are stored outside of the working
      copy, however they still have a .orig suffix appended to them.  This can cause
      unexpected conflicts, particularly when tracked files or directories have .orig
      at the end.
      
      This change removes the .orig suffix from files stored in an out-of-tree
      origbackuppath.
      
      Test Plan:
      Update and run unit tests.
      
      Differential Revision: https://phab.mercurial-scm.org/D679
      9e4f82bc2b0b
  28. Aug 23, 2017
  29. Aug 04, 2017
  30. Aug 02, 2017
    • Pulkit Goyal's avatar
      morestatus: move fb extension to core by plugging to `hg status --verbose` · 96f43981c1c4
      Pulkit Goyal authored
      morestatus extension in fbext use to show more context about the state of the
      repo like the repository is in a unfinished merge state, or a rebase is going
      on, or histedit is going on, listing the files which need to be resolved and
      also suggesting ways to handle the situation.
      
      This patch moves the extension directly to core by plugging it into the
      --verbose flag of the status command. So now if you are in any unfinished state
      and you do hg status -v, it will show you details and help related to the state.
      
      The extension in fbext also shows context about unfinished update state
      which is not ported to core as that plug in hooks to update command which need
      to be tackled somewhat differently.
      
      The following configuration will turn the behaviour on by default
      
      [commands]
      status.verbose = 1
      
      You can also skip considering some states like bisect as follows:
      
      [commands]
      status.skipstates=bisect
      
      This patch also adds test for the feature.
      
      .. feature::
      
         ``hg status -v`` can now show unfinished state. For example, when in
         an unfinished rebase state, ``hg status -v`` might show::
      
         # The repository is in an unfinished *rebase* state.
         # No unresolved merge conflicts.
         # To continue:                hg rebase --continue
         # To abort:                   hg rebase --abort
      
      Differential Revision: https://phab.mercurial-scm.org/D219
      96f43981c1c4
  31. Jul 16, 2017
  32. Jul 08, 2017
    • Jun Wu's avatar
      rebase: use scmutil.cleanupnodes (issue5606) (BC) · 3b7cb3d17137
      Jun Wu authored
      This patch migrates rebase to use scmutil.cleanupnodes API. It simplifies
      the code and makes rebase code reusable inside a transaction.
      
      This is a BC because the backup file is no longer strip-backup/*-backup.hg,
      but strip-backup/*-rebase.hg. The latter looks more reasonable since the
      directory name is "strip-backup" so there is no need to repeat "backup".
      
      I think the backup file name change is probably fine as a BC, since we have
      changed it before (aa4a1672583e) and didn't get complains. The end result
      of this series will be a much more consistent and unified backup names:
      
        command  | old backup file suffix       | new backup file suffix
        -------------------------------------------------------------------
        amend    | amend-backup.hg              | amend.hg
        histedit | backup.hg (could be 2 files) | histedit.hg (single file)
        rebase   | backup.hg                    | rebase.hg
        strip    | backup.hg                    | backup.hg
      
      (note: backup files are under .hg/strip-backup)
      
      It also fixes issue5606 as a side effect because the new "delayedstrip" code
      path will carefully examine nodes (safestriproots) to make sure orphaned
      changesets won't get stripped by accident.
      
      Some warning messages are changed to the new "warning: orphaned descendants
      detected, not stripping HASHES", which provides more information about
      exactly what changesets are left behind.
      
      Another minor behavior change is when there is an obsoleted changeset with a
      successor in the destination branch, bookmarks pointing to that obsoleted
      changeset will not be moved. I have commented in test-rebase-obsolete.t
      explaining why that is more desirable.
      3b7cb3d17137
  33. May 13, 2017
    • Kostia Balytskyi's avatar
      shelve: make shelvestate use simplekeyvaluefile · fe3105e6e051
      Kostia Balytskyi authored
      Currently shelvestate uses line ordering to differentiate fields. This
      makes it hard for extensions to wrap shelve, since if two alternative
      versions of code add a new line, correct merging is going to be problematic.
      simplekeyvaluefile was introduced fot this purpose specifically.
      
      After this patch:
      - shelve will always write a simplekeyvaluefile
      - unshelve will check the first line of the file for a version, and if the
        version is 1, will read it in a position-based way, if the version is 2,
        will read it in a key-value way
      
      As discussed with Yuya previously, this will be able to handle old-style
      shelvedstate files, but old Mercurial versions will fail on the attempt to
      read shelvedstate file of version 2 with a self-explanatory message:
        'abort: this version of shelve is incompatible with the version used
        in this repo'
      fe3105e6e051
  34. Mar 08, 2017
  35. Feb 19, 2017
    • liscju's avatar
      shelve: add -n/--name option to unshelve (issue5475) · 4189d790e8a4
      liscju authored
      This makes using shelve/unshelve more consistent because
      shelving can be done using name option and unshelving as
      well. Author of the idea of this improvement and solution is
      joshgold.
      4189d790e8a4
  36. Jan 19, 2017
Loading