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

Re: Right place for cleaning up entries fields on delete

From: Philip Martin <philip_at_codematters.co.uk>
Date: 2005-09-22 18:27:24 CEST

Ivan Zhakov <chemodax@gmail.com> writes:

> I am fixing deletion of replaced files in working copy (in
> wc-replacements branch). When file replaced it has copyfrom-url,
> copyfrom-rev and copied fields set. But when file gets deleted these
> fields should be cleared, am I right?

Just to check I understand you, something like:

  $ svn rm foo
  $ svn cp URL foo
  $ svn rm --force foo

> Next question where this logic should be implemented. I have found two
> places where this could be done:
> 1. In subversion/libsvn_wc/adm_ops:svn_wc_delete2() when we going to
> modify schedule field also modify copyfrom-url and copyfrom-rev
> fields.

There are already a number of places where the wc code is not atomic
and probably should be. I think this might be adding another.

> 2. Another place that I found is
> subversion/libsvn_wc/entries.c:fold_scheduling(). In this place
> already implemented similiar logic for discard entry on delete if
> before it was added.

fold_scheduling looks a little bit odd to me, how about doing it in
svn_wc__entry_modify.

-- 
Philip Martin
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Thu Sep 22 18:28:18 2005

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