You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@subversion.apache.org by John Szakmeister <jo...@szakmeister.net> on 2003/11/18 00:03:13 UTC

[PATCH] Take 2: Modified export behavior

Here's the new patch complete with tests and all.  Although, I'm a native 
english speaker, I'm not terribly elegant with command summaries. :-)  Please 
have a look and let me know if it's okay. :-)

-John

Log:
---------------------------------
Fixes a minor issue with the 'export' command failing to copy the BASE
revision of files when '-rBASE' is specified.  Also fixes translation of
keywords for locally modified files.  Adds a couple of tests for this new
functionality.

* subversion/libsvn_client/export.c
  (copy_versioned_files): Added revision parameter.  Changed the copy
  algorithm to translate keywords and eol style when appropriate.
  
  (svn_client_export): Added the ability to better distinguish when the
  repository should be contacted versus using the local base or working copy.

* subversion/clients/cmdline/main.c
  (svn_cl__cmd_table): Updated to reflect export's new functionality.

* subversion/tests/clients/cmdline/export_tests.py
  (export_working_copy_with_keyword_translation,
   export_working_copy_with_property_mods,
   export_working_copy_at_base_revision): New export tests.

* subversion/tests/clients/cmdline/svntest/actions.py
  (run_and_verify_export): Added new *args parameter to support new export
  tests.

---------------------------------

Re: [PATCH] Take 2: Modified export behavior

Posted by Erik Huelsmann <e....@gmx.net>.
 
> As for the keyword expansions: you can't count on the "current" user
> having any meaning in the repository username space.  The system
> username might be totally unrelated to the usernames used by the
> repository.  So $LastChangedBy$ should be unaffected, IMHO.
> 
> As for the rev, if you want to put a "+", I think that's okay, but
> it's sort of a bikeshed to me... :-)

Keeping with svnversion convention the "+" should probably be "M"?

bye,


Erik.

-- 
NEU F�R ALLE - GMX MediaCenter - f�r Fotos, Musik, Dateien...
Fotoalbum, File Sharing, MMS, Multimedia-Gru�, GMX FotoService

Jetzt kostenlos anmelden unter http://www.gmx.net

+++ GMX - die erste Adresse f�r Mail, Message, More! +++


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org

Re: [PATCH] Take 3: Modified export behavior

Posted by Julian Foad <ju...@btopenworld.com>.
John Szakmeister wrote:
> Thanks for the review Julian.  Committed in r7813.
> 
> Can I close issue 506 now that I've increased the export tests from 1 to 10?

I think you deserve to do so.

- Julian


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org

Re: [PATCH] Take 3: Modified export behavior

Posted by John Szakmeister <jo...@szakmeister.net>.
Thanks for the review Julian.  Committed in r7813.

Can I close issue 506 now that I've increased the export tests from 1 to 10?

-John



---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org

Re: [PATCH] Take 3: Modified export behavior

