On Oct 8, 8:31 pm, Chris Clark <[EMAIL PROTECTED]> wrote:
> On 10/8/2008 4:21 PM, Paulo Eduardo Neves wrote:
> > I've already did some patch uploads through the web interface, but now
> > when I try to upload a diff generated by subversion nothing happens.

> When I was debugging my SCM diffs, I added print statement to the diff
> parser and "import pdb ; pdb.set_trace()" to diffutils.py so I could
> step through (I'm using the built in web server).

Ok, the good ole set_trace. Here what I found:

def new_review_request(request,
                       template_name='reviews/
new_review_request.html'):
    """
    Displays a New Review Request form and handles the creation of a
    review request based on either an existing changeset or the
provided
    information.
    """
    import pdb;pdb.set_trace()
    if request.method == 'POST':
        form = NewReviewRequestForm(request.POST, request.FILES)

        if form.is_valid():
            try:
                review_request = form.create(
                    user=request.user,
                    diff_file=request.FILES['diff_path'],
 
parent_diff_file=request.FILES.get('parent_diff_path'))
                return
HttpResponseRedirect(review_request.get_absolute_url())
            except:
                # XXX - OwnershipError or ChangeSetError?
                #
                # We're preventing an exception from being thrown here
so that
                # we can display the errors that form.create() sets in
                # a much nicer way in the template. Otherwise, the
user would
                # see a useless backtrace.
                pass

Here it is, the Abominable Except Catch All code smell. I can't count
how many times this beast hurt me. The exception is eaten and nothing
happens in the interface. I've put a raise after the pass and got
this:

Exception Type: SCMError at /r/new/
Exception Value: Unable to parse diff revision header '(revis�15854)'

here is the trace back:
http://dpaste.com/83448/

Argh! Accents!  Here a piece of my patch file:

--- cv_yyy/email/xxx.html       (revisão 0)
+++ cv_yyy/email/xxx.html       (revisão 15855)
@@ -0,0 +1,30 @@

My subversion command line client is creating everything in
Portuguese!

Let's try:
>set LANG=en_US
>svn diff -r 15843:15844 > e:\revisao15844.patch

and I'm a HAPPY MAN!!

Everything is working.

Should I open an issue for this? I didn't dig inside the code to see
it, maybe it is just a reguar expression.

regards,
Paulo Eduardo Neves
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"reviewboard" group.
To post to this group, send email to reviewboard@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/reviewboard?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to