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

Upgrade to single-DB: problem locking an empty DB

From: Julian Foad <julian.foad_at_wandisco.com>
Date: Tue, 10 Aug 2010 15:31:20 +0100

Upgrading a WC to single-DB:

upgrade_to_wcng() calls

  svn_wc__db_upgrade_begin() to create a new DB, and then
  svn_wc__db_wclock_obtain() and then
  svn_wc__write_upgraded_entries()

The _wclock_obtain() fails because it checks that the node with relpath
"" exists. Normally in libsvn_wc a new DB is created with
svn_wc__db_init() which inserts a row for relpath "", but
svn_wc__db_upgrade_begin() doesn't.

What's the best solution here? Not lock it? Have
svn_wc__db_upgrade_begin() create an initial "" row? Have
svn_wc__db_wclock_obtain() NOT check for existence of a "" row? The
first and last options don't sound right. Creating an initial "" row
does sound right, and requires (presumably) a modification of
svn_wc__write_upgraded_entries().

- Julian
Received on 2010-08-10 16:32:05 CEST

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