You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@subversion.apache.org by Alan Wood <Al...@clear.net.nz> on 2011/03/21 00:33:34 UTC

Error with tree conflict data in database after update from 1.6

Hi Devs
 I have now taken the plunge and moved to using version 1.7 tsvn for my development.

After updating one of my working copies from 1.6 using TortoiseSVN from 2011/03/20
subversion 1.7.0 r1082999 I had the following error:

using svn status either from TortoiseSVN or from command line gave:
..\..\..\subversion\svn\status-cmd.c:326: (apr_err=155016)
..\..\..\subversion\svn\util.c:969: (apr_err=155016)
..\..\..\subversion\libsvn_client\status.c:537: (apr_err=155016)
..\..\..\subversion\libsvn_wc\status.c:2430: (apr_err=155016)
..\..\..\subversion\libsvn_wc\status.c:1259: (apr_err=155016)
..\..\..\subversion\libsvn_wc\status.c:1023: (apr_err=155016)
..\..\..\subversion\libsvn_wc\status.c:1207: (apr_err=155016)
..\..\..\subversion\libsvn_wc\status.c:803: (apr_err=155016)
..\..\..\subversion\libsvn_wc\status.c:561: (apr_err=155016)
..\..\..\subversion\libsvn_wc\questions.c:424: (apr_err=155016)
..\..\..\subversion\libsvn_wc\wc_db.c:7742: (apr_err=155016)
..\..\..\subversion\libsvn_wc\tree_conflicts.c:209: (apr_err=155016)
svn: E155016: Invalid conflict info in tree conflict description

After a debug session I found the offending row was for a directory 
called LanguageDlls.

SELECT op_depth, repos_id, repos_path, presence, kind, revision, 
checksum, translated_size, changed_revision, changed_date, 
changed_author, depth, symlink_target, last_mod_time, properties
FROM nodes
WHERE wc_id = 1 AND local_relpath = "LanguageDlls"
ORDER BY op_depth DESC;
0|1|trunk/Qproject/SuiteMSVC/LanguageDlls|normal|dir|365|||361|12994
79689054333|alan|infinity||0|

SELECT * FROM actual_node WHERE wc_id = 1 AND local_relpath = 
"LanguageDlls"; 
  1|LanguageDlls|||||||||()||||

The "()" for the tree_conflict_data causes the error to be reported.
I have deleted this row and all is ok now.

Unfortunatly I did not keep a copy of the old working copy. It was 
all up to date with no changes so I knew I could just check it out 
again. I now do not have a way to reproduce this.
 There should not have been any conflict data of any sort in this 
working copy as I am the only developer and I have only every had 
one working copy. But that is relying on my memory a bit much.

I hope someone may be able to plug this little hole in the upgrade 
system.

Thanks
Alan Wood

Alan Wood
Napier
New Zealand
Phone +64 6 835 4505



[PATCH] #3840: Re: Error with tree conflict data in database after update from 1.6

Posted by Daniel Shahaf <da...@elego.de>.
I've added my thoughts to the issue [1]; essentially, I've observed that
svn 1.6 stores tree_conflict_data="(foo bar)" where 1.7 stores
tree_conflict_data="foo bar", and this patch makes 'svn upgrade'
adjust accordingly.

I haven't tested upgrading from interim 1.7-dev formats, and I don't
recall offhand at which point we made the transition to lose the extra
level of ().

Reviews welcome, otherwise I'll commit it in a few days.

[[[
Fix issue #3840, "empty conflict description in db after update from 1.6".

* subversion/libsvn_wc/entries.c
  (write_entry): Strip one level of skel-wrapping () from TREE_CONFLICT_DATA
    when upgrading entries.
]]]

