From dae3e135d8c3e2d16e7dc22582aa8a3f66716de7 Mon Sep 17 00:00:00 2001 From: Daniel Shahaf Date: Fri, 29 Nov 2019 01:45:19 +0000 Subject: 44948: _subversion: Make _svn_controlled offer everything rather than nothing. --- ChangeLog | 3 +++ Completion/Unix/Command/_subversion | 19 +++++++++++++++++-- 2 files changed, 20 insertions(+), 2 deletions(-) diff --git a/ChangeLog b/ChangeLog index e870beee8..b6ee5ca22 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,8 @@ 2019-11-29 Daniel Shahaf + * 44948: Completion/Unix/Command/_subversion: Make + _svn_controlled offer everything rather than nothing. + * 44947: Completion/Unix/Command/_subversion: Complete the 'auth', 'changelist', 'patch', 'resolve', and 'x-unshelve' subcommands. 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] )) || -- cgit 1.4.1