zsh-workers
 help / color / mirror / code / Atom feed
* [PATCH 1/3] _subversion: Make _svn_conflicts not offer all files in the directory.
@ 2019-11-29  1:45 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 ` [PATCH 3/3] _subversion: Make _svn_controlled offer everything rather than nothing Daniel Shahaf
  0 siblings, 2 replies; 3+ messages in thread
From: Daniel Shahaf @ 2019-11-29  1:45 UTC (permalink / raw)
  To: zsh-workers

---
 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] )) ||

^ permalink raw reply	[flat|nested] 3+ messages in thread

* [PATCH 2/3] _subversion: Complete the 'auth', 'changelist', 'patch', 'resolve', and 'x-unshelve' subcommands.
  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 ` Daniel Shahaf
  2019-11-29  1:45 ` [PATCH 3/3] _subversion: Make _svn_controlled offer everything rather than nothing Daniel Shahaf
  1 sibling, 0 replies; 3+ messages in thread
From: Daniel Shahaf @ 2019-11-29  1:45 UTC (permalink / raw)
  To: zsh-workers

---
 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)*)

^ permalink raw reply	[flat|nested] 3+ messages in thread

* [PATCH 3/3] _subversion: Make _svn_controlled offer everything rather than nothing.
  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
  1 sibling, 0 replies; 3+ messages in thread
From: Daniel Shahaf @ 2019-11-29  1:45 UTC (permalink / raw)
  To: zsh-workers

---
 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] )) ||

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2019-11-29  1:46 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
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 ` [PATCH 3/3] _subversion: Make _svn_controlled offer everything rather than nothing Daniel Shahaf

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).