Skip to content
Snippets Groups Projects
  1. Jun 16, 2016
    • Martin von Zweigbergk's avatar
      changegroup: don't send empty subdirectory manifest groups · 1b699c7eb2b7
      Martin von Zweigbergk authored
      When grafting/rebasing, it is common for multiple changesets to make
      the same change to a subdirectory. When writing the revlog for the
      directory, the revlog code already takes care of not writing the entry
      again. In 0c2a088ffcc5 (changegroup: prune subdirectory dirlogs too,
      2016-02-12), I added the corresponding code in changegroup (not
      sending entries the client already has), but I forgot to avoid sending
      the entire changegroup if no nodes remained in the pruned
      set. Although that's harmless besides the wasted network traffic, the
      receiving side was checking for it (copied from the changegroup code
      for handling files). This resulted in the client crashing with:
      
        abort: received dir revlog group is empty
      
      Fix by simply not emitting a changegroup for the directory if there
      were no changes is it. This matches how files are handled.
      1b699c7eb2b7
  2. Jun 15, 2016
  3. Jun 12, 2016
  4. Jun 11, 2016
  5. Jun 15, 2016
  6. Jun 11, 2016
  7. Jun 15, 2016
  8. Jun 13, 2016
  9. Jun 15, 2016
  10. Jun 14, 2016
  11. Jun 13, 2016
  12. Jun 12, 2016
    • Katsunori FUJIWARA's avatar
      transaction: avoid ambiguity of file stat at restoring from backup · a9ccd9af48ef
      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
      a9ccd9af48ef
    • Katsunori FUJIWARA's avatar
      localrepo: make restoring from backup at rollback avoid ambiguity of file stat · 37c7f9fb7040
      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
      37c7f9fb7040
    • Katsunori FUJIWARA's avatar
      dirstate: make restoring from backup avoid ambiguity of file stat · bebe7d1c38c8
      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
      bebe7d1c38c8
  13. Jun 11, 2016
  14. Jun 14, 2016
  15. Jun 13, 2016
    • Martijn Pieters's avatar
      revset: add new topographical sort · 2188f170f5b6
      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)"
      2188f170f5b6
    • Martijn Pieters's avatar
      revset: move groupbranchiter over from graphmod · 98535ad46fc0
      Martijn Pieters authored
      This move is to prepare the adaptation of this function into a toposort
      predicate.
      98535ad46fc0
  16. Jun 14, 2016
  17. Jun 13, 2016
    • Jun Wu's avatar
      chg: make timeout adjustable · 62b890496de5
      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.
      62b890496de5
  18. Jun 11, 2016
    • Jun Wu's avatar
      chg: exec pager in child process · bb3d5c20eaf6
      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.
      bb3d5c20eaf6
  19. Jun 13, 2016
  20. Jun 10, 2016
  21. Jun 08, 2016
    • Martijn Pieters's avatar
      graphmod: avoid sorting when already sorted · 631617262e55
      Martijn Pieters authored
      This is somewhat redundant now, but allows us to add a toposort that should not
      be re-sorted either.
      631617262e55
    • Gregory Szorc's avatar
      sslutil: per-host config option to define certificates · ecc9b788fd69
      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.
      ecc9b788fd69
  22. May 27, 2016
Loading