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 2014/02/20 03:07:53 UTC

svn commit: r1570053 - in /subversion/trunk/subversion: libsvn_client/diff.c tests/cmdline/diff_tests.py tests/cmdline/log_tests.py tests/cmdline/merge_authz_tests.py tests/cmdline/merge_tests.py tests/cmdline/special_tests.py

Author: rhuijben
Date: Thu Feb 20 02:07:52 2014
New Revision: 1570053

URL: http://svn.apache.org/r1570053
Log:
Now that diff can produce proper revisions in all cases, stop producing
invalid revision numbers in the informational only parts of diff headers.

We used to produce 'revision 0' as old revision on additions and
the 'right revision' of the diff as right revision for deletions.
(Except for copies, and...)

These revisions are now reported as 'nonexistent'.

* subversion/libsvn_client/diff.c
  (DIFF_REVNUM_NONEXISTENT): New define.
  (diff_label): Define label for nodes that don't exist in a revision.
  (diff_driver_info_t): Remove right revision.

  (diff_file_added): Remove magic revision 0 and stray SVN_DBG().
  (diff_file_deleted): Use DIFF_REVNUM_NONEXISTENT on deleted nodes instead
    of the right revision.
  (diff_dir_added): Use DIFF_REVNUM_NONEXISTENT instead of r0.

  (diff_wc_wc,
   diff_repos_repos,
   diff_repos_wc,
   svn_client_diff6,
   svn_client_diff_peg6): Don't initialize now unused variable.

* subversion/tests/cmdline/diff_tests.py
  (diff_schedule_delete,
   diff_repos_wc_add_with_props,
   diff_repos_working_added_dir,
   diff_backward_repos_wc_copy,
   diff_git_format_wc_wc,
   diff_git_format_wc_wc_dir_mv,
   diff_git_format_url_wc,
   diff_git_format_url_url,
   diff_git_empty_files,
   diff_git_with_props,
   diff_two_working_copies,
   diff_deleted_url,
   diff_arbitrary_files_and_dirs,
   diff_dir_replaced_by_file,
   diff_move_inside_copy,
   diff_repo_repo_added_file_mime_type): Update expected results.

* subversion/tests/cmdline/log_tests.py
  (log_diff,
   log_diff_moved): Update expected result.

* subversion/tests/cmdline/merge_authz_tests.py
  (diff_unauth_parent): Update expected result.

* subversion/tests/cmdline/merge_tests.py
  (merge_in_new_file_and_diff): Update expected result.

* subversion/tests/cmdline/special_tests.py
  (diff_symlink_to_dir): Update expected result.

Modified:
    subversion/trunk/subversion/libsvn_client/diff.c
    subversion/trunk/subversion/tests/cmdline/diff_tests.py
    subversion/trunk/subversion/tests/cmdline/log_tests.py
    subversion/trunk/subversion/tests/cmdline/merge_authz_tests.py
    subversion/trunk/subversion/tests/cmdline/merge_tests.py
    subversion/trunk/subversion/tests/cmdline/special_tests.py

Modified: subversion/trunk/subversion/libsvn_client/diff.c
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_client/diff.c?rev=1570053&r1=1570052&r2=1570053&view=diff
==============================================================================
--- subversion/trunk/subversion/libsvn_client/diff.c (original)
+++ subversion/trunk/subversion/libsvn_client/diff.c Thu Feb 20 02:07:52 2014
@@ -58,6 +58,7 @@
 
 /* Utilities */
 
