Title: RE: [PATCH][SVNMERGE] Make error message more informative.

On Wed, 12 Apr 2006 13:22:41 +0530, Giovanni Bajo <[EMAIL PROTECTED]> wrote:

> Madan U S <[EMAIL PROTECTED]> wrote:
>
>> Fixed tabs in the patch... thanks djames for pointing out...
>>
>> [[[
>> Make (multiple heads present)error message more informative.
[snip]
>> ]]]
> There's a missing whitespace between "available" and the opening 
> parenthesis.
> The list of heads should be two-space indentented (makes things easier 
> for
> people parsing our output).
>
> Patch would be fine, but I don't specifically like the fact that you 
> list the
> repo-relative version of the path, given that -S/--head does not accept
> repo-relative addresses. We discussed this some days ago. Are you 
> planning to
> have this fixed? I would like to either fix that first, or have a 
> modified
> version of your patch which displays full URLs (until that patch goes 
> in).
>

Thanks for the feedback. Even I was thinking of printing out the absolute url instead of the repos-root relative path.
Pl. find the patch with the changes you had asked for....

[[[
Make (multiple heads present)error message more informative.

* contrib/client-side/svnmerge.py
  (get_default_head): Modified to make the error message
  more informative by listing the available heads.
]]]

Index: contrib/client-side/svnmerge.py
===================================================================
--- contrib/client-side/svnmerge.py     (revision 19318)
+++ contrib/client-side/svnmerge.py     (working copy)
@@ -765,8 +765,13 @@
         del props[directory]
 
     if len(props) > 1:
-        error('multiple heads found. '
-              'Explicit head argument (-S/--head) required.')
+        err_msg  = 'multiple heads found. '
+        err_msg += 'Explicit head argument (-S/--head) required.\n'
+        err_msg += 'The head values available are:'
+        repo_root = get_repo_root(branch_dir)
+        for prop in props:
+          err_msg += '\n  ' + repo_root + prop
+        error(err_msg)
 
     return props.keys()[0]
 
Make (multiple heads present)error message more informative.

* contrib/client-side/svnmerge.py
  (get_default_head): Modified to make the error message
  more informative by listing the available heads.
_______________________________________________
Svnmerge mailing list
[email protected]
http://www.orcaware.com/mailman/listinfo/svnmerge

Reply via email to