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

Re: [PATCH] Add '+' character if it is a copy

From: Daniel Rall <dlr_at_collab.net>
Date: 2006-09-21 22:09:56 CEST

On Thu, 21 Sep 2006, Bhuvaneswaran Arumugam wrote:
...
> If the path is a copy, add '+' character to the log message displayed in
> SVN_EDITOR.
>
> Patch by: me
> Kamesh Jayachandran <kamesh@collab.net>
>
> subversion/svn/util.c:
> * (svn_cl__get_log_message): Define new variable 'iscopy'('+'). If the
> path is a copy, add it to the log message displayed in SVN_EDITOR.

David James and I went over this patch, and came up with a revised
version (to avoid changing the level of indention), which produces the
following output for copies/moves:

--This line, and those below, will be ignored--

D foo
A + bar

Note that while this is in line with the output of 'svn status',
'status' actually describes 6 columns of output. Our feeling is that
only the 4 columns available here are valuable for inclusion in the
generated change log message.

Index: subversion/svn/util.c
===================================================================
--- subversion/svn/util.c (revision 21596)
+++ subversion/svn/util.c (working copy)
@@ -573,7 +573,11 @@
           svn_stringbuf_appendbytes(tmp_message, &text_mod, 1);
           svn_stringbuf_appendbytes(tmp_message, &prop_mod, 1);
           svn_stringbuf_appendbytes(tmp_message, &unlock, 1);
- svn_stringbuf_appendcstr(tmp_message, " ");
+ if (item->state_flags & SVN_CLIENT_COMMIT_ITEM_IS_COPY)
+ /* History included via copy/move. */
+ svn_stringbuf_appendcstr(tmp_message, "+ ");
+ else
+ svn_stringbuf_appendcstr(tmp_message, " ");
           svn_stringbuf_appendcstr(tmp_message, path);
           svn_stringbuf_appendcstr(tmp_message, APR_EOL_STR);
         }

  • application/pgp-signature attachment: stored
Received on Thu Sep 21 22:11:14 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.