##// END OF EJS Templates
bdiff: gradually enable the popularity hack...
bdiff: gradually enable the popularity hack Patch from Jason Orendorff The lower the threshold, the stronger the popularity hack's influence. So at 3999 lines, the hack is disabled; and at 4000 lines, the hack is enabled at maximum strength (t=4). No source file in mercurial/crew is over 4000 lines. But there are, oh, a few such files in Mozilla. I can testify that this hack causes hg to generate some correct but eyebrow-raising patches. I think the hack should phase in gradually. The threshold should be high for small files where we don't need it so much. Like this: t = (bn < 31000) ? 1000000 / bn : bn / 1000; That would leave the popularity hack disabled for small files, then gradually phase it in: bn < 1000 -- t > bn (popularity hack is completely disabled) bn == 1000 -- t = 1000 (still effectively disabled) bn == 2000 -- t = 500 (only hits unusual files) bn == 10000 -- t = 100 (only hits especially common lines) bn == 31000 -- t = 31 (hack is at maximum power) bn == 32000 -- t = 32 (hack could backfire, ease off)

File last commit:

r2350:091d5556 default
r9534:8e202431 default
Show More
patchreview.txt
97 lines | 4.3 KiB | text/plain | TextLexer
*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