Posted by Julian Foad <ju...@btopenworld.com>.
John Szakmeister wrote:
> Okay, I think I've got all of this worked.  I use the working copy timestamps 
> only if the file is locally modified.  For a locally modified file, I will 
> also substitute in "(local)" as the author, append an 'M' to the revision 
> number, and use the working copy time for LastChangedDate.
> 
> So, here's another stab with everything.  If no one disapproves of it, I'll 
> commit it tomorrow, and hopefully move on to more serious problems. :-)
> 
> -John
> 
> Log:
> ----------------------------------------
> Fixes a minor issue with the 'export' command failing to copy the BASE
> revision of files when '-rBASE' is specified.  Also fixes translation of
> keywords for locally modified files, as well as adding appropriate
> timestamping.  Adds a couple of tests for this new functionality.
> 
> * subversion/libsvn_client/export.c
>   (copy_versioned_files): Added revision parameter.  Changed the copy
>   algorithm to translate keywords and eol style when appropriate.
>   
>   (svn_client_export): Added the ability to better distinguish when the
>   repository should be contacted versus using the local base or working copy.
> 
> * subversion/clients/cmdline/main.c
>   (svn_cl__cmd_table): Updated to reflect export's new functionality.
> 
> * subversion/tests/clients/cmdline/export_tests.py
>   (export_working_copy_with_keyword_translation,
>    export_working_copy_with_property_mods,
>    export_working_copy_at_base_revision): New export tests.
> 
> * subversion/tests/clients/cmdline/svntest/actions.py
>   (run_and_verify_export): Added new *args parameter to support new export
>   tests.
> ----------------------------------------
> 
> 
> Index: subversion/libsvn_client/export.c
> ===================================================================
> --- subversion/libsvn_client/export.c	(revision 7778)
> +++ subversion/libsvn_client/export.c	(working copy)
> @@ -44,6 +44,7 @@
>  static svn_error_t *
>  copy_versioned_files (const char *from,
>                        const char *to,
> +                      svn_opt_revision_t *revision,
>                        svn_boolean_t force,
>                        svn_client_ctx_t *ctx,
>                        apr_pool_t *pool)
> @@ -121,8 +122,8 @@
>                    const char *new_from = svn_path_join (from, key, subpool);
>                    const char *new_to = svn_path_join (to, key, subpool);
>  
> -                  SVN_ERR (copy_versioned_files (new_from, new_to, force,
> -                                                 ctx, subpool));
> +                  SVN_ERR (copy_versioned_files (new_from, new_to, revision,
> +                                                 force, ctx, subpool));
>                  }
>              }
>            else if (*type == svn_node_file)
> @@ -143,8 +144,95 @@
>                /* don't copy it if it isn't versioned. */
>                if (entry)
>                  {
> -                  SVN_ERR (svn_io_copy_file (copy_from, copy_to, TRUE,
> -                                             subpool));
> +                  svn_subst_keywords_t kw = { 0 };
> +                  svn_subst_eol_style_t style;
> +                  apr_hash_t *props;
> +                  const char *base;
> +                  svn_string_t *eol_style;
> +                  svn_string_t *keywords;
> +                  svn_string_t *executable;
> +                  svn_string_t *date;
> +                  const char *eol = NULL;
> +                  svn_boolean_t local_mod = FALSE;
> +                  apr_time_t time;
> +    
> +                  if (revision->kind == svn_opt_revision_base)
> +                    {
> +                      SVN_ERR (svn_wc_get_pristine_copy_path 
> +                               (copy_from, &base, subpool));
> +                      SVN_ERR (svn_wc_get_prop_diffs
> +                               (NULL, &props, copy_from, adm_access, subpool));
> +                    }
> +                  else
> +                    {
> +                      svn_wc_status_t *status;
> +
> +                      base = copy_from;
> +                      SVN_ERR (svn_wc_prop_list (&props, copy_from,
> +                                                 adm_access, subpool));
> +                      SVN_ERR (svn_wc_status (&status, copy_from, adm_access, subpool));
> +                      if (status->text_status != svn_wc_status_normal)
> +                        local_mod = TRUE;
> +                    }
> +
> +                  eol_style = apr_hash_get (props, SVN_PROP_EOL_STYLE,
> +                                            APR_HASH_KEY_STRING);
> +
> +                  keywords = apr_hash_get (props, SVN_PROP_KEYWORDS,
> +                                           APR_HASH_KEY_STRING);
> +
> +                  executable = apr_hash_get (props, SVN_PROP_EXECUTABLE,
> +                                             APR_HASH_KEY_STRING);
> +
> +                  if (eol_style)
> +                    svn_subst_eol_style_from_value (&style, &eol,
> +                                                    eol_style->data);
> +
> +                  if (local_mod)
> +                    /* Use the modified time from the working copy if the file */
> +                    SVN_ERR (svn_io_file_affected_time (&time, copy_from, subpool));
> +                  else
> +                    time = entry->cmt_date;
> +
> +                  if (keywords)
> +                    {
> +                      const char *fmt;
> +                      const char *author;
> +
> +                      if (local_mod)
> +                        {
> +                          /* For locally modified files, we'll append an 'M'
> +                             to the revision number, and set the author to
> +                             "(local)" since we can't always determine the
> +                             current user's username */
> +                          fmt = "%" SVN_REVNUM_T_FMT "M";
> +                          author = "(local)";
> +                        }
> +                      else
> +                        {
> +                          fmt = "%" SVN_REVNUM_T_FMT;
> +                          author = entry->cmt_author;
> +                        }
> +
> +                      SVN_ERR (svn_subst_build_keywords 
> +                               (&kw, keywords->data,
> +                                apr_psprintf (pool, 
> +                                              fmt,
> +                                              entry->cmt_rev),
> +                                entry->url,
> +                                time,
> +                                author,
> +                                subpool));
> +                    }
> +
> +                  SVN_ERR (svn_subst_copy_and_translate (base, copy_to,
> +                                                         eol, FALSE,
> +                                                         &kw, TRUE,
> +                                                         subpool));
> +                  if (executable)
> +                    SVN_ERR (svn_io_set_file_executable (copy_to, TRUE, FALSE, subpool));
> +                
> +                  SVN_ERR (svn_io_set_file_affected_time (time, copy_to, subpool));
>                  }
>              }
>  
> @@ -208,8 +296,22 @@
>                     svn_client_ctx_t *ctx,
>                     apr_pool_t *pool)
>  {
> -  if (svn_path_is_url (from))
> +  svn_boolean_t use_ra = FALSE;
> +
> +  if (! svn_path_is_url (from) &&
> +      (revision->kind != svn_opt_revision_base) &&
> +      (revision->kind != svn_opt_revision_working))

You could include svn_opt_revision_committed as well, because -rBASE and -rCOMMITTED necessarily refer to the same data (even though they may correspond to different revision numbers because of commits elsewhere in the repository).

But you don't have to do so.

This pattern occurs in several places in the client code; I have been looking for good ways to factor it out, but have not found much of a good way yet.

>      {
> +      if (revision->kind == svn_opt_revision_unspecified)
> +        /* Default to WORKING in the case that we have
> +           been given a working copy path */
> +        revision->kind = svn_opt_revision_working;
> +      else
> +        use_ra = TRUE;
> +    }
> +
> +  if (svn_path_is_url (from) || use_ra)
> +    {
>        const char *URL;
>        svn_revnum_t revnum;
>        void *ra_baton, *session;
> @@ -219,8 +321,16 @@
>        const svn_ra_reporter_t *reporter;
>        void *report_baton;
>  
> -      URL = svn_path_canonicalize (from, pool);
> -      
> +      if (use_ra)
> +        {
> +          SVN_ERR (svn_client_url_from_path (&URL, from, pool));
> +          if (! URL)
> +            return svn_error_createf (SVN_ERR_ENTRY_MISSING_URL, NULL,
> +                                      "'%s' has no URL", from);
> +        }
> +      else
> +        URL = svn_path_canonicalize (from, pool);
> +
>        SVN_ERR (svn_client__get_export_editor (&export_editor, &edit_baton,
>                                                to, URL, force, ctx, pool));
>        
> @@ -236,7 +346,7 @@
>        if (revision->kind == svn_opt_revision_unspecified)
>          revision->kind = svn_opt_revision_head;
>        SVN_ERR (svn_client__get_revision_number
> -               (&revnum, ra_lib, session, revision, to, pool));
> +               (&revnum, ra_lib, session, revision, from, pool));
>  
>        /* Manufacture a basic 'report' to the update reporter. */
>        SVN_ERR (ra_lib->do_update (session,
> @@ -273,7 +383,7 @@
>    else
>      {
>        /* just copy the contents of the working copy into the target path. */
> -      SVN_ERR (copy_versioned_files (from, to, force, ctx, pool));
> +      SVN_ERR (copy_versioned_files (from, to, revision, force, ctx, pool));
>      }
>  
>    return SVN_NO_ERROR;
> Index: subversion/clients/cmdline/main.c
> ===================================================================
> --- subversion/clients/cmdline/main.c	(revision 7778)
> +++ subversion/clients/cmdline/main.c	(working copy)
> @@ -253,7 +253,7 @@
>    { "export", svn_cl__export, {0},
>      "Create an unversioned copy of a tree.\n"
>      "usage: 1. export [-r REV] URL [PATH]\n"
> -    "       2. export PATH1 PATH2\n"
> +    "       2. export [-r REV] PATH1 [PATH2]\n"
>      "\n"
>      "  1. Exports a clean directory tree from the repository specified by\n"
>      "     URL, at revision REV if it is given, otherwise at HEAD, into\n"
> @@ -261,8 +261,11 @@
>      "     for the local directory name.\n"
>      "\n"
>      "  2. Exports a clean directory tree from the working copy specified by\n"
> -    "     PATH1 into PATH2.  All local changes will be preserved, but files\n"
> -    "     not under version control will not be copied.\n",
> +    "     PATH1, at revision REV if it is given, otherwise at WORKING, into\n"
> +    "     PATH2.  If PATH2 is omitted, the last component of the PATH1 is used\n"
> +    "     for the local directory name. If REV is not specified, All local\n"

"All" -> "all".

> +    "     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} },
>  
> Index: subversion/tests/clients/cmdline/export_tests.py
> ===================================================================
> --- subversion/tests/clients/cmdline/export_tests.py	(revision 7778)
> +++ subversion/tests/clients/cmdline/export_tests.py	(working copy)
> @@ -190,6 +190,81 @@
>                                          expected_output,
>                                          expected_disk)
>  
> +def export_working_copy_with_keyword_translation(sbox):
> +  "export working copy with keyword translation"
> +  sbox.build()
> +
> +  wc_dir = sbox.wc_dir
> +
> +  # Add a keyword to A/mu and set the svn:keywords property
> +  # appropriately to make sure it's translated during
> +  # the export operation
> +  mu_path = os.path.join(wc_dir, 'A', 'mu')
> +  svntest.main.file_append(mu_path, '$LastChangedRevision$')
> +  svntest.main.run_svn(None, 'ps', 'svn:keywords', 
> +                       'LastChangedRevision', mu_path)
> +
> +  expected_disk = svntest.main.greek_state.copy()
> +  expected_disk.tweak('A/mu',
> +                      contents=expected_disk.desc['A/mu'].contents + 
> +                      '$LastChangedRevision: 1M $')
> +
> +  export_target = sbox.add_wc_path('export')
> +
> +  svntest.actions.run_and_verify_export(wc_dir,
> +                                        export_target,
> +                                        svntest.wc.State(sbox.wc_dir, {}),
> +                                        expected_disk)
> +
> +def export_working_copy_with_property_mods(sbox):
> +  "export working copy with property mods"
> +  sbox.build()
> +
> +  wc_dir = sbox.wc_dir
> +
> +  # Make a local property mod to A/my

"A/my" -> "A/mu".

> +  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',
> +                       'CR', 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')
> +
> +  svntest.actions.run_and_verify_export(wc_dir,
> +                                        export_target,
> +                                        svntest.wc.State(sbox.wc_dir, {}),
> +                                        expected_disk)
> +
> +def export_working_copy_at_base_revision(sbox):
> +  "export working copy at base revision"
> +  sbox.build()
> +
> +  wc_dir = sbox.wc_dir
> +
> +  # Add a keyword to A/mu and set the svn:keywords property
> +  # appropriately to make sure it's translated during
> +  # the export operation
> +  mu_path = os.path.join(wc_dir, 'A', 'mu')
> +  svntest.main.file_append(mu_path, 'Appended text')
> +
> +  # Note that we don't tweak the expected disk tree at all,
> +  # since the appended text should not be present.
> +  expected_disk = svntest.main.greek_state.copy()
> +
> +  export_target = sbox.add_wc_path('export')
> +
> +  svntest.actions.run_and_verify_export(wc_dir,
> +                                        export_target,
> +                                        svntest.wc.State(sbox.wc_dir, {}),
> +                                        expected_disk,
> +                                        None, None, None, None,
> +                                        '-rBASE')
> +
>  ########################################################################
>  # Run the tests
>  
[...]


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org

[PATCH] Take 3: Modified export behavior

Posted by John Szakmeister <jo...@szakmeister.net>.
Okay, I think I've got all of this worked.  I use the working copy timestamps 
only if the file is locally modified.  For a locally modified file, I will 
also substitute in "(local)" as the author, append an 'M' to the revision 
number, and use the working copy time for LastChangedDate.

So, here's another stab with everything.  If no one disapproves of it, I'll 
commit it tomorrow, and hopefully move on to more serious problems. :-)

-John

Log:
----------------------------------------
Fixes a minor issue with the 'export' command failing to copy the BASE
revision of files when '-rBASE' is specified.  Also fixes translation of
keywords for locally modified files, as well as adding appropriate
timestamping.  Adds a couple of tests for this new functionality.

* subversion/libsvn_client/export.c
  (copy_versioned_files): Added revision parameter.  Changed the copy
  algorithm to translate keywords and eol style when appropriate.
  
  (svn_client_export): Added the ability to better distinguish when the
  repository should be contacted versus using the local base or working copy.

* subversion/clients/cmdline/main.c
  (svn_cl__cmd_table): Updated to reflect export's new functionality.

* subversion/tests/clients/cmdline/export_tests.py
  (export_working_copy_with_keyword_translation,
   export_working_copy_with_property_mods,
   export_working_copy_at_base_revision): New export tests.

* subversion/tests/clients/cmdline/svntest/actions.py
  (run_and_verify_export): Added new *args parameter to support new export
  tests.
----------------------------------------

Re: [PATCH] Take 2: Modified export behavior

Posted by John Szakmeister <jo...@szakmeister.net>.
On Tuesday 18 November 2003 16:19, Branko Čibej wrote:
> kfogel@collab.net wrote:
> >Branko Čibej <br...@xbc.nu> writes:
> >>>The system
> >>>username might be totally unrelated to the usernames used by the
> >>>repository.  So $LastChangedBy$ should be unaffected, IMHO.
> >>
> >>I disagree. If export can't figure out who made the local changes, it
> >>definitely shouldn't lie about it in the keyword expansion.
> >
> >Ah, I see.  That makes sense -- perhaps $LastChangedBy$ should remain
> >unexpanded, or say "<local>", or something.

I think I'm going to put "(Locally Modified)" as the author, and append the 
'M' as suggest by Eric.

> >But, ... still kind of bikesheddy.  I'd be happy with *any* of the
> >behaviors, including the current one.  There are much more important
> >problems in Subversion :-).
>
> Hah. I'd say. Export-from-WC is one of the less blindingly critical
> features right now, for example...

Well, it didn't start out that way. :-)  I wanted to beef up the test suite 
and this just kind of ensued from there.  But I'm hoping to get this wrapped 
up soon, and if you have suggestions for something that isn't terribly 
complicated, I'm all ears.  I'd like to help you guys reach 1.0 as quick as 
possible, and if my time can be better spent somewhere else, I'd like to know 
about it.

-John


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org


Re: [PATCH] Take 2: Modified export behavior

Posted by Branko Čibej <br...@xbc.nu>.
kfogel@collab.net wrote:

>Branko Čibej <br...@xbc.nu> writes:
>  
>
>>>The system
>>>username might be totally unrelated to the usernames used by the
>>>repository.  So $LastChangedBy$ should be unaffected, IMHO.
>>>      
>>>
>>I disagree. If export can't figure out who made the local changes, it
>>definitely shouldn't lie about it in the keyword expansion.
>>    
>>
>
>Ah, I see.  That makes sense -- perhaps $LastChangedBy$ should remain
>unexpanded, or say "<local>", or something.
>
>But, ... still kind of bikesheddy.  I'd be happy with *any* of the
>behaviors, including the current one.  There are much more important
>problems in Subversion :-).
>  
>
Hah. I'd say. Export-from-WC is one of the less blindingly critical
features right now, for example...


