Index: subversion/include/svn_client.h
===================================================================
--- subversion/include/svn_client.h	(revision 9269)
+++ subversion/include/svn_client.h	(working copy)
@@ -1207,9 +1207,32 @@
  *
  * @a ctx is a context used for authentication in the repository case.
  *
+ * @a force if true will cause the export to overwrite files or directories.
+ *
+ * @a native_eol allows you to override the standard eol marker on the platform
+ * you are running on.  Can be either "LF", "CR" or "CRLF" or NULL.  If NULL
+ * will use the standard eol marker.
+ *
  * All allocations are done in @a pool.
  */ 
 svn_error_t *
+svn_client_export2 (svn_revnum_t *result_rev,
+                    const char *from,
+                    const char *to,
+                    svn_opt_revision_t *revision,
+                    svn_boolean_t force, 
+                    const char *native_eol,
+                    svn_client_ctx_t *ctx,
+                    apr_pool_t *pool);
+
+
+/**
+ * @deprecated Provided for backward compatibility with the 1.0.0 API.
+ *
+ * Similar to svn_client_export2(), but with the @a native_eol parameter
+ * always set to @c NULL.
+ */
+svn_error_t *
 svn_client_export (svn_revnum_t *result_rev,
                    const char *from,
                    const char *to,
Index: subversion/libsvn_client/export.c
===================================================================
--- subversion/libsvn_client/export.c	(revision 9269)
+++ subversion/libsvn_client/export.c	(working copy)
@@ -58,12 +58,33 @@
                                 externals_prop_val->len));
 }
 
+/* Helper function that gets the eol style and optionally overrides the
+   EOL marker for files marked as native. */
+static void
+get_eol_style (svn_subst_eol_style_t *style,
+               const char **eol,
+               const char *value,
+               const char *native_eol)
+{
+  svn_subst_eol_style_from_value (style, eol, value);
+  if (native_eol && *style == svn_subst_eol_style_native)
+    {
+      if (! strcmp ("LF", native_eol))
+        *eol = "\n";
+      else if (! strcmp ("CR", native_eol))
+        *eol = "\r";
+      else if (! strcmp ("CRLF", native_eol))
+        *eol = "\r\n";
+      /* else leave *eol alone */
+    }
+}
 
 static svn_error_t *
 copy_versioned_files (const char *from,
                       const char *to,
                       svn_opt_revision_t *revision,
                       svn_boolean_t force,
+                      const char *native_eol,
                       svn_client_ctx_t *ctx,
                       apr_pool_t *pool)
 {
@@ -144,7 +165,8 @@
               const char *new_to = svn_path_join (to, key, iterpool);
               
               SVN_ERR (copy_versioned_files (new_from, new_to, revision,
-                                             force, ctx, iterpool));
+                                             force, native_eol, ctx,
+                                             iterpool));
             }
         }
       else if (*type == svn_node_file)
@@ -202,7 +224,7 @@
                                     APR_HASH_KEY_STRING);
           
           if (eol_style)
