You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@subversion.apache.org by Philip Martin <ph...@codematters.co.uk> on 2002/11/04 15:28:46 UTC

Can we change 'svn status' output again?

Hello

I'd like to be able to see which files/directories in a working copy
are switched.  At present there is no easy way to determine this
information using the command line client and standard unix tools,
short of running a recursive 'svn info', parsing the output,
identifying parent-child relationships, and then comparing URLs.  By
contrast it would be fairly simple for the status command to do the
URL comparison as it traverses the hierarchy.

The sort of output I was thinking of is something simple, a single 'S'
say, but it would need to be in a separate column from the initial two
status characters.  Something like

$ svn st wc
M S   wc/zig/foo.c
  S   wc/zag
  S   wc/zag/zog/bar.c

The indication would be that the item is switched relative to its
direct parent, so in the example above foo.c is switched relative to
zig, and since zig is not switched, foo.c is also switched relative to
wc.  zag is also switched relative to wc, and bar.c is switched
relative to zog, and thus also relative to zag.  bar.c may have been
switched back to the same branch as wc, or to some other branch, one
uses 'svn info' to determine that.

I don't care whether the switched status is part of the standard
status output, or whether there is flag to enable it.

Why do I want this?  There are two reasons.  The first is that if one
switches part of a working copy, makes changes to the switched part,
commits them and then forgets about the switch, then later on it can
be hard to identify that the working copy is "unusual".

The other reason is that one way of working on a branch is to switch
just the items that one modifies, and leave the rest of the working
copy on the main line.  This allows the branch to be kept in
sync. with the main line without requiring lots of merges from the
main line to the branch.  Merges are only necessary if the same item
is modified on the branch and the main line.  (Those familiar with
ClearCase's dynamic views may reconise this method of working.)  For
this to be successful one needs a simple way of ensuring that all
modifications get committed to the branch, and do not accidentally get
committed to the main line.

-- 
Philip Martin

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org

Re: Can we change 'svn status' output again?

Posted by Nuutti Kotivuori <na...@iki.fi>.
Philip Martin wrote:
> brane@xbc.nu writes:
> 
>> Plilip, perhaps you should start by writing up the Definitive Guide
>> to the "svn status" and "svn update" output?
> 
> Don't forget 'svn merge' which seems to have it's own rules, or
> maybe they are the same rules, I'm not sure.  I'm don't understand
> them, see my comment in rev 3640
> libsvn_client/diff.c:merge_file_added :)
> 
> Hmm, I see to remember an 'svn status' patch that added more
> structure to the output code, that may be relevant as well.

'svn status --xml'

That's on the consider TODO list :-)

-- Naked

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org

Re: Can we change 'svn status' output again?

Posted by Philip Martin <ph...@codematters.co.uk>.
Karl Fogel <kf...@newton.ch.collab.net> writes:

> Philip Martin <ph...@codematters.co.uk> writes:
> > Hmm, I see to remember an 'svn status' patch that added more structure
> > to the output code, that may be relevant as well.
> 
> You're probably thinking of
> 
>    http://subversion.tigris.org/issues/show_bug.cgi?id=948
> 
> which adds the `--describe' option.

That's the one, thanks.

Gareth, do you remember this patch?  I've applied it locally and I
don't see the point of struct status_item tag member.  Could you
explain?  Also the --describe-only option numbers columns from zero,
which is perfectly logical for a hacker, but not so good for more
general users.  I think starting from one would be better.

Going back to my original plan to change the status output, it appears
that nothing ever appears between the '+' for history in column 4 and
the '*' in column 8.  That's 3 columns that are always empty.  Is
there a reason, some plan to show "bin" perhaps?  I'd quite like to
put 'S' into one of those columns.

-- 
Philip Martin

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org

Re: Can we change 'svn status' output again?

Posted by Karl Fogel <kf...@newton.ch.collab.net>.
Philip Martin <ph...@codematters.co.uk> writes:
> Hmm, I see to remember an 'svn status' patch that added more structure
> to the output code, that may be relevant as well.

You're probably thinking of

   http://subversion.tigris.org/issues/show_bug.cgi?id=948

which adds the `--describe' option.

-K

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org

Re: Can we change 'svn status' output again?

Posted by Philip Martin <ph...@codematters.co.uk>.
brane@xbc.nu writes:

> Plilip, perhaps you should start by writing up the Definitive Guide
> to the "svn status" and "svn update" output?

Don't forget 'svn merge' which seems to have it's own rules, or maybe
they are the same rules, I'm not sure.  I'm don't understand them, see
my comment in rev 3640 libsvn_client/diff.c:merge_file_added :)

Hmm, I see to remember an 'svn status' patch that added more structure
to the output code, that may be relevant as well.

-- 
Philip Martin

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org

Re: Can we change 'svn status' output again?

Posted by br...@xbc.nu.
Quoting Ben Collins-Sussman <su...@collab.net>:

> Philip Martin <ph...@codematters.co.uk> writes:
> 
> > $ svn st wc
> > M S   wc/zig/foo.c
> >   S   wc/zag
> >   S   wc/zag/zog/bar.c
> 
> A Big Fat +1 from me.  
> 
> My only warning is that there is *already* a 3rd column.  It's where
> the "L" for (L)ocked shows up.  So maybe you want to put the S into a
> fourth column?

And since there's already a 4th column, this would go into the 5th column...
Ooof. Perhaps we should think about overloading some of those columns, or go
back to an "ls -l"-like format. We have so many flags now that the're hard to
keep straight.

Plilip, perhaps you should start by writing up the Definitive Guide to the "svn
status" and "svn update" output?

    Brane

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org

Re: Can we change 'svn status' output again?

Posted by Philip Martin <ph...@codematters.co.uk>.
Ben Collins-Sussman <su...@collab.net> writes:

> Philip Martin <ph...@codematters.co.uk> writes:
> 
> > $ svn st wc
> > M S   wc/zig/foo.c
> >   S   wc/zag
> >   S   wc/zag/zog/bar.c
> 
> A Big Fat +1 from me.  
> 
> My only warning is that there is *already* a 3rd column.  It's where
> the "L" for (L)ocked shows up.  So maybe you want to put the S into a
> fourth column?

Yes, the example was for "illustrative purposes only" :)

-- 
Philip Martin

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org

Re: Can we change 'svn status' output again?

Posted by Ben Collins-Sussman <su...@collab.net>.
Philip Martin <ph...@codematters.co.uk> writes:

> $ svn st wc
> M S   wc/zig/foo.c
>   S   wc/zag
>   S   wc/zag/zog/bar.c

A Big Fat +1 from me.  

My only warning is that there is *already* a 3rd column.  It's where
the "L" for (L)ocked shows up.  So maybe you want to put the S into a
fourth column?


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org