zsh-users
 help / color / mirror / code / Atom feed
From: Daniel Shahaf <d.s@daniel.shahaf.name>
To: Cristiano De Michele <cristiano.demichele@uniroma1.it>
Cc: zsh-users@zsh.org
Subject: Re: subversion complete functions obsolete
Date: Sat, 24 Aug 2019 17:24:33 +0000	[thread overview]
Message-ID: <20190824172433.c4v252jc4czjsyay@tarpaulin.shahaf.local2> (raw)
In-Reply-To: <5521481D-C84A-449A-BBF7-0C429868247B@uniroma1.it>

Cristiano De Michele wrote on Fri, Aug 23, 2019 at 18:38:07 +0200:
> the subversion functions for tab completion provided by current stable
> version of zsh (5.7.1) are obsolete and they do not work as expected
> (e.g. 'svn diff <tab>’ does not provide all files under revision
> control),

I can't reproduce this.  What files does it not complete?

> simplifying the logic of tab completion, in that it completes all
> files and dirs in the current folder (i.e. not only the ones under
> revision control),

Note that completion should also complete files that are missing (status
«!»), scheduled for deletion (status «D»), and in the case of «svn up»,
files that are cropped (after an earlier «svn up --set-depth=exclude»).
Does your patch regress either of these cases?

(If multiple things are broken, a patch needs to fix only one of them to
be acceptable — provided that it doesn't regress anything else.  If it
does, it will need to be considered on a case-by-case basis.)

> since the latest svn versions store all files in the folder
> .svn of the root directory of the repository.

Context for the list:

Subversion through 1.6.x put .svn dirs in each and every subdirectory,
like CVS did.  Subversion ≥1.7 put one .svn dir in the working copy
root, like git and hg do.  Subversion 1.7.0 was released in Oct 2011.
Subversion 1.6.x EOL'd in June 2013.  At this point I see little value
in continuing to support the ≤1.6 working copy format in zsh.  If anyone
disagrees, speak up.

> Hence, I patched a bit the original file making svn completion work
> again but 

Thanks for basing your work on HEAD of master.  Please send patches
as unified diffs, not as full files.  That's easier to read and review.

Non parlo italiano.  If the comment at the top of the file is pertinent,
please translate it to English.  

Why did you delete _svn_conflicts()?  The pattern there is still valid.

I'm not fond of deleting _svn_deletedfiles(), _svn_controlled(), and
_svn_status().  If there's no way to fix them, I'd prefer to keep them
as functions that return true, so it would be easier to restore the
functionality once someone figures out an implementation.

_svn_status() could probably be salvaged just by making it check the
mtime of wc.db and wc.db-journal instead (more or less; IIRC SQLite has
some pragmas/options affecting naming of auxiliary files).

_svn_deletedfiles(), by using «svn st | grep '^D' | cut -c8-».

_svn_controlled(), by using «svn info -R» or «svn st --xml».  (It would
be wrong to use «svn ls» there: that wouldn't DTRT on mixed-revision
and/or switched working copies.)

And looking further into it, _svn_deletedfiles() and _svn_controlled()
can both be computed by a _single_ command: «svn info -R
--show-item=schedule».

Thanks for the patch!

Cheers,

Daniel

  reply	other threads:[~2019-08-24 17:25 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-08-23 16:38 Cristiano De Michele
2019-08-24 17:24 ` Daniel Shahaf [this message]
2019-08-24 20:25   ` Cristiano De Michele
2019-08-24 21:16     ` Daniel Shahaf
     [not found]       ` <35D00560-E05B-40F1-B581-43BAAC418C32@uniroma1.it>
     [not found]         ` <bfb30924-2b36-4d99-b8ba-674eb280c5e0@www.fastmail.com>
2019-08-25  9:46           ` Cristiano De Michele
2019-08-26 14:23             ` Daniel Shahaf

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=20190824172433.c4v252jc4czjsyay@tarpaulin.shahaf.local2 \
    --to=d.s@daniel.shahaf.name \
    --cc=cristiano.demichele@uniroma1.it \
    --cc=zsh-users@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).