-            svn_subst_eol_style_from_value (&style, &eol, eol_style->data);
+            get_eol_style (&style, &eol, eol_style->data, native_eol);
           
           if (local_mod)
             {
@@ -313,6 +335,7 @@
   svn_boolean_t force;
   svn_revnum_t *target_revision;
   apr_hash_t *externals;
+  const char *native_eol;
 
   svn_wc_notify_func_t notify_func;
   void *notify_baton;
@@ -576,6 +599,7 @@
             apr_pool_t *pool)
 {
   struct file_baton *fb = file_baton;
+  struct edit_baton *eb = fb->edit_baton;
 
   /* Was a txdelta even sent? */
   if (! fb->tmppath)
@@ -608,7 +632,7 @@
       svn_subst_keywords_t final_kw = {0};
 
       if (fb->eol_style_val)
-        svn_subst_eol_style_from_value (&style, &eol, fb->eol_style_val->data);
+        get_eol_style (&style, &eol, fb->eol_style_val->data, eb->native_eol);
 
       if (fb->keywords_val)
         SVN_ERR (svn_subst_build_keywords (&final_kw, fb->keywords_val->data, 
@@ -650,13 +674,14 @@
 /*** Public Interfaces ***/
 
 svn_error_t *
-svn_client_export (svn_revnum_t *result_rev,
-                   const char *from,
-                   const char *to,
-                   svn_opt_revision_t *revision,
-                   svn_boolean_t force, 
-                   svn_client_ctx_t *ctx,
-                   apr_pool_t *pool)
+svn_client_export2 (svn_revnum_t *result_rev,
+                    const char *from,
+                    const char *to,
+                    svn_opt_revision_t *revision,
+                    svn_boolean_t force, 
+                    const char *native_eol,
+                    svn_client_ctx_t *ctx,
+                    apr_pool_t *pool)
 {
   svn_revnum_t edit_revision = SVN_INVALID_REVNUM;
   svn_boolean_t use_ra = FALSE;
@@ -708,6 +733,7 @@
       eb->notify_func = ctx->notify_func;
       eb->notify_baton = ctx->notify_baton;
       eb->externals = apr_hash_make (pool);
+      eb->native_eol = native_eol; 
 
       editor->set_target_revision = set_target_revision;
       editor->open_root = open_root;
@@ -775,7 +801,8 @@
   else
     {
       /* just copy the contents of the working copy into the target path. */
-      SVN_ERR (copy_versioned_files (from, to, revision, force, ctx, pool));
+      SVN_ERR (copy_versioned_files (from, to, revision, force, native_eol,
+                                     ctx, pool));
     }
 
   if (ctx->notify_func)
@@ -795,3 +822,15 @@
 }
 
 
+svn_error_t *
+svn_client_export (svn_revnum_t *result_rev,
+                   const char *from,
+                   const char *to,
+                   svn_opt_revision_t *revision,
+                   svn_boolean_t force, 
+                   svn_client_ctx_t *ctx,
+                   apr_pool_t *pool)
+{
+  return svn_client_export2 (result_rev, from, to, revision, force, NULL, ctx,
+                             pool);
+}
Index: subversion/clients/cmdline/cl.h
===================================================================
--- subversion/clients/cmdline/cl.h	(revision 9269)
+++ subversion/clients/cmdline/cl.h	(working copy)
@@ -58,6 +58,7 @@
   svn_cl__ignore_ancestry_opt,
   svn_cl__incremental_opt,
   svn_cl__merge_cmd_opt,
+  svn_cl__native_eol_opt,
   svn_cl__new_cmd_opt,
   svn_cl__no_auth_cache_opt,
   svn_cl__no_autoprops_opt,
@@ -129,6 +130,7 @@
   const char * config_dir;       /* over-riding configuration directory */
   svn_boolean_t autoprops;       /* enable automatic properties */
   svn_boolean_t no_autoprops;    /* disable automatic properties */
+  const char *native_eol;        /* override system standard eol marker */
 } svn_cl__opt_state_t;
 
 
Index: subversion/clients/cmdline/export-cmd.c
===================================================================
--- subversion/clients/cmdline/export-cmd.c	(revision 9269)
+++ subversion/clients/cmdline/export-cmd.c	(working copy)
@@ -69,8 +69,9 @@
                           FALSE, pool);
 
   /* Do the export. */
-  err = svn_client_export (NULL, from, to, &(opt_state->start_revision),
-                           opt_state->force, ctx, pool);
+  err = svn_client_export2 (NULL, from, to, &(opt_state->start_revision),
+                            opt_state->force, opt_state->native_eol, ctx,
+                            pool);
   if (err && err->apr_err == SVN_ERR_WC_OBSTRUCTED_UPDATE && !opt_state->force)
     SVN_ERR_W (err,
                "Destination directory exists; please remove "
Index: subversion/clients/cmdline/main.c
===================================================================
--- subversion/clients/cmdline/main.c	(revision 9269)
+++ subversion/clients/cmdline/main.c	(working copy)
@@ -127,6 +127,10 @@
                       "enable automatic properties"},
     {"no-auto-props", svn_cl__no_autoprops_opt, 0,
                       "disable automatic properties"},
+    {"native-eol", svn_cl__native_eol_opt, 1,
+         "Use a different EOL marker than the standard\n"
+         "                             system marker for files with a native svn:eol-style\n"
+         "                             property.  ARG may be one of 'LF', 'CR', 'CRLF'\n"},
     {0,               0, 0, 0}
   };
 