-- 
Brane Čibej   <br...@xbc.nu>   http://www.xbc.nu/brane/

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org

Re: [PATCH] Take 2: Modified export behavior

Posted by kf...@collab.net.
Branko Čibej <br...@xbc.nu> writes:
> >The system
> >username might be totally unrelated to the usernames used by the
> >repository.  So $LastChangedBy$ should be unaffected, IMHO.
>
> I disagree. If export can't figure out who made the local changes, it
> definitely shouldn't lie about it in the keyword expansion.

Ah, I see.  That makes sense -- perhaps $LastChangedBy$ should remain
unexpanded, or say "<local>", or something.

But, ... still kind of bikesheddy.  I'd be happy with *any* of the
behaviors, including the current one.  There are much more important
problems in Subversion :-).

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org


Re: [PATCH] Take 2: Modified export behavior

Posted by Branko Čibej <br...@xbc.nu>.
kfogel@collab.net wrote:

>The system
>username might be totally unrelated to the usernames used by the
>repository.  So $LastChangedBy$ should be unaffected, IMHO.
>  
>
I disagree. If export can't figure out who made the local changes, it
definitely shouldn't lie about it in the keyword expansion.

-- 
Brane Čibej   <br...@xbc.nu>   http://www.xbc.nu/brane/


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org

