contrib/vim/patchreview.txt
author Martin von Zweigbergk <martinvonz@google.com>
Wed, 03 Apr 2019 16:03:41 -0700
changeset 42093 edbcf5b239f9
parent 26098 ce26928cbe41
permissions -rw-r--r--
config: read configs from directories in lexicographical order Mercurial currently reads the .rc files specified in HGRCPATH (and the system-default paths) in directory order, which is unspecified. My team at work maintains a set of .rc files. So far there has been no overlap between them, so we had not noticed this behavior. However, we would now like to release some common .rc files and then have another one per plaform with platform-specific overrides. It would be nice if we can determine the load order by choosing names carefully. This patch enables that by loading the .rc files in lexicographical order. Before this patch, the added test case would consistently say "30" on my file system (whatever I have -- some Linux FS). Differential Revision: https://phab.mercurial-scm.org/D6193
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
10545
b9e4a67329cd Updated contrib/vim/patchreview.* to version 0.2.1
Manpreet Singh <junkblocker@yahoo.com>
parents: 2350
diff changeset
     1
*patchreview.txt* Vim global plugin for doing single, multi-patch or diff code reviews
10550
8036bc1871c2 Updated contrib/vim/patchreview.* to version 0.2.2
Manpreet Singh <junkblocker@yahoo.com>
parents: 10545
diff changeset
     2
                  Version  v0.2.2 (for Vim version 7.0 or higher)
2350
091d555653a4 contrib: patch review plugin for vim 7.0
Manpreet Singh <junkblocker@yahoo.com>
parents:
diff changeset
     3
10545
b9e4a67329cd Updated contrib/vim/patchreview.* to version 0.2.1
Manpreet Singh <junkblocker@yahoo.com>
parents: 2350
diff changeset
     4
            Author: Manpreet Singh < junkblocker@yahoo.com >
b9e4a67329cd Updated contrib/vim/patchreview.* to version 0.2.1
Manpreet Singh <junkblocker@yahoo.com>
parents: 2350
diff changeset
     5
            Copyright (C) 2006-2010 by Manpreet Singh
2350
091d555653a4 contrib: patch review plugin for vim 7.0
Manpreet Singh <junkblocker@yahoo.com>
parents:
diff changeset
     6
            License : This file is placed in the public domain.
091d555653a4 contrib: patch review plugin for vim 7.0
Manpreet Singh <junkblocker@yahoo.com>
parents:
diff changeset
     7
091d555653a4 contrib: patch review plugin for vim 7.0
Manpreet Singh <junkblocker@yahoo.com>
parents:
diff changeset
     8
=============================================================================
091d555653a4 contrib: patch review plugin for vim 7.0
Manpreet Singh <junkblocker@yahoo.com>
parents:
diff changeset
     9
10545
b9e4a67329cd Updated contrib/vim/patchreview.* to version 0.2.1
Manpreet Singh <junkblocker@yahoo.com>
parents: 2350
diff changeset
    10
CONTENTS	                 *patchreview* *diffreview* *patchreview-contents*
2350
091d555653a4 contrib: patch review plugin for vim 7.0
Manpreet Singh <junkblocker@yahoo.com>
parents:
diff changeset
    11
091d555653a4 contrib: patch review plugin for vim 7.0
Manpreet Singh <junkblocker@yahoo.com>
parents:
diff changeset
    12
  1. Contents.........................................: |patchreview-contents|
091d555653a4 contrib: patch review plugin for vim 7.0
Manpreet Singh <junkblocker@yahoo.com>
parents:
diff changeset
    13
  2. Introduction.....................................: |patchreview-intro|
091d555653a4 contrib: patch review plugin for vim 7.0
Manpreet Singh <junkblocker@yahoo.com>
parents:
diff changeset
    14
  3. PatchReview options..............................: |patchreview-options|
091d555653a4 contrib: patch review plugin for vim 7.0
Manpreet Singh <junkblocker@yahoo.com>
parents:
diff changeset
    15
  4. PatchReview Usage................................: |patchreview-usage|
10545
b9e4a67329cd Updated contrib/vim/patchreview.* to version 0.2.1
Manpreet Singh <junkblocker@yahoo.com>
parents: 2350
diff changeset
    16
     4.1 DiffReview Usage.............................: |:DiffReview|
