Skip to content
Snippets Groups Projects
  1. Feb 22, 2025
  2. May 02, 2022
  3. May 31, 2022
  4. May 07, 2021
  5. Apr 09, 2021
  6. Jan 15, 2021
    • Pierre-Yves David's avatar
      copies: add an devel option to trace all files · e948ad0dcbe2
      Pierre-Yves David authored
      Filelog based copy tracing only trace copy for file that have been added. This
      is a trade off between skipping some rare copy case in exchange for avoiding
      atrocious-to-the-point-of-unusable performance.
      
      The changeset centric copy tracing does not need this trade off and naturally
      trace all copy, include the one involving non-new files.
      
      In order to ease the comparison from both algorithm, we add a small devel option
      to trace copy for all files in the target revisions.
      
      Differential Revision: https://phab.mercurial-scm.org/D9796
      e948ad0dcbe2
  7. Nov 12, 2020
  8. Oct 07, 2020
  9. Jan 28, 2020
    • Martin von Zweigbergk's avatar
      copy: add experimetal support for unmarking committed copies · 7c4b98a4e536
      Martin von Zweigbergk authored
      The simplest way I'm aware of to unmark a file as copied after
      committing is this:
      
        hg uncommit --keep <dest>
        hg forget <dest>
        hg add <dest>
        hg amend
      
      This patch teaches `hg copy --forget` a `-r` argument to simplify that into:
      
        hg copy --forget --at-rev . <dest>
      
      In addition to being simpler, it doesn't touch the working copy, so it
      can easily be used even if the destination file has been modified in
      the working copy.
      
      I'll teach `hg copy` without `--forget` to work with `--at-rev` next.
      
      Differential Revision: https://phab.mercurial-scm.org/D8030
      7c4b98a4e536
  10. Dec 20, 2019
    • Martin von Zweigbergk's avatar
      copy: add option to unmark file as copied · 8be0c63535b5
      Martin von Zweigbergk authored
      To unmark a file as copied, the user currently has to do this:
      
        hg forget <dest>
        hg add <dest>
      
      The new command simplifies that to:
      
        hg copy --forget <dest>
      
      That's not a very big improvement, but I'm planning to also teach `hg
      copy [--forget]` a `--at-rev` argument for marking/unmarking copies
      after commit (usually with `--at-rev .`).
      
      Differential Revision: https://phab.mercurial-scm.org/D8029
      8be0c63535b5
  11. Feb 08, 2019
  12. Sep 04, 2018
  13. Aug 29, 2018
  14. Apr 04, 2018
    • 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
    • Gregory Szorc's avatar
      tests: remove superfluous config setting · db06c4bb2158
      Gregory Szorc authored
      format.usegeneraldelta defaults to true.
      
      Differential Revision: https://phab.mercurial-scm.org/D3057
      db06c4bb2158
  15. Apr 02, 2018
    • Gregory Szorc's avatar
      debugcommands: drop offset and length from debugindex by default · d4e62df1c73d
      Gregory Szorc authored
      These fields are an implementation detail of revlog storage. As
      such, they are not part of the generic storage "index" interface
      and shouldn't be displayed by default.
      
      Because we don't have another way to display these fields, we've
      retained support for printing these fields via --verbose.
      
      Yes, I know we should probably be doing all this formatting using
      modern formatting/templater APIs. I didn't feel like scope
      bloating this patch.
      
      Differential Revision: https://phab.mercurial-scm.org/D3028
      d4e62df1c73d
    • Gregory Szorc's avatar
      debugcommands: drop base revision from debugindex · 009d0283de5f
      Gregory Szorc authored
      Revlog index data consists of generic index metadata that will
      likely be implemented across all storage engines and revlog-specifc
      metadata.
      
      Most tests printing index data only care about the generic fields.
      
      This commit drops the printing of the base revision from
      `hg debugindex`. This value is an implementation detail of
      revlogs / delta chains. If tests are interested in verifying this
      implementation detail, `hg debugdeltachain` is a better command.
      
      Most tests were skipping over this field anyway. Tests that weren't
      looked like they were newer. So my guess is we forgot to make them
      skip the field to match the style of the older tests. This reinforces
      my belief that the base revision is not worth having in
      `hg debugindex`.
      
      Differential Revision: https://phab.mercurial-scm.org/D3027
      009d0283de5f
  16. Jul 27, 2017
  17. Jul 12, 2017
  18. May 02, 2017
    • Pierre-Yves David's avatar
      caches: move the 'updating the branch cache' message in 'updatecaches' · c2380b448265
      Pierre-Yves David authored
      We are about to remove the branchmap cache update in changegroup application.
      There is a debug message alongside this update that we do not want to loose. We
      move the message beforehand to simplify the test update in the next changeset.
      The message move is quite noisy and isolating that noise is useful.
      
      Most tests update are just line reordering since the message is issued at a
      later point during the transaction.
      
      After this changes, the message is displayed in more case since local commit
      creation also issue it.
      c2380b448265
  19. Sep 19, 2016
    • Augie Fackler's avatar
      copy: distinguish "file exists" cases and add a hint (BC) · 381293e1135e
      Augie Fackler authored
      Users that want to add a copy record to an existing commit with 'hg
      commit --amend' should be guided towards this workflow, rather than
      reaching for some sort of uncommit-recommit flow. As part of this,
      distinguish in the top-line error message whether the file merely
      already exists (untracked) on disk or the file already exists in
      history.
      
      The full list of copy and rename cases and how they interact with
      flags are listed below:
      
      target exists  --after  --force  |  action
            n            n      *    |  copy
            n            y      *    |  (1)
        untracked        n      n    |  (4) NEWHINT
        untracked        n      y    |  (3)
        untracked        y      *    |  (2)
            y            n      n    |  (4) NEWHINT
            y            n      y    |  (3)
            y            y      n    |  (2)
            y            y      y    |  (3)
         deleted         n      n    |  copy
         deleted         n      y    |  (3)
         deleted         y      n    |  (1)
         deleted         y      y    |  (1)
      
      * = don't care
      (1) <src>: not recording move - <target> does not exist
      (2) preserve target contents
      (3) replace target contents
      (4) <target>: not overwriting - file {exists,already committed}
      
      Credit to Kevin for wholly rewriting my table to cover more cases we
      discovered at the sprint.
      
      I think this change gets the hints correct in all cases, but I'd
      appreciate close inspection of the test cases to make sure I haven't
      gotten turned around in here.
      381293e1135e
    • Augie Fackler's avatar
      copy: document current behavior of 'hg cp --after' · 37a36c05dcc3
      Augie Fackler authored
      I'm about to propose an output change here, but the existing behavior
      was untested!
      37a36c05dcc3
  20. Oct 19, 2015
  21. Jun 08, 2015
  22. May 29, 2015
    • Gilles Moris's avatar
      summary: move the parents phase marker to commit line (issue4688) · 6084926366b9
      Gilles Moris authored
      The phase of the pending commit depends on the parent of the working directory
      and on the phases.newcommit configuration.
      First, this information rather depend on the commit line which describe the
      pending commit.
      Then, we only want to be advertised when the pending phase is going to be higher
      than the default new commit phase.
      
      So the format will change from
      
      $ hg summary
      parent: 2:ab91dfabc5ad
       foo
      parent: 3:24f1031ad244 tip
       bar
      branch: default
      commit: 1 modified, 1 unknown, 1 unresolved (merge)
      update: (current)
      phases: 1 secret (secret)
      
      to
      
      parent: 2:ab91dfabc5ad
       foo
      parent: 3:24f1031ad244 tip
       bar
      branch: default
      commit: 1 modified, 1 unknown, 1 unresolved (merge) (secret)
      update: (current)
      phases: 1 secret
      6084926366b9
  23. May 14, 2015
    • Gilles Moris's avatar
      summary: add a phase line (draft, secret) to the output · 1ef96a3b8b89
      Gilles Moris authored
      The number of draft and secret changesets are currently not summarized.
      This is an important information because the number of drafts give some rough
      idea of the number of outgoing changesets in typical workflows, without needing
      to probe a remote repository. And a non-zero number of secrets means that
      those changeset will not be pushed.
      
      If the repository is "dirty" - some draft or secret changesets exists - then
      summary will display a line like:
      
      phases: X draft, Y secret (public)
      
      The phase in parenthesis corresponds to the highest phase of the parents of
      the working directory, i.e. the current phase.
      
      By default, the line is not printed if the repository is "clean" - all
      changesets are public - but if verbose is activated, it will display:
      
      phases: (public)
      
      On the other hand, nothing will be printed if quiet is in action.
      
      A few tests have been added in test-phases.t to cover the -v and -q cases.
      1ef96a3b8b89
  24. Mar 17, 2015
  25. Jan 26, 2015
    • Matt Harbison's avatar
      largefiles: revert to lfilesrepo.status() being an unfiltered method · df463ca0adef
      Matt Harbison authored
      This effectively reverts 67d63ec85eb7, which caused some normal file copies to
      not be displayed as copies.  Other normal file copies could be displayed- the
      exact reason isn't clear.  This also adds two tests that were failing prior to
      this backout, so that this can be sorted out next cycle.
      
      The difference between copy cases that worked and those that didn't seemed to be
      in copies.pathcopies().  When largefiles isn't enabled for the changed test, or
      lfstatus is not set in the commands.status() override, 'y.ancestor(x) == x'.
      That wasn't true otherwise, which fell through to the _chain() method.  In this
      case, the copy is removed in the criss cross loop.
      
      'y.ancestor(x)' returns a context.changectx type, while 'x' is a lfilesctx type
      in the failing case.  I tried adding the ancestor method to the lfilesctx class
      to change the type of the ancestor context, however the context when printed as
      a string then gains a '+'.  This points to it being a context.committablectx,
      which clearly isn't correct for an ancestor.  Possibly the problem is the
      lfilesctx needs to subclass context.committablectx in some cases, but
      context.changectx in others, within the same invocation?  I'm not sure how to
      pull that off, and backing out this change is safer during the freeze.
      
      As to the status changing when a path is specified, I haven't looked into it
      yet.
      df463ca0adef
  26. Apr 18, 2014
  27. Nov 12, 2014
  28. Aug 17, 2012
  29. Jul 11, 2012
    • Bryan O'Sullivan's avatar
      tests: reduce spurious failures when run with generaldelta · b87acfda5268
      Bryan O'Sullivan authored
      Quite a few tests fail in noisy but meaningless ways when the test suite
      is run with generaldelta enabled:
      
        ./run-tests.py --extra-config-opt=format.generaldelta=1
      
      This reduces the amount of noise introduced by the debugindex command,
      the main source of differences.  In my environment, when testing with
      generaldelta enabled, this change reduces the number of completely
      failing tests from 21 to 8.
      b87acfda5268
  30. Jun 10, 2012
    • kiilerix's avatar
      tests: add missing trailing 'cd ..' · f2719b387380
      kiilerix authored
      Many tests didn't change back from subdirectories at the end of the tests ...
      and they don't have to. The missing 'cd ..' could always be added when another
      test case is added to the test file.
      
      This change do that tests (99.5%) consistently end up in $TESTDIR where they
      started, thus making it simpler to extend them or move them around.
      f2719b387380
  31. Jun 04, 2012
  32. Apr 03, 2012
  33. May 04, 2011
    • Sune Foldager's avatar
      tests: fix deprecated use of hg debugdata/debugindex · ec5886db9dc6
      Sune Foldager authored
      For filelogs, debugindex and debugdata can be called with the file name
      directly instead of the path to the revlog. Since in the future filelogs
      will no longer be valid revlogs, calling with a path to the revlog is
      deprecated for debugdata. For debugindex it is expected to still work,
      but I changed them as well for consistency.
      ec5886db9dc6
  34. Apr 19, 2011
    • Adrian Buehlmann's avatar
      add: introduce a warning message for non-portable filenames (issue2756) (BC) · 8b252e826c68
      Adrian Buehlmann authored
      On POSIX platforms, the 'add', 'addremove', 'copy' and 'rename' commands now
      warn if a file has a name that can't be checked out on Windows.
      
      Example:
      
        $ hg add con.xml
        warning: filename contains 'con', which is reserved on Windows: 'con.xml'
        $ hg status
        A con.xml
      
      The file is added despite the warning.
      
      The warning is ON by default. It can be suppressed by setting the config option
      'portablefilenames' in section 'ui' to 'ignore' or 'false':
      
        $ hg --config ui.portablefilenames=ignore add con.xml
        $ hg sta
        A con.xml
      
      If ui.portablefilenames is set to 'abort', then the command is aborted:
      
        $ hg --config ui.portablefilenames=abort add con.xml
        abort: filename contains 'con', which is reserved on Windows: 'con.xml'
      
      On Windows, the ui.portablefilenames config setting is irrelevant and the
      command is always aborted if a problematic filename is found.
      8b252e826c68
  35. Sep 02, 2010
    • Martin Geisler's avatar
      tests: remove unneeded -d flags · 4c94b6d0fb1c
      Martin Geisler authored
      Many tests fixed the commit date of their changesets at '1000000 0' or
      similar. However testing with "Mon Jan 12 13:46:40 1970 +0000" is not
      better than testing with "Thu Jan 01 00:00:00 1970 +0000", which is
      the default run-tests.py installs.
      
      Removing the unnecessary flag removes some clutter and will hopefully
      make it clearer what the tests are really trying to test. Some tests
      did not even change their output when the dates were changed, in which
      case the -d flag was truly irrelevant.
      
      Dates used in sequence (such as '0 0', '1 0', etc...) were left alone
      since they may make the test easier to understand.
      4c94b6d0fb1c
Loading