Commit Graph

121 Commits

Author SHA1 Message Date
Giuseppe
d53aa0e94f vim-patch.sh: more colorful #8115 2018-03-09 00:58:12 +01:00
Justin M. Keyes
b67ce84c45 vim-patch.sh: delete *.orig files 2018-02-11 15:27:55 +01:00
Justin M. Keyes
e69a71427c vim-patch.sh: remove --posix from patch invocation
This was supposed to avoid creating *.orig. It doesn't do that, and
worse, it also seems to prevent new files from being created.
2018-02-11 15:27:47 +01:00
Daniel Hahler
0d548b73ef scripts/vim-patch.sh: continue when patching with -P fails (#7790)
The `set -e` caused the script to stop in case `patch` fails, but it is
better to continue giving instructions.
2017-12-30 14:15:51 +01:00
Justin M. Keyes
7773bbd098 vimpatch.lua: automate version.c
Invoke it like this:

    VIM_SOURCE_DIR=~/neovim/.vim-src/ nvim -i NONE -u NONE --headless +'luafile ./scripts/vimpatch.lua' +q
2017-12-27 12:30:55 +01:00
Justin M. Keyes
903ed09a61 vim-patch.sh: extract list_vimpatch_tokens()
Use streams instead of for-loop (20x speedup for list_vimpatch_tokens).
2017-12-26 04:00:18 +01:00
Justin M. Keyes
973bd10a12 vim-patch.sh: introduce -V 2017-12-26 04:00:18 +01:00
James McCoy
067bb1e9f4
vim-patch.sh: Include upstream summary in commit message
[ci skip]
2017-12-17 10:45:55 -05:00
Justin M. Keyes
23fb833ea7 vim-patch.sh: remove version.c in generated patch
Vim patch tracking is now driven completely by `vim-patch:xxx` tokens in
the VCS logs. version.c will be auto-generated, if it is used at all.
2017-12-11 00:54:25 +01:00
Justin M. Keyes
56b49955b7 vim-patch.sh: introduce -L 2017-12-11 00:49:44 +01:00
Justin M. Keyes
5bd8827431 vim-patch.sh: always use git log, not version.c 2017-12-10 17:13:22 +01:00
Justin M. Keyes
ea51f08276 vim-patch.sh: avoid creating *.orig files 2017-11-07 22:33:26 +01:00
Justin M. Keyes
3a7feb6989 vim-patch.sh: remove vimrc_example.vim
vimrc_example.vim is not relevant to Nvim. Anything worth having in
there should be made an actual default.

.gitignore:
  - remove *.orig ... super annoying
2017-11-07 20:38:04 +01:00
Justin M. Keyes
dc92901094 vim-patch.sh: new option -P 2017-11-07 00:54:05 +01:00
James McCoy
e6d4b7686c
vim-patch.sh: Exclude testdir/ files from src/ file pruning
Without the testdir/ exclusion, all directories under src/ were affected
by this cleanup.  However, testdir/ has its own pruning that happens
later.
2017-09-27 08:20:43 -04:00
Justin M. Keyes
8aa0dfd684 doc: "terminal" always means "embedded terminal emulator"
- Prefer "TUI" where possible to refer to the host terminal.
- Remove obsolete tags and ancient TTY exposition.
- Establish "terminal" to consistently mean "terminal emulator" in all
  Nvim documentation. This removes the need for verbose qualifiers in
  tags and prose.

References #6280
References #6803
2017-08-03 00:29:51 +02:00
lonerover
e3a2b7220f vim-patch.sh: only show missing patches 2017-07-15 20:34:24 +08:00
James McCoy
06ec15121a
Bump Vim version to 8.0 and applied patches 2017-07-14 06:44:06 -04:00
Daniel Hahler
6eb2bcd1a0 scripts/vim-patch.sh: do not git-reset on push failure (#6878)
This was added from the beginning to submit_pr in 775a16b0b, but I
cannot see why that is useful - in contrast, it will mess with the local
branch in case "origin" cannot be pushed to (i.e. when it points to
neovim/neovim itself).
2017-06-11 16:25:13 +02:00
Justin M. Keyes
0df1b6655b doc: Removed t_XX options/keycodes. (#6616)
Closes #4482

TODO: revisit find_key_option_len()
2017-04-29 16:56:40 +02:00
Justin M. Keyes
b25fa94eb5 scripts/vim-patch.sh: word-boundaries in preprocess regex 2017-04-19 21:26:17 +02:00
James McCoy
210b013ce7 vim-patch: Update regex for included_patches array (#6449)
28dafe3ff const-ified the array without updating the regex.

[ci skip]
2017-04-06 02:10:20 +02:00
Justin M. Keyes
03a04172ec scripts/vim-patch.sh: Remove "Last change ..." lines.
Also:
- fix ignoring doc/tags file
- use 12 chars of hash instead of 7
2017-03-21 12:19:16 +01:00
James McCoy
0882ca50d8 vim-patch.sh: Bump base Vim version to 7.4.1980
All patches up through 7.4.1974 have been merged and 7.4.1975-1979 are
pending in a PR.

[ci skip]
2017-02-27 09:31:25 -05:00
lonerover
891d412d6c vim-patch.sh: don't ignore runtime/doc/tagsrch.txt 2017-02-14 16:14:41 +08:00
James McCoy
1df492dd3a vim-patch: Use get_vim_patch to retrieve patch for review
This ensures the downloaded Vim patch is preprocessed so unused material
isn't presented to the reviewer.

[ci skip]
2017-02-06 15:58:33 -05:00
Marco Hinz
66936d7866
vim-patch: fix default answers 2016-12-22 03:17:01 +01:00
James McCoy
412d87698f vim-patch: Allow skipping non-"vim-patch" commits during review
It's not atypical to have extra, non-"vim-patch" commits in a PR merging
a bigger or set of related patches from Vim.  Rather than immediately
aborting, display the patch header to the user and let them decide
whether to continue reviewing.
2016-12-15 09:09:52 -05:00
James McCoy
c6bd9f525c
vim-patch: Add -g switch to download/preprocess patch 2016-12-12 20:55:25 -05:00
Justin M. Keyes
c3a7a94a12 l10n: Remove some non-UTF8 .po files. (#5622)
Some .po files do not have UTF8 versions, leave those alone for now.

Also remove sjiscorr.c utility.
2016-11-17 17:27:13 +01:00
James McCoy
10c72cd365
vim-patch.sh: Remove "set -o pipefail"
grep 2.26 changed its behavior when redirecting its output to /dev/null
such that it exits as soon as one match is found.  This causes sed to
get a SIGPIPE which, due to "set -o pipefail", falsely implies that the
patch is not applied.

Removing "set -o pipefail" preserves the good exit status from grep.
2016-11-15 07:53:01 -05:00
Justin M. Keyes
f96dfae52f doc; vim-patch.sh
Also include missing changes from:
06d2d38ab7
26852128a2
2016-10-24 13:26:55 +02:00
James McCoy
9d170a493e
vim-patch: Group alternations in preprocess_patch
Without the groupings, only the first alternation matches the diff
marker.  For example,

    local na_doc='todo\.txt\|version\d\.txt\|tags'
    ... +'g^diff --git a/runtime/doc/'${na_doc}'...

becomes, after expansion,

    ... +'g^diff --git a/runtime/doc/todo\.txt\|version\d\.txt\|tags'...

so the matches become "^diff --get a/runtime/doc/todo\.txt",
"version\d\.txt", or "tags".  Adding the grouping ensures the expected
behavior of requiring "^diff --get a/runtime/doc/" before every
filename.
2016-09-22 07:16:50 -04:00
Justin M. Keyes
d61826a85c vim-patch.sh: Use printf instead of echo
Also: neovim => nvim
2016-09-13 12:40:20 +02:00
Justin M. Keyes
d5aaa18316 vim-patch.sh: preprocess_patch()
- Remove not-applicable Vim changes such as *.proto, todo.txt, ...

Also:
- support NVIM_SOURCE_DIR override
2016-09-13 11:38:09 +02:00
Daniel Hahler
884b37fd2a scripts/vim-patch.sh: fix typo (#5221)
[ci skip]
2016-08-14 08:19:46 -04:00
Daniel Hahler
3e00dc4477 scripts/vim-patch.sh: use privileged mode (set -p)
Without this the "cd scripts/.." might change to another dir (since
CDPATH is looked at before a local path), and then NEOVIM_SOURCE_DIR
might end up being "/somewhere/else\n/somewhere/else" (since the "cd"
prints the dir already in that case).

Closes https://github.com/neovim/neovim/pull/5213.
2016-08-11 18:57:54 +02:00
Simon Weil
29060a592c vim-patch.sh: ignore coloring and pagers (#5030) 2016-07-10 15:21:45 -04:00
Shota
568da8ef3b vimpatch.sh: bug fix in find_git_remote regex (#4863)
vimpatch.sh: fix awk expr
2016-06-01 15:02:20 -04:00
James McCoy
e50b4fd36d vim-patch.sh: Only print the first neovim/neovim remote name
If a user has multiple remotes set for neovim/neovim, then
find_get_remote was returning 'remote1\nremote2\n', which breaks
anything trying to use it.  Since we're just using this remote to fetch
from, any one will do.
2016-05-28 14:16:10 -04:00
James McCoy
8759a77dc2 vim-patch.sh: Show if a patch includes runtime files 2016-05-19 06:40:51 -04:00
James McCoy
957c91d5d0 vim-patch.sh: Add support for sociomatic/git-hub 2016-05-19 06:40:47 -04:00
James McCoy
af3d4b4049 vim-patch.sh: Rename check_executable to require_executable
check_executable now just wraps the "exists && executable" check.  This
will be needed to allow fallbacks for commands.
2016-05-19 06:40:37 -04:00
James McCoy
de570a0b84 vim-patch.sh: Ignore “git describe” failures in list_vim_patches
It's acceptable for “git describe --tags --exact-match …” to fail, since
all runtime updates commits are untagged.  All that matters is that we
get a tag when one exists.

Therefore, ignore the failure status of the git describe call, relying
on the captured output instead.
2016-05-17 01:03:18 -04:00
Michael Ennen
954f983bc1 Run shellcheck (shell scripting linter) on shell scripts.
There are a total of 5 shell scripts in the Neovim source tree.
All but runtime\macros\less.sh had warnings/errors when run through
Shellcheck (http://www.shellcheck.net/).

This commit fixes all warnings/errors and also changes the shebang to
"#!/bin/sh" when possible (this was not possible for vim-patch.sh
because it uses many bashisms).

The shellcheck errors that were fixed are:
SC2068: Double quote array expansions to avoid re-splitting elements.
SC2086: Double quote to prevent globbing and word splitting.
SC2124: Assigning an array to a string! Assign as array, or use *
    instead of @ to concatenate
SC2155: Declare and assign separately to avoid masking return values.
2016-05-11 21:06:26 -07:00
Daniel Hahler
a9f97226ae vim-patch.sh: fix/improve pattern with find_git_remote 2016-04-24 19:07:41 +02:00
James McCoy
3098b18a2b vim-patch.sh: Query git for name of neovim remote
Rather than assume the user named their neovim/neovim remote "upstream",
parse the information from "git remote -v".
2016-04-23 15:32:43 -04:00
pips.linux
7cdbf3f97a vim-patch.sh: Fetch the whole vim repository and fix a regexp
Make get_vim_sources fetch the whole repository (it's not THAT big) so we can
pick up all the patches. The regexp didn't pick up the NA patches if there was a
comma after NA, so I extended it (I allowed arbitray things after NA, so maybe
someone can write a comment or so, should not lead to confusion).
2016-04-08 20:13:24 +02:00
Florian Walch
e65fce8ed3 vim-patch.sh: Replace #<number> with vim/vim#<number> in commit messages. 2016-02-17 00:18:19 +01:00
Florian Walch
cc6299ecbc vim-patch.sh: Support multi-patch pull requests.
* Calling "vim-patch.sh -p" on a checked-out branch already created with
  "-p" will re-use the branch and append commits.

* Fetch upstream/master before checking out branch on first call of "-p".

* Reverted creation of commit in submit step ("-s") to previous behavior:
  Create an empty commit with correct commit message when "-p" is called.

* Submitting a pull request with "-s" will create a correct pull request
  message even if multiple patches have been ported in one single branch
  with "-p".
2016-02-17 00:18:19 +01:00
Florian Walch
775a16b0b7 vim-patch.sh: Add -s (submit pull request) option.
When calling "vim-patch.sh -s" on a checked-out branch created with
"vim-patch.sh -p", create commit from staged changes, push to origin,
create pull request (using hub), and clean up patch files.
2016-02-17 00:18:19 +01:00
Florian Walch
07eabc062e vim-patch.sh: Use .patch files only. 2016-02-17 00:18:19 +01:00
Florian Walch
b768d8a09c vim-patch.sh: Improvements for review functionality.
* Support pull requests with multiple commits.
 * Offer to clean up files after review.
 * Always use full commit hash in assign_commit_details().
2016-02-17 00:18:19 +01:00
Florian Walch
03d8adda8e vim-patch.sh: List in chronological order. #4034 2016-01-20 22:16:56 -05:00
Florian Walch
9b550a8760 vim-patch.sh: Fix listing of NA patches. #4034 2016-01-17 19:18:45 -05:00
Justin M. Keyes
36f17ce87e vim-patch.sh: fix regression 2016-01-08 19:12:36 -05:00
Justin M. Keyes
1e7a553ed7 vim-patch.sh: force LC_ALL=C for preprocessing
Any patch may contain mixed encodings, so we must process them as byte
arrays. E.g. with stock `sed` on OS X patch
8a94d873aa8c753a8522ea86a049bdf2abd0c507 causes this error:
    sed: RE error: illegal byte sequence
To avoid that, set LC_ALL=C.

Also remove redundant *.patch creation from review_pr().
2015-12-17 21:28:54 -05:00
Justin M. Keyes
9d64d75031 vim-patch.sh: fix order of non-tagged patches
Sort non-tagged patches in descending order, like tagged patches.
2015-12-17 04:07:03 -05:00
Johan Klokkhammer Helsing
cbb7044878 Fix the examples for vim-patch.sh so they are valid commands. #3631
The examples were missing the required -p flag.
2015-11-08 17:03:22 +01:00
Justin M. Keyes
a7ec1a5f50 vim-patch.sh: best-effort for older git. 2015-08-27 23:44:48 -04:00
Justin Gassner
aafbe5d28a vim-patch.sh: get all untagged patches #3250 2015-08-27 23:22:56 -04:00
Justin M. Keyes
b4d29fe067 vim-patch.sh: update for git 2015-08-26 03:02:13 -04:00
John Whitley
4d39db355b vim-patch.sh: update for Vim's hg => git migration 2015-08-26 02:15:24 -04:00
Florian Walch
95a4dc6487 vim-patch.sh: Add --review option to compare PR and original diffs. #3083
Helped-by: Michael Reed <m.reed@mykolab.com>
2015-08-03 21:36:33 +02:00
Florian Walch
a903407471 vim-patch.sh: Fix indentation, use GH URL for tagged versions. #2525
* Link to the commit details on GitHub for a tagged version.
* Non-tagged patches (runtime updates) are still linked to
  Google Code because they are identified by a Mercurial commit hash.
2015-04-28 17:29:20 +03:00
Michael Reed
08d2f7b562 scripts/vim-patch.sh: Misc. improvements #2108
- Check for mercurial before using it
- Make 'Merging patches...' wiki page easier to copy
- Use `basename` instead of assuming the user is running vim-patch.sh
  via the repo root
- Appease shellcheck by quoting path variables
- Remove unneeded variable quoting inside [[ ]] blocks
- Don't unconditionally 'exit 1'
  '-h' and '--help' are both recognized options, so current behavior is
  misleading.
2015-03-16 11:00:24 -04:00
Michael Reed
84ca5f973d scripts/vim-patch: Allow equivalent shorthand args 2015-02-02 01:11:19 -05:00
Florian Walch
0cbc48ea89 vim-patch.sh: Add option to list missing Vim changesets. 2015-01-14 09:51:19 +01:00
Florian Walch
0ae2acdc86 Improvements to vim-patch script. 2014-12-25 23:32:40 +01:00
Florian Walch
b1d025a0c8 Ignore update errors in vim-patch script. 2014-12-23 11:15:42 +01:00
Florian Walch
b27eadbcf2 Add helper script for porting vim patches. 2014-11-21 16:11:32 +01:00