b9e4a67329cd Updated contrib/vim/patchreview.* to version 0.2.1
Manpreet Singh <junkblocker@yahoo.com>
parents: 2350
diff changeset
    17
     4.2 PatchReview Usage............................: |:PatchReview|
2350
091d555653a4 contrib: patch review plugin for vim 7.0
Manpreet Singh <junkblocker@yahoo.com>
parents:
diff changeset
    18
091d555653a4 contrib: patch review plugin for vim 7.0
Manpreet Singh <junkblocker@yahoo.com>
parents:
diff changeset
    19
=============================================================================
091d555653a4 contrib: patch review plugin for vim 7.0
Manpreet Singh <junkblocker@yahoo.com>
parents:
diff changeset
    20
091d555653a4 contrib: patch review plugin for vim 7.0
Manpreet Singh <junkblocker@yahoo.com>
parents:
diff changeset
    21
PatchReview Introduction                                  *patchreview-intro*
091d555653a4 contrib: patch review plugin for vim 7.0
Manpreet Singh <junkblocker@yahoo.com>
parents:
diff changeset
    22
10545
b9e4a67329cd Updated contrib/vim/patchreview.* to version 0.2.1
Manpreet Singh <junkblocker@yahoo.com>
parents: 2350
diff changeset
    23
The Patch Review plugin allows easy single or multipatch code or diff reviews.
b9e4a67329cd Updated contrib/vim/patchreview.* to version 0.2.1
Manpreet Singh <junkblocker@yahoo.com>
parents: 2350
diff changeset
    24
b9e4a67329cd Updated contrib/vim/patchreview.* to version 0.2.1
Manpreet Singh <junkblocker@yahoo.com>
parents: 2350
diff changeset
    25
It opens each affected file in the patch or in a workspace diff in a diff view
b9e4a67329cd Updated contrib/vim/patchreview.* to version 0.2.1
Manpreet Singh <junkblocker@yahoo.com>
parents: 2350
diff changeset
    26
in a separate tab.
b9e4a67329cd Updated contrib/vim/patchreview.* to version 0.2.1
Manpreet Singh <junkblocker@yahoo.com>
parents: 2350
diff changeset
    27
b9e4a67329cd Updated contrib/vim/patchreview.* to version 0.2.1
Manpreet Singh <junkblocker@yahoo.com>
parents: 2350
diff changeset
    28
VIM provides the |:diffpatch| and related commands to do single file reviews
b9e4a67329cd Updated contrib/vim/patchreview.* to version 0.2.1
Manpreet Singh <junkblocker@yahoo.com>
parents: 2350
diff changeset
    29
but can not handle patch files containing multiple patches as is common with
b9e4a67329cd Updated contrib/vim/patchreview.* to version 0.2.1
Manpreet Singh <junkblocker@yahoo.com>
parents: 2350
diff changeset
    30
software development projects. This plugin provides that missing
b9e4a67329cd Updated contrib/vim/patchreview.* to version 0.2.1
Manpreet Singh <junkblocker@yahoo.com>
parents: 2350
diff changeset
    31
functionality.
b9e4a67329cd Updated contrib/vim/patchreview.* to version 0.2.1
Manpreet Singh <junkblocker@yahoo.com>
parents: 2350
diff changeset
    32
26098
ce26928cbe41 spelling: behaviour -> behavior
timeless@mozdev.org
parents: 10550
diff changeset
    33
It also improves on |:diffpatch|'s behavior of creating the patched files in
2350
091d555653a4 contrib: patch review plugin for vim 7.0
Manpreet Singh <junkblocker@yahoo.com>
parents:
diff changeset
    34
the same directory as original file which can lead to project workspace
091d555653a4 contrib: patch review plugin for vim 7.0
Manpreet Singh <junkblocker@yahoo.com>
parents:
diff changeset
    35
pollution.
091d555653a4 contrib: patch review plugin for vim 7.0
Manpreet Singh <junkblocker@yahoo.com>
parents:
diff changeset
    36
10550
8036bc1871c2 Updated contrib/vim/patchreview.* to version 0.2.2
Manpreet Singh <junkblocker@yahoo.com>
parents: 10545
diff changeset
    37
