view contrib/vim/patchreview.txt @ 5192:33015dac5df5

convert: fix mercurial_sink.putcommit Changeset 4ebc8693ce72 added some code to putcommit to avoid creating a revision that touches no files, but this can break regular conversions from some repositories: - conceptually, since we're converting a repo, we should try to make the new hg repo as similar as possible to the original repo - we should create a new changeset, even if the original revision didn't touch any files (maybe the commit message had some important bit); - even if a "regular" revision that doesn't touch any file may seem weird (and maybe even broken), it's completely legitimate for a merge revision to not touch any file, and, if we just skip it, the converted repo will end up with wrong history and possibly an extra head. As an example, say the crew and main hg repos are sync'ed. Somebody sends an important patch to the mailing list. Matt quickly applies and pushes it. But at the same time somebody also applies it to crew and pushes it. Suppose the commit message ended up being a bit different (say, there was a typo and somebody didn't fix it) or that the date ended up being different (because of different patch-applying scripts): the changeset hashes will be different, but the manifests will be the same. Since both changesets were pushed to public repos, it's hard to recall them. If both are merged, the manifest from the resulting merge revision will have the exact same contents as its parents - i.e. the merge revision really doesn't touch any file at all. To keep the file filtering stuff "working", the generic code was changed to skip empty revisions if we're filtering the repo, fixing a bug in the process (we want parents[0] instead of tip).
author Alexis S. L. Carvalho <alexis@cecm.usp.br>
date Fri, 17 Aug 2007 20:18:05 -0300
parents 091d555653a4
children
line wrap: on
line source

*patchreview.txt* Vim global plugin for doing single or multipatch code reviews

            Author: Manpreet Singh (junkblocker-CAT-yahoo-DOG-com)
                    (Replace -CAT- and -DOG- with @ and . first)
            Copyright (C) 2006 by Manpreet Singh
            License : This file is placed in the public domain.

=============================================================================

CONTENTS	                               *patchreview* *patchreview-contents*

  1. Contents.........................................: |patchreview-contents|
  2. Introduction.....................................: |patchreview-intro|
  3. PatchReview options..............................: |patchreview-options|
  4. PatchReview Usage................................: |patchreview-usage|
     4.1 PatchReview Usage............................: |:PatchReview|
     4.2 PatchReview Usage............................: |:PatchReviewCleanup|

=============================================================================

PatchReview Introduction                                  *patchreview-intro*

The Patch Review plugin allows single or multipatch code review to be done in
VIM. VIM provides the |:diffpatch| command to do single file reviews but can
not handle patch files containing multiple patches as is common with software
development projects. This plugin provides that missing functionality. It also
tries to improve on |:diffpatch|'s behaviour of creating the patched files in
the same directory as original file which can lead to project workspace
pollution.

=============================================================================

PatchReview Options                                     *patchreview-options*

  g:patchreview_filterdiff : Optional path to filterdiff binary. PatchReview
                             tries to locate filterdiff on system path
                             automatically. If the binary is not on system
                             path, this option tell PatchReview the full path
                             to the binary.  This option, if specified,
                             overrides the default filterdiff binary on the
                             path.

     examples:
        (On Windows with Cygwin)

           let g:patchreview_filterdiff = 'c:\\cygwin\\bin\\filterdiff.exe'

        (On *nix systems)

           let g:patchreview_filterdiff = '/usr/bin/filterdiff'

  g:patchreview_patch      : Optional path to patch binary. PatchReview tries
                             to locate patch on system path automatically. If
                             the binary is not on system path, this option
                             tell PatchReview the full path to the binary.
                             This option, if specified, overrides the default
                             patch binary on the path.

     examples:
        (On Windows with Cygwin)

           let g:patchreview_patch = 'c:\\cygwin\\bin\\patch.exe'

        (On *nix systems)

           let g:patchreview_patch = '/usr/bin/gpatch'


  g:patchreview_tmpdir : Optional path where the plugin can save temporary
                         files.  If this is not specified, the plugin tries to
                         use TMP, TEMP and TMPDIR environment variables in
                         succession.

    examples:
        (On Windows)      let g:patchreview_tmpdir = 'c:\\tmp'
        (On *nix systems) let g:patchreview_tmpdir = '~/tmp'

=============================================================================

PatchReview Usage                                          *patchreview-usage*
                                                                *:PatchReview*

  :PatchReview patchfile_path [optional_source_directory]

    Perform a patch review in the current directory based on the supplied
    patchfile_path. If optional_source_directory is specified, patchreview is
    done on that directory. Othewise, the current directory is assumed to be
    the source directory.
                                                          *:PatchReviewCleanup*

  :PatchReviewCleanup

    After you are done using the :PatchReview command, you can cleanup the
    temporary files in the temporary directory using this command.

=============================================================================
vim: ft=help:ts=2:sts=2:sw=2:tw=78:tw=78