Skip to content
Snippets Groups Projects
  1. Jun 13, 2016
  2. Jun 15, 2016
  3. Jun 14, 2016
  4. Jun 13, 2016
  5. Jun 12, 2016
    • Katsunori FUJIWARA's avatar
      transaction: avoid ambiguity of file stat at restoring from backup · a9ccd9af
      Katsunori FUJIWARA authored
      In some cases below, copying from backup is used to restore original
      contents of a file, which is backuped via addfilegenerator(). If
      copying keeps ctime, mtime and size of a file, restoring is
      overlooked, and old contents cached before restoring isn't invalidated
      as expected.
      
        - failure of transaction (from '.hg/journal.backup.*')
        - rollback of previous transaction (from '.hg/undo.backup.*')
      
      To avoid ambiguity of file stat at restoring, this patch invokes
      util.copyfile() with checkambig=True.
      
      This patch is a part of "Exact Cache Validation Plan":
      
          https://www.mercurial-scm.org/wiki/ExactCacheValidationPlan
      a9ccd9af
    • Katsunori FUJIWARA's avatar
      localrepo: make restoring from backup at rollback avoid ambiguity of file stat · 37c7f9fb
      Katsunori FUJIWARA authored
      Rollback of previous transaction restores contents of files below by
      renaming from 'undo.*' file. If renaming keeps ctime, mtime and size
      of a file, restoring is overlooked, and old contents cached before
      restoring isn't invalidated as expected.
      
        - .hg/bookmarks
        - .hg/phaseroots
      
      To avoid ambiguity of file stat at restoring, this patch invokes
      vfs.rename() with checkambig=True.
      
      BTW, .hg/dirstate is also restored at rollback. But it is restored by
      dirstate.restorebackup(), and previous patch already made it invoke
      vfs.rename() with checkambig=True.
      
      This patch is a part of "Exact Cache Validation Plan":
      
          https://www.mercurial-scm.org/wiki/ExactCacheValidationPlan
      37c7f9fb
    • Katsunori FUJIWARA's avatar
      dirstate: make restoring from backup avoid ambiguity of file stat · bebe7d1c
      Katsunori FUJIWARA authored
      File .hg/dirstate is restored by renaming from backup in failure
      inside scopes below. If renaming keeps ctime, mtime and size of a
      file, restoring is overlooked, and old contents cached before
      restoring isn't invalidated as expected.
      
        - dirstateguard scope (from '.hg/dirstate.SUFFIX')
        - transaction scope (from '.hg/journal.dirstate')
      
      To avoid ambiguity of file stat at restoring, this patch invokes
      vfs.rename() with checkambig=True.
      
      This patch is a part of "Exact Cache Validation Plan":
      
          https://www.mercurial-scm.org/wiki/ExactCacheValidationPlan
      bebe7d1c
  6. Jun 11, 2016
  7. Jun 14, 2016
  8. Jun 13, 2016
    • Martijn Pieters's avatar
      revset: add new topographical sort · 2188f170
      Martijn Pieters authored
      Sort revisions in reverse revision order but grouped by topographical branches.
      Visualised as a graph, instead of:
      
        o  4
        |
        | o  3
        | |
        | o  2
        | |
        o |  1
        |/
        o  0
      
      revisions on a 'main' branch are emitted before 'side' branches:
      
        o  4
        |
        o  1
        |
        | o  3
        | |
        | o  2
        |/
        o  0
      
      where what constitutes a 'main' branch is configurable, so the sort could also
      result in:
      
        o  3
        |
        o  2
        |
        | o  4
        | |
        | o  1
        |/
        o  0
      
      This sort was already available as an experimental option in the graphmod
      module, from which it is now removed.
      
      This sort is best used with hg log -G:
      
        $ hg log -G "sort(all(), topo)"
      2188f170
    • Martijn Pieters's avatar
      revset: move groupbranchiter over from graphmod · 98535ad4
      Martijn Pieters authored
      This move is to prepare the adaptation of this function into a toposort
      predicate.
      98535ad4
  9. Jun 14, 2016
  10. Jun 13, 2016
    • Jun Wu's avatar
      chg: make timeout adjustable · 62b89049
      Jun Wu authored
      Before this patch, chg will give up when it cannot connect to the new server
      within 10 seconds. If the host has high load during that time, 10 seconds
      is not enough.
      
      This patch makes it adjustable using the CHGTIMEOUT environment variable.
      62b89049
  11. Jun 11, 2016
    • Jun Wu's avatar
      chg: exec pager in child process · bb3d5c20
      Jun Wu authored
      Before this patch, chg uses the old pager behavior (pre 369741ef7253), which
      executes pager in the main process. The user will see the exit code of the
      pager, instead of the hg command.
      
      Like 369741ef7253, this patch fixes the behavior by executing the pager in
      the child process, and wait for it at the end of the main process.
      bb3d5c20
  12. Jun 13, 2016
  13. Jun 10, 2016
  14. Jun 08, 2016
    • Martijn Pieters's avatar
      graphmod: avoid sorting when already sorted · 63161726
      Martijn Pieters authored
      This is somewhat redundant now, but allows us to add a toposort that should not
      be re-sorted either.
      63161726
    • Gregory Szorc's avatar
      sslutil: per-host config option to define certificates · ecc9b788
      Gregory Szorc authored
      Recent work has introduced the [hostsecurity] config section for
      defining per-host security settings. This patch builds on top
      of this foundation and implements the ability to define a per-host
      path to a file containing certificates used for verifying the server
      certificate. It is logically a per-host web.cacerts setting.
      
      This patch also introduces a warning when both per-host
      certificates and fingerprints are defined. These are mutually
      exclusive for host verification and I think the user should be
      alerted when security settings are ambiguous because, well,
      security is important.
      
      Tests validating the new behavior have been added.
      
      I decided against putting "ca" in the option name because a
      non-CA certificate can be specified and used to validate the server
      certificate (commonly this will be the exact public certificate
      used by the server). It's worth noting that the underlying
      Python API used is load_verify_locations(cafile=X) and it calls
      into OpenSSL's SSL_CTX_load_verify_locations(). Even OpenSSL's
      documentation seems to omit that the file can contain a non-CA
      certificate if it matches the server's certificate exactly. I
      thought a CA certificate was a special kind of x509 certificate.
      Perhaps I'm wrong and any x509 certificate can be used as a
      CA certificate [as far as OpenSSL is concerned]. In any case,
      I thought it best to drop "ca" from the name because this reflects
      reality.
      ecc9b788
  15. May 27, 2016
  16. May 31, 2016
  17. Jun 07, 2016
  18. Jun 09, 2016
  19. Jun 07, 2016
  20. Jun 01, 2016
  21. Jun 04, 2016
    • Pulkit Goyal's avatar
      py3: conditionalize cPickle import by adding in util · b5015791
      Pulkit Goyal authored
      The cPickle is renamed to _pickle in python3 and this C extension is available
       in pickle which was not included in earlier versions. So imports are conditionalized
       to import cPickle in py2 and pickle in py3. Moreover the use of pickle in py2 is
       switched to cPickle as the C extension is faster. The hack is added in util.py and
      the modules import util.pickle
      b5015791
  22. Jun 02, 2016
    • Matt Mackall's avatar
      bdiff: remove effectively dead code · d29cb5e7
      Matt Mackall authored
      Now that we extend matches backwards in the inner loop, the final
      adjustment has no effect.
      
      (A similar extension for the forward direction is trickier and has
      less benefit.)
      d29cb5e7
    • Matt Mackall's avatar
      bdiff: extend matches across popular lines · 66dbdd3c
      Matt Mackall authored
      For very large diffs that have large numbers of identical lines (JSON
      dumps) that also have large blocks of identical text, bdiff could become
      confused about which block matches which because it can only match
      very limited regions. The result is very large diffs for small sets of edits.
      
      The earlier recursion rebalancing fix made this behavior more frequent because
      it's now more prone to match block 1 to block 2. One frequent user of
      large JSON files reported being unable to pass the resulting diffs
      through their code review system.
      
      Prior to this change, bdiff would calculate the length of a match at
      (i, j) as 1 + length found at (i-1, j-1). With large number of popular
      (ignored) lines, this often meant matches couldn't be extended
      backwards at all and thus all matching regions were very small.
      Disabling the popularity threshold is not an option because it brings
      back quadratic behavior.
      
      Instead, we extend a match backwards until we either found a previously
      discovered match or we find a mismatching line. This thus successfully
      bridges over any popular lines inside and before a matching region.
      The larger regions then significant reduce the probability of confusion.
      66dbdd3c
Loading