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

Re: In which situation will a deleted item be scheduled add/replace?

From: Rui, Guo <timmyguo_at_mail.ustc.edu.cn>
Date: Sat, 16 Aug 2008 17:44:29 +0800

On Sat, Aug 16, 2008 at 10:09:13AM +0100, Philip Martin wrote:
> "Rui, Guo" <timmyguo_at_mail.ustc.edu.cn> writes:
> > On Fri, Aug 15, 2008 at 05:59:30PM +0100, Philip Martin wrote:
> >> That looks like a bug.
> >>
> >> svnadmin create repo
> >> svn co file://`pwd`/repo wc
> >> touch wc/foo wc/bar
> >> svn add wc/foo wc/bar
> >> svn ci -mm wc
> >> svn up wc
> >> svn rm wc/foo
> >> svn ci -mm wc # foo is entry->deleted
> >> svn cp wc/bar wc/foo # BUG! foo is not entry->deleted
> >> svn revert wc/foo
> >> svn up -r1 wc
> > And if you try without '-r1' instead, the update will simply fail.
> Is that because revert leaves an unversioned wc/foo? I forgot to show
> 'rm wc/foo' after the revert; it's possible that that is a revert bug
> and that the copy should not count as a local modification.
No, I did remove the foo before an update. The revert just cause the record of
foo in the .entries file go away. As a result, the foo looks like a totally
unversioned item in the wc and will cause problem in later update. But I don't
think revert is the one to blame. The root of the problem is still the one
you have figured out.

> >>
> >> The last update should restore wc/foo but the copy bug means it
> >> doesn't happen.
> >
> > Does this bug deserve a fix? It seems not very harmful.
> I'd say yes, but I'm not planning to do it :)
Me neither :)

Now, add+deleted is not a problem for me. And I digged into the code a bit
about replace. I find that it means a scheduled-delete plus a scheduled-add. I
think the scheduled-delete and deleted flag can not happen at the same time.
If that's the truth, testing against (!entry->deleted || entry->schedule ==
svn_wc_schedule_replace) is meaningless. Right? On the other hand, if the
situation can happen, some code will have to be fixed, since they only cover
the situation of 'add'.


To unsubscribe, e-mail: dev-unsubscribe_at_subversion.tigris.org
For additional commands, e-mail: dev-help_at_subversion.tigris.org
Received on 2008-08-16 11:44:50 CEST

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.