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

Re: svn commit: r1099992 - in /subversion/trunk/subversion: libsvn_client/commit_util.c libsvn_client/copy.c svn/cl.h svn/copy-cmd.c svn/notify.c tests/cmdline/copy_tests.py

From: Dongsheng Song <dongsheng.song_at_gmail.com>
Date: Fri, 22 Jul 2011 13:18:31 +0800

On Fri, May 6, 2011 at 07:14, <rhuijben_at_apache.org> wrote:
>
> Author: rhuijben
> Date: Thu May  5 23:14:16 2011
> New Revision: 1099992
>
> URL: http://svn.apache.org/viewvc?rev=1099992&view=rev
> Log:
> Resolve issue #3314, by adding a similar copy source exist check for not
> present nodes as was added to the normal commit handling in r1099411.
>
> Also enable notifications for these svn cp DIR URL operations.
> The primary reason why notifications weren't enabled earlier was that we
> couldn't handle notifications for absolute paths... And for 1.7 most
> notifications are absolute paths.
>
> * subversion/libsvn_client/commit_util.c
>  (harvest_committables): Add check_url_func and baton to arguments.
>    When we find a not present node in copy mode, check if we should really
>    add a delete operation via the check_func.
>    Pass SVN_INVALID_REV as the base revision in copy mode, as the url
>    where we copy to doesn't exist yet.
>  (svn_client__harvest_committables,
>   harvest_copy_committables): Update caller.
>  (svn_client__condense_commit_items): Switch debug code to using SVN_DBG()
>    to make it usable from the test suite.
>
> * subversion/libsvn_client/copy.c
>  (check_url_kind_baton): New struct.
>  (check_url_kind): New function.
>  (wc_to_repos_copy): Provide check_url_kind to harvesting.
>  (repos_to_wc_copy_single): Unhook notification handler on error conditions.
>
> * subversion/svn/cl.h
>  (svn_cl__notifier_mark_wc_to_repos_copy): New function.
>
> * subversion/svn/copy-cmd.c
>  (svn_cl__copy): Handle todo by calling svn_cl__notifier_mark_wc_to_repos_copy
>    instead of clearing the notify function for wc to url copies.
>
> * subversion/svn/notify.c
>  (notify_baton): Add boolean.
>  (notify): Add 'copy of' when committing to a different url.
>  (svn_cl__notifier_mark_wc_to_repos_copy): New function.
>
> * subversion/tests/cmdline/copy_tests.py
>  (wc_copy_parent_into_child): Update expected output.
>  (copy_wc_url_with_absent): Remove XFail marker.
>
> Modified:
>    subversion/trunk/subversion/libsvn_client/commit_util.c
>    subversion/trunk/subversion/libsvn_client/copy.c
>    subversion/trunk/subversion/svn/cl.h
>    subversion/trunk/subversion/svn/copy-cmd.c
>    subversion/trunk/subversion/svn/notify.c
>    subversion/trunk/subversion/tests/cmdline/copy_tests.py
>

In subversion/trunk/subversion/svn/notify.c, these changes make messages
not translatable:

>       if ((err = svn_cmdline_printf(pool,
> -                                    _("Sending        %s\n"),
> +                                    _("Sending %s       %s\n"),
> +                                    nb->is_wc_to_repos_copy
> +                                      ? _("copy of") : "",
>                                     path_local)))
>         goto print_error;
>       break;
> @@ -694,21 +697,27 @@ notify(void *baton, const svn_wc_notify_
>       if (n->mime_type && svn_mime_type_is_binary(n->mime_type))
>         {
>           if ((err = svn_cmdline_printf(pool,
> -                                        _("Adding  (bin)  %s\n"),
> +                                        _("Adding %s (bin)  %s\n"),
> +                                        nb->is_wc_to_repos_copy
> +                                          ? _("copy of") : "",
>                                         path_local)))
>           goto print_error;
>         }
>       else
>         {
>           if ((err = svn_cmdline_printf(pool,
> -                                        _("Adding         %s\n"),
> +                                        _("Adding %s        %s\n"),
> +                                        nb->is_wc_to_repos_copy
> +                                          ? _("copy of") : "",
>                                         path_local)))
>             goto print_error;
>         }
>       break;
>
>     case svn_wc_notify_commit_deleted:
> -      if ((err = svn_cmdline_printf(pool, _("Deleting       %s\n"),
> +      if ((err = svn_cmdline_printf(pool, _("Deleting %s      %s\n"),
> +                                    nb->is_wc_to_repos_copy
> +                                      ? _("copy of") : "",
>                                     path_local)))
>         goto print_error;
>       break;
> @@ -716,7 +725,9 @@ notify(void *baton, const svn_wc_notify_
>     case svn_wc_notify_commit_replaced:
>     case svn_wc_notify_commit_copied_replaced:
>       if ((err = svn_cmdline_printf(pool,
> -                                    _("Replacing      %s\n"),
> +                                    _("Replacing %s     %s\n"),
> +                                    nb->is_wc_to_repos_copy
> +                                      ? _("copy of") : "",
>                                     path_local)))

--
Dongsheng
Received on 2011-07-22 07:19:33 CEST

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.