[svn.haxx.se] · SVN Dev · SVN Users · SVN Org · TSVN Dev · TSVN Users · Subclipse Dev · Subclipse Users · this month's index

Re: Extracting URL from WC

From: Mark Reibert <svn_at_reibert.com>
Date: 2007-12-19 07:15:03 CET

On Tue, 2007-12-18 at 13:16 +0100, marc gonzalez-carnicer wrote:
> hi,
>
> 2007/12/18, Mark Reibert <svn@reibert.com>:
> >
> > I can't think of anything much shorter than:
> >
> > svn info | awk '/^URL:/ { print $2 }'
>
> now that i see your post, i recall there is something i never dared
> to ask. i wonder if it would be a good idea to provide the svn status
> command with an option (or a set of options) that allow searching
> or modified files, conflicted files, added files, etc, in order to ease
> scripting. something that would be equivalent to type commands like:
>
> svn status | awk '/^M/ { print $2 }'
>
> this would not work for files whose properties have been modified
> (awk '^ M'), etc. i did something like that for a script that helps
> the user to solve conflicts, that starts in that case with
>
> FITXERS=`svn status | grep "^C" | cut -c 8-`
>
> and performs moreless the same way as svn update for
> version 1.5 when there are conflicts. this scripts is for
> an old machine that uses solaris 8 and launches filemerge
> (kdiff3 is not easily installable). i tried to find the spec on the
> roadmap for svn 1.5.0 but i failed, don't know if it has been
> moved).
>
> doing this kind of scripts / hacks is always tricky and tedious.
> don't you think it would be useful to have these set of options
> for svn status?

I am not a fan of adding functionality to commands that can be
accomplished with existing tools. The problem is, once you start down
that path you invariably leave out some feature. How many times has a
Window application popped up a dialog that does not give you the option
you need? And you can't do anything about it!

The UNIX philosophy has always been a collection of small tools that do
very specific things well, with stdin/stdout and a pipe to glue it all
together. Thus there is almost no limit to what can be accomplished. It
is the reason UNIX is still viable after nearly 40 years.

-- 
----------------------
Mark S. Reibert, Ph.D.
svn@reibert.com
----------------------
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org
Received on Wed Dec 19 07:15:22 2007

This is an archived mail posted to the Subversion Users mailing list.

This site is subject to the Apache Privacy Policy and the Apache Public Forum Archive Policy.