--- Completion/Unix/Command/_subversion | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Completion/Unix/Command/_subversion b/Completion/Unix/Command/_subversion index b5532b101..04a8da0bf 100644 --- a/Completion/Unix/Command/_subversion +++ b/Completion/Unix/Command/_subversion @@ -337,7 +337,7 @@ _svn_controlled() { (( $+functions[_svn_conflicts] )) || _svn_conflicts() { - [ -n $REPLY.(mine|r<->)(N[1]) ] + () { (( $# > 0 )) } $REPLY.(mine|r<->)(NY1) } (( $+functions[_svn_deletedfiles] )) ||
--- Completion/Unix/Command/_subversion | 26 ++++++++++++++++++++++---- 1 file changed, 22 insertions(+), 4 deletions(-) diff --git a/Completion/Unix/Command/_subversion b/Completion/Unix/Command/_subversion index 04a8da0bf..b39c8578e 100644 --- a/Completion/Unix/Command/_subversion +++ b/Completion/Unix/Command/_subversion @@ -131,6 +131,18 @@ _svn () { '*:file:_files -g "*(^e:_svn_controlled:)"' ) ;; + (auth) + args+=( + '*:auth pattern: ' + ) + ;; + (changelist) + args[(r)--remove]='(1)--remove' + args+=( + '(--remove)1:changelist name:_svn_changelists' + '*:file:_files -g "*(e:_svn_controlled:)"' + ) + ;; (commit) args=( ${args/(#b)(*--file*):arg:/$match[1]:file:_files} @@ -167,6 +179,12 @@ _svn () { (mergeinfo) args[(r)--show-revs=:arg:]=( '--show-revs=:revisions:(merged eligible)' ) ;; + (patch) + args+=( + '1:patch file:_files' + '2::working copy to patch:_files' + ) + ;; (propget|propedit|propdel) args+=( '1:property name:_svn_props' @@ -181,7 +199,7 @@ _svn () { '*:path or url: _alternative "files:file:_files" "urls:URL:_svn_urls"' ) ;; - (resolved) + (resolve|resolved) args+=( '*:file:_files -g "*(e:_svn_conflicts:)"' ) @@ -191,9 +209,9 @@ _svn () { '*:file:_files -g "(.svn|*)(/e:_svn_deletedfiles:,e:_svn_status:)"' ) ;; - (unshelve) - args+=( '1:shelf name:compadd - ${${(f)"$(_call_program shelves svn unshelve -q --list)"}%% *}' ) - ;; + (x-unshelve) + args+=( '1:shelf name:compadd - ${(f)"$(_call_program shelves svn x-shelves --quiet)"}' '2::shelf version' ) + ;; (*) case $usage in *(SRC|DST|TARGET|URL*PATH)*)
--- Completion/Unix/Command/_subversion | 19 +++++++++++++++++-- 1 file changed, 17 insertions(+), 2 deletions(-) diff --git a/Completion/Unix/Command/_subversion b/Completion/Unix/Command/_subversion index b39c8578e..2ce43a0cd 100644 --- a/Completion/Unix/Command/_subversion +++ b/Completion/Unix/Command/_subversion @@ -128,7 +128,7 @@ _svn () { case $cmd in; (add) args+=( - '*:file:_files -g "*(^e:_svn_controlled:)"' + '*:file:_files -g "*(e:_svn_uncontrolled:)"' ) ;; (auth) @@ -350,7 +350,22 @@ _svnadmin () { (( $+functions[_svn_controlled] )) || _svn_controlled() { - [[ -f ${(M)REPLY##*/}.svn/text-base/${REPLY##*/}.svn-base ]] + # For svn<=1.6, this was implemented as: + # [[ -f ${(M)REPLY##*/}.svn/text-base/${REPLY##*/}.svn-base ]] + # However, because that implementation returns false for all files on svn>=1.7, and + # because 1.6 has been deprecated for 8 years and EOL for 6 years, we opt to DTRT + # for >=1.7. Therefore: + + # TODO: Reimplement this function and _svn_uncontrolled for svn>=1.7. + # (Use 'svn st' or 'svn info', not 'svn ls') + return 0 +} + + +(( $+functions[_svn_uncontrolled] )) || +_svn_uncontrolled() { + # TODO: See comments in _svn_controlled + return 0 } (( $+functions[_svn_conflicts] )) ||