You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@subversion.apache.org by pb...@apache.org on 2011/08/23 16:03:14 UTC
svn commit: r1160699 [3/3] - in /subversion/branches/issue-3975: ./ build/
notes/ subversion/bindings/swig/ruby/test/ subversion/include/
subversion/include/private/ subversion/libsvn_client/
subversion/libsvn_ra_serf/ subversion/libsvn_ra_svn/ subvers...
Modified: subversion/branches/issue-3975/subversion/tests/cmdline/upgrade_tests.py
URL: http://svn.apache.org/viewvc/subversion/branches/issue-3975/subversion/tests/cmdline/upgrade_tests.py?rev=1160699&r1=1160698&r2=1160699&view=diff
==============================================================================
--- subversion/branches/issue-3975/subversion/tests/cmdline/upgrade_tests.py (original)
+++ subversion/branches/issue-3975/subversion/tests/cmdline/upgrade_tests.py Tue Aug 23 14:03:12 2011
@@ -1093,6 +1093,24 @@ def upgrade_with_missing_subdir(sbox):
expected_disk,
expected_status)
+@Issue(3994)
+def upgrade_locked(sbox):
+ "upgrade working copy with locked files"
+
+ replace_sbox_with_tarfile(sbox, 'upgrade_locked.tar.bz2')
+
+ svntest.actions.run_and_verify_svn(None, None, [], 'upgrade', sbox.wc_dir)
+
+ expected_status = svntest.wc.State(sbox.wc_dir,
+ {
+ '' : Item(status=' ', wc_rev=1),
+ 'A' : Item(status='D ', wc_rev=2),
+ 'A/third' : Item(status='D ', writelocked='K', wc_rev=2),
+ 'other' : Item(status='D ', writelocked='K', wc_rev=4),
+ 'iota' : Item(status=' ', writelocked='K', wc_rev=3),
+ })
+
+ run_and_verify_status_no_server(sbox.wc_dir, expected_status)
########################################################################
# Run the tests
@@ -1141,6 +1159,7 @@ test_list = [ None,
add_add_del_del_tc,
add_add_x2,
upgrade_with_missing_subdir,
+ upgrade_locked,
]
Modified: subversion/branches/issue-3975/subversion/tests/libsvn_diff/parse-diff-test.c
URL: http://svn.apache.org/viewvc/subversion/branches/issue-3975/subversion/tests/libsvn_diff/parse-diff-test.c?rev=1160699&r1=1160698&r2=1160699&view=diff
==============================================================================
--- subversion/branches/issue-3975/subversion/tests/libsvn_diff/parse-diff-test.c (original)
+++ subversion/branches/issue-3975/subversion/tests/libsvn_diff/parse-diff-test.c Tue Aug 23 14:03:12 2011
@@ -246,6 +246,15 @@ static const char *bad_git_diff_header =
"diff --git a/ b/path 1 b/ b/path 1" NL
"new file mode 100644" NL;
+static const char *unidiff_lacking_trailing_eol =
+ "Index: A/C/gamma" NL
+ "===================================================================" NL
+ "--- A/C/gamma\t(revision 2)" NL
+ "+++ A/C/gamma\t(working copy)" NL
+ "@@ -1 +1,2 @@" NL
+ " This is the file 'gamma'." NL
+ "+some more bytes to 'gamma'"; /* Don't add NL after this line */
+
/* Create a PATCH_FILE containing the contents of DIFF. */
static svn_error_t *
@@ -900,6 +909,57 @@ test_git_diffs_with_spaces_diff(apr_pool
SVN_ERR(svn_diff_close_patch_file(patch_file, pool));
return SVN_NO_ERROR;
}
+
+static svn_error_t *
+test_parse_unidiff_lacking_trailing_eol(apr_pool_t *pool)
+{
+ svn_patch_file_t *patch_file;
+ svn_boolean_t reverse;
+ svn_boolean_t ignore_whitespace;
+ int i;
+ apr_pool_t *iterpool;
+
+ reverse = FALSE;
+ ignore_whitespace = FALSE;
+ iterpool = svn_pool_create(pool);
+ for (i = 0; i < 2; i++)
+ {
+ svn_patch_t *patch;
+ svn_diff_hunk_t *hunk;
+
+ svn_pool_clear(iterpool);
+
+ SVN_ERR(create_patch_file(&patch_file, unidiff_lacking_trailing_eol,
+ pool));
+
+ /* We have one patch with one hunk. Parse it. */
+ SVN_ERR(svn_diff_parse_next_patch(&patch, patch_file, reverse,
+ ignore_whitespace, iterpool,
+ iterpool));
+ SVN_TEST_ASSERT(patch);
+ SVN_TEST_STRING_ASSERT(patch->old_filename, "A/C/gamma");
+ SVN_TEST_STRING_ASSERT(patch->new_filename, "A/C/gamma");
+ SVN_TEST_ASSERT(patch->hunks->nelts == 1);
+
+ hunk = APR_ARRAY_IDX(patch->hunks, 0, svn_diff_hunk_t *);
+ SVN_ERR(check_content(hunk, ! reverse,
+ "This is the file 'gamma'." NL,
+ pool));
+
+ /* Verify that the contents are as expected, with a NL appended.
+ TODO: test for notification about the NL silently appended */
+ SVN_ERR(check_content(hunk, reverse,
+ "This is the file 'gamma'." NL
+ "some more bytes to 'gamma'" NL,
+ pool));
+
+ reverse = !reverse;
+ SVN_ERR(svn_diff_close_patch_file(patch_file, pool));
+ }
+ svn_pool_destroy(iterpool);
+ return SVN_NO_ERROR;
+}
+
/* ========================================================================== */
struct svn_test_descriptor_t test_funcs[] =
@@ -921,5 +981,7 @@ struct svn_test_descriptor_t test_funcs[
"test property diffs with odd symbols"),
SVN_TEST_PASS2(test_git_diffs_with_spaces_diff,
"test git diffs with spaces in paths"),
+ SVN_TEST_XFAIL2(test_parse_unidiff_lacking_trailing_eol,
+ "test parsing unidiffs lacking trailing eol"),
SVN_TEST_NULL
};
Modified: subversion/branches/issue-3975/tools/dist/collect_sigs.py
URL: http://svn.apache.org/viewvc/subversion/branches/issue-3975/tools/dist/collect_sigs.py?rev=1160699&r1=1160698&r2=1160699&view=diff
==============================================================================
--- subversion/branches/issue-3975/tools/dist/collect_sigs.py (original)
+++ subversion/branches/issue-3975/tools/dist/collect_sigs.py Tue Aug 23 14:03:12 2011
@@ -75,7 +75,9 @@ def generate_asc_files(target_dir='.'):
db = sqlite3.connect(os.path.join(target_dir, 'sigs.db'))
curs = db.cursor()
- curs.execute('SELECT filename, signature FROM signatures;')
+ like_filename = 'subversion-%s%%' % config.version
+ curs.execute('''SELECT filename, signature FROM signatures
+ WHERE filename LIKE ?''', (like_filename, ) )
for filename, signature in curs:
fd = _open(filename)
fd.write(signature)
Modified: subversion/branches/issue-3975/tools/dist/dist.sh
URL: http://svn.apache.org/viewvc/subversion/branches/issue-3975/tools/dist/dist.sh?rev=1160699&r1=1160698&r2=1160699&view=diff
==============================================================================
--- subversion/branches/issue-3975/tools/dist/dist.sh (original)
+++ subversion/branches/issue-3975/tools/dist/dist.sh Tue Aug 23 14:03:12 2011
@@ -268,19 +268,19 @@ vsn_file="$DISTPATH/subversion/include/s
if [ "$VERSION" != "trunk" ]; then
sed \
- -e "/#define *SVN_VER_MAJOR/s/[0-9]\+/$ver_major/" \
- -e "/#define *SVN_VER_MINOR/s/[0-9]\+/$ver_minor/" \
- -e "/#define *SVN_VER_PATCH/s/[0-9]\+/$ver_patch/" \
+ -e "/#define *SVN_VER_MAJOR/s/[0-9]\\+/$ver_major/" \
+ -e "/#define *SVN_VER_MINOR/s/[0-9]\\+/$ver_minor/" \
+ -e "/#define *SVN_VER_PATCH/s/[0-9]\\+/$ver_patch/" \
-e "/#define *SVN_VER_TAG/s/\".*\"/\" ($VER_TAG)\"/" \
-e "/#define *SVN_VER_NUMTAG/s/\".*\"/\"$VER_NUMTAG\"/" \
- -e "/#define *SVN_VER_REVISION/s/[0-9]\+/$REVISION/" \
+ -e "/#define *SVN_VER_REVISION/s/[0-9]\\+/$REVISION/" \
< "$vsn_file" > "$vsn_file.tmp"
else
# Don't munge the version number if we are creating a nightly trunk tarball
sed \
-e "/#define *SVN_VER_TAG/s/\".*\"/\" ($VER_TAG)\"/" \
-e "/#define *SVN_VER_NUMTAG/s/\".*\"/\"$VER_NUMTAG\"/" \
- -e "/#define *SVN_VER_REVISION/s/[0-9]\+/$REVISION/" \
+ -e "/#define *SVN_VER_REVISION/s/[0-9]\\+/$REVISION/" \
< "$vsn_file" > "$vsn_file.tmp"
fi
Modified: subversion/branches/issue-3975/tools/dist/release.py
URL: http://svn.apache.org/viewvc/subversion/branches/issue-3975/tools/dist/release.py?rev=1160699&r1=1160698&r2=1160699&view=diff
==============================================================================
--- subversion/branches/issue-3975/tools/dist/release.py (original)
+++ subversion/branches/issue-3975/tools/dist/release.py Tue Aug 23 14:03:12 2011
@@ -423,7 +423,7 @@ def roll_tarballs(args):
logging.info('Moving artifacts and calculating checksums')
for e in extns:
if args.version.pre == 'nightly':
- filename = 'subversion-trunk.%s' % e
+ filename = 'subversion-nightly.%s' % e
else:
filename = 'subversion-%s.%s' % (args.version, e)