subversion-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From julianf...@apache.org
Subject svn commit: r1668667 [3/3] - in /subversion/branches/move-tracking-2: ./ subversion/ subversion/bindings/javahl/native/ subversion/bindings/swig/include/ subversion/bindings/swig/perl/native/ subversion/include/ subversion/include/private/ subversion/l...
Date Mon, 23 Mar 2015 15:27:33 GMT
Modified: subversion/branches/move-tracking-2/subversion/tests/libsvn_wc/conflict-data-test.c
URL: http://svn.apache.org/viewvc/subversion/branches/move-tracking-2/subversion/tests/libsvn_wc/conflict-data-test.c?rev=1668667&r1=1668666&r2=1668667&view=diff
==============================================================================
--- subversion/branches/move-tracking-2/subversion/tests/libsvn_wc/conflict-data-test.c (original)
+++ subversion/branches/move-tracking-2/subversion/tests/libsvn_wc/conflict-data-test.c Mon
Mar 23 15:27:31 2015
@@ -853,7 +853,7 @@ test_prop_conflict_resolving(const svn_t
   SVN_ERR(sbox_wc_update(&b, "", 1));
 
   A_abspath = sbox_wc_path(&b, "A");
-  SVN_ERR(svn_wc__db_read_conflict(&conflict, NULL,
+  SVN_ERR(svn_wc__db_read_conflict(&conflict, NULL, NULL,
                                    b.wc_ctx->db, A_abspath,
                                    pool, pool));
 
@@ -880,7 +880,7 @@ test_prop_conflict_resolving(const svn_t
   SVN_ERR(sbox_wc_resolve_prop(&b, "A", "prop-3",
                                svn_wc_conflict_choose_merged));
 
-  SVN_ERR(svn_wc__db_read_conflict(&conflict, NULL,
+  SVN_ERR(svn_wc__db_read_conflict(&conflict, NULL, NULL,
                                    b.wc_ctx->db, A_abspath,
                                    pool, pool));
 
@@ -910,6 +910,45 @@ test_prop_conflict_resolving(const svn_t
   return SVN_NO_ERROR;
 }
 
+static svn_error_t *
+test_binary_file_conflict(const svn_test_opts_t *opts,
+                          apr_pool_t *pool)
+{
+  svn_test__sandbox_t sbox;
+  const apr_array_header_t *conflicts;
+  svn_wc_conflict_description2_t *desc;
+
+  SVN_ERR(svn_test__sandbox_create(&sbox, "test_binary_file_conflict", opts, pool));
+
+  /* Create and add a binary file. */
+  SVN_ERR(sbox_file_write(&sbox, "binary-file", "\xff\xff"));
+  SVN_ERR(sbox_wc_add(&sbox, "binary-file"));
+  SVN_ERR(sbox_wc_propset(&sbox, SVN_PROP_MIME_TYPE,
+                          "application/octet-stream", "binary-file"));
+  SVN_ERR(sbox_wc_commit(&sbox, "binary-file")); /* r1 */
+
+  /* Make a change to the binary file. */
+  SVN_ERR(sbox_file_write(&sbox, "binary-file", "\xfc\xfc\xfc\xfc\xfc\xfc"));
+  SVN_ERR(sbox_wc_commit(&sbox, "binary-file")); /* r2 */
+
+  /* Update back to r1, make a conflicting change to binary file. */
+  SVN_ERR(sbox_wc_update(&sbox, "binary-file", 1));
+  SVN_ERR(sbox_file_write(&sbox, "binary-file", "\xfd\xfd\xfd\xfd"));
+
+  /* Update to HEAD and ensure the conflict is marked as binary. */
+  SVN_ERR(sbox_wc_update(&sbox, "binary-file", 2));
+  SVN_ERR(svn_wc__read_conflicts(&conflicts, NULL, sbox.wc_ctx->db,
+                                 sbox_wc_path(&sbox, "binary-file"),
+                                 FALSE /* create_tempfiles */,
+                                 FALSE /* only_tree_conflict */,
+                                 pool, pool));
+  SVN_TEST_ASSERT(conflicts->nelts == 1);
+  desc = APR_ARRAY_IDX(conflicts, 0, svn_wc_conflict_description2_t *);
+  SVN_TEST_ASSERT(desc->is_binary);
+
+  return SVN_NO_ERROR;
+}
+
 
 /* The test table.  */
 
@@ -934,6 +973,8 @@ static struct svn_test_descriptor_t test
                        "test prop conflicts"),
     SVN_TEST_OPTS_PASS(test_prop_conflict_resolving,
                        "test property conflict resolving"),
+    SVN_TEST_OPTS_PASS(test_binary_file_conflict,
+                       "test binary file conflict"),
     SVN_TEST_NULL
   };
 

Modified: subversion/branches/move-tracking-2/subversion/tests/libsvn_wc/op-depth-test.c
URL: http://svn.apache.org/viewvc/subversion/branches/move-tracking-2/subversion/tests/libsvn_wc/op-depth-test.c?rev=1668667&r1=1668666&r2=1668667&view=diff
==============================================================================
--- subversion/branches/move-tracking-2/subversion/tests/libsvn_wc/op-depth-test.c (original)
+++ subversion/branches/move-tracking-2/subversion/tests/libsvn_wc/op-depth-test.c Mon Mar
23 15:27:31 2015
@@ -515,7 +515,7 @@ check_db_conflicts(svn_test__sandbox_t *
       local_abspath = svn_dirent_join(b->wc_abspath, info->local_relpath,
                                       iterpool);
 
-      SVN_ERR(svn_wc__db_read_conflict(&conflict, NULL,
+      SVN_ERR(svn_wc__db_read_conflict(&conflict, NULL, NULL,
                                        b->wc_ctx->db, local_abspath,
                                        iterpool, iterpool));
 
@@ -5981,8 +5981,8 @@ check_tree_conflict_repos_path(svn_test_
   const apr_array_header_t *locations;
   svn_boolean_t text_conflicted, prop_conflicted, tree_conflicted;
 
-  SVN_ERR(svn_wc__db_read_conflict(&conflict, NULL, b->wc_ctx->db,
-                                   sbox_wc_path(b, wc_path),
+  SVN_ERR(svn_wc__db_read_conflict(&conflict, NULL, NULL,
+                                   b->wc_ctx->db, sbox_wc_path(b, wc_path),
                                    b->pool, b->pool));
 
   SVN_TEST_ASSERT(conflict != NULL);

Propchange: subversion/branches/move-tracking-2/tools/
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Mon Mar 23 15:27:31 2015
@@ -82,4 +82,4 @@
 /subversion/branches/verify-at-commit/tools:1462039-1462408
 /subversion/branches/verify-keep-going/tools:1439280-1546110
 /subversion/branches/wc-collate-path/tools:1402685-1480384
-/subversion/trunk/tools:1606692-1666945
+/subversion/trunk/tools:1606692-1668666

Modified: subversion/branches/move-tracking-2/tools/buildbot/slaves/svn-x64-macosx/svnbuild.sh
URL: http://svn.apache.org/viewvc/subversion/branches/move-tracking-2/tools/buildbot/slaves/svn-x64-macosx/svnbuild.sh?rev=1668667&r1=1668666&r2=1668667&view=diff
==============================================================================
--- subversion/branches/move-tracking-2/tools/buildbot/slaves/svn-x64-macosx/svnbuild.sh (original)
+++ subversion/branches/move-tracking-2/tools/buildbot/slaves/svn-x64-macosx/svnbuild.sh Mon
Mar 23 15:27:31 2015
@@ -80,7 +80,7 @@ cd ${absbld}
 env CC=clang CXX=clang++ \
 ${abssrc}/configure \
     --prefix="${absbld}/.install-prefix" \
-    --disable-debug${optimizeconfig} \
+    --enable-debug${optimizeconfig} \
     --disable-nls \
     --disable-mod-activation \
     ${aprconfig}${serfconfig} \

Modified: subversion/branches/move-tracking-2/tools/dev/fsfs-access-map.c
URL: http://svn.apache.org/viewvc/subversion/branches/move-tracking-2/tools/dev/fsfs-access-map.c?rev=1668667&r1=1668666&r2=1668667&view=diff
==============================================================================
--- subversion/branches/move-tracking-2/tools/dev/fsfs-access-map.c (original)
+++ subversion/branches/move-tracking-2/tools/dev/fsfs-access-map.c Mon Mar 23 15:27:31 2015
@@ -198,9 +198,9 @@ open_file(const char *name, int handle)
       /* determine first revision of rev / packed rev files */
       if (strstr(name, "/db/revs/") != NULL && strstr(name, "manifest") == NULL)
         if (strstr(name, ".pack/pack") != NULL)
-          file->rev_num = atoi(strstr(name, "/db/revs/") + 9);
+          file->rev_num = SVN_STR_TO_REV(strstr(name, "/db/revs/") + 9);
         else
-          file->rev_num = atoi(strrchr(name, '/') + 1);
+          file->rev_num = SVN_STR_TO_REV(strrchr(name, '/') + 1);
       else
         file->rev_num = -1;
 

Modified: subversion/branches/move-tracking-2/tools/dist/release.py
URL: http://svn.apache.org/viewvc/subversion/branches/move-tracking-2/tools/dist/release.py?rev=1668667&r1=1668666&r2=1668667&view=diff
==============================================================================
--- subversion/branches/move-tracking-2/tools/dist/release.py (original)
+++ subversion/branches/move-tracking-2/tools/dist/release.py Mon Mar 23 15:27:31 2015
@@ -421,6 +421,29 @@ def compare_changes(repos, branch, revis
       logging.warning('CHANGES has unmerged revisions: %s' %
                       stdout.replace("\n", " "))
 
+
+_current_year = str(datetime.datetime.now().year)
+_copyright_re = re.compile(r'Copyright (?:\(C\) )?(?P<year>[0-9]+)'
+                           r' The Apache Software Foundation',
+                           re.MULTILINE)
+
+def check_copyright_year(repos, branch, revision):
+    def check_file(branch_relpath):
+        file_url = (repos + '/' + branch + '/'
+                    + branch_relpath + '@' + str(revision))
+        cat_cmd = ['svn', 'cat', file_url]
+        stdout = subprocess.check_output(cat_cmd)
+        m = _copyright_re.search(stdout)
+        if m:
+            year = m.group('year')
+        else:
+            year = None
+        if year != _current_year:
+            logging.warning('Copyright year in ' + branch_relpath
+                            + ' is not the current year')
+    check_file('NOTICE')
+    check_file('subversion/libsvn_subr/version.c')
+
 def roll_tarballs(args):
     'Create the release artifacts.'
 
@@ -432,6 +455,8 @@ def roll_tarballs(args):
     logging.info('Rolling release %s from branch %s@%d' % (args.version,
                                                            branch, args.revnum))
 
+    check_copyright_year(repos, args.branch, args.revnum)
+
     # Ensure we've got the appropriate rolling dependencies available
     autoconf = AutoconfDep(args.base_dir, False, args.verbose,
                          tool_versions[args.version.branch]['autoconf'])



Mime
View raw message