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

Re: svn commit: r11035 - in trunk/subversion: libsvn_wc tests/clients/cmdline

From: <kfogel_at_collab.net>
Date: 2004-09-20 14:58:13 CEST

jpieper@tigris.org writes:
> Log:
> Correctly display diffs of scheduled-add symlinks.
>
> * subversion/libsvn_wc/diff.c
> (file_diff): Look at the translated version of files when diffing a
> schedule-add file.
>
> * subversion/tests/clients/cmdline/special_tests.py
> (general_symlink): Do a quick diff before committing our first
> symlink in this test.

It looks like this fixes not only a bug in diffing scheduled-add
symlinks, but a bug in diffing any scheduled-add file that contains
(say) keywords and (say) has the appropriate svn:keywords property
value.

Is that the case? Or is there some subtle reason why this change only
affects symlink files?

-Karl

> Modified: trunk/subversion/libsvn_wc/diff.c
> Url: http://svn.collab.net/viewcvs/svn/trunk/subversion/libsvn_wc/diff.c?view=diff&rev=11035&p1=trunk/subversion/libsvn_wc/diff.c&r1=11034&p2=trunk/subversion/libsvn_wc/diff.c&r2=11035
> ==============================================================================
> --- trunk/subversion/libsvn_wc/diff.c (original)
> +++ trunk/subversion/libsvn_wc/diff.c Fri Sep 17 17:49:09 2004
> @@ -468,6 +468,7 @@
> svn_boolean_t copied = entry->copied;
> svn_wc_adm_access_t *adm_access;
> const char *pristine_mimetype, *working_mimetype;
> + const char *translated;
>
> SVN_ERR (svn_wc_adm_retrieve (&adm_access, dir_baton->edit_baton->anchor,
> dir_baton->path, pool));
> @@ -527,14 +528,19 @@
> adm_access, path, pool));
>
> if (! eb->use_text_base)
> - SVN_ERR (dir_baton->edit_baton->callbacks->file_added
> - (NULL, NULL, path,
> - empty_file,
> - path,
> - 0, entry->revision,
> - NULL,
> - working_mimetype,
> - dir_baton->edit_baton->callback_baton));
> + {
> + SVN_ERR (svn_wc_translated_file (&translated, path, adm_access,
> + TRUE, pool));
> +
> + SVN_ERR (dir_baton->edit_baton->callbacks->file_added
> + (NULL, NULL, path,
> + empty_file,
> + translated,
> + 0, entry->revision,
> + NULL,
> + working_mimetype,
> + dir_baton->edit_baton->callback_baton));
> + }
>
> SVN_ERR (svn_wc_props_modified_p (&modified, path, adm_access, pool));
> if (modified && (! eb->use_text_base))
> @@ -560,7 +566,6 @@
> adm_access, pool));
> if (modified && (! eb->use_text_base))
> {
> - const char *translated;
> svn_error_t *err, *err2 = SVN_NO_ERROR;
>
> pristine_copy = svn_wc__text_base_path (path, FALSE, pool);
>
> Modified: trunk/subversion/tests/clients/cmdline/special_tests.py
> Url: http://svn.collab.net/viewcvs/svn/trunk/subversion/tests/clients/cmdline/special_tests.py?view=diff&rev=11035&p1=trunk/subversion/tests/clients/cmdline/special_tests.py&r1=11034&p2=trunk/subversion/tests/clients/cmdline/special_tests.py&r2=11035
> ==============================================================================
> --- trunk/subversion/tests/clients/cmdline/special_tests.py (original)
> +++ trunk/subversion/tests/clients/cmdline/special_tests.py Fri Sep 17 17:49:09 2004
> @@ -55,6 +55,17 @@
> 'linktarget' : Item(verb='Adding'),
> })
>
> + # Run a diff and verify that we get the correct output
> + stdout_lines, stderr_lines = svntest.main.run_svn(1, 'diff', wc_dir)
> +
> + regex = '^\+link linktarget'
> + for line in stdout_lines:
> + if re.match(regex, line):
> + break
> + else:
> + raise svntest.Failure
> +
> + # Commit and make sure everything is good
> expected_status = svntest.actions.get_virginal_state(wc_dir, 2)
> expected_status.tweak(wc_rev=1)
> expected_status.add({
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: svn-unsubscribe@subversion.tigris.org
> For additional commands, e-mail: svn-help@subversion.tigris.org

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Mon Sep 20 16:42:51 2004

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.