Skip to content
Snippets Groups Projects
  1. Feb 04, 2018
    • Matt Harbison's avatar
      lfs: prefetch lfs blobs during revert · d857cad588e4
      Matt Harbison authored
      The revert command oddly prints out what it will do before requesting the files
      to be prefetched.  But the 'need to transfer' line indicates the blobs are being
      grouped.
      d857cad588e4
    • Matt Harbison's avatar
      cmdutil: convert _revertprefetch() to a generic stored file hook (API) · efbd04238029
      Matt Harbison authored
      This will be used by LFS to fetch required files in a group for multiple
      commands, prior to being accessed.  That avoids the one-at-a-time fetch when the
      filelog wrapper goes to access it, and it is missing locally (which costs two
      round trips to the server.)  The core command list that needs this is probably
      at least:
      
        - annotate
        - archive (which is also used by extdiff)
        - cat
        - diff
        - export
        - grep
        - verify (sadly)
        - anything that has the '{data}' template
      
      There are no core users of the revert prefetch hook, and never have been since
      it was introduced in 45e02cfad4bd for remotefilelog.  Thanks to Yuya for
      figuring out a way to reliably trigger the deprecated warning.  Unfortunately,
      it wanted to blame the caller of revert.  Passing along an adjusted stack level
      seemed the least bad choice (although it still blames a core function).
      
      One thing to note is that the store lock isn't being held when this is called.
      I'm not at all familiar with remotefilelog or its locking requirements, so this
      may not be a big deal.  Currently, LFS doesn't hold a lock when downloading
      files.  Even though largefiles doesn't either, I'm starting to think it should,
      and maybe the .hg/store/lock isn't good enough to cover the globally shared
      cache.
      
      .. api::
      
         The cmdutil._revertprefetch() hook point for prefetching stored files has
         been replaced by the command agnostic cmdutil._prefetchfiles().  The new
         function takes a list of files, instead of a list of lists of files.
      efbd04238029
    • Matt Harbison's avatar
      lfs: prefetch lfs blobs when applying merge updates · 0b79f99fd7b0
      Matt Harbison authored
      In addition to merge, this method ultimately gets called by many commands:
      
        - backout
        - bisect
        - clone
        - fetch
        - graft
        - import (without --bypass)
        - pull -u
        - rebase
        - strip
        - share
        - transplant
        - unbundle
        - update
      
      Additionally, it's also called by histedit, shelve, unshelve, and split, but it
      seems that the related blobs should always be available locally for these.
      
      For `hg update`, it happens after the normal argument checking and pre-update
      hook processing, and remote corruption is detected prior to manipulating the
      working directory.  Other commands could use this treatment (archive, cat,
      revert, etc), but this covers so many of the frequently used bulk commands, it
      seems like a good starting point.
      
      Losing the verbose message that prints the file name before a corrupt blob
      aborts the command is a little sad, because there's no easy way to go from oid
      to file name.  I'd like to change that message to list the file name so it looks
      cleaner and less cryptic, but the pointer object is nowhere near where it needs
      to be to do this.  So punt on that for now.
      0b79f99fd7b0
  2. Jan 27, 2018
  3. Feb 05, 2018
  4. Dec 29, 2017
  5. Feb 05, 2018
  6. Feb 04, 2018
  7. Feb 05, 2018
  8. Jan 20, 2018
    • Kyle Lippincott's avatar
      merge: use operation-provided labels (ex: dest/source) in several merge-tools · a9802c9ecfb5
      Kyle Lippincott authored
      Tools that did not use labels already, used only one, or used some label other
      than the exact strings of "local" or "other" were unmodified.  Cases that used
      the label "base" were modified as well, if they were otherwise changed in this
      CL; "merged" was *not* changed.
      
      There are other possible changes we might want to make, but I didn't:
      - bcompare (linux and osx) uses the labels "parent1" and "parent2" instead of
        "local" and "other", so it was left alone, even though beyondcompare3
        (windows) *was* changed.
      - araxis used the labels "Other", "Base", and "Local :$local", so it was also
        left alone.
      - UltraCompare didn't provide a label for 'local', just for 'base' and 'other',
        so it was left alone.
      
      Differential Revision: https://phab.mercurial-scm.org/D2012
      a9802c9ecfb5
  9. Jan 18, 2018
    • Kyle Lippincott's avatar
      filemerge: support passing labels to external merge tools · 9037c29e9f53
      Kyle Lippincott authored
      This adds $labellocal, $labelother, and $labelbase to the replacement set for
      merge-tools.<tool>.args config variables, and to the environment as HG_MY_LABEL,
      HG_OTHER_LABEL, and HG_BASE_LABEL, respectively.
      
      We also add merge-tools.<tool>.mergemarkers and
      merge-tools.<tool>.mergemarkertemplate config variables as counterparts of
      the variables available in [ui]. We are intentionally *not* respecting
      ui.mergemarkers when calling out to external merge programs; too often the
      default template will be too wide to display comfortably in most GUIs.
      
      Differential Revision: https://phab.mercurial-scm.org/D2011
      9037c29e9f53
  10. Feb 03, 2018
  11. Jan 27, 2018
  12. Feb 03, 2018
  13. Jan 25, 2018
  14. Jan 21, 2018
    • Yuya Nishihara's avatar
      cmdutil: drop aliases for logcmdutil functions (API) · c8e2d6ed1f9e
      Yuya Nishihara authored
      .. api::
      
         Log-related utility functions has been renamed as follows:
      
          - cmdutil.loglimit -> logcmdutil.getlimit
          - cmdutil.diffordiffstat -> logcmdutil.diffordiffstat
          - cmdutil._changesetlabels -> logcmdutil.changesetlabels
          - cmdutil.changeset_printer -> logcmdutil.changesetprinter
          - cmdutil.jsonchangeset = logcmdutil.jsonchangeset
          - cmdutil.changeset_templater -> logcmdutil.changesettemplater
          - cmdutil.logtemplatespec -> logcmdutil.templatespec
          - cmdutil.makelogtemplater -> logcmdutil.maketemplater
          - cmdutil.show_changeset -> logcmdutil.changesetdisplayer
          - cmdutil.getlogrevs -> logcmdutil.getrevs
          - cmdutil.getloglinerangerevs -> logcmdutil.getlinerangerevs
          - cmdutil.displaygraph -> logcmdutil.displaygraph
          - cmdutil.graphlog -> logcmdutil.graphlog
          - cmdutil.checkunsupportedgraphflags -> logcmdutil.checkunsupportedgraphflags
          - cmdutil.graphrevs -> logcmdutil.graphrevs
          - cmdutil._makenofollowlogfilematcher -> logcmdutil._makenofollowfilematcher
      c8e2d6ed1f9e
    • Yuya Nishihara's avatar
      logcmdutil: drop redundant "log" from function names (API) · 572f36e9a780
      Yuya Nishihara authored
      A few exceptions:
      
      - s/loglimit/getlimit/ to avoid name conflict
      - s/_logrevs/_initialrevs/ to clarify its functionality
      572f36e9a780
    • Yuya Nishihara's avatar
      logcmdutil: rename classes and functions to conform to our coding style (API) · b0014780c7fc
      Yuya Nishihara authored
      show_changeset is renamed to changesetdisplayer as its return value is called
      a displayer.
      b0014780c7fc
    • Yuya Nishihara's avatar
      cmdutil: split functions of log-like commands to new module (API) · 7625b4f7db70
      Yuya Nishihara authored
      cmdutil.py is painfully big and makes Emacs slow. Let's split log-related
      functions.
      
        % wc -l mercurial/cmdutil.py
        4027 mercurial/cmdutil.py
      
        % wc -l mercurial/cmdutil.py mercurial/logcmdutil.py
        3141 mercurial/cmdutil.py
         933 mercurial/logcmdutil.py
        4074 total
      7625b4f7db70
Loading