[svn.haxx.se] · SVN Dev · SVN Users · SVN Org · TSVN Dev · TSVN Users · Subclipse Dev · Subclipse Users · this month's index

Re: [PATCH] (v3) Fixed issue 3436 : Short option for --ignore-externals (-i?)

From: Edmund Wong <ed_at_kdtc.net>
Date: Wed, 02 Sep 2009 16:53:30 +0800

Hi,

This patch incorporates the suggestions as given by stsp
from his review as well as the fixes and adjustments of
comments. I took the liberty in changing the python
test function name from "export_wc_without_externals"
to "export_wc_ignoring_externals" which is what it's
about (even though it means the same). Further changes
also include the changing of the comment to
"Export the working copy ignoring externals using --ie"
which is the main purpose of the test; that is, to
see if 'svn export --ie' really works.

Thanks for your patience.

Edmund

Log:

[[[

Fix issue #3436: Short option for --ignore-externals (-i?).

Instead of using the suggested -i, markphip suggested --ie
which is what is implemented following patch in accordance to
the discussion at
http://subversion.tigris.org/ds/viewMessage.do?dsMessageId=2370618&dsForumId=462.
A new test has been added to externals_tests.py to check if the
exported WC (using svn export --ie) contains any of the externals.

* subversion/svn/main.c
    (svn_cl__options[]): Appended an alias of --ie to
     --ignore-externals and added a new option "ie".

* subversion/tests/cmdline/getopt_tests_data/svn_help_log_switch_stdout
     Appended "[aliases: --ie]" to reflect the change in the help for
     svn help switch, which uses --ignore-externals.

* subversion/tests/cmdline/externals_tests.py
    (export_wc_ignoring_externals) : New test for issue #3436.

Patch by: Edmund Wong ed <at> kdtc.net.
Suggested by: markphip
               danielsh
               stsp
]]]

------------------------------------------------------
http://subversion.tigris.org/ds/viewMessage.do?dsForumId=462&dsMessageId=2390096

Index: subversion/tests/cmdline/getopt_tests_data/svn_help_log_switch_stdout
===================================================================
--- subversion/tests/cmdline/getopt_tests_data/svn_help_log_switch_stdout (revision 39058)
+++ subversion/tests/cmdline/getopt_tests_data/svn_help_log_switch_stdout (working copy)
@@ -130,6 +130,7 @@
   --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 39058)
+++ subversion/tests/cmdline/externals_tests.py (working copy)
@@ -1379,6 +1379,38 @@
 
   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", "D", "x"),
+ os.path.join(export_target, "A", "D", "x", "y"),
+ os.path.join(export_target, "A", "D", "x", "y", "z"),
+ os.path.join(export_target, "A", "D", "x", "y", "z", "blah"),
+ os.path.join(export_target, "A", "D", "x", "y", "z", "blah", "E", "alpha"),
+ os.path.join(export_target, "A", "D", "x", "y", "z", "blah", "E", "beta"),
+ ]
+
+ probe_paths_missing(paths)
+
 ########################################################################
 # Run the tests
 
@@ -1406,6 +1438,7 @@
               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 39058)
+++ subversion/svn/main.c (working copy)
@@ -226,7 +226,9 @@
   {"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 @@
   */
 
   {"cl", opt_changelist, 1, NULL},
+ {"ie", opt_ignore_externals, 0, NULL},
 
   {0, 0, 0, 0},
 };
Received on 2009-09-02 10:59:43 CEST

This is an archived mail posted to the Subversion Dev mailing list.

This site is subject to the Apache Privacy Policy and the Apache Public Forum Archive Policy.