Commit Graph

11 Commits (c055c6464de20da13a6c805f017543f94b6e0ca9)

Author SHA1 Message Date
Daniel Shahaf c055c6464d unposted: vcs_info: Add Vim modelines
... for consistency with all other vcs_info function files.
2 years ago
Daniel Shahaf 5448e1611d 47303: vcs_info hg: Fix changing the expansion of %g (hook_com[guards]) in the set-patch-format hook (regression from workers/40480).
To reproduce, go to a hg repository with active mq guards and configure
vcs_info as follows:

    zstyle '*' get-unapplied true
    zstyle ':vcs_info:*set-patch-format*' hooks f
    zstyle '*' patch-format '[%g : %G]'
    zstyle '*' nopatch-format '[%g : %G]'
    zstyle '*' formats '%m'
    +vi-f () {
    	hook_com[guards]+=XXX
    }

The regression was first released in 5.3.1-test-2, over three years ago.
4 years ago
Daniel Shahaf e38f15f8ff 43620 (tweaked): vcs_info git: Reverse the order patches are passed to gen-unapplied-string in.
This is an incompatible change; see README for details.

Tweaks (relative to posted version): tweaked README, removed scalpel (debug print).
6 years ago
Daniel Shahaf ecd88284f3 40492: vcs_info: Escape '%' signs in payloads.
Test case: a patch whose subject is '%Sfoo%sbar'.  ('S' and 's' are
expandos both in prompts and in the 'formats' style.)
7 years ago
Daniel Shahaf 33c0a10448 40480: vcs_info set-patch-format: Eliminate the remaining code duplication. 7 years ago
Daniel Shahaf 9211d7f277 40479: vcs_info set-patch-format: Prepare for more code sharing between the callers.
This changes hook invocation order in the hg backend.
7 years ago
Daniel Shahaf 3a1756b728 40478: vcs_info set-patch-format: Guard against empty variable elision. 7 years ago
Daniel Shahaf 2854a67e09 40403/0004: vcs_info set-patch-format helper: Part #4.
This also fixes the %a (${hook_com[all-n]}) expando in the hg backend:
before this change, it counted only unapplied changes.
7 years ago
Daniel Shahaf edd9798de7 40403/0003: vcs_info set-patch-format helper: Part #3. 7 years ago
Daniel Shahaf 2702857334 40403/0002: vcs_info set-patch-format helper: Part #2.
Not all callers reset ${hook_com}, but those that don't, immediately
overwrite it a few lines later.
7 years ago
Daniel Shahaf 0ea1957608 40403/0001: vcs_info set-patch-format helper: Part #1. 7 years ago