Re: [PATCH] Take 2: Modified export behavior

Posted by kf...@collab.net.
John Szakmeister <jo...@szakmeister.net> writes:
> The next problem I ran into was time-stamping the file.  In an export
> from the repository, you'd get the last committed time stamps.  So, I
> did the same for export... except for one problem, what do I do with
> locally modified files?  At the moment, I'm making a call to
> svn_wc_status() and checking text_status or props_status != normal.
> If either has been modified, then I'm pulling the time stamp from the
> WC file and applying it to the export.
> 
> Then I started thinking, that if I copied the modified file times from
> the working copy, that someone might use that information to determine
> what had changed.  Then I got to wondering whether or not the
> $LastChangedRev$ should reflect the fact that a file is locally
> modified (perhaps something like $LastChangedRev: 2+ $), as well as
> changing $LastChangedBy$ to reflect the current user.

Whew.

First, the timestamps: I'd say if the file's text has been modified
locally, then the timestamp should be that of the working file.  If
only props -- even a keyword or eol prop -- are modified, then use the
committed time, because exports do not preserve properties (even
though they may preserve keyword or eol effects, they don't preserve
the actual properties).

As for the keyword expansions: you can't count on the "current" user
having any meaning in the repository username space.  The system
username might be totally unrelated to the usernames used by the
repository.  So $LastChangedBy$ should be unaffected, IMHO.

