Re: post-review login issue

2009-09-23 Thread Christian Hammond
Strange. This is not an issue I've seen before. I can't tell if the error is
just overly escaping the \ or if the filename is invalid.

Do you know exactly what line is causing that error in the code?

Christian

-- 
Christian Hammond - chip...@chipx86.com
Review Board - http://www.review-board.org
VMware, Inc. - http://www.vmware.com


On Tue, Sep 22, 2009 at 10:39 PM, Hui Lin hui@bankofamerica.com wrote:


 Uploading the diff works now after fixing some perforce registry
 issues.

 However, when I click the View Diff button in the request details
 page, I got this error:
[Errno 2] No such file or directory: 'c:\\winnt\\temp\
 \reviewboard.jyl6y5\\tmpsx6zut-new'

 The patched new file isn't there. I turned on the debug, and saw the
 output of the patch command:
Hmm...  I can't seem to find a patch in there anywhere.

 I tweaked the code of diffutils.py by first saving the diff data
 into a file, and then run the patch command:
patch -d c:\winnt\temp\reviewboard.jyl6y5 -i tmpsx6zut-diff -o
 tmpsx6zut-new tmpsx6zut

 But still not working. This command worked fine when executed in the
 DOS console.

 It also works fine when executed in python runtime interactively:
 command = 'patch -d c:\winnt\temp\reviewboard.jyl6y5 -i
 tmpsx6zut-diff -o tmpsx6zut-new tmpsx6zut'
 import subprocess
 p = subprocess.Popen(command, stdin=subprocess.PIPE,
 stdout=subprocess.PIPE, stderr=subprocess.STDOUT)
 p.stdout.read()
'patching file c:\\winnt\\temp\\reviewboard.zug54j\\tmp-wkiqd\r\n'

 What could be wrong?

 I am using the GnuWin32 patch version 2.5.9.


 On Sep 22, 6:45 pm, Lacoste, Dana (TSG Software San Diego)
 dana.laco...@hp.com wrote:
  OK, that makes sense.
 
  I was just hoping for a quicker solution to the give me the whole file
 problem ☺
 
  I'll see what I can provide in the realm of support for coding that ☺
 
  Dana
 
  From: reviewboard@googlegroups.com [mailto:reviewbo...@googlegroups.com]
 On Behalf Of Christian Hammond
  Sent: Tuesday, September 22, 2009 4:38 PM
  To: reviewboard@googlegroups.com
  Subject: Re: post-review login issue
 
  Hi Dana,
 
  We specifically avoid this for a few reasons.
 
  1) It's much more efficient to store a diff in the database instead of a
 full file.
 
  2) We need both an original, unmodified file along with the patched file.
 This means that either we still need to do a server fetch, or we now need
 both files uploaded and stored in the database.
 
  3) It actually limits us. By having the diff, future extensions to Review
 Board may be able to do things like track a patch's freshness (useful for
 contributed patches to open source projects) by periodically attempting to
 apply the patch to the latest version in a codebase. If we use full files,
 we can't build this kind of extensibility.
 
  4) Review Board now needs to know how to generate every kind of diff we
 could possibly need for every revision control system when the user clicks
 Download Diff. We want to preserve the diffs uploaded. For example, A Git
 diff may contain some author and description information embedded in the
 diff. We can't reproduce this.
 
  There's no reason today why we can't build the functionality to download
 the modified files. It's just a matter of looking up the list of files
 associated with a change and calling our existing function to grab the
 patched version of the file from the repository, then assemble them into a
 zip or something for download.
 
  Christian
 
  --
  Christian Hammond - chip...@chipx86.commailto:chip...@chipx86.com
  Review Board -http://www.review-board.org
  VMware, Inc. -http://www.vmware.com
 


--~--~-~--~~~---~--~~
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 
reviewboard+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/reviewboard?hl=en
-~--~~~~--~~--~--~---



404 when adding line comment

2009-09-23 Thread Pv

I just got Review Board up and running today using Apache+mod_python
+memcache on Windows (py25).

First question: Is this the right group to post a question to? :)