[[[
Index: subversion/libsvn_wc/entries.c
===================================================================
--- subversion/libsvn_wc/entries.c	(revision 1085641)
+++ subversion/libsvn_wc/entries.c	(working copy)
@@ -1824,8 +1824,20 @@ write_entry(struct write_baton **entry_node,
 
   if (entry->tree_conflict_data)
     {
+      /* Issue #3840: 1.6 uses one pair of () more than we do, so
+         strip it.  Thus, "()" becomes NULL and "((skel1) (skel2))"
+         becomes "(skel1) (skel2)". */
+      svn_skel_t *skel;
+
       actual_node = MAYBE_ALLOC(actual_node, scratch_pool);
-      actual_node->tree_conflict_data = entry->tree_conflict_data;
+      skel = svn_skel__parse(entry->tree_conflict_data,
+                             strlen(entry->tree_conflict_data),
+                             scratch_pool);
+      if (skel->children)
+        actual_node->tree_conflict_data = svn_skel__unparse(skel->children,
+                                                            result_pool)->data;
+      else
+        actual_node->tree_conflict_data = NULL;
     }
 
   if (entry->file_external_path != NULL)
]]]

[1] http://subversion.tigris.org/issues/show_bug.cgi?id=3840

Alan Wood wrote on Mon, Mar 21, 2011 at 23:52:20 +1300:
> 
> On 21 Mar 2011 at 10:48, Stefan Sperling wrote:
> 
> > On Mon, Mar 21, 2011 at 12:33:34PM +1300, Alan Wood wrote:
> > >  There should not have been any conflict data of any sort in this 
> > > working copy as I am the only developer and I have only every had 
> > > one working copy.
> > 
> > That's not a valid assumption.
> > It is possible to inflict tree conflicts upon yourself, with only
> > one working copy: http://subversion.apache.org/faq.html#self-tree-conflict
> 
> Thanks for the link. I had read this a while ago, but forgotton all about it.
> 
> > > I hope someone may be able to plug this little hole in the upgrade 
> > > system.
> > 
> > Looks like the upgrade code shouldn't insert empty conflict description
> > skels into the DB. Can you file an issue that points to this mailing list
> > thread, so that this doesn't fall through the cracks? Thanks.
> 
> Filed issue# 3840
> http://subversion.tigris.org/issues/show_bug.cgi?id=3840
> 
> Sorry for the confusion with the version labels.
> 
> > 
> > And thanks for testing!
> No trouble, would like to have more time for it.
> 
> Alan
> 
> 
> 
> Alan Wood
> 
> Napier
> New Zealand
> Phone +64 6 835 4505
> 

Re: Error with tree conflict data in database after update from 1.6

Posted by Julian Foad <ju...@wandisco.com>.
Alan Wood wrote:
> Sorry for the confusion with the version labels.

No problem.  I was just concerned that maybe we weren't successfully
getting the message out that these are builds of software that is still
under development, but it sounds like you were aware so that's OK.  It
did make me double-check what "svn --version" reports, and I see it says
"1.7.0 (dev build)", and I thought maybe it would be better if it said
"1.7.0-dev (... something ...)" instead, so I wrote a separate email
about that.

- Julian



Re: Error with tree conflict data in database after update from 1.6

Posted by Alan Wood <Al...@clear.net.nz>.
On 21 Mar 2011 at 10:48, Stefan Sperling wrote:

> On Mon, Mar 21, 2011 at 12:33:34PM +1300, Alan Wood wrote:
> >  There should not have been any conflict data of any sort in this 
> > working copy as I am the only developer and I have only every had 
> > one working copy.
> 
> That's not a valid assumption.
> It is possible to inflict tree conflicts upon yourself, with only
> one working copy: http://subversion.apache.org/faq.html#self-tree-conflict

Thanks for the link. I had read this a while ago, but forgotton all about it.

> > I hope someone may be able to plug this little hole in the upgrade 
> > system.
> 
> Looks like the upgrade code shouldn't insert empty conflict description
> skels into the DB. Can you file an issue that points to this mailing list
> thread, so that this doesn't fall through the cracks? Thanks.

Filed issue# 3840
http://subversion.tigris.org/issues/show_bug.cgi?id=3840

Sorry for the confusion with the version labels.

> 
> And thanks for testing!
No trouble, would like to have more time for it.

Alan



Alan Wood

Napier
New Zealand
Phone +64 6 835 4505


Re: Error with tree conflict data in database after update from 1.6

Posted by Stefan Sperling <st...@elego.de>.
On Mon, Mar 21, 2011 at 12:33:34PM +1300, Alan Wood wrote:
>  There should not have been any conflict data of any sort in this 
> working copy as I am the only developer and I have only every had 
> one working copy.

That's not a valid assumption.
It is possible to inflict tree conflicts upon yourself, with only
one working copy: http://subversion.apache.org/faq.html#self-tree-conflict

> I hope someone may be able to plug this little hole in the upgrade 
> system.

Looks like the upgrade code shouldn't insert empty conflict description
skels into the DB. Can you file an issue that points to this mailing list
thread, so that this doesn't fall through the cracks? Thanks.

And thanks for testing!

Re: Error with tree conflict data in database after update from 1.6

Posted by Julian Foad <ju...@wandisco.com>.
On Mon, 2011-03-21, Alan Wood wrote:
> Hi Devs
>  I have now taken the plunge and moved to using version 1.7 tsvn for my development.
> 
> After updating one of my working copies from 1.6 using TortoiseSVN from 2011/03/20
> subversion 1.7.0 r1082999 I had the following error:

Hi Alan.  Not addressing your problem, but could I just check that
you're aware that version 1.7 is still in development and not yet
released.  We call the development builds "version 1.7-dev" or
"1.7.0-dev" at this stage, and never "1.7" or "1.7.0" until it's
released.

- Julian


> using svn status either from TortoiseSVN or from command line gave:
> ..\..\..\subversion\svn\status-cmd.c:326: (apr_err=155016)
> ..\..\..\subversion\svn\util.c:969: (apr_err=155016)
> ..\..\..\subversion\libsvn_client\status.c:537: (apr_err=155016)
> ..\..\..\subversion\libsvn_wc\status.c:2430: (apr_err=155016)
> ..\..\..\subversion\libsvn_wc\status.c:1259: (apr_err=155016)
> ..\..\..\subversion\libsvn_wc\status.c:1023: (apr_err=155016)
> ..\..\..\subversion\libsvn_wc\status.c:1207: (apr_err=155016)
> ..\..\..\subversion\libsvn_wc\status.c:803: (apr_err=155016)
> ..\..\..\subversion\libsvn_wc\status.c:561: (apr_err=155016)
> ..\..\..\subversion\libsvn_wc\questions.c:424: (apr_err=155016)
> ..\..\..\subversion\libsvn_wc\wc_db.c:7742: (apr_err=155016)
> ..\..\..\subversion\libsvn_wc\tree_conflicts.c:209: (apr_err=155016)
> svn: E155016: Invalid conflict info in tree conflict description
> 
> After a debug session I found the offending row was for a directory 
> called LanguageDlls.
> 
> SELECT op_depth, repos_id, repos_path, presence, kind, revision, 
> checksum, translated_size, changed_revision, changed_date, 
> changed_author, depth, symlink_target, last_mod_time, properties
> FROM nodes
> WHERE wc_id = 1 AND local_relpath = "LanguageDlls"
> ORDER BY op_depth DESC;
> 0|1|trunk/Qproject/SuiteMSVC/LanguageDlls|normal|dir|365|||361|12994
> 79689054333|alan|infinity||0|
> 
> SELECT * FROM actual_node WHERE wc_id = 1 AND local_relpath = 
> "LanguageDlls"; 
>   1|LanguageDlls|||||||||()||||
> 
> The "()" for the tree_conflict_data causes the error to be reported.
> I have deleted this row and all is ok now.
> 
> Unfortunatly I did not keep a copy of the old working copy. It was 
> all up to date with no changes so I knew I could just check it out 
> again. I now do not have a way to reproduce this.
>  There should not have been any conflict data of any sort in this 
> working copy as I am the only developer and I have only every had 
> one working copy. But that is relying on my memory a bit much.
> 
> I hope someone may be able to plug this little hole in the upgrade 
> system.
> 
> Thanks
> Alan Wood
> 
> Alan Wood
> Napier
> New Zealand
> Phone +64 6 835 4505
> 
>