As for the rev, if you want to put a "+", I think that's okay, but
it's sort of a bikeshed to me... :-)

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org

Re: [PATCH] Take 2: Modified export behavior

Posted by John Szakmeister <jo...@szakmeister.net>.
On Tuesday 18 November 2003 05:52, John Szakmeister wrote:
> Oof, found a problem with this... the svn:executable property doesn't get
> applied.  I've got to track down how to do that now.

Okay, I fixed this problem, but it brought around more questions, that I feel 
I need a little guidance on.

The next problem I ran into was time-stamping the file.  In an export from the 
repository, you'd get the last committed time stamps.  So, I did the same for 
export... except for one problem, what do I do with locally modified files?  
At the moment, I'm making a call to svn_wc_status() and checking text_status 
or props_status != normal.  If either has been modified, then I'm pulling the 
time stamp from the WC file and applying it to the export.

Then I started thinking, that if I copied the modified file times from the 
working copy, that someone might use that information to determine what had 
changed.  Then I got to wondering whether or not the $LastChangedRev$ should 
reflect the fact that a file is locally modified (perhaps something like 
$LastChangedRev: 2+ $), as well as changing $LastChangedBy$ to reflect the 
current user.

So now, I'm a bit confused as to what I should do. :-)  I want this to do the 
intuitive thing, but I'm not sure what that is.  Any help that can be offered 
would be appreciated.

