You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@subversion.apache.org by David Kimdon <dw...@debian.org> on 2003/05/26 21:44:22 UTC

[patch]: use notifier for wc->wc copy

Hi,

The following patch makes 'svn copy' use a notifier when doing a
working copy to working copy operation.  There was a note in the
source indicating that 'copy' didn't need to produce output, so maybe
there is some reason why this patch is not desired (see the diff
below).  The note originated in r556, I believe that is before move
printed any output.  I took a look in the archives and the log and
didn't get more info as to why this feature would not be desired.

Adding the notifier makes command behavior more consistent.  Without
this patch, for example, a 'move' creates output:

$ svn move hi.c hello.c
A         hello.c
D         hi.c
$ svn status
A  +   hello.c
D      hi.c
$

While a copy does not:

$ svn copy hi.c hello.c
$ svn status
A  +   hello.c
$ 

With this patch a copy looks like:

$ svn copy hi.c hello.c
A         hello.c
$ 

-David

* subversion/clients/cmdline/copy-cmd.c (svn_cl__copy) : Do notification
  for working-copy to working-copy 'svn copy' operations.

Index: subversion/clients/cmdline/copy-cmd.c
===================================================================
--- subversion/clients/cmdline/copy-cmd.c	(revision 6033)
+++ subversion/clients/cmdline/copy-cmd.c	(working copy)
@@ -63,8 +63,12 @@
   dst_is_url = svn_path_is_url (dst_path);
 
   if ((! src_is_url) && (! dst_is_url))
-    /* WC->WC : No notification needed. */
-    ;
+    {
+      /* WC->WC */
+      if (! opt_state->quiet)
+        svn_cl__get_notifier (&ctx->notify_func, &ctx->notify_baton, 
+                              FALSE, FALSE, FALSE, pool);
+    }
   else if ((! src_is_url) && (dst_is_url))
     {
       /* WC->URL : Use notification. */


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

Re: [patch]: use notifier for wc->wc copy

Posted by Ben Collins-Sussman <su...@collab.net>.
kfogel@collab.net writes:

> David Kimdon <dw...@debian.org> writes:
> > The following patch makes 'svn copy' use a notifier when doing a
> > working copy to working copy operation.  There was a note in the
> > source indicating that 'copy' didn't need to produce output, so maybe
> > there is some reason why this patch is not desired (see the diff
> > below).  The note originated in r556, I believe that is before move
> > printed any output.  I took a look in the archives and the log and
> > didn't get more info as to why this feature would not be desired.
> 
> I can't think of any reason why wc->wc copy shouldn't produce output.
> Can anyone else?

This patch looks great to me.

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

Re: [patch]: use notifier for wc->wc copy

Posted by kf...@collab.net.
David Kimdon <dw...@debian.org> writes:
> The following patch makes 'svn copy' use a notifier when doing a
> working copy to working copy operation.  There was a note in the
> source indicating that 'copy' didn't need to produce output, so maybe
> there is some reason why this patch is not desired (see the diff
> below).  The note originated in r556, I believe that is before move
> printed any output.  I took a look in the archives and the log and
> didn't get more info as to why this feature would not be desired.

I can't think of any reason why wc->wc copy shouldn't produce output.
Can anyone else?

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