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

Re: tree-conflicts: add-on-add with directories

From: Julian Foad <julianfoad_at_btopenworld.com>
Date: Mon, 08 Dec 2008 11:50:56 +0000

Neels Janosch Hofmeyr wrote:
> I've just found out that we're not actually raising a tree-conflict upon an
> added-added conflict involving only a directory. It *is* reported on files
> when similarly named files are in the two added dirs.
>
> See attached reproduction script (which was aiming at testing whether such
> an add-add conflict on a dir was blocked when stepping into it).

It's tested by tree_conflict_tests.py 8 "up/sw dir: add onto add", which
is XFAIL.

This code is in update_editor.c:add_directory():
[[[
      else /* Obstructing dir *is* versioned or scheduled for addition. */
        {
          const svn_wc_entry_t *entry;

          SVN_ERR(svn_wc_entry(&entry, db->path, adm_access, FALSE, pool));

          /* Anything other than a dir scheduled for addition without
             history is an error. */
          /* ### what's this "add_existed" clause for? */
          if (entry
              && entry->schedule == svn_wc_schedule_add
              && ! entry->copied)
            {
              db->add_existed = TRUE;
            }
          else
            {
               (Raise a tree conflict)
            }
]]]

The case of a directory already scheduled for addition WITHOUT HISTORY
is treated as a special case. I couldn't understand why, and wrote that
"###" comment. One of us can take another look at it some time and see
if we can figure it out.

- Julian

[...]
> Before I cram this list with sending retries, just get the "attached"
> file at: http://hofmeyr.de/svn/cd-into-conflicted3.sh.txt

------------------------------------------------------
http://subversion.tigris.org/ds/viewMessage.do?dsForumId=462&dsMessageId=981116
Received on 2008-12-08 12:51:48 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.