On Wed, Sep 02, 2009 at 04:53:30PM +0800, Edmund Wong wrote:
> Hi,
>
> This patch incorporates the suggestions as given by stsp
> from his review as well as the fixes and adjustments of
> comments.
I've tweaked the test a little, see below, it now tests for the
absence of all externals set up by externals_test_setup().
Are you OK with this version of the patch? It works for me.
Stefan
Index: subversion/tests/cmdline/getopt_tests_data/svn_help_log_switch_stdout
===================================================================
--- subversion/tests/cmdline/getopt_tests_data/svn_help_log_switch_stdout (revision 39065)
+++ subversion/tests/cmdline/getopt_tests_data/svn_help_log_switch_stdout (working copy)
@@ -130,6 +130,7 @@ Valid options:
--diff3-cmd ARG : use ARG as merge command
--relocate : relocate via URL-rewriting
--ignore-externals : ignore externals definitions
+ [aliases: --ie]
--force : force operation to run
--accept ARG : specify automatic conflict resolution action
('postpone', 'base', 'mine-conflict',
Index: subversion/tests/cmdline/externals_tests.py
===================================================================
--- subversion/tests/cmdline/externals_tests.py (revision 39065)
+++ subversion/tests/cmdline/externals_tests.py (working copy)
@@ -1379,6 +1379,36 @@ def export_sparse_wc_with_externals(sbox):
svntest.main.safe_rmtree(export_target)
+#----------------------------------------------------------------------
+
+def export_wc_ignoring_externals(sbox):
+ "exports from working copy, ignoring externals"
+
+ externals_test_setup(sbox)
+
+ wc_dir = sbox.wc_dir
+ repo_url = sbox.repo_url
+ export_target = sbox.add_wc_path('export')
+
+ # Create a working copy.
+ svntest.actions.run_and_verify_svn(None, None, [],
+ 'checkout',
+ repo_url, wc_dir)
+
+ # Export the working copy ignoring externals using --ie
+ svntest.actions.run_and_verify_svn(None, None, [],
+ 'export', '--ie',
+ wc_dir, export_target)
+
+ paths = [
+ os.path.join(export_target, "A", "C", "exdir_G"),
+ os.path.join(export_target, "A", "C", "exdir_H"),
+ os.path.join(export_target, "A", "D", "exdir_A"),
+ os.path.join(export_target, "A", "D", "x", "y", "z", "blah"),
+ ]
+
+ probe_paths_missing(paths)
+
########################################################################
# Run the tests
@@ -1406,6 +1436,7 @@ test_list = [ None,
XFail(update_lose_file_external),
XFail(switch_relative_external),
export_sparse_wc_with_externals,
+ export_wc_ignoring_externals,
]
if __name__ == '__main__':
Index: subversion/svn/main.c
===================================================================
--- subversion/svn/main.c (revision 39065)
+++ subversion/svn/main.c (working copy)
@@ -226,7 +226,9 @@ const apr_getopt_option_t svn_cl__options[] =
{"ignore-ancestry", opt_ignore_ancestry, 0,
N_("ignore ancestry when calculating merges")},
{"ignore-externals", opt_ignore_externals, 0,
- N_("ignore externals definitions")},
+ N_("ignore externals definitions\n"
+ " "
+ "[aliases: --ie]")},
{"diff-cmd", opt_diff_cmd, 1, N_("use ARG as diff command")},
{"diff3-cmd", opt_merge_cmd, 1, N_("use ARG as merge command")},
{"editor-cmd", opt_editor_cmd, 1, N_("use ARG as external editor")},
@@ -303,6 +305,7 @@ const apr_getopt_option_t svn_cl__options[] =
*/
{"cl", opt_changelist, 1, NULL},
+ {"ie", opt_ignore_externals, 0, NULL},
{0, 0, 0, 0},
};
------------------------------------------------------
http://subversion.tigris.org/ds/viewMessage.do?dsForumId=462&dsMessageId=2390108
Received on 2009-09-02 11:51:12 CEST