Skip to content
Snippets Groups Projects
  1. May 15, 2016
  2. May 06, 2016
    • Gregory Szorc's avatar
      sslutil: require serverhostname argument (API) · 7424f429
      Gregory Szorc authored
      All callers now specify it. So we can require it.
      
      Requiring the argument means SNI will always work if supported
      by Python.
      
      The main reason for this change is to store state on the socket
      instance to make the validation function generic. This will be
      evident in subsequent commits.
      7424f429
  3. May 18, 2016
    • Matt Mackall's avatar
      annotate: optimize line counting · c04ad3d3
      Matt Mackall authored
      We used len(text.splitlines()) to count lines. This allocates, copies, and
      deallocates an object for every line in a file. Instead, we use
      count("\n") to count newlines and adjust based on whether there's a
      trailing newline.
      
      This improves the speed of annotating localrepo.py from 4.2 to 4.0
      seconds.
      c04ad3d3
  4. May 16, 2016
    • Gregory Szorc's avatar
      purge: use opts.get() · ed4bd789
      Gregory Szorc authored
      Most commands use opts.get() to retrieve values for options
      that may not be explicitly passed. purge wasn't.
      
      This makes it easier to call purge() from 3rd party extensions.
      ed4bd789
  5. May 11, 2016
  6. May 09, 2016
    • liscju's avatar
      largefiles: send statlfile remote calls only for nonexisting locally files · fd288d11
      liscju authored
      Files that are already in local store should be checked locally. The problem
      with this implementation is how difference in messages between local and remote
      checks should look like. For now local errors for file missing and content
      corrupted looks like this:
      
      'changeset cset: filename references missing storepath\n'
      'changeset cset: filename references corrupted storepath\n'
      
      for remote it looks like:
      
      'changeset cset: filename missing\n'
      'changeset cset: filename: contents differ\n'
      
      Contents differ error for remote calls is never raised currently - for now
      statlfile implementation lacks checking file content.
      fd288d11
  7. May 16, 2016
  8. May 07, 2016
  9. May 14, 2016
  10. May 18, 2016
    • Katsunori FUJIWARA's avatar
      util: make copyfile avoid ambiguity of file stat if needed · ce2d81aa
      Katsunori FUJIWARA authored
      In some cases below, copying from backup is used to restore original
      contents of a file. 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 before closing (from '.hg/journal.backup.*')
        - rollback of previous transaction (from '.hg/undo.backup.*')
      
      To avoid such problem, this patch makes copyfile() avoid ambiguity of
      file stat, if needed.
      
      Ambiguity check is executed, only if:
      
        - checkambig=True is specified (not all copying needs ambiguity check), and
        - destination file exists before copying
      
      This patch also adds 'not (copystat and checkambig)' assertion,
      because combination of copystat and checkambig is meaningless.
      
      This patch is a part of preparation for "Exact Cache Validation Plan":
      
          https://www.mercurial-scm.org/wiki/ExactCacheValidationPlan
      ce2d81aa
    • Katsunori FUJIWARA's avatar
      vfs: make rename avoid ambiguity of file stat if needed · 731ced08
      Katsunori FUJIWARA authored
      In some cases below, renaming from backup is used to restore original
      contents of a 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.
      
        - failure of transaction before closing (only from '.hg/journal.dirstate')
        - rollback of previous transaction (from '.hg/undo.*')
        - failure in dirstateguard scope (from '.hg/dirstate.SUFFIX')
      
      To avoid such problem, this patch makes vfs.rename() avoid ambiguity
      of file stat, if needed.
      
      Ambiguity check is executed, only if:
      
        - checkambig=True is specified (not all renaming needs ambiguity check), and
        - destination file exists before renaming
      
      This patch is a part of preparation for "Exact Cache Validation Plan":
      
          https://www.mercurial-scm.org/wiki/ExactCacheValidationPlan
      731ced08
    • Katsunori FUJIWARA's avatar
      vfs: make atomictempfile avoid ambiguity of file stat if needed · 76f1ea36
      Katsunori FUJIWARA authored
      This patch is a part of preparation for "Exact Cache Validation Plan":
      
          https://www.mercurial-scm.org/wiki/ExactCacheValidationPlan
      76f1ea36
    • Katsunori FUJIWARA's avatar
      util: make atomictempfile avoid ambiguity of file stat if needed · a109bf7e
      Katsunori FUJIWARA authored
      Ambiguity check is executed at close(), only if:
      
        - atomictempfile is created with checkambig=True, and
        - target file exists before renaming
      
      This restriction avoids performance decrement by needless examination
      of file stat (for example, filelog doesn't need exact cache
      validation, even though it uses atomictempfile to write changes out).
      
      See description of filestat class for detail about why the logic in
      this patch works as expected.
      
      This patch is a part of preparation for "Exact Cache Validation Plan":
      
          https://www.mercurial-scm.org/wiki/ExactCacheValidationPlan
      a109bf7e
    • Katsunori FUJIWARA's avatar
      util: add filestat class to detect ambiguity of file stat · ca406502
      Katsunori FUJIWARA authored
      Current posix.cachestat implementation might overlook change of a
      file, if changing keeps ctime, mtime and size of file. Comparison of
      inode number also overlooks changing in such situation, because inode
      number is rapidly reused.
      
      Contents of a file cached before changing isn't invalidated as
      expected, if change of a file is overlooked for this "ambiguity" of
      file stat.
      
      This patch adds filestat class to detect ambiguity of file stat.
      
      This patch is a part of preparation for "Exact Cache Validation Plan":
      
          https://www.mercurial-scm.org/wiki/ExactCacheValidationPlan
      ca406502
  11. May 05, 2016
    • timeless's avatar
      run-tests: handle json.dumps divergence · daff05dc
      timeless authored
      In py2, json.dumps includes a trailing space after a comma at the
      end of lines. The py3 behavior which omits the trailing space is
      preferable, so we're going to strip it.
      daff05dc
  12. May 10, 2016
  13. May 15, 2016
  14. May 17, 2016
  15. May 11, 2016
  16. May 13, 2016
Loading