It does automatic diff generation for various version control systems by
8036bc1871c2 Updated contrib/vim/patchreview.* to version 0.2.2
Manpreet Singh <junkblocker@yahoo.com>
parents: 10545
diff changeset
    38
running their diff command.
8036bc1871c2 Updated contrib/vim/patchreview.* to version 0.2.2
Manpreet Singh <junkblocker@yahoo.com>
parents: 10545
diff changeset
    39
2350
091d555653a4 contrib: patch review plugin for vim 7.0
Manpreet Singh <junkblocker@yahoo.com>
parents:
diff changeset
    40
=============================================================================
091d555653a4 contrib: patch review plugin for vim 7.0
Manpreet Singh <junkblocker@yahoo.com>
parents:
diff changeset
    41
091d555653a4 contrib: patch review plugin for vim 7.0
Manpreet Singh <junkblocker@yahoo.com>
parents:
diff changeset
    42
PatchReview Options                                     *patchreview-options*
091d555653a4 contrib: patch review plugin for vim 7.0
Manpreet Singh <junkblocker@yahoo.com>
parents:
diff changeset
    43
10550
8036bc1871c2 Updated contrib/vim/patchreview.* to version 0.2.2
Manpreet Singh <junkblocker@yahoo.com>
parents: 10545
diff changeset
    44
  g:patchreview_patch = {string}
8036bc1871c2 Updated contrib/vim/patchreview.* to version 0.2.2
Manpreet Singh <junkblocker@yahoo.com>
parents: 10545
diff changeset
    45
      Optional path to patch binary. PatchReview tries to locate patch on
8036bc1871c2 Updated contrib/vim/patchreview.* to version 0.2.2
Manpreet Singh <junkblocker@yahoo.com>
parents: 10545
diff changeset
    46
      system path automatically. If the binary is not on system path, this
8036bc1871c2 Updated contrib/vim/patchreview.* to version 0.2.2
Manpreet Singh <junkblocker@yahoo.com>
parents: 10545
diff changeset
    47
      option tell PatchReview the full path to the binary.  This option, if
8036bc1871c2 Updated contrib/vim/patchreview.* to version 0.2.2
Manpreet Singh <junkblocker@yahoo.com>
parents: 10545
diff changeset
    48
      specified, overrides the default patch binary on the path.
10545
b9e4a67329cd Updated contrib/vim/patchreview.* to version 0.2.1
Manpreet Singh <junkblocker@yahoo.com>
parents: 2350
diff changeset
    49
b9e4a67329cd Updated contrib/vim/patchreview.* to version 0.2.1
Manpreet Singh <junkblocker@yahoo.com>
parents: 2350
diff changeset
    50
    examples:
10550
8036bc1871c2 Updated contrib/vim/patchreview.* to version 0.2.2
Manpreet Singh <junkblocker@yahoo.com>
parents: 10545
diff changeset
    51
        (On Windows with Cygwin) >
8036bc1871c2 Updated contrib/vim/patchreview.* to version 0.2.2
Manpreet Singh <junkblocker@yahoo.com>
parents: 10545
diff changeset
    52
           let g:patchreview_patch = 'c:\\cygwin\\bin\\patch.exe'
10545
b9e4a67329cd Updated contrib/vim/patchreview.* to version 0.2.1
Manpreet Singh <junkblocker@yahoo.com>
parents: 2350
diff changeset
    53
<
b9e4a67329cd Updated contrib/vim/patchreview.* to version 0.2.1
Manpreet Singh <junkblocker@yahoo.com>
parents: 2350
diff changeset
    54
        (On *nix systems) >
10550
8036bc1871c2 Updated contrib/vim/patchreview.* to version 0.2.2
Manpreet Singh <junkblocker@yahoo.com>
parents: 10545
diff changeset
    55
           let g:patchreview_patch = '/usr/bin/gpatch'
10545
b9e4a67329cd Updated contrib/vim/patchreview.* to version 0.2.1
Manpreet Singh <junkblocker@yahoo.com>
parents: 2350
diff changeset
    56
