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

Re: [PATCH] Add "copied" subcommand to svnlook

From: Christopher Ness <chris_at_nesser.org>
Date: 2005-09-23 05:03:07 CEST

Paul, nice work.

I'm not sure if a new sub-command is needed or if this information
should be added to the "changed" sub-command.

Since there isn't a sense of "copied" in `svn help status` I think the
new sub-command could be useful. But I'm looking at the general
usability of the svn family of programs. svnlook really doesn't have
anything to do with the help output of `svn status`.

The output of the new command isn't very computer friendly for parsing.
The big example is what if a path contains a space, which is what I
would likely use for my regex (a better one would be " is a copy of ")

[nesscg@heidrun copyWC]$ svnlook copied /tmp/copy
tags/project1/1.0/ is a copy of /trunk/ (rev 1)
tags/project1/1.0/file2.c is a copy of /trunk/file2.c (rev 2)
tags/project1/1.0/file3.c is a copy of /trunk/file3.c (rev 2)

You could enquote the paths like:
'./tags/project1/1.0/' is a copy of '/trunk/' (rev 1)

But I believe file names can also have the ' character in them as well.
You could try this, which is done in `svn log` to seperate headers:

./tags/project1/1.0/ | /trunk/ | r1

Since svnlook only runs on the server, the conflicted state will not
exist and is out of context. Perhaps some people would favour
overloading the "C" character as copied in svnlook?

Did anyone else find the run-time help rather useless for `svnlook`
subcommands (for example "changed")? What values are possible returns?
I could dig into updating that.

Cheers,
Chris

On Thu, 2005-09-22 at 20:59 -0400, Paul Dugas wrote:
> The attached patch adds a new "copied" subcommand to the svnlook command.
> I've been looking for something like this to help enforce some constraints
> on how tags and branches are created in my repositories. I need to ensure
> tags are copies of trunk and branches start as copies of tags.
>
> All I've done is copy the code from the "changed" subcommand the, instead
> of displaying A/D/R/U entries, I'm printing a line for each node where
>
> ((node->action == 'A') && (node->copyfrom_path))
>
> Two questions...
>
> Is there a better way to do this?
>
> Is there a prefered (more easily parsed) way to display the info?
>
> I'm sure I've not done 100% testing of this. All I can say is "works for
> me" ;)
>
> Cheers,
>
> Paul
>
> PS: my first subversion patch, pls be gentle
> --
> Paul Dugas, Computer Engineer Dugas Enterprises, LLC
> paul@dugas.cc phone: 404-932-1355 522 Black Canyon Park
> http://dugas.cc fax: 866-751-6494 Canton, GA 30114 USA
> --
> Onsite at GDOT W.Annex 404-463-2860 x199
> --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org For additional commands, e-mail: dev-help@subversion.tigris.org

-- 
http://www.nesser.org
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Fri Sep 23 05:03:33 2005

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

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