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

Re: svn commit: rev 4552 - in trunk/subversion: include libsvn_wc libsvn_client tests/clients/cmdline

From: <gstein_at_lyra.org>
Date: 2003-01-24 04:08:15 CET

On Thu, Jan 23, 2003 at 07:06:28PM -0600, cmpilato@tigris.org wrote:
...
 * subversion/libsvn_client/diff.c
 * subversion/libsvn_wc/adm_ops.c
 * subversion/libsvn_wc/diff.c
 * subversion/libsvn_wc/status.c
 * subversion/libsvn_wc/update_editor.c
   Update calls to svn_wc_text_modified_p(), passing 0 for the new
     'force_comparison' flag.

Eh? The parameter is defined as svn_boolean_t, so that should be FALSE.

...
 +++ trunk/subversion/libsvn_client/commit_util.c Thu Jan 23 19:06:19 2003
...
 @@ -279,15 +303,18 @@
       information about it. */
    if (state_flags SVN_CLIENT_COMMIT_ITEM_ADD)
      {
 + svn_boolean_t eol_prop_changed;
 +
        /* See if there are property modifications to send. */
 - SVN_ERR (svn_wc_props_modified_p (prop_mod, path, adm_access, pool));
 + SVN_ERR (check_prop_mods (prop_mod, eol_prop_changed, path,
 + adm_access, pool));
  
        /* Regular adds of files have text mods, but for copies we have
           to test for textual mods. Directories simply don't have text! */
        if (entry-kind == svn_node_file)
          {
            if (state_flags SVN_CLIENT_COMMIT_ITEM_IS_COPY)
 - SVN_ERR (svn_wc_text_modified_p (text_mod, path,
 + SVN_ERR (svn_wc_text_modified_p (text_mod, path, eol_prop_changed,
                                               adm_access, pool));

It is unclear why eol_prop_changed is appropriate to pass for
force_comparison. A comment explaning the rationale here would be good.
Considering that all other calls to svn_wc_text_modified_p() are hard-coded
to FALSE, makes this case (and the one below it) quite special. But why?

...
 + SVN_ERR (svn_wc_text_modified_p (text_mod, path, eol_prop_changed,
 + adm_access, pool));

And here.

...
 +++ trunk/subversion/tests/clients/cmdline/trans_tests.py Thu Jan 23 19:06:20 2003
...
 + # add a new file to the working copy.
 + foo_path = os.path.join(wc_dir, 'foo')
 + f = open(foo_path, w)

woah! You probably want to open that using wb. Otherwise, you could get
text translation going on. Probably not a good idea when that is what you're
trying to test :-)

...
 + # check 2: do the files have the right contents now?
 + f = open(foo_path, r)
 + contents = f.read()
 + f.close()

And here. I also like: contents = open(foo_path, rb).read()

Cheers,
-g

-- 
Greg Stein, http://www.lyra.org/
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Sat Oct 14 02:11:56 2006

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.