Things seem to work fairly smoothly, but when I try to save a comment
to a line of code in a diff I get a 404 at the top of the screen.
Looking at my apache log I see the following:

No FileDiff matches the given query.
Traceback (most recent call last):
  File c:\python25\lib\site-packages\django-1.1-py2.5.egg\django\core
\handlers\base.py, line 92, in get_response
response = callback(request, *callback_args, **callback_kwargs)
  File c:\python25\lib\site-packages\django-1.1-py2.5.egg\django\views
\decorators\cache.py, line 44, in _wrapped_view_func
response = view_func(request, *args, **kwargs)
  File c:\python25\lib\site-packages\ReviewBoard-1.1alpha1-py2.5.egg
\reviewboard\webapi\decorators.py, line 20, in _check
return view_func(request, *args, **kwargs)
  File c:\python25\lib\site-packages\ReviewBoard-1.1alpha1-py2.5.egg
\reviewboard\webapi\json.py, line 1345, in diff_line_comments
diffset__revision=diff_revision)
  File c:\python25\lib\site-packages\django-1.1-py2.5.egg\django
\shortcuts\__init__.py, line 87, in get_object_or_404
raise Http404('No %s matches the given query.' %
queryset.model._meta.object_name)
Http404: No FileDiff matches the given query.


The diff was uploaded via the post-review tool.

Pv

--~--~-~--~~~---~--~~
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 
reviewboard+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/reviewboard?hl=en
-~--~~~~--~~--~--~---



Re: 404 when adding line comment

2009-09-23 Thread Christian Hammond
Hi,

Yep, this is the right mailing list.

So first of all, did you mean to install the in-development version? That's
perfectly fine, but I want to make sure.

Was the review request published? Or did you leave a comment on the diff
before publishing the review request? That will cause this. There's a bug or
two open on this somewhere.

Christian

-- 
Christian Hammond - chip...@chipx86.com
Review Board - http://www.review-board.org
VMware, Inc. - http://www.vmware.com


On Wed, Sep 23, 2009 at 4:56 PM, Pv p...@swooby.com wrote:


 I just got Review Board up and running today using Apache+mod_python
 +memcache on Windows (py25).

 First question: Is this the right group to post a question to? :)

 Things seem to work fairly smoothly, but when I try to save a comment
 to a line of code in a diff I get a 404 at the top of the screen.
 Looking at my apache log I see the following:

 No FileDiff matches the given query.
 Traceback (most recent call last):
  File c:\python25\lib\site-packages\django-1.1-py2.5.egg\django\core
 \handlers\base.py, line 92, in get_response
response = callback(request, *callback_args, **callback_kwargs)
  File c:\python25\lib\site-packages\django-1.1-py2.5.egg\django\views
 \decorators\cache.py, line 44, in _wrapped_view_func
response = view_func(request, *args, **kwargs)
  File c:\python25\lib\site-packages\ReviewBoard-1.1alpha1-py2.5.egg
 \reviewboard\webapi\decorators.py, line 20, in _check
return view_func(request, *args, **kwargs)
  File c:\python25\lib\site-packages\ReviewBoard-1.1alpha1-py2.5.egg
 \reviewboard\webapi\json.py, line 1345, in diff_line_comments
diffset__revision=diff_revision)
  File c:\python25\lib\site-packages\django-1.1-py2.5.egg\django
 \shortcuts\__init__.py, line 87, in get_object_or_404
raise Http404('No %s matches the given query.' %
 queryset.model._meta.object_name)
 Http404: No FileDiff matches the given query.


 The diff was uploaded via the post-review tool.

 Pv

 


--~--~-~--~~~---~--~~
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 
reviewboard+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/reviewboard?hl=en
-~--~~~~--~~--~--~---



Re: 404 when adding line comment

2009-09-23 Thread Pv

Yes, I meant to install and try out the dev version.

The review was still a draft and had not been published.
I published the review and could make a comment fine.

I did a quick discussion search for 404 (and related), but did not see
anything.

