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

Re: svn commit: r30009 - trunk/subversion/libsvn_wc

From: Erik Huelsmann <ehuels_at_gmail.com>
Date: Sun, 23 Mar 2008 16:36:28 +0100

On Sun, Mar 23, 2008 at 12:22 AM, Karl Fogel <kfogel_at_red-bean.com> wrote:
> dionisos_at_tigris.org writes:
> > --- trunk/subversion/libsvn_wc/update_editor.c Sat Mar 22 07:33:07 2008 (r30008)
> > +++ trunk/subversion/libsvn_wc/update_editor.c Sat Mar 22 13:54:37 2008 (r30009)
> > @@ -2621,8 +2621,10 @@ merge_file(svn_wc_notify_state_t *conten
> > SVN_ERR(svn_wc__loggy_entry_modify(&log_accum, adm_access,
> > fb->path, &tmp_entry, flags, pool));
> >
> > - /* Log commands to handle text-timestamp and working-size */
> > - if (!is_locally_modified)
> > + /* Log commands to handle text-timestamp and working-size,
> > + if the file is - or will be - unmodified and schedule-normal */
> > + if (!is_locally_modified &&
> > + (fb->added || entry->schedule == svn_wc_schedule_normal))
> > {
> > /* Adjust working copy file unless this file is an allowed
> > obstruction. */
>
> Shouldn't it be
>
>
> (!is_locally_modified &&
> (fb->added
> || fb->added_with_history
>
> || entry->schedule == svn_wc_schedule_normal))
>
> ? That is, don't we need to accept the 'replaced' case too?

> (By the way, I think 'struct file_baton' under-documents its 'added'
> field, since it's not entirely clear whether 'added_with_history' always
> implies 'added', or whether the former can be true while the latter is
> false.)

From the comment above, I conclude that you did your research, but
that it still leaves this question makes me sad about the state of
libsvn_wc though.

To answer your question: I think the answer is 'no': fb (file-baton)
is about what we're being sent from the server. Replacements will be
sent as D+A, meaning that the A code-path will be executed and 'added'
will be TRUE. The 'added' transformation presumably leads to a new
'schedule-normal' file in the Working Copy.

If the file wasn't added, but updated, then, if the file was
'replaced-with-history', we don't need to cache the working size and
time, since those serve to detect whether the target is a committable:
it already is. (BTW: Is receiving an update for a
replaced-with-history file a tree conflict?) In any other case, since
the schedule isn't normal anyway, I don't think we need to cache the
WC file metadata.

Hope that answers your question.

Bye,

Erik.

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe_at_subversion.tigris.org
For additional commands, e-mail: dev-help_at_subversion.tigris.org
Received on 2008-03-23 16:36:43 CET

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