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

RE: svn commit: r1434913 - /subversion/trunk/subversion/libsvn_wc/wc_db.c

From: Bert Huijben <bert_at_qqmail.nl>
Date: Thu, 17 Jan 2013 22:14:11 +0100

> -----Original Message-----
> From: rhuijben_at_apache.org [mailto:rhuijben_at_apache.org]
> Sent: donderdag 17 januari 2013 22:03
> To: commits_at_subversion.apache.org
> Subject: svn commit: r1434913 -
> /subversion/trunk/subversion/libsvn_wc/wc_db.c
>
> Author: rhuijben
> Date: Thu Jan 17 21:03:26 2013
> New Revision: 1434913
>
> URL: http://svn.apache.org/viewvc?rev=1434913&view=rev
> Log:
> * subversion/libsvn_wc/wc_db.c
> (read_children_info): Add note about possible bug.
>
> Modified:
> subversion/trunk/subversion/libsvn_wc/wc_db.c
>
> Modified: subversion/trunk/subversion/libsvn_wc/wc_db.c
> URL:
> http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_wc/wc_
> db.c?rev=1434913&r1=1434912&r2=1434913&view=diff
> ==========================================================
> ====================
> --- subversion/trunk/subversion/libsvn_wc/wc_db.c (original)
> +++ subversion/trunk/subversion/libsvn_wc/wc_db.c Thu Jan 17 21:03:26
> 2013
> @@ -8044,12 +8044,16 @@ read_children_info(svn_wc__db_wcroot_t *
> child_item->info.have_more_work = (child_item->nr_layers > 1);
>
> /* Moved-to can only exist at op_depth > 0. */
> + /* ### Should we really do this for every layer where op_depth > 0
> + in undefined order? */
> moved_to_relpath = svn_sqlite__column_text(stmt, 21, NULL);
> if (moved_to_relpath)
> child_item->info.moved_to_abspath =
> svn_dirent_join(wcroot->abspath, moved_to_relpath, result_pool);
>
> /* Moved-here can only exist at op_depth > 0. */
> + /* ### Should we really do this for every layer where op_depth > 0
> + in undefined order? */
> child_item->info.moved_here = svn_sqlite__column_boolean(stmt,
> 20);
> }

I think
$ svn mv A B
$ svn mv B A

Will now store moved_from and moved_to in the same record, at the op-depth of A.
(Or copy_tests.py move_file_back_and_forth wouldn't show moved_from and moved_to on a single node using status using the code snippet here)

How will this store a future move
$ svn mv A C

The original 1.7 model would have only stored moved_from at op-depth 0, so we can find the in-wc location of every node in the repository using a single query (if there is one).

--------------
21:07 <@julianf> When you put a replacement file or dir at the moved-from path?
21:07 <@breser> Yup
21:07 <@breser> svn mv A A2; svn status; svn mkdir A; svn status
21:08 <@breser> No more move tracking.
21:08 <@breser> And if you do an update that brings in a change to A it just conflicts.
21:09 <@breser> err it does display the resolution option, it just gives you the 'working' state err.
21:09 <@julianf> Good catch.
21:10 <@breser> If our wc move design is predicated on not replacing the from path we've made a major error.
21:10 <@breser> (I've been playing around with this trying to come up with realistic scenarios that people are likely
                to do)
-------------

Did we find a few small issues in the current implementation, or should we first go back to the design of the move storage?

        Bert
Received on 2013-01-17 22:14:51 CET

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.