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

Printing the revision number of a WC item [was: [PATCH] svn_client_blame3() and svn_opt_revision_working]

From: Julian Foad <julianfoad_at_btopenworld.com>
Date: 2006-05-09 23:13:49 CEST

Peter N. Lundblad wrote:
> Daniel Rall writes:
> > On Mon, 08 May 2006, C. Michael Pilato wrote:
> > > +1 on immediately, today, returning an SVN_ERR_UNSUPPORTED_FEATURE for blame
> > > of 'WORKING'.
> >
> > +1 on eventually adding support for this. Exactly how the changes are
> > communicated to the user could use a little discussion. For example,
> > do we say all WORKING changes were made by the user performing the
> > 'blame' operation (which might not be true in the case of a shared
> > WC), or do we use some generic text indicating that the changes are
> > specific to the WC (e.g. "(local)")? What to we use in place of the
> > revision?
>
> This is already handled by cat. It adds an M to the revision number
> and uses "(local)" for the user name. It uses the current mtime of the file.

(It took me a while to work out why "cat" prints these things at all: it's in
keyword expansion, specifically in keyword re-expansion to ensure that the
keyword values displayed by "svn cat" are distinct from the values that are
probably still in the WC file that actually correspond to its base version.)

I looked at these cases:

"svnversion" (its main output) uses "1234M"
"svn cat" (keyword expansion) uses "1234M"
"svn diff" (diff header) uses "(working copy)"
"svn blame" (line prefix) under consideration

and thought, "We could do with some consistency across commands."

However, we're not really trying to represent the same thing in these "svn"
commands that "svnversion" conveys. The "svnversion" example means "These WC
items are based on r1234 and modified with respect to their base". The other
commands want to say, "This is a working copy item based on r1234". They do
not and should need to check whether the item is modified.

On that basis, I would now say that "svn cat" is wrong to use the "1234M" style
and "svn cat/blame/diff" should use a different notation from that (but the
same as each other) such as "(working copy)". Does that make sense?

Actually, "(working copy)" is uncomfortably long for use in "svn blame" so
maybe we want to choose a different notation.

- Julian

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Tue May 9 23:14:24 2006

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