@@ -269,7 +273,7 @@
     "     changes will be preserved, but files not under version control will\n"
     "     not be copied.\n",
     {'r', 'q', svn_cl__force_opt, SVN_CL__AUTH_OPTIONS,
-     svn_cl__config_dir_opt} },
+     svn_cl__config_dir_opt, svn_cl__native_eol_opt} },
 
   { "help", svn_cl__help, {"?", "h"},
     "Describe the usage of this program or its subcommands.\n"
@@ -931,6 +935,23 @@
           }
         opt_state.no_autoprops = TRUE;
         break;
+      case svn_cl__native_eol_opt:
+        if ( !strcmp ("LF", opt_arg) || !strcmp ("CR", opt_arg) ||
+             !strcmp ("CRLF", opt_arg))
+          opt_state.native_eol = apr_pstrdup (pool, opt_arg);
+        else
+          {
+            err = svn_utf_cstring_to_utf8 (&utf8_opt_arg, opt_arg, pool);
+            if (! err)
+              err = svn_error_createf
+                (SVN_ERR_CL_ARG_PARSING_ERROR, NULL,
+                 "Syntax error in native-eol argument '%s'",
+                 utf8_opt_arg);
+            svn_handle_error (err, stderr, FALSE);
+            svn_error_clear (err);
+            svn_pool_destroy (pool);
+            return EXIT_FAILURE;
+          }
       default:
         /* Hmmm. Perhaps this would be a good place to squirrel away
            opts that commands like svn diff might need. Hmmm indeed. */
Index: subversion/tests/clients/cmdline/export_tests.py
===================================================================
--- subversion/tests/clients/cmdline/export_tests.py	(revision 9269)
+++ subversion/tests/clients/cmdline/export_tests.py	(working copy)
@@ -265,6 +265,42 @@
                                         None, None, None, None,
                                         '-rBASE')
 
+def export_native_eol_option(sbox):
+  "export with --native-eol"
+  sbox.build()
+
+  wc_dir = sbox.wc_dir
+
+  # Append a '\n' to A/mu and set svn:eol-style to 'native'
+  # to see if it's applied correctly in the export operation
+  mu_path = os.path.join(wc_dir, 'A', 'mu')
+  svntest.main.file_append(mu_path, '\n')
+  svntest.main.run_svn(None, 'ps', 'svn:eol-style', 
+                       'native', mu_path)
+  svntest.main.run_svn(None, 'ci',
+                       '--username', svntest.main.wc_author,
+                       '--password', svntest.main.wc_passwd,
+                       '-m', 'Added eol-style prop to mu', mu_path)
+
+  expected_disk = svntest.main.greek_state.copy()
+  expected_disk.tweak('A/mu',
+                      contents=expected_disk.desc['A/mu'].contents + 
+                      '\r')
+
+  export_target = sbox.add_wc_path('export')
+
+  expected_output = svntest.main.greek_state.copy()
+  expected_output.wc_dir = export_target
+  expected_output.desc[''] = Item()
+  expected_output.tweak(contents=None, status='A ')
+
+  svntest.actions.run_and_verify_export(sbox.repo_url,
+                                        export_target,
+                                        expected_output,
+                                        expected_disk,
+                                        None, None, None, None,
+                                        '--native-eol','CR')
+
 ########################################################################
 # Run the tests
 
@@ -280,7 +316,8 @@
               export_eol_translation,
               export_working_copy_with_keyword_translation,
               export_working_copy_with_property_mods,
-              export_working_copy_at_base_revision
+              export_working_copy_at_base_revision,
+              export_native_eol_option
              ]
 
 if __name__ == '__main__':


