You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@subversion.apache.org by st...@apache.org on 2011/10/17 13:28:35 UTC
svn commit: r1185110 - /subversion/trunk/subversion/libsvn_wc/update_editor.c
Author: stsp
Date: Mon Oct 17 11:28:35 2011
New Revision: 1185110
URL: http://svn.apache.org/viewvc?rev=1185110&view=rev
Log:
During update, auto-merge incoming file additions destined for a directory
that was moved away.
* subversion/libsvn_wc/update_editor.c
(add_file): Set the MOVED_TO_ABSPATH in the file baton if the parent
was moved away. All other magic is already being handled elsewhere.
Modified:
subversion/trunk/subversion/libsvn_wc/update_editor.c
Modified: subversion/trunk/subversion/libsvn_wc/update_editor.c
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_wc/update_editor.c?rev=1185110&r1=1185109&r2=1185110&view=diff
==============================================================================
--- subversion/trunk/subversion/libsvn_wc/update_editor.c (original)
+++ subversion/trunk/subversion/libsvn_wc/update_editor.c Mon Oct 17 11:28:35 2011
@@ -3369,6 +3369,15 @@ add_file(const char *path,
do_notification(eb, fb->local_abspath, svn_node_file,
svn_wc_notify_tree_conflict, scratch_pool);
}
+ else if (wc_kind == svn_kind_unknown &&
+ versioned_locally_and_present == FALSE &&
+ pb->moved_to_abspath)
+ {
+ /* The parent directory of the file we're adding was moved.
+ * Add the new file at the new location. */
+ fb->moved_to_abspath = svn_dirent_join(pb->moved_to_abspath,
+ fb->name, fb->pool);
+ }
svn_pool_destroy(scratch_pool);
Re: svn commit: r1185110 -
/subversion/trunk/subversion/libsvn_wc/update_editor.c
Posted by Stefan Sperling <st...@elego.de>.
On Tue, Oct 18, 2011 at 01:03:23AM +0200, Stefan Sperling wrote:
> On Mon, Oct 17, 2011 at 03:44:11PM +0200, Bert Huijben wrote:
> > What if the child was moved to a different location than its parent?
> >
> > $ svn mv A/child B/child
> > $ svn mv A new_A
> >
> > $ svn up .
> > Receives update for A/child
>
> Yes, that's a problem -- what happens is that the child goes missing.
> Thanks for pointing it out.
See http://subversion.tigris.org/issues/show_bug.cgi?id=4037
I don't think we can solve this without the client knowing about
the destination of the incoming move.
The issue is marked as a 1.8 blocker to make sure the final release
does something sane here.
Re: svn commit: r1185110 -
/subversion/trunk/subversion/libsvn_wc/update_editor.c
Posted by Stefan Sperling <st...@elego.de>.
On Mon, Oct 17, 2011 at 03:44:11PM +0200, Bert Huijben wrote:
> What if the child was moved to a different location than its parent?
>
> $ svn mv A/child B/child
> $ svn mv A new_A
>
> $ svn up .
> Receives update for A/child
Yes, that's a problem -- what happens is that the child goes missing.
Thanks for pointing it out.
Note that I am working on incoming add vs. local move at the moment.
Your example uses incoming move vs. local move, which is a bit different.
But I'll look into fixing it tomorrow.
Maybe it will turn out to be simple, maybe not.
RE: svn commit: r1185110 - /subversion/trunk/subversion/libsvn_wc/update_editor.c
Posted by Bert Huijben <be...@qqmail.nl>.
> -----Original Message-----
> From: stsp@apache.org [mailto:stsp@apache.org]
> Sent: maandag 17 oktober 2011 13:29
> To: commits@subversion.apache.org
> Subject: svn commit: r1185110 -
> /subversion/trunk/subversion/libsvn_wc/update_editor.c
>
> Author: stsp
> Date: Mon Oct 17 11:28:35 2011
> New Revision: 1185110
>
> URL: http://svn.apache.org/viewvc?rev=1185110&view=rev
> Log:
> During update, auto-merge incoming file additions destined for a directory
> that was moved away.
>
> * subversion/libsvn_wc/update_editor.c
> (add_file): Set the MOVED_TO_ABSPATH in the file baton if the parent
> was moved away. All other magic is already being handled elsewhere.
>
> Modified:
> subversion/trunk/subversion/libsvn_wc/update_editor.c
>
> Modified: subversion/trunk/subversion/libsvn_wc/update_editor.c
> URL:
> http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_wc/upd
> ate_editor.c?rev=1185110&r1=1185109&r2=1185110&view=diff
> ==========================================================
> ====================
> --- subversion/trunk/subversion/libsvn_wc/update_editor.c (original)
> +++ subversion/trunk/subversion/libsvn_wc/update_editor.c Mon Oct 17
> 11:28:35 2011
> @@ -3369,6 +3369,15 @@ add_file(const char *path,
> do_notification(eb, fb->local_abspath, svn_node_file,
> svn_wc_notify_tree_conflict, scratch_pool);
> }
> + else if (wc_kind == svn_kind_unknown &&
> + versioned_locally_and_present == FALSE &&
> + pb->moved_to_abspath)
> + {
> + /* The parent directory of the file we're adding was moved.
> + * Add the new file at the new location. */
> + fb->moved_to_abspath = svn_dirent_join(pb->moved_to_abspath,
> + fb->name, fb->pool);
> + }
What if the child was moved to a different location than its parent?
$ svn mv A/child B/child
$ svn mv A new_A
$ svn up .
Receives update for A/child
Bert