Also interesting, when I had the review in draft and used the admin to
view the review request draft to change I got a 500 error.
Once published I can admin the non-draft review just fine.

Pv

On Sep 23, 5:05 pm, Christian Hammond chip...@chipx86.com wrote:
 Hi,

 Yep, this is the right mailing list.

 So first of all, did you mean to install the in-development version? That's
 perfectly fine, but I want to make sure.

 Was the review request published? Or did you leave a comment on the diff
 before publishing the review request? That will cause this. There's a bug or
 two open on this somewhere.

 Christian

 --
 Christian Hammond - chip...@chipx86.com
 Review Board -http://www.review-board.org
 VMware, Inc. -http://www.vmware.com



 On Wed, Sep 23, 2009 at 4:56 PM, Pv p...@swooby.com wrote:

  I just got Review Board up and running today using Apache+mod_python
  +memcache on Windows (py25).

  First question: Is this the right group to post a question to? :)

  Things seem to work fairly smoothly, but when I try to save a comment
  to a line of code in a diff I get a 404 at the top of the screen.
  Looking at my apache log I see the following:

  No FileDiff matches the given query.
  Traceback (most recent call last):
   File c:\python25\lib\site-packages\django-1.1-py2.5.egg\django\core
  \handlers\base.py, line 92, in get_response
     response = callback(request, *callback_args, **callback_kwargs)
   File c:\python25\lib\site-packages\django-1.1-py2.5.egg\django\views
  \decorators\cache.py, line 44, in _wrapped_view_func
     response = view_func(request, *args, **kwargs)
   File c:\python25\lib\site-packages\ReviewBoard-1.1alpha1-py2.5.egg
  \reviewboard\webapi\decorators.py, line 20, in _check
     return view_func(request, *args, **kwargs)
   File c:\python25\lib\site-packages\ReviewBoard-1.1alpha1-py2.5.egg
  \reviewboard\webapi\json.py, line 1345, in diff_line_comments
     diffset__revision=diff_revision)
   File c:\python25\lib\site-packages\django-1.1-py2.5.egg\django
  \shortcuts\__init__.py, line 87, in get_object_or_404
     raise Http404('No %s matches the given query.' %
  queryset.model._meta.object_name)
  Http404: No FileDiff matches the given query.

  The diff was uploaded via the post-review tool.

  Pv
--~--~-~--~~~---~--~~
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 
reviewboard+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/reviewboard?hl=en
-~--~~~~--~~--~--~---



Re: post-review login issue

2009-09-23 Thread Hui Lin

I resolved the patch issue by running Apache as a normal Windows
application, not a service. Not sure exactly why, but suspect that the
different user accounts for running Windows services (SYSTEM) and
running user applications (Current User Login) may be the reason.

Now diff view is working great.


On Sep 23, 12:00 pm, Hui Lin hui@bankofamerica.com wrote:
 Hi, Dana:

 I saw your posts are rendered at full length each line, but mine are
 wrapped at 70-80 characters, which makes them look quite different
 from what I originally posted.

 What is the trick?

 Thanks

 On Sep 23, 11:28 am, Hui Lin hui@bankofamerica.com wrote:



  The issue started from line 107 of diffutils.py. This is how the
  patch is executed:
      p = subprocess.Popen(['patch', '-o', newfile, oldfile],
                           stdin=subprocess.PIPE,
  stdout=subprocess.PIPE,
                           stderr=subprocess.STDOUT)

  The subsequent error checking isn't adequent, as in this case, p.wait
  () returns false, but the patch_output indicates that it actually
  failed.
      patch_output = p.stdout.read()
      failure = p.wait()

      if failure:
          ...

  On Sep 23, 1:00 am, Christian Hammond chip...@chipx86.com wrote:

   Strange. This is not an issue I've seen before. I can't tell if the error 
   is
   just overly escaping the \ or if the filename is invalid.

   Do you know exactly what line is causing that error in the code?

   Christian

   --
   Christian Hammond - chip...@chipx86.com
   Review Board -http://www.review-board.org
   VMware, Inc. -http://www.vmware.com

   On Tue, Sep 22, 2009 at 10:39 PM, Hui Lin hui@bankofamerica.com 
   wrote:

