Skip to content
Snippets Groups Projects
  1. Aug 12, 2014
  2. Aug 11, 2014
    • Matt Mackall's avatar
      run-tests: attempt to fix iolock handling · 70bdf59d
      Matt Mackall authored
      Ideally, when using -j and -i together, when a prompt comes up, we'd
      like all other output to wait (but testing to continue!). This gets
      other output to wait by adding back a bunch of the locking that
      formerly existed. We switch to a recursive lock to deal with the
      restructuring due to unittest compatibility.
      
      Running tests continue to run, but now the scheduler doesn't schedule
      any new tasks while waiting at a prompt because no task slots become
      available due to result output happening in the thread and
      blocking on the iolock.
      70bdf59d
    • Matt Mackall's avatar
      merge with stable · fff8e1ce
      Matt Mackall authored
      fff8e1ce
  3. Aug 03, 2014
  4. Jun 25, 2014
    • Pierre-Yves David's avatar
      test-revert: improve comment · 9ed5e105
      Pierre-Yves David authored
      We highlight the behavior tested by each sections. (This is a gratuitous
      improvement before significant upgrade of the test and massive refactoring of
      the revert code)
      9ed5e105
  5. Aug 11, 2014
    • Katsunori FUJIWARA's avatar
      largefiles: synchronize lfdirstate with dirstate after automated committing · 2fb3c1c0
      Katsunori FUJIWARA authored
      Before this patch, after successful "hg rebase" of the revision
      removing largefiles, "hg status" may still show ""R" for such
      largefiles unexpectedly.
      
      "lfilesrepo.commit" executes the special code path for automated
      committing while rebase/transplant, and lfdirstate entries for removed
      files aren't updated in this code path, even after successful
      committing.
      
      Then, "R" entries still existing in lfdirstate cause unexpected "hg
      status" output.
      
      This patch synchronizes lfdirstate with dirstate after automated
      committing.
      
      This patch passes False as "normallookup" to "synclfdirstate", because
      modified files in "files()" of the recent (= just committed) context
      should be "normal"-ed.
      
      This is a temporary way to fix with less changes. For fundamental
      resolution of this kind of problems in the future, lfdirstate should
      be updated with dirstate simultaneously. Hooking "markcommitted" of
      ctx in "localrepository.commitctx" may achieve this.
      
      This problem occurs, only when (1) the parent of the working directory
      is rebased and (2) it removes largefiles, because:
      
        - if the parent of the working directory isn't rebased, returning to
          the initial revision (= update) after rebase hides this problem
      
        - files added on "other" branch (= rebase target) are treated not as
          "added" but as "modified" (= "normal" status and "unset"
          timestamp) at merging
      
      This patch tests also the status of added largefile, but it is only
      for avoiding regression.
      
      In addition to conditions above, "hg status" must not take existing
      files to reproduce this problem, because existing files make
      "match._files" not empty in "lfilesrepo.status" code path below:
      
          def sfindirstate(f):
              sf = lfutil.standin(f)
              dirstate = self.dirstate
              return sf in dirstate or sf in dirstate.dirs()
      
          match._files = [f for f in match._files
                          if sfindirstate(f)]
      
      Not empty "match._files" prevents "status" on lfdirstate from
      returning the result containing problematic "R" files.
      
      This is reason why "large1" (removed) and "largeX" (added) are checked
      separately in this patch.
      
      Problematic code path in "lfilesrepo.commit" is used also by "hg
      transplant", but this problem doesn't occur at "hg transplant",
      because invocation of "updatelfiles" after transplant-ing in
      "overridetransplant" causes cleaning lfdirstate up.
      
      This patch tests also "hg transplant" as same as "hg rebase", but it
      is only for avoiding regression.
      2fb3c1c0
    • Katsunori FUJIWARA's avatar
      largefiles: drop orphan entries from lfdristat at "hg rollback" · 7d1eac06
      Katsunori FUJIWARA authored
      Before this patch, newly added (but not yet committed) largefiles
      aren't treated as unknown ("?") after "hg rollback".
      
      After "hg rollback", lfdirstate still contains "A" status entries for
      such largefiles, even though corresponding entries for standins are
      already dropped from dirstate.
      
      Such "orphan" entries in lfdirstate prevent unknown (large)files in
      the working directory from being listed up in "unknown" list. The code
      path in "if working" route of "lfilesrepo.status" below drops
      largefiles tracked in lfdirstate from "unknown" list:
      
          lfiles = set(lfdirstate._map)
          # Unknown files
          result[4] = set(result[4]).difference(lfiles)
      
      This patch drops orphan entries from lfdristate at "hg rollback".
      
      This is a temporary way to fix with less changes. For fundamental
      resolution of this kind of problems in the future, lfdirstate should
      be rollback-ed as a part of transaction, as same as dirstate.
      7d1eac06
    • Katsunori FUJIWARA's avatar
      largefiles: restore R status of removed largefiles correctly at "hg rollback" · 61e52658
      Katsunori FUJIWARA authored
      Before this patch, removed or forgotten largefiles aren't treated as
      removed ("R") after "hg rollback". Removed ones are treated as missing
      ("!") and forgotten ones are treated as clean ("C") unexpectedly.
      
      "overriderollback" uses "normallookup" to restore status in lfdirstate
      for largefiles other than ones not added in rollback-ed revision, but
      this isn't correct for removed (or forgotten) largefiles.
      
      This patch uses "lfutil.synclfdirstate" to restore "R" status of
      removed (or forgotten) largefiles correctly at "hg rollback".
      
      This is a temporary way to fix with less changes. For fundamental
      resolution of this kind of problems in the future, lfdirstate should
      be rollback-ed as a part of transaction, as same as dirstate.
      61e52658
    • Katsunori FUJIWARA's avatar
    • Katsunori FUJIWARA's avatar
      largefiles: put whole rollback-ing process into the same "wlock" scope · 7d706547
      Katsunori FUJIWARA authored
      Before this patch, there are three distinct "wlock" scopes in
      "overriderollback":
      
        1. "localrepository.rollback" via original "rollback" command,
        2. "merge.update" for reverting standin files only, and
        3. "overriderollback" specific "wlock" scope (to synchronize
           largefile dirstate)
      
      But these should be executed in the same "wlock" scope for
      consistency.
      7d706547
    • Matt Mackall's avatar
      tests: use a decorator for hghave checks · 45611a30
      Matt Mackall authored
      45611a30
    • Matt Mackall's avatar
    • Matt Mackall's avatar
      unbundle: don't advance bookmarks (issue4322) (BC) · f72b71ba
      Matt Mackall authored
      This behavior didn't make much sense and interacts badly with things
      that use unbundle internally like shelve. Presumably, the original
      rationale was that since bundles didn't contain bookmarks, this gave a
      sense of keeping bookmarks up-to-date like would happen with a
      corresponding pull. However, since it only updated the current active
      bookmark, and bare update already did that anyway, this is pretty
      slim.
      
      Notably, the corresponding test actually works better without this
      feature.
      f72b71ba
  6. Aug 10, 2014
  7. Aug 09, 2014
  8. Aug 08, 2014
  9. Aug 07, 2014
    • Pierre-Yves David's avatar
      phase: attach phase to the transaction instead of the lock · 37f46575
      Pierre-Yves David authored
      The phase cache file is no longer written on lock release, it is now handled by
      the transaction (as changesets and obsolescence markers are).
      
      (Hooray)
      
      As we stop relying on the lock to write phase, repos with no existing phase
      information will need to wait for a phase move or a strip to happen in order to
      get the first write in the `phaseroots` file. This explain the change in
      test-inherit-mode.t.
      
      This should not have any side effects but in very obscure cases where
      people interact with pre-2.1 and post-2.1 versions of Mercurial on the
      same repo while having MQ patches applied but the MQ extension
      disabled from time to time. A case unlikely enough to not be worth
      preserving the old behavior with awful hacks.
      37f46575
    • Pierre-Yves David's avatar
      phase: extract the phaseroots serialization in a dedicated method · 5dcc5864
      Pierre-Yves David authored
      In most case, the file creation logic will be handled by the
      transaction itself. The write method has to stay around for the case
      where the repository is modified outside a transaction (strip).
      5dcc5864
    • Pierre-Yves David's avatar
      transaction: add a file generation mechanism · feb4797c
      Pierre-Yves David authored
      A new `transaction.addfilegenerator` function is added. It allows external code
      to register files to be generated. See inline documentation for details.
      
      It is important to gather all file creation logic on the transaction
      as at some point we'll want to mimic the "pre-transaction-commit"
      logic that we use for revlog. I'm refering to the logic that lets
      hooks see the result of the transaction before it actually gets
      committed.
      feb4797c
    • Pierre-Yves David's avatar
      transaction: backup file in a dedicated "namespace" · 2990ce46
      Pierre-Yves David authored
      File backup may conflict with other "journal.*" file. We add a fixed part in the
      backup name file to prevent it.
      2990ce46
    • Pierre-Yves David's avatar
      transaction: use `self.journal` to create backup file · e59b5e59
      Pierre-Yves David authored
      Transaction journal name is "journal" in most case, but it can be something else.
      We use the appropriate attribute to create the file.
      e59b5e59
  10. Jun 18, 2014
  11. Jul 26, 2014
    • Sean Farley's avatar
      memfilectx: add remove and write methods · fbe967b0
      Sean Farley authored
      Similar to the previous patch for workingfilectx, this patch will allow
      abstracting localrepo.remove / write method to refactor working directory code
      but instead operate on files in memory.
      fbe967b0
  12. Jul 02, 2014
  13. Jul 26, 2014
  14. Aug 07, 2014
    • durin42's avatar
      test-patchbomb.t: work around Python change d579866d6419 (issue4188) · f8fc5df6
      durin42 authored
      Python 2.7.7 and later (as well as some ubuntu/debian packages of
      2.7.6) include a fix that makes the email module more pedantically
      correct for MIME boundaries, but this breaks our tests. We work around
      this by filtering the output of any 'hg email' invocations in the test
      that produce MIME messages.
      f8fc5df6
  15. Aug 06, 2014
    • Pierre-Yves David's avatar
      phase: add a transaction argument to retractboundary · c1ca4720
      Pierre-Yves David authored
      We now pass a transaction option to this phase movement function. The
      object is currently not used by the function, but it will be in the
      future.
      
      All call sites have been updated. Most call sites were already enclosed in a
      transaction for a long time. The handful of others have been recently
      updated in previous commit.
      c1ca4720
    • Pierre-Yves David's avatar
      phase: add a transaction argument to advanceboundary · 616a455b
      Pierre-Yves David authored
      We now pass a transaction option to this phase movement function. The object
      is currently not used by the function, but it will be in the future.
      
      All call sites have been updated. Most call sites were already enclosed in a
      transaction for a long time. The handful of others have been recently
      updated in previous commit.
      
      The retractboundary function remains to be upgraded.
      616a455b
    • Pierre-Yves David's avatar
      pull: pre-filter remote phases before moving local ones · d34058dd
      Pierre-Yves David authored
      We were relying on the phase internals to filter out redundant phase
      information from remove. However as we plan to integrate phase
      movement inside the transaction, we want to avoid useless transaction
      creation on no-op pulls.
      
      Therefore we filter out all the information that already matches the current
      repository state. This will let us create a transaction only when there is
      actual phase movement needed.
      d34058dd
Loading