You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@subversion.apache.org by rh...@apache.org on 2011/04/21 13:48:55 UTC
svn commit: r1095663 -
/subversion/trunk/subversion/tests/cmdline/svntest/wc.py
Author: rhuijben
Date: Thu Apr 21 11:48:54 2011
New Revision: 1095663
URL: http://svn.apache.org/viewvc?rev=1095663&view=rev
Log:
Fix a few tests on system that have a python compiled to an old sqlite, which
doesn't support all trigger features.
* subversion/tests/cmdline/svntest/wc.py
(text_base_path): Don't access sqlite directly when we have something more
portable to get the checksum from: 'svn'.
Modified:
subversion/trunk/subversion/tests/cmdline/svntest/wc.py
Modified: subversion/trunk/subversion/tests/cmdline/svntest/wc.py
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/tests/cmdline/svntest/wc.py?rev=1095663&r1=1095662&r2=1095663&view=diff
==============================================================================
--- subversion/trunk/subversion/tests/cmdline/svntest/wc.py (original)
+++ subversion/trunk/subversion/tests/cmdline/svntest/wc.py Thu Apr 21 11:48:54 2011
@@ -848,30 +848,12 @@ def open_wc_db(local_path):
def text_base_path(file_path):
"""Return the path to the text-base file for the versioned file
FILE_PATH."""
- db, root_path, relpath = open_wc_db(file_path)
- c = db.cursor()
- # NODES conversion is complete enough that we can use it if it exists
- c.execute("""pragma table_info(nodes)""")
- if c.fetchone():
- c.execute("""select checksum from nodes
- where local_relpath = '""" + relpath + """'
- and op_depth = 0""")
- else:
- c.execute("""select checksum from base_node
- where local_relpath = '""" + relpath + """'""")
- row = c.fetchone()
- if row is not None:
- checksum = row[0]
- if checksum is not None and checksum[0:6] == "$md5 $":
- c.execute("""select checksum from pristine
- where md5_checksum = '""" + checksum + """'""")
- checksum = c.fetchone()[0]
- if row is None or checksum is None:
- raise svntest.Failure("No SHA1 checksum for " + relpath)
- db.close()
+ info = svntest.actions.run_and_parse_info(file_path)[0]
+
+ checksum = info['Checksum']
+ db, root_path, relpath = open_wc_db(file_path)
- checksum = checksum[6:]
# Calculate single DB location
dot_svn = svntest.main.get_admin_name()
fn = os.path.join(root_path, dot_svn, 'pristine', checksum[0:2], checksum)