Uploading the diff works now after fixing some perforce registry
issues.

However, when I click the View Diff button in the request details
page, I got this error:
   [Errno 2] No such file or directory: 'c:\\winnt\\temp\
\reviewboard.jyl6y5\\tmpsx6zut-new'

The patched new file isn't there. I turned on the debug, and saw the
output of the patch command:
   Hmm...  I can't seem to find a patch in there anywhere.

I tweaked the code of diffutils.py by first saving the diff data
into a file, and then run the patch command:
   patch -d c:\winnt\temp\reviewboard.jyl6y5 -i tmpsx6zut-diff -o
tmpsx6zut-new tmpsx6zut

But still not working. This command worked fine when executed in the
DOS console.

It also works fine when executed in python runtime interactively:
    command = 'patch -d c:\winnt\temp\reviewboard.jyl6y5 -i
tmpsx6zut-diff -o tmpsx6zut-new tmpsx6zut'
    import subprocess
    p = subprocess.Popen(command, stdin=subprocess.PIPE,
stdout=subprocess.PIPE, stderr=subprocess.STDOUT)
    p.stdout.read()
   'patching file c:\\winnt\\temp\\reviewboard.zug54j\\tmp-wkiqd\r\n'

What could be wrong?

I am using the GnuWin32 patch version 2.5.9.

On Sep 22, 6:45 pm, Lacoste, Dana (TSG Software San Diego)
dana.laco...@hp.com wrote:
 OK, that makes sense.

 I was just hoping for a quicker solution to the give me the whole 
 file
problem ☺

 I'll see what I can provide in the realm of support for coding that ☺

 Dana

 From: reviewboard@googlegroups.com 
 [mailto:reviewbo...@googlegroups.com]
On Behalf Of Christian Hammond
 Sent: Tuesday, September 22, 2009 4:38 PM
 To: reviewboard@googlegroups.com
 Subject: Re: post-review login issue

 Hi Dana,

 We specifically avoid this for a few reasons.

 1) It's much more efficient to store a diff in the database instead 
 of a
full file.

 2) We need both an original, unmodified file along with the patched 
 file.
This means that either we still need to do a server fetch, or we now 
need
both files uploaded and stored in the database.

 3) It actually limits us. By having the diff, future extensions to 
 Review
Board may be able to do things like track a patch's freshness (useful 
for
contributed patches to open source projects) by periodically attempting 
to
apply the patch to the latest version in a codebase. If we use full 
files,
we can't build this kind of extensibility.

 4) Review Board now needs to know how to generate every kind of diff 
 we
could possibly need for every revision control system when the user 
clicks
Download Diff. We want to preserve the diffs uploaded. For example, A 
Git
diff may contain some author and description information embedded in the
diff. We can't reproduce this.

 There's no reason today why we can't build the functionality to 
 download
the modified files. It's just a matter of looking up the list of files
associated with a change and calling our existing function to grab the
patched version of the file from the repository, then assemble them 
into a
zip or something for download.

 

Re: post-review login issue

2009-09-23 Thread Christian Hammond
Ahh, that very well may be. Glad it's finally working though.

Most of our development and testing is done on Linux. Some of our
dependencies are hard to install on Windows, and there's some other gotchas
like this that we're still only finding out about. I'm personally hoping to
find someone who wants to maintain our Windows support. What we've been
recommending to a lot of people is to use Linux in a VM and install on
there.

Thanks for being patient with us and with this whole process. I know issues
like this can be infuriating. The feedback is useful though.

Christian

-- 
Christian Hammond - chip...@chipx86.com
Review Board - http://www.review-board.org
VMware, Inc. - http://www.vmware.com


