Index: subversion/tests/cmdline/svnversion_tests.py =================================================================== --- subversion/tests/cmdline/svnversion_tests.py (revision 922931) +++ subversion/tests/cmdline/svnversion_tests.py (arbetskopia) @@ -236,7 +236,36 @@ svntest.actions.run_and_verify_svnversion("working copy with excluded file", D_path, repo_url + '/A/D', [ "1P\n" ], []) +def structural_changes(sbox): + "test 'svnversion' with structural changes" + sbox.build() + wc_dir = sbox.wc_dir + repo_url = sbox.repo_url + iota_path = os.path.join(wc_dir, 'iota') + iota_copy_path = os.path.join(wc_dir, 'iota_copy') + + svntest.actions.run_and_verify_svn(None, None, [], + 'cp', iota_path, iota_copy_path) + + svntest.actions.run_and_verify_svnversion("Copied file", + iota_copy_path, repo_url + + '/iota_copy', + [ "Local uncommitted " + "modifications, no revision " + "information found\n" ], []) + C_path = os.path.join(wc_dir, 'A', 'C') + C_copy_path = os.path.join(wc_dir, 'C_copy') + svntest.actions.run_and_verify_svn(None, None, [], + 'cp', C_path, C_copy_path) + + svntest.actions.run_and_verify_svnversion("Copied dir", + C_copy_path, repo_url + + '/C_copy', + [ "Local uncommitted " + "modifications, no revision " + "information found\n" ], []) + ######################################################################## # Run the tests @@ -246,6 +275,7 @@ svnversion_test, ignore_externals, svnversion_with_excluded_subtrees, + structural_changes, ] if __name__ == '__main__': Index: subversion/svnversion/main.c =================================================================== --- subversion/svnversion/main.c (revision 922931) +++ subversion/svnversion/main.c (arbetskopia) @@ -290,6 +290,17 @@ return EXIT_FAILURE; } + if (res->min_rev == -1) + { + /* Local uncommited modifications, no revision info was found. */ + SVN_INT_ERR(svn_cmdline_printf(pool, _("Local uncommitted " + "modifications, no revision " + "information found%s"), + no_newline ? "" : "\n")); + svn_pool_destroy(pool); + return EXIT_SUCCESS; + } + /* Build compact '123[:456]M?S?' string. */ SVN_INT_ERR(svn_cmdline_printf(pool, "%ld", res->min_rev)); if (res->min_rev != res->max_rev)