-John


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org

Re: [PATCH] Take 2: Modified export behavior

Posted by John Szakmeister <jo...@szakmeister.net>.
Oof, found a problem with this... the svn:executable property doesn't get 
applied.  I've got to track down how to do that now.

-John

On Monday 17 November 2003 19:03, John Szakmeister wrote:
> Here's the new patch complete with tests and all.  Although, I'm a native
> english speaker, I'm not terribly elegant with command summaries. :-) 
> Please have a look and let me know if it's okay. :-)
>
> -John
>
> Log:
> ---------------------------------
> Fixes a minor issue with the 'export' command failing to copy the BASE
> revision of files when '-rBASE' is specified.  Also fixes translation of
> keywords for locally modified files.  Adds a couple of tests for this new
> functionality.
>
> * subversion/libsvn_client/export.c
>   (copy_versioned_files): Added revision parameter.  Changed the copy
>   algorithm to translate keywords and eol style when appropriate.
>
>   (svn_client_export): Added the ability to better distinguish when the
>   repository should be contacted versus using the local base or working
> copy.
>
> * subversion/clients/cmdline/main.c
>   (svn_cl__cmd_table): Updated to reflect export's new functionality.
>
> * subversion/tests/clients/cmdline/export_tests.py
>   (export_working_copy_with_keyword_translation,
>    export_working_copy_with_property_mods,
>    export_working_copy_at_base_revision): New export tests.
>
> * subversion/tests/clients/cmdline/svntest/actions.py
>   (run_and_verify_export): Added new *args parameter to support new export
>   tests.
>
> ---------------------------------


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org