Skip to content
Snippets Groups Projects
  1. Oct 18, 2017
  2. Oct 06, 2017
  3. Oct 17, 2017
    • Pulkit Goyal's avatar
      rebase: add support to output nodechanges · c858afe9
      Pulkit Goyal authored
      This patch adds support to rebase to show the changes in node once the rebase is
      complete. This will be extremely helpful for automation purposes and editors
      such as Nuclide.
      
      The output is a dictionary of predecessor hash as key and a list of successors'
      hashes. The successors one is a list as there can be many successors for a single
      predecessor in case of split and it will good to have a generic output format.
      
      This patch adds tests for the same. A new file is created for the patch as
      existing files related to rebase has their own purpose and there will be more
      formatter support coming for rebase in next cycle.
      
      Thanks to Jun for suggesting to use fm.data().
      
      Differential Revision: https://phab.mercurial-scm.org/D1173
      c858afe9
    • Saurabh Singh's avatar
      ui: move request exit handlers to global state · e9f320a4
      Saurabh Singh authored
      Since the ui objects can be created with the 'load' class method, it
      is possible to lose the exit handlers information from the old ui instance. For
      example, running 'test-bad-extension.t' leads to this situation where chg
      creates a new ui instance which does not copy the exit handlers from the
      earlier ui instance. For exit handlers, which are special cases anyways, it
      probably makes sense to have a global state of the handlers. This would ensure
      that the exit handlers registered once are definitely executed at the end of
      the request.
      
      Test Plan:
      Ran all the tests without '--chg' option. This also fixes the
      'test-bad-extension.t' with the '--chg' option.
      
      Differential Revision: https://phab.mercurial-scm.org/D1166
      e9f320a4
  4. Oct 18, 2017
    • Paul Morelle's avatar
      sparse-read: skip gaps too small to be worth splitting · 8c9b08a0
      Paul Morelle authored
      Splitting at too small gaps might not be worthwhile. With this changeset,
      we stop considering splitting on too small gaps. The threshold is configurable.
      We arbitrarily pick 256K as a default value because it seems "okay".
      Further testing on various repositories and setups will be needed to tune it.
      
      The option name is 'experimental.sparse-read.min-gap-size`, and replaces
      `experimental.sparse-read.min-block-size` which is not used any more.
      8c9b08a0
    • Boris Feld's avatar
      sparse-read: move from a recursive-based approach to a heap-based one · 9e18ab7f
      Boris Feld authored
      The previous recursive approach was trying to optimise each read slice to have
      a good density. It had the tendency to over-optimize smaller slices while
      leaving larger hole in others.
      
      The new approach focuses on improving the combined density of all the reads,
      instead of the individual slices. It slices at the largest gaps first, as they
      reduce the total amount of read data the most efficiently.
      
      Another benefit of this approach is that we iterate over the delta chain only
      once, reducing the overhead of slicing long delta chains.
      
      On the repository we use for tests, the new approach shows similar or faster
      performance than the current default linear full read.
      
      The repository contains about 450,000 revisions with many concurrent
      topological branches. Tests have been run on two versions of the repository:
      one built with the current delta constraint, and the other with an unlimited
      delta span (using 'experimental.maxdeltachainspan=0')
      
      Below are timings for building 1% of all the revision in the manifest log using
      'hg perfrevlogrevisions -m'. Times are given in seconds. They include the new
      couple of follow-up changeset in this series.
      
      delta-span  standard    unlimited
      linear-read     922s         632s
      sparse-read     814s         566s
      9e18ab7f
    • Matt Harbison's avatar
      subrepo: implement 'unshare' for Mercurial subrepos · 7d51a779
      Matt Harbison authored
      I think there's a slight hole here in that a subrepo could be shared, removed
      from .hgsub, and then it's not part of context.substate (so not iterated over).
      But the push command has the same hole IIRC, and I think removing a subrepo is
      an edge case.
      
      The import hack is a copy/paste of subrepo.subrepo().
      7d51a779
    • Matt Harbison's avatar
      share: move the implementation of 'unshare' to the 'hg' module · 9f7ecc5b
      Matt Harbison authored
      This will be used to setup unsharing subrepos.  Usually cmdutil is used for
      this purpose.  But the implementation needs hg.copystore(), and the hg module
      already imports cmdutil.
      9f7ecc5b
  5. Oct 17, 2017
  6. Oct 18, 2017
  7. Oct 17, 2017
  8. Sep 28, 2017
    • Boris Feld's avatar
      config: use 'experimental.evolution.exchange' · 44797aed
      Boris Feld authored
      Extract 'experimental.evolution' = exchange as
      'experimental.evolution.exchange'.
      
      We keep the new option in the 'experimental.evolution' namespace in order to
      stay coherent with other options ('experimental.evolution.bundle-obsmarker'
      and 'experimental.evolution.track-operation') ease the renaming as possibly
      'evolution.exchange'.
      
      Differential Revision: https://phab.mercurial-scm.org/D1151
      44797aed
    • Boris Feld's avatar
      config: use 'experimental.evolution.allowunstable' · 7f183c64
      Boris Feld authored
      Extract 'experimental.evolution' = allowunstable as
      'experimental.evolution.allowunstable'.
      
      We keep the new option in the 'experimental.evolution' namespace in order to
      stay coherent with other options ('experimental.evolution.bundle-obsmarker'
      and 'experimental.evolution.track-operation') ease the renaming as possibly
      'evolution.allowunstable'.
      
      Differential Revision: https://phab.mercurial-scm.org/D1150
      7f183c64
    • Boris Feld's avatar
      config: use 'experimental.evolution.create-markers' · 1644623a
      Boris Feld authored
      Extract 'experimental.evolution' = createmarkers as
      'experimental.evolution.createmarkers'.
      
      We keep the new option in the 'experimental.evolution' namespace in order to
      stay coherent with other options ('experimental.evolution.bundle-obsmarker'
      and 'experimental.evolution.track-operation') ease the renaming as possibly
      'evolution.createmarkers'.
      
      Differential Revision: https://phab.mercurial-scm.org/D1149
      1644623a
  9. Oct 17, 2017
  10. Oct 16, 2017
  11. Apr 21, 2015
  12. Sep 14, 2015
  13. Oct 16, 2017
  14. Oct 17, 2017
    • Denis Laxalde's avatar
      log: add -L/--line-range option to follow file history by line range · 84c6b938
      Denis Laxalde authored
      We add an experimental -L/--line-range option to 'hg log' taking file patterns
      along with a line range using the (new) FILE,FROMLINE-TOLINE syntax where FILE
      may be a pattern (matching exactly one file). The resulting history is similar
      to what the "followlines" revset except that, if --patch is specified,
      only diff hunks within specified line range are shown.
      
      Basically, this brings the CLI on par with what currently only exists in hgweb
      through line selection in "file" and "annotate" views resulting in a file log
      with filtered patch to only display followed line range.
      
      The option may be specified multiple times and can be combined with --rev and
      regular file patterns to further restrict revisions. Usage of this option
      requires --follow; revisions are shown in descending order and renames are
      followed. Only the --graph option is currently not supported.
      
      The UI is the result of a consensus from review feedback at:
      
        https://www.mercurial-scm.org/pipermail/mercurial-devel/2017-October/106749.html
      
      
      The implementation spreads between commands.log() and cmdutil module.
      In commands.log(), the main loop may now use a "hunksfilter" factory (similar
      to "filematcher") that, for a given "rev", produces a filtering function
      for diff hunks for a given file context object.
      The logic to build revisions from -L/--line-range options lives in
      cmdutil.getloglinerangerevs() which produces "revs", "filematcher" and
      "hunksfilter" information. Revisions obtained by following files' line range
      are filtered if they do not match the revset specified by --rev option. If
      regular FILE arguments are passed along with -L options, both filematchers are
      combined into a new matcher.
      
      .. feature::
      
         Add an experimental -L/--line-range FILE,FROMLINE-TOLINE option to 'hg log'
         command to follow the history of files by line range. In combination with
         -p/--patch option, only diff hunks within specified line range will be
         displayed. Feedback, especially on UX aspects, is welcome.
      84c6b938
  15. Oct 06, 2017
  16. Oct 05, 2017
  17. Oct 04, 2017
  18. Oct 06, 2017
    • Boris Feld's avatar
      obsfate: add obsfate to default mapfile · 962f7df2
      Boris Feld authored
      Use the verbosity aware template keyword introduced earlier. It has the nice
      property of being verbosity dependent but in order to customize the obsfate
      part, users will need to replace the lobsfate definition from default mapfile
      with the one using template functions (by copying the one from test-obsmarker-
      template.t for example).
      
      As it's a more advanced use-case, I'm more inclined to have the same code for
      the {obsfate} keyword, in the changeset printer and in the default mapfile for
      consistency.
      
      But, the definition in default mapfile could be replaced with one based on
      template filter to obsfate output customization if it is a big need for users.
      962f7df2
  19. Oct 05, 2017
    • Boris Feld's avatar
      log: add obsfate by default in changeset printer · d45236f3
      Boris Feld authored
      Having an obsfate by default in log will be useful for users to understand why
      they have obsolete and unstable changesets. Obsfate will only be shown for
      obsolete changesets, which only happens if people opt-in to experimental feature.
      
      But when obsolete changeset are visible, it is very useful to understand where
      they are. Having it in log could be sufficient for most people, so they don't
      have to learn a new command (like obslog which is itself useful in case of
      divergences).
      
      For example, when pulling and working directory parent become obsolete:
      
        $ hg pull
        ...
        working directory parent is obsolete! (f936c1697205)
      
      This message comes from the Evolve extension.
      
      Obsfate would comes handy:
      
        $ hg log -G
        o  changeset:   2:6f91013c5136
        |  tag:         tip
        |  parent:      0:4ef7b558f3ec
        |  user:        Boris Feld <boris.feld@octobus.net>
        |  date:        Mon Oct 09 16:00:27 2017 +0200
        |  summary:     A
        |
        | @  changeset:   1:f936c1697205
        |/   user:        Boris Feld <boris.feld@octobus.net>
        |    date:        Mon Oct 09 16:00:27 2017 +0200
        |    obsfate:     rewritten using amend as 2:6f91013c5136
        |    summary:     -A
        |
        o  changeset:   0:feb4dd822b8c
           user:        Boris Feld <boris.feld@octobus.net>
           date:        Tue Oct 09 16:00:00 2017 +0200
           summary:     ROOT
      
      And once we update, we don't have an obsolete changeset in the log anymore so
      we don't show obsfate anymore, most users won't see obsfate often if they
      don't have obsolete changeset often:
      
        @  changeset:   2:6f91013c5136
        |  tag:         tip
        |  parent:      0:4ef7b558f3ec
        |  user:        Boris Feld <boris.feld@octobus.net>
        |  date:        Mon Oct 09 16:00:27 2017 +0200
        |  summary:     A
        |
        o  changeset:   0:feb4dd822b8c
           user:        Boris Feld <boris.feld@octobus.net>
           date:        Tue Oct 09 16:00:00 2017 +0200
           summary:     ROOT
      d45236f3
Loading