Patchwork improving zsh completion by adding descriptive branch names to head revision numbers

login
register
mail settings
Submitter Johannes Schlatow
Date Jan. 17, 2013, 1 a.m.
Message ID <50F74D32.5050700@schlatow.name>
Download mbox | patch
Permalink /patch/674/
State Accepted
Delegated to: Matt Mackall
Headers show

Comments

Johannes Schlatow - Jan. 17, 2013, 1 a.m.
# HG changeset patch
# User Johannes Schlatow <johannes@schlatow.name>
# Date 1358381160 -3600
# Node ID ec4fc4474af7dcedd182c4f9153884f4e852e089
# Parent  6d851c829427e8f85f5640c8c1333715fd7b1f37
zsh_completion: add descriptive branch names to head revisions

Patch

diff -r 6d851c829427 -r ec4fc4474af7 contrib/zsh_completion
--- a/contrib/zsh_completion    Thu Jan 17 00:54:49 2013 +0100
+++ b/contrib/zsh_completion    Thu Jan 17 01:06:00 2013 +0100
@@ -208,9 +208,9 @@ 
   typeset -a heads
   local myrev

-  heads=(${(f)"$(_hg_cmd heads --template '{rev}\\n')"})
+  heads=(${(f)"$(_hg_cmd heads --template '{rev}:{branch}\\n')"})
   # exclude own revision
-  myrev=$(_hg_cmd log -r . --template '{rev}\\n')
+  myrev=$(_hg_cmd log -r . --template '{rev}:{branch}\\n')
   heads=(${heads:#$myrev})

   (( $#heads )) && _describe -t heads 'heads' heads