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

Re: [PATCH] - svn blame doesn't use the working revision (Issue 1777)

From: C. Michael Pilato <cmpilato_at_collab.net>
Date: 2004-04-16 17:43:06 CEST

John Szakmeister <john@szakmeister.net> writes:

> On Friday 16 April 2004 06:24, S.Ramaswamy wrote:
> > Log Message:
> > Fix Issue #1777: 'svn blame' should default to the working revision,
> > when no revision is specified.
> >
> > * subversion/clients/cmdline/blame-cmd.c
> > (svn_cl__blame) : Set opt_state->end_revision.kind
> > to svn_opt_revision_base,to ensure 'svn blame' defaults to base
> > revision.
> >
> >
> > Index: subversion/clients/cmdline/blame-cmd.c
> > ===================================================================
> > -- subversion/clients/cmdline/blame-cmd.c (revision 9374)
> > +++ subversion/clients/cmdline/blame-cmd.c (working copy)
> > @@ -108,7 +108,7 @@
> > opt_state->start_revision.value.number = 1;
> > }
> > else
> > - opt_state->end_revision.kind = svn_opt_revision_head;
> > + opt_state->end_revision.kind = svn_opt_revision_base;
> > }
> >
> > if (opt_state->start_revision.kind == svn_opt_revision_unspecified)
>
> Small problem here. This breaks using a URL without specifying a revision.
> With your patch I get the following when trying to use a URL instead of a
> working copy path:

This could be fixed without breaking the API promises. Just make the
else clause set a flag that means "I still need to resolve this choice
between BASE and HEAD". Then, inside the targets loops, if that flag
is set, make the value of end_revision.kind dependent on
svn_path_is_url(), HEAD for URLs, BASE otherwise.

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Fri Apr 16 17:46:55 2004

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.