On Wed, Sep 23, 2009 at 6:23 PM, Hui Lin hui@bankofamerica.com wrote:


 I resolved the patch issue by running Apache as a normal Windows
 application, not a service. Not sure exactly why, but suspect that the
 different user accounts for running Windows services (SYSTEM) and
 running user applications (Current User Login) may be the reason.

 Now diff view is working great.


 On Sep 23, 12:00 pm, Hui Lin hui@bankofamerica.com wrote:
  Hi, Dana:
 
  I saw your posts are rendered at full length each line, but mine are
  wrapped at 70-80 characters, which makes them look quite different
  from what I originally posted.
 
  What is the trick?
 
  Thanks
 
  On Sep 23, 11:28 am, Hui Lin hui@bankofamerica.com wrote:
 
 
 
   The issue started from line 107 of diffutils.py. This is how the
   patch is executed:
   p = subprocess.Popen(['patch', '-o', newfile, oldfile],
stdin=subprocess.PIPE,
   stdout=subprocess.PIPE,
stderr=subprocess.STDOUT)
 
   The subsequent error checking isn't adequent, as in this case, p.wait
   () returns false, but the patch_output indicates that it actually
   failed.
   patch_output = p.stdout.read()
   failure = p.wait()
 
   if failure:
   ...
 
   On Sep 23, 1:00 am, Christian Hammond chip...@chipx86.com wrote:
 
Strange. This is not an issue I've seen before. I can't tell if the
 error is
just overly escaping the \ or if the filename is invalid.
 
Do you know exactly what line is causing that error in the code?
 
Christian
 
--
Christian Hammond - chip...@chipx86.com
Review Board -http://www.review-board.org
VMware, Inc. -http://www.vmware.com
 
On Tue, Sep 22, 2009 at 10:39 PM, Hui Lin hui@bankofamerica.com
 wrote:
 
 Uploading the diff works now after fixing some perforce registry
 issues.
 
 However, when I click the View Diff button in the request details
 page, I got this error:
[Errno 2] No such file or directory: 'c:\\winnt\\temp\
 \reviewboard.jyl6y5\\tmpsx6zut-new'
 
 The patched new file isn't there. I turned on the debug, and saw
 the
 output of the patch command:
Hmm...  I can't seem to find a patch in there anywhere.
 
 I tweaked the code of diffutils.py by first saving the diff data
 into a file, and then run the patch command:
patch -d c:\winnt\temp\reviewboard.jyl6y5 -i tmpsx6zut-diff -o
 tmpsx6zut-new tmpsx6zut
 
 But still not working. This command worked fine when executed in
 the
 DOS console.
 
 It also works fine when executed in python runtime interactively:
 command = 'patch -d c:\winnt\temp\reviewboard.jyl6y5 -i
 tmpsx6zut-diff -o tmpsx6zut-new tmpsx6zut'
 import subprocess
 p = subprocess.Popen(command, stdin=subprocess.PIPE,
 stdout=subprocess.PIPE, stderr=subprocess.STDOUT)
 p.stdout.read()
'patching file
 c:\\winnt\\temp\\reviewboard.zug54j\\tmp-wkiqd\r\n'
 
 What could be wrong?
 
 I am using the GnuWin32 patch version 2.5.9.
 
 On Sep 22, 6:45 pm, Lacoste, Dana (TSG Software San Diego)
 dana.laco...@hp.com wrote:
  OK, that makes sense.
 
  I was just hoping for a quicker solution to the give me the
 whole file
 problem ☺
 
  I'll see what I can provide in the realm of support for coding
 that ☺
 
  Dana
 
  From: reviewboard@googlegroups.com [mailto:
 reviewbo...@googlegroups.com]
 On Behalf Of Christian Hammond
  Sent: Tuesday, September 22, 2009 4:38 PM
  To: reviewboard@googlegroups.com
  Subject: Re: post-review login issue
 
  Hi Dana,
 
  We specifically avoid this for a few reasons.
 
  1) It's much more efficient to store a diff in the database
 instead of a
 full file.
 
  2) We need both an original, unmodified file along with the
 patched file.
 This means that either we still need to do a server fetch, or we
 now need
 both files uploaded and stored in the database.
 
  3) It actually limits us. By having the diff, future extensions
 to Review
 Board may be able to do things like track a patch's freshness
 (useful for
 contributed patches to open source projects) by periodically
 attempting to