Skip to content
Snippets Groups Projects
  1. Aug 20, 2016
  2. Oct 13, 2016
    • Gábor Stefanik's avatar
      mergecopies: invoke _computenonoverlap for both base and tca during merges · 0accd5a5ad04
      Gábor Stefanik authored
      The algorithm of _checkcopies can only walk backwards in the DAG, never
      forward. Because of this, the two _checkcopies patches need to run from
      their respective endpoints to the TCA to cover the entire subgraph where
      the merge is being performed. However, detection of files new in both
      endpoints, as well as directory rename detection, need to run with respect
      to the merge base, so we need lists of new files both from the TCA's and
      the merge base's viewpoint to correctly detect renames in a graft-like
      merge scenario.
      
      (Series reworked by Pierre-Yves David)
      0accd5a5ad04
  3. Oct 17, 2016
  4. Oct 13, 2016
    • Gábor Stefanik's avatar
      copies: make _checkcopies handle simple renames in a rotated DAG · 88626de195f8
      Gábor Stefanik authored
      This introduces a distinction between "merge base" and
      "topological common ancestor". During a regular merge, these two are
      identical. Graft, however, performs a merge in a rotated DAG, where the
      merge base will not be a common ancestor at all in the
      original DAG.
      
      To correctly find copies in case of a graft, we need to take both the
      merge base and the topological CA into account, and track any renames
      between them in reverse. Fortunately we can detect this in advance,
      see comment in the code about "backwards".
      
      This patch only supports finding non-divergent renames contained entirely
      between the merge base and the topological CA. Further patches are coming
      to support more complex cases.
      
      (Pierre-Yves David was involved in the cleanup of this patch.)
      88626de195f8
    • Gábor Stefanik's avatar
      copies: compute a suitable TCA if base turns out to be unsuitable · 8c69c52ced98
      Gábor Stefanik authored
      This will be used later in an update to _checkcopies.
      
      (Pierre-Yves David was involved in the cleanup of this patch.)
      8c69c52ced98
  5. Oct 12, 2016
    • Gábor Stefanik's avatar
      copies: detect graft-like merges · 368e27eb1ffa
      Gábor Stefanik authored
      Right now, nothing changes as a result of this, but we want to handle
      grafts differently from ordinary merges later.
      
      (Series developed together with Pierre-Yves David)
      368e27eb1ffa
    • Gábor Stefanik's avatar
      tests: introduce tests for grafting through renames · 509d29255c04
      Gábor Stefanik authored
      These cover all currently known cases of renames being grafted,
      or changes being grafted through renames.
      
      Right now, most of these cases are broken. Later patches in this series
      will make them behave correctly.
      
      The testcases heavily rely on each other, which would make it very difficult
      to separate them and add them one-by-one for each case fixed by a patch.
      Separating them should perhaps be a 4.1 task, if it doesn't slow down
      the tests too much.
      
      (Developed together with Pierre-Yves David)
      509d29255c04
    • Gábor Stefanik's avatar
      checkcopies: add a sanity check against false-positive copies · 8a864844d5a0
      Gábor Stefanik authored
      When grafting a copy backwards through a rename, a copy is wrongly detected,
      which causes the graft to be applied inappropriately, in a destructive way.
      Make sure that the old file name really exists in the common ancestor,
      and bail out if it doesn't.
      
      This fixes the aggravated case of bug 5343, although the basic issue
      (failure to duplicate the copy information) still occurs.
      8a864844d5a0
  6. Oct 16, 2016
    • Gregory Szorc's avatar
      exchange: refactor APIs to obtain bundle data (API) · 3e86261bf110
      Gregory Szorc authored
      Currently, exchange.getbundle() returns either a cg1unpacker or a
      util.chunkbuffer (in the case of bundle2). This is kinda OK, as
      both expose a .read() to consumers. However, localpeer.getbundle()
      has code inferring what the response type is based on arguments and
      converts the util.chunkbuffer returned in the bundle2 case to a
      bundle2.unbundle20 instance. This is a sign that the API for
      exchange.getbundle() is not ideal because it doesn't consistently
      return an "unbundler" instance.
      
      In addition, unbundlers mask the fact that there is an underlying
      generator of changegroup data. In both cg1 and bundle2, this generator
      is being fed into a util.chunkbuffer so it can be re-exposed as a
      file object.
      
      util.chunkbuffer is a nice abstraction. However, it should only be
      used "at the edges." This is because keeping data as a generator is
      more efficient than converting it to a chunkbuffer, especially if we
      convert that chunkbuffer back to a generator (as is the case in some
      code paths currently).
      
      This patch refactors exchange.getbundle() into
      exchange.getbundlechunks(). The new API returns an iterator of chunks
      instead of a file-like object.
      
      Callers of exchange.getbundle() have been updated to use the new API.
      
      There is a minor change of behavior in test-getbundle.t. This is
      because `hg debuggetbundle` isn't defining bundlecaps. As a result,
      a cg1 data stream and unpacker is being produced. This is getting fed
      into a new bundle20 instance via bundle2.writebundle(), which uses
      a backchannel mechanism between changegroup generation to add the
      "nbchanges" part parameter. I never liked this backchannel mechanism
      and I plan to remove it someday. `hg bundle` still produces the
      "nbchanges" part parameter, so there should be no user-visible
      change of behavior. I consider this "regression" a bug in
      `hg debuggetbundle`. And that bug is captured by an existing
      "TODO" in the code to use bundle2 capabilities.
      3e86261bf110
  7. Oct 12, 2016
  8. Oct 11, 2016
  9. Oct 13, 2016
    • Mads Kiilerich's avatar
      cmdutil: satisfy expections in dirstateguard.__del__, even if __init__ fails · 144d8fe266d9
      Mads Kiilerich authored
      Python "delstructors" are terrible - this one because it assumed that __init__
      had completed before it was called. That would not necessarily be the case if
      the repository was read only or broken and saving the dirstate thus failed in
      unexpected ways. That could give confusing warnings about missing '_active'
      after failures.
      
      To fix that, make sure all member variables are "declared" before doing
      anything that possibly could fail. [Famous last words.]
      144d8fe266d9
    • Mads Kiilerich's avatar
      util: increase filechunkiter size to 128k · 7356e6b1f5b8
      Mads Kiilerich authored
      util.filechunkiter has been using a chunk size of 64k for more than 10 years,
      also in years where Moore's law still was a law. It is probably ok to bump it
      now and perhaps get a slight win in some cases.
      
      Also, largefiles have been using 128k for a long time. Specifying that size
      multiple times (or forgetting to do it) seems a bit stupid. Decreasing it to
      64k also seems unfortunate.
      
      Thus, we will set the default chunksize to 128k and use the default everywhere.
      7356e6b1f5b8
  10. Oct 12, 2016
    • Mads Kiilerich's avatar
      largefiles: always use filechunkiter when iterating files · 736f92c44656
      Mads Kiilerich authored
      Before, we would sometimes use the default iterator over large files. That
      iterator is line based and would add extra buffering and use odd chunk sizes
      which could give some overhead.
      
      copyandhash can't just apply a filechunkiter as it sometimes is passed a
      genuine generator when downloading remotely.
      736f92c44656
  11. Oct 14, 2016
  12. Oct 10, 2016
    • Yuya Nishihara's avatar
      revset: make follow() reject more than one start revisions · d61c42c1a35c
      Yuya Nishihara authored
      Taking only the last revision is inconsistent because ancestors(set) follows
      all revisions given, and theoretically follow(startrev=set) == ancestors(set).
      I'm planning to add a support for multiple start revisions, but that won't fit
      to the 4.0 time frame. So reject multiple revisions now to avoid future BC.
      
      len(revs) might be slow if revs were large, but we don't care since a valid
      revs should have only one element.
      d61c42c1a35c
  13. Oct 16, 2016
    • Gregory Szorc's avatar
      bundle2: only emit compressed chunks if they have data · 9626022feaa4
      Gregory Szorc authored
      This is similar to 58467204cac0. Not all calls into the compressor
      return compressed data, as the compressor may buffer compressed
      output internally. It is cheaper to check for empty chunks than to
      send empty chunks through the generator.
      
      When generating a gzip-v2 bundle of the mozilla-unified repo, this
      change results in 50,093 empty chunks not being sent through the
      generator (out of 1,902,996 total input chunks).
      9626022feaa4
  14. Oct 15, 2016
  15. Oct 13, 2016
    • Danek Duvall's avatar
      color: debugcolor should emit the user-defined colors · 8915c68f3eba
      Danek Duvall authored
      This also fixes a long-standing bug that reversed the sense of the color
      name and the label used to print it, which was never relevant before.
      8915c68f3eba
    • Danek Duvall's avatar
      color: ignore effects missing from terminfo · 5d777fe4615d
      Danek Duvall authored
      If terminfo mode is in effect, and an effect is used which is missing from
      the terminfo database, simply silently ignore the request, leaving the
      output unaffected rather than causing a crash.
      5d777fe4615d
    • Danek Duvall's avatar
      color: allow for user-configurable terminfo codes for effects · f34a8cff51d9
      Danek Duvall authored
      If the entry in the terminfo database for your terminal is missing some
      attributes, it should be possible to create them on the fly without
      resorting to just making them a color.  This change allows you to have
      
          [color]
          terminfo.<effect> = <code>
      
      where <effect> might be something like "dim" or "bold", and <code> is the
      escape sequence that would otherwise have come from a call to tigetstr().
      If an escape character is needed, use "\E".  Any such settings will
      override attributes that are present in the terminfo database.
      f34a8cff51d9
  16. Oct 04, 2016
    • Stanislau Hlebik's avatar
      update: warn if cwd was deleted · 90a6c18a7c1d
      Stanislau Hlebik authored
      During update directories are deleted as soon as they have no entries.
      But if current working directory is deleted then it cause problems
      in complex commands like 'hg split'. This commit adds a warning
      that will help users figure the problem faster.
      90a6c18a7c1d
  17. Oct 13, 2016
  18. Oct 14, 2016
  19. Oct 13, 2016
  20. Oct 12, 2016
  21. Oct 08, 2016
  22. Oct 12, 2016
  23. Oct 14, 2016
    • Philippe Pepiot's avatar
      commit: return 1 for interactive commit with no changes (issue5397) · df224038c516
      Philippe Pepiot authored
      For consistency with non interactive commit
      df224038c516
    • Mads Kiilerich's avatar
      demandimport: disable lazy import of __builtin__ · 75c71c533977
      Mads Kiilerich authored
      Demandimport uses the "try to import __builtin__, else use builtins" trick to
      handle Python 3. External libraries and extensions might do something similar.
      On Fedora 25 subversion-python-1.9.4-4.fc25.x86_64 will do just that (except
      the opposite) ... and it failed all subversion convert tests because
      demandimport was hiding that it didn't have builtins but should use
      __builtin__.
      
      The builtin module has already been imported when demandimport is loaded so
      there is no point in trying to import it on demand. Just always ignore both
      variants in demandimport.
      75c71c533977
Loading