From: Daniel Shahaf <d.s@daniel.shahaf.name>
To: zsh-workers@zsh.org
Subject: [PATCH 3/3] _subversion: Make _svn_controlled offer everything rather than nothing.
Date: Fri, 29 Nov 2019 01:45:19 +0000 [thread overview]
Message-ID: <20191129014519.12513-3-danielsh@tarpaulin.shahaf.local2> (raw)
In-Reply-To: <20191129014519.12513-1-danielsh@tarpaulin.shahaf.local2>
---
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] )) ||
prev parent reply other threads:[~2019-11-29 1:46 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-11-29 1:45 [PATCH 1/3] _subversion: Make _svn_conflicts not offer all files in the directory Daniel Shahaf
2019-11-29 1:45 ` [PATCH 2/3] _subversion: Complete the 'auth', 'changelist', 'patch', 'resolve', and 'x-unshelve' subcommands Daniel Shahaf
2019-11-29 1:45 ` Daniel Shahaf [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20191129014519.12513-3-danielsh@tarpaulin.shahaf.local2 \
--to=d.s@daniel.shahaf.name \
--cc=zsh-workers@zsh.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.vuxu.org/mirror/zsh/
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).