+#define DIFF_REVNUM_NONEXISTENT ((svn_revnum_t) -100)
 
 #define MAKE_ERR_BAD_RELATIVE_PATH(path, relative_to_dir) \
         svn_error_createf(SVN_ERR_BAD_RELATIVE_PATH, NULL, \
@@ -238,9 +239,11 @@ diff_label(const char *path,
            apr_pool_t *pool)
 {
   const char *label;
-  if (revnum != SVN_INVALID_REVNUM)
+  if (revnum >= 0)
     label = apr_psprintf(pool, _("%s\t(revision %ld)"), path, revnum);
-  else
+  else if (revnum == DIFF_REVNUM_NONEXISTENT)
+    label = apr_psprintf(pool, _("%s\t(nonexistent)"), path);
+  else /* SVN_INVALID_REVNUM */
     label = apr_psprintf(pool, _("%s\t(working copy)"), path);
 
   return label;
@@ -533,16 +536,6 @@ typedef struct diff_driver_info_t
 
   /* Whether the local diff target of a repos->wc diff is a copy. */
   svn_boolean_t repos_wc_diff_target_is_copy;
-
-  /* These are the numeric representations of the revisions passed to
-     svn_client_diff6(), either may be SVN_INVALID_REVNUM.  We need these
-     because some of the svn_wc_diff_callbacks4_t don't get revision
-     arguments.
-
-     ### Perhaps we should change the callback signatures and eliminate
-     ### these? (### Done in the diff processor)
-  */
-  svn_revnum_t revnum2;
 } diff_driver_info_t;
 
 
@@ -987,7 +980,7 @@ diff_file_added(const char *relpath,
   else if (copyfrom_source && right_file)
     SVN_ERR(diff_content_changed(&wrote_header, relpath,
                                  left_file, right_file,
-                                 0 /* magic revision */,
+                                 DIFF_REVNUM_NONEXISTENT,
                                  right_source->revision,
                                  svn_prop_get_value(left_props,
                                                     SVN_PROP_MIME_TYPE),
@@ -1001,7 +994,7 @@ diff_file_added(const char *relpath,
   else if (right_file)
     SVN_ERR(diff_content_changed(&wrote_header, relpath,
                                  left_file, right_file,
-                                 0 /* magic revision */,
+                                 DIFF_REVNUM_NONEXISTENT,
                                  right_source->revision,
                                  svn_prop_get_value(left_props,
                                                     SVN_PROP_MIME_TYPE),
@@ -1012,11 +1005,10 @@ diff_file_added(const char *relpath,
                                  NULL, SVN_INVALID_REVNUM,
                                  dwi, scratch_pool));
 
-  SVN_DBG(("Added %s, propchanges: %d / %d", relpath, prop_changes->nelts,
-                                                apr_hash_count(right_props)));
   if (prop_changes->nelts > 0)
     SVN_ERR(diff_props_changed(relpath,
-                               copyfrom_source ? copyfrom_source->revision : 0,
+                               copyfrom_source ? copyfrom_source->revision
+                                               : DIFF_REVNUM_NONEXISTENT,
                                right_source->revision,
                                prop_changes,
                                left_props, ! wrote_header,
@@ -1064,7 +1056,7 @@ diff_file_deleted(const char *relpath,
         SVN_ERR(diff_content_changed(&wrote_header, relpath,
                                      left_file, dwi->empty_file,
                                      left_source->revision,
-                                     dwi->ddi.revnum2,
+                                     DIFF_REVNUM_NONEXISTENT,
                                      svn_prop_get_value(left_props,
                                                         SVN_PROP_MIME_TYPE),
                                      NULL,
@@ -1082,7 +1074,7 @@ diff_file_deleted(const char *relpath,
 
           SVN_ERR(diff_props_changed(relpath,
                                      left_source->revision,
-                                     dwi->ddi.revnum2,
+                                     DIFF_REVNUM_NONEXISTENT,
                                      prop_changes,
                                      left_props, ! wrote_header,
                                      dwi, scratch_pool));
@@ -1137,7 +1129,7 @@ diff_dir_added(const char *relpath,
                          scratch_pool));
 
   return svn_error_trace(diff_props_changed(relpath,
-                                            0 /* Magic legacy value */,
+                                            DIFF_REVNUM_NONEXISTENT,
                                             right_source->revision,
                                             prop_changes,
                                             original_props,
@@ -1593,8 +1585,6 @@ diff_wc_wc(const char **anchor_path,
     {
       svn_node_kind_t kind;
 
-      ddi->revnum2 = SVN_INVALID_REVNUM;  /* WC */
-
       SVN_ERR(svn_wc_read_kind2(&kind, ctx->wc_ctx, abspath1,
                               TRUE, FALSE, scratch_pool));
 
@@ -1685,8 +1675,6 @@ diff_repos_repos(const char **anchor_pat
       ddi->orig_path_2 = url2;
 
       /* Get numeric revisions. */
-      ddi->revnum2 = rev2;
-
       ddi->anchor = base_path;
 
       SVN_ERR(svn_ra_get_session_url(ra_session, &ddi->anchor_url,
@@ -1906,11 +1894,6 @@ diff_repos_wc(const char **anchor_path,
                                           (strcmp(path_or_url1, url1) == 0)
                                                     ? NULL : abspath_or_url1,
                                           ra_session, revision1, pool));
-  if (ddi)
-    {
-      if (reverse)
-        ddi->revnum2 = rev;
-    }
 
   /* Check if our diff target is a copied node. */
   SVN_ERR(svn_wc__node_get_origin(&is_copy,
@@ -2314,7 +2297,6 @@ svn_client_diff6(const apr_array_header_
   diff_cmd_baton.outstream = outstream;
   diff_cmd_baton.errstream = errstream;
   diff_cmd_baton.header_encoding = header_encoding;
-  diff_cmd_baton.ddi.revnum2 = SVN_INVALID_REVNUM;
 
   diff_cmd_baton.force_binary = ignore_content_type;
   diff_cmd_baton.ignore_properties = ignore_properties;
@@ -2399,7 +2381,6 @@ svn_client_diff_peg6(const apr_array_hea
   diff_cmd_baton.outstream = outstream;
   diff_cmd_baton.errstream = errstream;
   diff_cmd_baton.header_encoding = header_encoding;
-  diff_cmd_baton.ddi.revnum2 = SVN_INVALID_REVNUM;
 
   diff_cmd_baton.force_binary = ignore_content_type;
   diff_cmd_baton.ignore_properties = ignore_properties;

Modified: subversion/trunk/subversion/tests/cmdline/diff_tests.py
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/tests/cmdline/diff_tests.py?rev=1570053&r1=1570052&r2=1570053&view=diff
==============================================================================
--- subversion/trunk/subversion/tests/cmdline/diff_tests.py (original)
+++ subversion/trunk/subversion/tests/cmdline/diff_tests.py Thu Feb 20 02:07:52 2014
@@ -2193,37 +2193,37 @@ def diff_schedule_delete(sbox):
   sbox.build()
 
   expected_output_r2_working = make_diff_header("foo", "revision 2",
-                                                "working copy") + [
+                                                "nonexistent") + [
   "@@ -1 +0,0 @@\n",
   "-xxx\n"
   ]
 
   expected_output_r2_base = make_diff_header("foo", "revision 2",
-                                                "working copy") + [
+                                                "nonexistent") + [
   "@@ -1 +0,0 @@\n",
   "-xxx\n",
   ]
-  expected_output_base_r2 = make_diff_header("foo", "revision 0",
+  expected_output_base_r2 = make_diff_header("foo", "nonexistent",
                                                 "revision 2") + [
   "@@ -0,0 +1 @@\n",
   "+xxx\n",
   ]
 
-  expected_output_r1_base = make_diff_header("foo", "revision 0",
+  expected_output_r1_base = make_diff_header("foo", "nonexistent",
                                                 "working copy") + [
   "@@ -0,0 +1,2 @@\n",
   "+xxx\n",
   "+yyy\n"
   ]
   expected_output_base_r1 = make_diff_header("foo", "working copy",
-                                                "revision 1") + [
+                                                "nonexistent") + [
   "@@ -1,2 +0,0 @@\n",
   "-xxx\n",
   "-yyy\n"
   ]
   expected_output_base_working = expected_output_base_r1[:]
   expected_output_base_working[2] = "--- foo\t(revision 3)\n"
-  expected_output_base_working[3] = "+++ foo\t(working copy)\n"
+  expected_output_base_working[3] = "+++ foo\t(nonexistent)\n"
 
   wc_dir = sbox.wc_dir
   os.chdir(wc_dir)
@@ -2416,17 +2416,17 @@ def diff_repos_wc_add_with_props(sbox):
     ] + make_diff_prop_header("X/bar") + \
     make_diff_prop_added("propname", "propvalue")
 
-  diff_X_r1_base = make_diff_header("X", "revision 0",
+  diff_X_r1_base = make_diff_header("X", "nonexistent",
                                          "working copy") + diff_X
-  diff_X_base_r3 = make_diff_header("X", "revision 0",
+  diff_X_base_r3 = make_diff_header("X", "nonexistent",
                                          "revision 3") + diff_X
-  diff_foo_r1_base = make_diff_header("foo", "revision 0",
+  diff_foo_r1_base = make_diff_header("foo", "nonexistent",
                                              "revision 3") + diff_foo
-  diff_foo_base_r3 = make_diff_header("foo", "revision 0",
+  diff_foo_base_r3 = make_diff_header("foo", "nonexistent",
                                              "revision 3") + diff_foo
-  diff_X_bar_r1_base = make_diff_header("X/bar", "revision 0",
+  diff_X_bar_r1_base = make_diff_header("X/bar", "nonexistent",
                                                  "revision 3") + diff_X_bar
-  diff_X_bar_base_r3 = make_diff_header("X/bar", "revision 0",
+  diff_X_bar_base_r3 = make_diff_header("X/bar", "nonexistent",
                                                  "revision 3") + diff_X_bar
 
   expected_output_r1_base = svntest.verify.UnorderedOutput(diff_X_r1_base +
@@ -2512,11 +2512,11 @@ def diff_repos_working_added_dir(sbox):
 
   sbox.build()
 
-  expected_output_r1_BASE = make_diff_header("X/bar", "revision 0",
+  expected_output_r1_BASE = make_diff_header("X/bar", "nonexistent",
                                                 "revision 2") + [
     "@@ -0,0 +1 @@\n",
     "+content\n" ]
-  expected_output_r1_WORKING = make_diff_header("X/bar", "revision 0",
+  expected_output_r1_WORKING = make_diff_header("X/bar", "nonexistent",
                                                 "working copy") + [
     "@@ -0,0 +1,2 @@\n",
     "+content\n",
@@ -3115,7 +3115,7 @@ def diff_backward_repos_wc_copy(sbox):
   svntest.main.run_svn(None, 'up', '-r1')
 
   # diff r2 against working copy
-  diff_repos_wc = make_diff_header("A/mucopy", "revision 2", "working copy")
+  diff_repos_wc = make_diff_header("A/mucopy", "revision 2", "nonexistent")
   diff_repos_wc += [
     "@@ -1 +0,0 @@\n",
     "-This is the file 'mu'.\n",
@@ -3387,7 +3387,7 @@ def diff_git_format_wc_wc(sbox):
 
   expected_output = make_git_diff_header(
                          alpha_copied_path, "A/B/E/alpha_copied",
-                         "revision 0", "working copy",
+                         "nonexistent", "working copy",
                          copyfrom_path="A/B/E/alpha",
                          copyfrom_rev='1', cp=True,
                          text_changes=True) + [
@@ -3401,7 +3401,7 @@ def diff_git_format_wc_wc(sbox):
                                          copyfrom_rev='1', cp=True,
                                          text_changes=False) \
   + make_git_diff_header(mu_path, "A/mu", "revision 1",
-                                         "working copy",
+                                         "nonexistent",
                                          delete=True) + [
     "@@ -1 +0,0 @@\n",
     "-This is the file 'mu'.\n",
@@ -3410,7 +3410,7 @@ def diff_git_format_wc_wc(sbox):
     "@@ -1 +1,2 @@\n",
     " This is the file 'iota'.\n",
     "+Changed 'iota'.\n",
-  ] + make_git_diff_header(new_path, "new", "revision 0",
+  ] + make_git_diff_header(new_path, "new", "nonexistent",
                            "working copy", add=True) + [
     "@@ -0,0 +1 @@\n",
     "+This is the file 'new'.\n",
@@ -3438,19 +3438,19 @@ def diff_git_format_wc_wc_dir_mv(sbox):
   svntest.main.run_svn(None, 'mv', g_path, g2_path)
 
   expected_output = make_git_diff_header(pi_path, "A/D/G/pi",
-                                         "revision 1", "working copy",
+                                         "revision 1", "nonexistent",
                                          delete=True) \
   + [
     "@@ -1 +0,0 @@\n",
     "-This is the file 'pi'.\n"
   ] + make_git_diff_header(rho_path, "A/D/G/rho",
-                           "revision 1", "working copy",
+                           "revision 1", "nonexistent",
                            delete=True) \
   + [
     "@@ -1 +0,0 @@\n",
     "-This is the file 'rho'.\n"
   ] + make_git_diff_header(tau_path, "A/D/G/tau",
-                           "revision 1", "working copy",
+                           "revision 1", "nonexistent",
                            delete=True) \
   + [
     "@@ -1 +0,0 @@\n",
@@ -3485,11 +3485,11 @@ def diff_git_format_url_wc(sbox):
   svntest.main.run_svn(None, 'commit', '-m', 'Committing changes', wc_dir)
   svntest.main.run_svn(None, 'up', wc_dir)
 
-  expected_output = make_git_diff_header(new_path, "new", "revision 0",
+  expected_output = make_git_diff_header(new_path, "new", "nonexistent",
                                          "revision 2", add=True) + [
     "@@ -0,0 +1 @@\n",
     "+This is the file 'new'.\n",
-  ] + make_git_diff_header(mu_path, "A/mu", "revision 1", "working copy",
+  ] + make_git_diff_header(mu_path, "A/mu", "revision 1", "nonexistent",
                            delete=True) + [
     "@@ -1 +0,0 @@\n",
     "-This is the file 'mu'.\n",
@@ -3527,11 +3527,11 @@ def diff_git_format_url_url(sbox):
   svntest.main.run_svn(None, 'up', wc_dir)
 
   expected_output = make_git_diff_header("A/mu", "A/mu", "revision 1",
-                                         "revision 2",
+                                         "nonexistent",
                                          delete=True) + [
     "@@ -1 +0,0 @@\n",
     "-This is the file 'mu'.\n",
-    ] + make_git_diff_header("new", "new", "revision 0", "revision 2",
+    ] + make_git_diff_header("new", "new", "nonexistent", "revision 2",
                              add=True) + [
     "@@ -0,0 +1 @@\n",
     "+This is the file 'new'.\n",
@@ -3702,7 +3702,7 @@ def diff_git_empty_files(sbox):
   svntest.main.run_svn(None, 'add', new_path)
   svntest.main.run_svn(None, 'rm', iota_path)
 
-  expected_output = make_git_diff_header(new_path, "new", "revision 0",
+  expected_output = make_git_diff_header(new_path, "new", "nonexistent",
                                          "working copy",
                                          add=True, text_changes=False) + [
   ] + make_git_diff_header(iota_path, "iota", "revision 2", "working copy",
@@ -3741,7 +3741,7 @@ def diff_git_with_props(sbox):
   svntest.main.run_svn(None, 'propset', 'svn:keywords', 'Id', iota_path)
 
   expected_output = make_git_diff_header(new_path, "new",
-                                         "revision 0", "working copy",
+                                         "nonexistent", "working copy",
                                          add=True, text_changes=False) + \
                     make_diff_prop_header("new") + \
                     make_diff_prop_added("svn:eol-style", "native") + \
@@ -3924,17 +3924,17 @@ def diff_two_working_copies(sbox):
 
   src_label = os.path.basename(wc_dir_old)
   dst_label = os.path.basename(wc_dir)
-  expected_output = make_diff_header('newdir/newfile', 'revision 0',
+  expected_output = make_diff_header('newdir/newfile', 'nonexistent',
                                      'working copy',
                                      src_label, dst_label) + [
                       "@@ -0,0 +1 @@\n",
                       "+new text\n",
                     ] + make_diff_header('A/mu', 'working copy',
-                                         'working copy',
+                                         'nonexistent',
                                          src_label, dst_label) + [
                       "@@ -1 +0,0 @@\n",
                       "-This is the file 'mu'.\n",
-                    ] + make_diff_header('A/B/F', 'revision 0',
+                    ] + make_diff_header('A/B/F', 'nonexistent',
                                          'working copy',
                                          src_label, dst_label) + [
                       "@@ -0,0 +1 @@\n",
@@ -3958,27 +3958,27 @@ def diff_two_working_copies(sbox):
                         make_diff_prop_header('A/D/gamma') + \
                         make_diff_prop_added("newprop", "propval") + \
                     make_diff_header('A/D/G/pi', 'working copy',
-                                         'working copy',
+                                         'nonexistent',
                                          src_label, dst_label) + [
                       "@@ -1 +0,0 @@\n",
                       "-This is the file 'pi'.\n",
-                    ] + make_diff_header('A/D/G/pi', 'revision 0',
+                    ] + make_diff_header('A/D/G/pi', 'nonexistent',
                                          'working copy',
                                          src_label, dst_label) + \
                         make_diff_prop_header('A/D/G/pi') + \
                         make_diff_prop_added("newprop", "propval") + \
                     make_diff_header('A/D/H/chi', 'working copy',
-                                         'working copy',
+                                         'nonexistent',
                                          src_label, dst_label) + [
                       "@@ -1 +0,0 @@\n",
                       "-This is the file 'chi'.\n",
                     ] + make_diff_header('A/D/H/omega', 'working copy',
-                                         'working copy',
+                                         'nonexistent',
                                          src_label, dst_label) + [
                       "@@ -1 +0,0 @@\n",
                       "-This is the file 'omega'.\n",
                     ] + make_diff_header('A/D/H/psi', 'working copy',
-                                         'working copy',
+                                         'nonexistent',
                                          src_label, dst_label) + [
                       "@@ -1 +0,0 @@\n",
                       "-This is the file 'psi'.\n",
@@ -4000,15 +4000,15 @@ def diff_deleted_url(sbox):
   sbox.simple_commit()
 
   # A diff of r2 with target A/D/H should show the removed children
-  expected_output = make_diff_header("chi", "revision 1", "revision 2") + [
+  expected_output = make_diff_header("chi", "revision 1", "nonexistent") + [
                       "@@ -1 +0,0 @@\n",
                       "-This is the file 'chi'.\n",
                     ] + make_diff_header("omega", "revision 1",
-                                         "revision 2") + [
+                                         "nonexistent") + [
                       "@@ -1 +0,0 @@\n",
                       "-This is the file 'omega'.\n",
                     ] + make_diff_header("psi", "revision 1",
-                                         "revision 2") + [
+                                         "nonexistent") + [
                       "@@ -1 +0,0 @@\n",
                       "-This is the file 'psi'.\n",
                     ]
@@ -4036,39 +4036,39 @@ def diff_arbitrary_files_and_dirs(sbox):
                                      '--new', sbox.ospath('A/mu'))
 
   # diff A/B/E with A/D
-  expected_output = make_diff_header("G/pi", "revision 0", "working copy",
+  expected_output = make_diff_header("G/pi", "nonexistent", "working copy",
                                      "B/E", "D") + [
                       "@@ -0,0 +1 @@\n",
                       "+This is the file 'pi'.\n"
-                    ] + make_diff_header("G/rho", "revision 0",
+                    ] + make_diff_header("G/rho", "nonexistent",
                                          "working copy", "B/E", "D") + [
                       "@@ -0,0 +1 @@\n",
                       "+This is the file 'rho'.\n"
-                    ] + make_diff_header("G/tau", "revision 0",
+                    ] + make_diff_header("G/tau", "nonexistent",
                                          "working copy", "B/E", "D") + [
                       "@@ -0,0 +1 @@\n",
                       "+This is the file 'tau'.\n"
-                    ] + make_diff_header("H/chi", "revision 0",
+                    ] + make_diff_header("H/chi", "nonexistent",
                                          "working copy", "B/E", "D") + [
                       "@@ -0,0 +1 @@\n",
                       "+This is the file 'chi'.\n"
-                    ] + make_diff_header("H/omega", "revision 0",
+                    ] + make_diff_header("H/omega", "nonexistent",
                                          "working copy", "B/E", "D") + [
                       "@@ -0,0 +1 @@\n",
                       "+This is the file 'omega'.\n"
-                    ] + make_diff_header("H/psi", "revision 0",
+                    ] + make_diff_header("H/psi", "nonexistent",
                                          "working copy", "B/E", "D") + [
                       "@@ -0,0 +1 @@\n",
                       "+This is the file 'psi'.\n"
                     ] + make_diff_header("alpha", "working copy",
-                                         "working copy", "B/E", "D") + [
+                                         "nonexistent", "B/E", "D") + [
                       "@@ -1 +0,0 @@\n",
                       "-This is the file 'alpha'.\n"
                     ] + make_diff_header("beta", "working copy",
-                                         "working copy", "B/E", "D") + [
+                                         "nonexistent", "B/E", "D") + [
                       "@@ -1 +0,0 @@\n",
                       "-This is the file 'beta'.\n"
-                    ] + make_diff_header("gamma", "revision 0",
+                    ] + make_diff_header("gamma", "nonexistent",
                                          "working copy", "B/E", "D") + [
                       "@@ -0,0 +1 @@\n",
                       "+This is the file 'gamma'.\n"
@@ -4402,18 +4402,18 @@ def diff_dir_replaced_by_file(sbox):
     'Index: %s\n' % sbox.path('A/B/E/alpha'),
     '===================================================================\n',
     '--- %s\t(revision 1)\n' % sbox.path('A/B/E/alpha'),
-    '+++ %s\t(working copy)\n' % sbox.path('A/B/E/alpha'),
+    '+++ %s\t(nonexistent)\n' % sbox.path('A/B/E/alpha'),
     '@@ -1 +0,0 @@\n',
     '-This is the file \'alpha\'.\n',
     'Index: %s\n' % sbox.path('A/B/E/beta'),
     '===================================================================\n',
     '--- %s\t(revision 1)\n' % sbox.path('A/B/E/beta'),
-    '+++ %s\t(working copy)\n' % sbox.path('A/B/E/beta'),
+    '+++ %s\t(nonexistent)\n' % sbox.path('A/B/E/beta'),
     '@@ -1 +0,0 @@\n',
     '-This is the file \'beta\'.\n',
     'Index: %s\n' % sbox.path('A/B/E'),
     '===================================================================\n',
-    '--- %s\t(revision 0)\n' % sbox.path('A/B/E'),
+    '--- %s\t(nonexistent)\n' % sbox.path('A/B/E'),
     '+++ %s\t(working copy)\n' % sbox.path('A/B/E'),
     '@@ -0,0 +1 @@\n',
     '+text\n',
@@ -4440,24 +4440,24 @@ def diff_dir_replaced_by_dir(sbox):
     'Index: %s\n' % sbox.path('A/B/E/alpha'),
     '===================================================================\n',
     '--- %s\t(revision 1)\n' % sbox.path('A/B/E/alpha'),
-    '+++ %s\t(working copy)\n' % sbox.path('A/B/E/alpha'),
+    '+++ %s\t(nonexistent)\n' % sbox.path('A/B/E/alpha'),
     '@@ -1 +0,0 @@\n',
     '-This is the file \'alpha\'.\n',
     'Index: %s\n' % sbox.path('A/B/E/beta'),
     '===================================================================\n',
     '--- %s\t(revision 1)\n' % sbox.path('A/B/E/beta'),
-    '+++ %s\t(working copy)\n' % sbox.path('A/B/E/beta'),
+    '+++ %s\t(nonexistent)\n' % sbox.path('A/B/E/beta'),
     '@@ -1 +0,0 @@\n',
     '-This is the file \'beta\'.\n',
     'Index: %s\n' % sbox.path('A/B/E/beta'),
     '===================================================================\n',
-    '--- %s\t(revision 0)\n' % sbox.path('A/B/E/beta'),
+    '--- %s\t(nonexistent)\n' % sbox.path('A/B/E/beta'),
     '+++ %s\t(working copy)\n' % sbox.path('A/B/E/beta'),
     '@@ -0,0 +1 @@\n',
     '+New beta\n',
     'Index: %s\n' % sbox.path('A/B/E'),
     '===================================================================\n',
-    '--- %s\t(revision 0)\n' % sbox.path('A/B/E'),
+    '--- %s\t(nonexistent)\n' % sbox.path('A/B/E'),
     '+++ %s\t(working copy)\n' % sbox.path('A/B/E'),
     '\n',
     'Property changes on: %s\n' % sbox.path('A/B/E'),
@@ -4487,7 +4487,7 @@ def diff_dir_replaced_by_dir(sbox):
     'Index: %s\n' % sbox.path('A/B/E/alpha'),
     '===================================================================\n',
     '--- %s\t(revision 1)\n' % sbox.path('A/B/E/alpha'),
-    '+++ %s\t(working copy)\n' % sbox.path('A/B/E/alpha'),
+    '+++ %s\t(nonexistent)\n' % sbox.path('A/B/E/alpha'),
     '@@ -1 +0,0 @@\n',
     '-This is the file \'alpha\'.\n',
     'Index: %s\n' % sbox.path('A/B/E/beta'),
@@ -4677,7 +4677,7 @@ def diff_repo_wc_copies(sbox):
   iota_url = sbox.repo_url + '/iota'
 
   sbox.simple_copy('iota', 'iota_copy')
-  expected_output = make_diff_header(iota_copy, "revision 0", "working copy",
+  expected_output = make_diff_header(iota_copy, "nonexistent", "working copy",
                                      iota_url, iota_copy) + [
                                        "@@ -0,0 +1 @@\n",
                                        "+This is the file 'iota'.\n" ]
@@ -4780,7 +4780,7 @@ def diff_repo_repo_added_file_mime_type(
     sbox.simple_commit() # r2
 
     # try to diff across the addition
-    expected_output = make_diff_header(newfile, 'revision 0', 'revision 2') + \
+    expected_output = make_diff_header(newfile, 'nonexistent', 'revision 2') + \
                       [ '@@ -0,0 +1 @@\n',
                         "+This is the file 'newfile'.\n" ] + \
                       make_diff_prop_header(newfile) + \
@@ -4790,7 +4790,7 @@ def diff_repo_repo_added_file_mime_type(
                                        '-r1:2', newfile)
 
     # reverse the diff to diff across a deletion
-    expected_output = make_diff_header(newfile, 'revision 2', 'revision 1') + \
+    expected_output = make_diff_header(newfile, 'revision 2', 'nonexistent') + \
                       [ '@@ -1 +0,0 @@\n',
                         "-This is the file 'newfile'.\n",
                         '\n',

Modified: subversion/trunk/subversion/tests/cmdline/log_tests.py
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/tests/cmdline/log_tests.py?rev=1570053&r1=1570052&r2=1570053&view=diff
==============================================================================
--- subversion/trunk/subversion/tests/cmdline/log_tests.py (original)
+++ subversion/trunk/subversion/tests/cmdline/log_tests.py Thu Feb 20 02:07:52 2014
@@ -2173,7 +2173,7 @@ def log_diff(sbox):
                    "\ No newline at end of file\n",
                  ]
            ]
-  r8diff = [ make_diff_header('A2/D/G/rho', 'revision 0', 'revision 8')
+  r8diff = [ make_diff_header('A2/D/G/rho', 'nonexistent', 'revision 8')
               + [ "@@ -0,0 +1 @@\n",
                   "+88\n",
                   "\ No newline at end of file\n",
@@ -2221,7 +2221,7 @@ def log_diff_moved(sbox):
   mu_at_1 = sbox.repo_url + '/A/mu@1'
   mu3_at_3 = sbox.repo_url + '/A/mu3@3'
 
-  r1diff = [make_diff_header('mu', 'revision 0', 'revision 1')
+  r1diff = [make_diff_header('mu', 'nonexistent', 'revision 1')
             + ["@@ -0,0 +1 @@\n",
                "+This is the file 'mu'.\n"]]
 

Modified: subversion/trunk/subversion/tests/cmdline/merge_authz_tests.py
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/tests/cmdline/merge_authz_tests.py?rev=1570053&r1=1570052&r2=1570053&view=diff
==============================================================================
--- subversion/trunk/subversion/tests/cmdline/merge_authz_tests.py (original)
+++ subversion/trunk/subversion/tests/cmdline/merge_authz_tests.py Thu Feb 20 02:07:52 2014
@@ -806,19 +806,19 @@ def diff_unauth_parent(sbox):
     '-This is the file \'beta\'.\n',
     'Index: tau\n',
     '===================================================================\n',
-    '--- tau\t(revision 0)\n',
+    '--- tau\t(nonexistent)\n',
     '+++ tau\t(revision 4)\n',
     '@@ -0,0 +1 @@\n',
     '+This is the file \'tau\'.\n',
     'Index: rho\n',
     '===================================================================\n',
-    '--- rho\t(revision 0)\n',
+    '--- rho\t(nonexistent)\n',
     '+++ rho\t(revision 4)\n',
     '@@ -0,0 +1 @@\n',
     '+This is the file \'rho\'.\n',
     'Index: pi\n',
     '===================================================================\n',
-    '--- pi\t(revision 0)\n',
+    '--- pi\t(nonexistent)\n',
     '+++ pi\t(revision 4)\n',
     '@@ -0,0 +1 @@\n',
     '+This is the file \'pi\'.\n',
@@ -847,7 +847,7 @@ def diff_unauth_parent(sbox):
     expected_output += [
     'Index: .\n',
     '===================================================================\n',
-    '--- .\t(revision 0)\n',
+    '--- .\t(nonexistent)\n',
     '+++ .\t(revision 4)\n',
     '\n',
     'Property changes on: .\n',

Modified: subversion/trunk/subversion/tests/cmdline/merge_tests.py
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/tests/cmdline/merge_tests.py?rev=1570053&r1=1570052&r2=1570053&view=diff
==============================================================================
--- subversion/trunk/subversion/tests/cmdline/merge_tests.py (original)
+++ subversion/trunk/subversion/tests/cmdline/merge_tests.py Thu Feb 20 02:07:52 2014
@@ -1327,7 +1327,7 @@ def merge_in_new_file_and_diff(sbox):
   expected_output = [
     "Index: " + url_branch_path + "/newfile\n",
     "===================================================================\n",
-    "--- "+ url_branch_path + "/newfile	(revision 0)\n",
+    "--- "+ url_branch_path + "/newfile	(nonexistent)\n",
     "+++ "+ url_branch_path + "/newfile	(working copy)\n",
     "@@ -0,0 +1 @@\n",
     "+newfile\n",

Modified: subversion/trunk/subversion/tests/cmdline/special_tests.py
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/tests/cmdline/special_tests.py?rev=1570053&r1=1570052&r2=1570053&view=diff
==============================================================================
--- subversion/trunk/subversion/tests/cmdline/special_tests.py (original)
+++ subversion/trunk/subversion/tests/cmdline/special_tests.py Thu Feb 20 02:07:52 2014
@@ -537,7 +537,7 @@ def diff_symlink_to_dir(sbox):
   expected_output = [
     "Index: link\n",
     "===================================================================\n",
-    "--- link\t(revision 0)\n",
+    "--- link\t(nonexistent)\n",
     "+++ link\t(working copy)\n",
     "@@ -0,0 +1 @@\n",
     "+link A/D\n",