Commits

Nikolaj Sjujskij  committed 35a5c5f

zsh: split out MQ and misc patches

  • Participants
  • Parent commits 056696d

Comments (0)

Files changed (3)

 zsh_subrepos
 zsh_extensions
 zsh_opts
+zsh_mq
+zsh_misc
 old_zsh_comp
+# HG changeset patch
+# Parent 941128a0603a0564e7b830f6c06520af8dcd235c
+diff --git a/contrib/zsh_completion b/contrib/zsh_completion
+--- a/contrib/zsh_completion
++++ b/contrib/zsh_completion
+@@ -689,7 +689,7 @@
+   _arguments -s -w : $_hg_log_opts $_hg_branch_bmark_opts $_hg_remote_opts \
+                      $_hg_style_opts $_hg_subrepos_opts \
+   '(--force -f)'{-f,--force}'[run even when the remote repository is unrelated]' \
+-  '(--rev -r)'{-r+,--rev}'[a specific revision up to which you would like to pull]:revision:_hg_tags' \
++  '(--rev -r)'{-r+,--rev}'[a specific revision up to which you would like to pull]:revision:_hg_labels' \
+   '(--newest-first -n)'{-n,--newest-first}'[show newest record first]' \
+   '--bundle[file to store the bundles into]:bundle file:_files' \
+   ':source:_hg_remote'
+@@ -742,7 +742,7 @@
+   _arguments -s -w : $_hg_global_opts $_hg_branch_bmark_opts $_hg_remote_opts \
+                      $_hg_style_opts $_hg_subrepos_opts \
+   '(--force -f)'{-f,--force}'[run even when the remote repository is unrelated]' \
+-  '(--rev -r)'{-r+,--rev}'[a specific revision you would like to push]' \
++  '*'{-r,--rev}'[a specific revision you would like to push]:revision:_hg_revrange' \
+   '(--newest-first -n)'{-n,--newest-first}'[show newest record first]' \
+   ':destination:_hg_remote'
+ }
+@@ -1184,9 +1184,9 @@
+ _hg_cmd_rebase() {
+   _arguments -s -w : $_hg_global_opts $_hg_commit_opts $_hg_mergetool_opts \
+   '*'{-r,--rev}'[rebase these revisions]:revision:_hg_revrange' \
+-  '(--source -s)'{-s,--source}'[rebase from the specified changeset]:revision:_hg_labels' \
+-  '(--base -b)'{-b,--base}'[rebase from the base of the specified changeset]:revision:_hg_labels' \
+-  '(--dest -d)'{-d,--dest}'[rebase onto the specified changeset]' \
++  '(--source -s)'{-s+,--source}'[rebase from the specified changeset]:revision:_hg_labels' \
++  '(--base -b)'{-b+,--base}'[rebase from the base of the specified changeset]:revision:_hg_labels' \
++  '(--dest -d)'{-d+,--dest}'[rebase onto the specified changeset]:revision:_hg_labels' \
+   '--collapse[collapse the rebased changeset]' \
+   '--keep[keep original changeset]' \
+   '--keepbranches[keep original branch name]' \
+# HG changeset patch
+# Parent 315ecb651118fd0878e16511b8f22f8efd810bf9
+zsh completion: update mq commands completion
+
+ * add qclone command;
+ * qapplied/qunapplied: add --last/--first;
+ * qdiff: add all diff options;
+ * qfold: add --force, --no-backup;
+ * qgoto: add --keep-changes;
+ * qimport: add --git, --push;
+ * qnew: add user- and date-related options;
+ * qpop/qpush: add --keep-changes and --no-backup, drop --name;
+ * qpush: drop deprecated --merge;
+ * qrename: complete only unapplied patches' names;
+ * strip: add --rev, --keep, --bookmark, update descriptions, drop --backup.
+
+
+diff --git a/contrib/zsh_completion b/contrib/zsh_completion
+--- a/contrib/zsh_completion
++++ b/contrib/zsh_completion
+@@ -1002,7 +1002,16 @@
+   '(--summary -s)'{-s,--summary}'[print first line of patch header]')
+ 
+ _hg_cmd_qapplied() {
+-  _arguments -s -w : $_hg_global_opts $_hg_qseries_opts
++  _arguments -s -w : $_hg_global_opts $_hg_qseries_opts \
++  '(--last -1)'{-1,--last}'[show only the preceding applied patch]' \
++  '*:patch:_hg_qapplied'
++}
++
++_hg_cmd_qclone() {
++  _arguments -s -w : $_hg_global_opts $_hg_remote_opts $_hg_clone_opts \
++  '(--patches -p)'{-p+,--patches}'[location of source patch repository]' \
++  ':source repository:_hg_remote' \
++  ':destination:_hg_clone_dest'
+ }
+ 
+ _hg_cmd_qdelete() {
+@@ -1027,12 +1036,15 @@
+ _hg_cmd_qfold() {
+   _arguments -s -w : $_hg_global_opts $_h_commit_opts \
+   '(--keep,-k)'{-k,--keep}'[keep folded patch files]' \
++  '(--force -f)'{-f,--force}'[overwrite any local changes]' \
++  '--no-backup[do not save backup copies of files]' \
+   '*:unapplied patch:_hg_qunapplied'
+ }
+ 
+ _hg_cmd_qgoto() {
+   _arguments -s -w : $_hg_global_opts \
+   '(--force -f)'{-f,--force}'[overwrite any local changes]' \
++  '--keep-changes[tolerate non-conflicting local changes]' \
+   ':patch:_hg_qseries'
+ }
+ 
+@@ -1055,13 +1067,12 @@
+   '(--name -n 2)'{-n+,--name}'[patch file name]:name:' \
+   '(--force -f)'{-f,--force}'[overwrite existing files]' \
+   '*'{-r+,--rev}'[place existing revisions under mq control]:revision:_hg_revrange' \
++  '(--push -P)'{-P,--push}'[qpush after importing]' \
+   '*:patch:_files'
+ }
+ 
+ _hg_cmd_qnew() {
+-  _arguments -s -w : $_hg_global_opts $_hg_commit_opts \
+-                     $_hg_date_user_opts $_hg_gitlike_opts \
+-  '(--force -f)'{-f,--force}'[import uncommitted changes into patch]' \
++  _arguments -s -w : $_hg_global_opts $_hg_commit_opts $_hg_date_user_opts $_hg_gitlike_opts \
+   ':patch:'
+ }
+ 
+@@ -1072,8 +1083,9 @@
+ _hg_cmd_qpop() {
+   _arguments -s -w : $_hg_global_opts \
+   '(--all -a :)'{-a,--all}'[pop all patches]' \
+-  '(--name -n)'{-n+,--name}'[queue name to pop]:' \
+   '(--force -f)'{-f,--force}'[forget any local changes]' \
++  '--keep-changes[tolerate non-conflicting local changes]' \
++  '--no-backup[do not save backup copies of files]' \
+   ':patch:_hg_qapplied'
+ }
+ 
+@@ -1085,24 +1097,23 @@
+   _arguments -s -w : $_hg_global_opts \
+   '(--all -a :)'{-a,--all}'[apply all patches]' \
+   '(--list -l)'{-l,--list}'[list patch name in commit text]' \
+-  '(--merge -m)'{-m+,--merge}'[merge from another queue]:' \
+-  '(--name -n)'{-n+,--name}'[merge queue name]:' \
+   '(--force -f)'{-f,--force}'[apply if the patch has rejects]' \
+   '(--exact -e)'{-e,--exact}'[apply the target patch to its recorded parent]' \
+   '--move[reorder patch series and apply only the patch]' \
++  '--keep-changes[tolerate non-conflicting local changes]' \
++  '--no-backup[do not save backup copies of files]' \
+   ':patch:_hg_qunapplied'
+ }
+ 
+ _hg_cmd_qrefresh() {
+   _arguments -s -w : $_hg_global_opts $_hg_pat_opts $_hg_commit_opts $_hg_gitlike_opts \
+-  '(--git -g)'{-g,--git}'[use git extended diff format]' \
+   '(--short -s)'{-s,--short}'[short refresh]' \
+   '*:files:_hg_files'
+ }
+ 
+ _hg_cmd_qrename() {
+   _arguments -s -w : $_hg_global_opts \
+-  ':patch:_hg_qseries' \
++  ':patch:_hg_unapplied' \
+   ':destination:'
+ }
+ 
+@@ -1121,7 +1132,8 @@
+ }
+ 
+ _hg_cmd_qunapplied() {
+-  _arguments -s -w : $_hg_global_opts $_hg_qseries_opts
++  _arguments -s -w : $_hg_global_opts $_hg_qseries_opts \
++  '(--first -1)'{-1,--first}'[show only the first patch]'
+ }
+ 
+ _hg_cmd_qtop() {
+@@ -1130,9 +1142,11 @@
+ 
+ _hg_cmd_strip() {
+   _arguments -s -w : $_hg_global_opts \
+-  '(--force -f)'{-f,--force}'[force multi-head removal]' \
+-  '(--backup -b)'{-b,--backup}'[bundle unrelated changesets]' \
+-  '(--nobackup -n)'{-n,--nobackup}'[no backups]' \
++  '(--force -f)'{-f,--force}'[force removal, discard uncommitted changes, no backup]' \
++  '(--no-backup -n)'{-n,--no-backup}'[no backups]' \
++  '(--keep -k)'{-k,--keep}'[do not modify working copy during strip]' \
++  '(--bookmark -B)'{-B+,--bookmark}'[remove revs only reachable from given bookmark]:bookmark:_hg_bookmarks' \
++  '(--rev -r)'{-r+,--rev}'[revision]:revision:_hg_labels' \
+   ':revision:_hg_labels'
+ }
+