<
b9e4a67329cd Updated contrib/vim/patchreview.* to version 0.2.1
Manpreet Singh <junkblocker@yahoo.com>
parents: 2350
diff changeset
    57
b9e4a67329cd Updated contrib/vim/patchreview.* to version 0.2.1
Manpreet Singh <junkblocker@yahoo.com>
parents: 2350
diff changeset
    58
  g:patchreview_filterdiff = {string}
b9e4a67329cd Updated contrib/vim/patchreview.* to version 0.2.1
Manpreet Singh <junkblocker@yahoo.com>
parents: 2350
diff changeset
    59
      Optional path to filterdiff binary. PatchReview tries to locate
b9e4a67329cd Updated contrib/vim/patchreview.* to version 0.2.1
Manpreet Singh <junkblocker@yahoo.com>
parents: 2350
diff changeset
    60
      filterdiff on system path automatically. If the binary is not on system
b9e4a67329cd Updated contrib/vim/patchreview.* to version 0.2.1
Manpreet Singh <junkblocker@yahoo.com>
parents: 2350
diff changeset
    61
      path, this option tell PatchReview the full path to the binary.  This
b9e4a67329cd Updated contrib/vim/patchreview.* to version 0.2.1
Manpreet Singh <junkblocker@yahoo.com>
parents: 2350
diff changeset
    62
      option, if specified, overrides the default filterdiff binary on the
b9e4a67329cd Updated contrib/vim/patchreview.* to version 0.2.1
Manpreet Singh <junkblocker@yahoo.com>
parents: 2350
diff changeset
    63
      path.
2350
091d555653a4 contrib: patch review plugin for vim 7.0
Manpreet Singh <junkblocker@yahoo.com>
parents:
diff changeset
    64
091d555653a4 contrib: patch review plugin for vim 7.0
Manpreet Singh <junkblocker@yahoo.com>
parents:
diff changeset
    65
     examples:
091d555653a4 contrib: patch review plugin for vim 7.0
Manpreet Singh <junkblocker@yahoo.com>
parents:
diff changeset
    66
        (On Windows with Cygwin)
10545
b9e4a67329cd Updated contrib/vim/patchreview.* to version 0.2.1
Manpreet Singh <junkblocker@yahoo.com>
parents: 2350
diff changeset
    67
>
2350
091d555653a4 contrib: patch review plugin for vim 7.0
Manpreet Singh <junkblocker@yahoo.com>
parents:
diff changeset
    68
           let g:patchreview_filterdiff = 'c:\\cygwin\\bin\\filterdiff.exe'
10545
b9e4a67329cd Updated contrib/vim/patchreview.* to version 0.2.1
Manpreet Singh <junkblocker@yahoo.com>
parents: 2350
diff changeset
    69
<
2350
091d555653a4 contrib: patch review plugin for vim 7.0
Manpreet Singh <junkblocker@yahoo.com>
parents:
diff changeset
    70
        (On *nix systems)
10545
b9e4a67329cd Updated contrib/vim/patchreview.* to version 0.2.1
Manpreet Singh <junkblocker@yahoo.com>
parents: 2350
diff changeset
    71
>
2350
091d555653a4 contrib: patch review plugin for vim 7.0
Manpreet Singh <junkblocker@yahoo.com>
parents:
diff changeset
    72
           let g:patchreview_filterdiff = '/usr/bin/filterdiff'
10545
b9e4a67329cd Updated contrib/vim/patchreview.* to version 0.2.1
Manpreet Singh <junkblocker@yahoo.com>
parents: 2350
diff changeset
    73
<
2350
091d555653a4 contrib: patch review plugin for vim 7.0
Manpreet Singh <junkblocker@yahoo.com>
parents:
diff changeset
    74
=============================================================================
091d555653a4 contrib: patch review plugin for vim 7.0
Manpreet Singh <junkblocker@yahoo.com>
parents:
diff changeset
    75
091d555653a4 contrib: patch review plugin for vim 7.0
Manpreet Singh <junkblocker@yahoo.com>
parents:
diff changeset
    76
PatchReview Usage                                          *patchreview-usage*
10545
b9e4a67329cd Updated contrib/vim/patchreview.* to version 0.2.1
Manpreet Singh <junkblocker@yahoo.com>
parents: 2350
diff changeset
    77
                                                                *:DiffReview*
