You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@subversion.apache.org by Gabriela Gibson <ga...@gmail.com> on 2013/03/30 22:31:31 UTC

[PATCH] Change label strings in svn up to match svn diff

[[[

Change the label strings for "svn merge" and "svn update" when
diff3-cmd is used to match the label strings for "svn diff" when
diff-cmd is used.

* subversion/libsvn_wc/update_editor.c
   (svn_wc__perform_file_merge): Alter label to include filename.

]]]

Re: [PATCH] Change label strings in svn up to match svn diff

Posted by Gabriela Gibson <ga...@gmail.com>.
On 31/03/13 00:39, Daniel Shahaf wrote:
> Gabriela Gibson wrote on Sat, Mar 30, 2013 at 21:31:31 +0000:

> Code inspection tells me that oldrev_str can become the @a suffix
> parameter to the svn_io_open_uniquely_named() call in
> preserve_pre_merge_files(), in which case [\t ()] are all inappropriate
> characters.
>
> I assume the "label" you refer to is the text following the
> <<<<<</======/>>>>>> conflict markers?
>
I was trying to change the label for the working copy in a 3-way merge 
to show the relative file path.

Take 2 below:

[[[

Change "mine_label" passed to external diff3-cmd to list relative
path of file.

* subversion/include/svn_io.h
   (svn_io_run_diff3_4): Fix comment, re-version function.
   (svn_io_run_diff3_3): Change comment to reflect deprecation.

* subversion/libsvn_subr/deprecated.c
   (svn_io_run_diff3_3): Move function from io.c.

* subversion/libsvn_subr/io.c
   (svn_io_run_diff3_3): Move function to deprecated.c.
   (svn_io_run_diff3_4): Add parameter for use in "mine_label".

* subversion/libsvn_wc/merge.c
   (do_text_merge_external): Add new parameter.

]]]


Re: [PATCH] Change label strings in svn up to match svn diff

Posted by Daniel Shahaf <da...@elego.de>.
Gabriela Gibson wrote on Sat, Mar 30, 2013 at 21:31:31 +0000:
> [[[
>
> Change the label strings for "svn merge" and "svn update" when
> diff3-cmd is used to match the label strings for "svn diff" when
> diff-cmd is used.
>
> * subversion/libsvn_wc/update_editor.c
>   (svn_wc__perform_file_merge): Alter label to include filename.
>
> ]]]

> Index: subversion/libsvn_wc/update_editor.c
> ===================================================================
> --- subversion/libsvn_wc/update_editor.c	(revision 1460218)
> +++ subversion/libsvn_wc/update_editor.c	(working copy)
> @@ -3792,16 +3795,20 @@ svn_wc__perform_file_merge(svn_skel_t **work_items
>    if (!SVN_IS_VALID_REVNUM(old_revision))
>      old_revision = 0;
>  
> -  oldrev_str = apr_psprintf(scratch_pool, ".r%ld%s%s",
> +  
> +  oldrev_str = apr_psprintf(scratch_pool, "%s\t(revision %ld) %s%s",
> +			    child_relpath,
>                              old_revision,
>                              *path_ext ? "." : "",
>                              *path_ext ? path_ext : "");

Code inspection tells me that oldrev_str can become the @a suffix
parameter to the svn_io_open_uniquely_named() call in
preserve_pre_merge_files(), in which case [\t ()] are all inappropriate
characters.

I assume the "label" you refer to is the text following the
<<<<<</======/>>>>>> conflict markers?