Michael Diers


Suggested
r892471

r892471 | stsp | 2009-12-19 14:13:18 +0000 (Sat, 19 Dec 2009)

Allow keyword expansion to be disabled during 'svn export' using
a new --ignore-keywords option.

In some scenarios expanded keywords create unnecessary noise.
E.g. if files exported from Subversion need to be compared with files
from other sources, such as after a migration from another version
control system to Subversion.
Or, if two Subversion URLs need to be compared reliably using 'svn export'
(currently a 2-URL diff from 'svn diff' doesn't show deleted files properly,
see issue #2333).

Suggested by: Michael Diers

* subversion/include/svn_client.h
  (svn_client_export5): Declare, document new ignore_keywords parameter.
  (svn_client_export4): Deprecate.

* subversion/libsvn_client/deprecated.c
  (svn_client_export4): Moved here from ...

* subversion/libsvn_client/export.c
  (svn_client_export4): ... here.
  (copy_one_versioned_file, copy_versioned_files): Add and handle new
   ignore_keywords parameter.
  (edit_baton): Add ignore_keywords field.
  (change_file_prop): Heed new ignore_keywords in edit_baton.
  (svn_client_export5): Add ignore_keywords parameter, pass it on to
   the edit_baton and copy_versioned_files().

* subversion/svn/cl.h
  (svn_cl__opt_state_t): Add ignore_keywords field.

* subversion/svn/export-cmd.c
  (svn_cl__export): Upgrade to svn_client_export5().

* subversion/svn/main.c
  (svn_cl__longopt_t): Add opt_ignore_keywords field.
  (svn_cl__options): Add entry for --ignore-keywords, alias --ik.
  (svn_cl__cmd_table): Add opt_ignore_keywords to the list of options
   supported by 'svn export'.
  (main): Handle new --ignore-keywords option.

* subversion/tests/cmdline/export_tests.py
  (export_ignoring_keyword_translation,
   export_working_copy_ignoring_keyword_translation): New tests.
  (test_list): Add new tests.