b9e4a67329cd Updated contrib/vim/patchreview.* to version 0.2.1
Manpreet Singh <junkblocker@yahoo.com>
parents: 2350
diff changeset
    78
b9e4a67329cd Updated contrib/vim/patchreview.* to version 0.2.1
Manpreet Singh <junkblocker@yahoo.com>
parents: 2350
diff changeset
    79
  :DiffReview
b9e4a67329cd Updated contrib/vim/patchreview.* to version 0.2.1
Manpreet Singh <junkblocker@yahoo.com>
parents: 2350
diff changeset
    80
b9e4a67329cd Updated contrib/vim/patchreview.* to version 0.2.1
Manpreet Singh <junkblocker@yahoo.com>
parents: 2350
diff changeset
    81
    Perform a diff review in the current directory under version control.
b9e4a67329cd Updated contrib/vim/patchreview.* to version 0.2.1
Manpreet Singh <junkblocker@yahoo.com>
parents: 2350
diff changeset
    82
    Currently supports Mercurial (hg), Subversion (svn), CVS, Bazaar (bzr) and
b9e4a67329cd Updated contrib/vim/patchreview.* to version 0.2.1
Manpreet Singh <junkblocker@yahoo.com>
parents: 2350
diff changeset
    83
    Monotone.
b9e4a67329cd Updated contrib/vim/patchreview.* to version 0.2.1
Manpreet Singh <junkblocker@yahoo.com>
parents: 2350
diff changeset
    84
2350
091d555653a4 contrib: patch review plugin for vim 7.0
Manpreet Singh <junkblocker@yahoo.com>
parents:
diff changeset
    85
                                                                *:PatchReview*
091d555653a4 contrib: patch review plugin for vim 7.0
Manpreet Singh <junkblocker@yahoo.com>
parents:
diff changeset
    86
091d555653a4 contrib: patch review plugin for vim 7.0
Manpreet Singh <junkblocker@yahoo.com>
parents:
diff changeset
    87
  :PatchReview patchfile_path [optional_source_directory]
091d555653a4 contrib: patch review plugin for vim 7.0
Manpreet Singh <junkblocker@yahoo.com>
parents:
diff changeset
    88
091d555653a4 contrib: patch review plugin for vim 7.0
Manpreet Singh <junkblocker@yahoo.com>
parents:
diff changeset
    89
    Perform a patch review in the current directory based on the supplied
091d555653a4 contrib: patch review plugin for vim 7.0
Manpreet Singh <junkblocker@yahoo.com>
parents:
diff changeset
    90
    patchfile_path. If optional_source_directory is specified, patchreview is
10545
b9e4a67329cd Updated contrib/vim/patchreview.* to version 0.2.1
Manpreet Singh <junkblocker@yahoo.com>
parents: 2350
diff changeset
    91
    done on that directory. Otherwise, the current directory is assumed to be
2350
091d555653a4 contrib: patch review plugin for vim 7.0
Manpreet Singh <junkblocker@yahoo.com>
parents:
diff changeset
    92
    the source directory.
10545
b9e4a67329cd Updated contrib/vim/patchreview.* to version 0.2.1
Manpreet Singh <junkblocker@yahoo.com>
parents: 2350
diff changeset
    93
b9e4a67329cd Updated contrib/vim/patchreview.* to version 0.2.1
Manpreet Singh <junkblocker@yahoo.com>
parents: 2350
diff changeset
    94
    Only supports context or unified format patches.
b9e4a67329cd Updated contrib/vim/patchreview.* to version 0.2.1
Manpreet Singh <junkblocker@yahoo.com>
parents: 2350
diff changeset
    95
b9e4a67329cd Updated contrib/vim/patchreview.* to version 0.2.1
Manpreet Singh <junkblocker@yahoo.com>
parents: 2350
diff changeset
    96
------------------------------------------------------------------------------
b9e4a67329cd Updated contrib/vim/patchreview.* to version 0.2.1
Manpreet Singh <junkblocker@yahoo.com>
parents: 2350
diff changeset
    97
 vim: ft=help:ts=2:sts=2:sw=2:tw=78:norl: