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

[PATCH] Follow-up to r922176 was:Re: svn commit: r922176 - in /subversion/trunk/subversion: include/svn_wc.h libsvn_wc/revision_status.c svnversion/main.c

From: Daniel Näslund <daniel_at_longitudo.com>
Date: Fri, 12 Mar 2010 22:52:55 +0100

On Fri, Mar 12, 2010 at 05:43:18AM -0500, Greg Stein wrote:
> On Fri, Mar 12, 2010 at 03:21, <dannas_at_apache.org> wrote:
> >...
> > +++ subversion/trunk/subversion/libsvn_wc/revision_status.c Fri Mar 12 08:21:45 2010
> >...
> >  {
> > -  struct status_baton *sb = baton;
> > +  struct walk_baton *wb = baton;
> > +  svn_revnum_t changed_rev;
> > +  svn_revnum_t revision;
> > +  svn_depth_t depth;
> > +  svn_wc__db_status_t status;
> > +  svn_boolean_t wc_root;
> > +  svn_boolean_t switched;
>
> wc_root and switched can be moved into a tighter scope.

Fixed!

> > -  if (status->entry->depth != svn_depth_exclude)
> > +  /* Added files have a revision of no interest */
> > +  if (revision != SVN_INVALID_REVNUM)
> >     {
> > -      sb->result->switched |= status->switched;
> > -      sb->result->modified |= (status->text_status != svn_wc_status_normal);
> > -      sb->result->modified |= (status->prop_status != svn_wc_status_normal
> > -                               && status->prop_status != svn_wc_status_none);
> > +      svn_revnum_t item_rev = (wb->committed
> > +                               ? changed_rev
> > +                               : revision);
>
> I think this may introduce a bug. Depending on wb->committed, we look
> at different revision values. And it may be that REVISION is valid,
> but CHANGED_REV is not. I would suggest moving the assignment of
> ITEM_REV one block out, and using that in the primary if() test.

Fixed, although I must admit that I don't truly understand how
changed_rev and revision differs!

My change of the caller svnversion/main.c in r922176 caused a problem
when svnversion was invoked on a newly added path. It is under version
control but has no revision number. At the moment '-1' is returned for
such a path. I intend to fix that in a separate patch.

[[[
Follow-up to r922176. Fix that tree changes were not considered when
determining if the wc has modifications.

* subversion/libsvn_wc/revision_status.c
  (analyze_status): Determine from status if a path has been added or
    deleted. Do some optimizations to avoid having to do a text
    comparison for determining if a wc has modifications.

Suggested by: gstein
              rhuijben
Approved by: ?
]]]

Received on 2010-03-12 22:53:28 CET

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