here is the promised patch:
http://codereview.appspot.com/1026
(see the second patch set). Some debugging leftovers are still there,
but generally it works for me. Usage:
$ static/upload.py -s localhost:8080 -m "heja" --hg -r 3
Loaded authentication cookies from /home/ondra/.codereview_upload_cookies
Issue created. URL: http://localhost:8080/148
2
Uploading codereview/models.py...
Base file codereview/models.py uploaded.
2
Uploading codereview/views.py...
Base file codereview/views.py uploaded.
2
Uploading static/upload.py...
Base file static/upload.py uploaded.
Or some other revision:
$ static/upload.py -s localhost:8080 -m "heja" --hg -r 7
Loaded authentication cookies from /home/ondra/.codereview_upload_cookies
Issue created. URL: http://localhost:8080/163
6
Uploading codereview/views.py...
Base file codereview/views.py uploaded.
There are still some minor bugs, but the gist of it is in there
already and it more or less works. So I'd like to invite everyone
interested in this to review the patches, point out all deficiencies
and I'll polish it and hopefully after couple of iterations we can get
this in and then further improve on this with more patches. I will
have time for polishing on Monday and Tuesday. After that I will not
have time for this maybe till the next Monday. So please review soon.
:)
Ondrej
I've put the updated code to reviews.sympy.org, so here is how you can test it:
$ hg clone http://hg.sympy.org/sympy
$ cd sympy
$ wget http://reviews.sympy.org/static/upload.py
Apply this simple patch (I just discovered this now):
$ diff -Naur upload.py /home/ondra/ext/sympy/upload.py
--- upload.py 2008-05-26 04:15:53.000000000 +0200
+++ /home/ondra/ext/sympy/upload.py 2008-05-26 04:13:17.302006271 +0200
@@ -523,7 +523,8 @@
if options.local_base:
base = None
else:
- base = GuessBase()
+ #base = GuessBase()
+ base = None
#CheckForUnknownFiles()
if options.mercurial:
if options.revision:
and continue:
$ python upload.py -s reviews.sympy.org -m "test" --hg -r 2103
Loaded authentication cookies from /home/ondra/.codereview_upload_cookies
Email: ondrej.certik
Password for ondrej.certik:
Saving authentication cookies to /home/ondra/.codereview_upload_cookies
Issue created. URL: http://reviews.sympy.org/121
2102
Uploading sympy/core/basic.py...
Base file sympy/core/basic.py uploaded.
2102
Uploading sympy/core/decimal_math.py...
Base file sympy/core/decimal_math.py uploaded.
2102
Uploading sympy/core/numbers.py...
Base file sympy/core/numbers.py uploaded.
2102
Uploading sympy/core/tests/test_numbers.py...
Base file sympy/core/tests/test_numbers.py uploaded.
2102
Uploading sympy/functions/special/spherical_harmonics.py...
Base file sympy/functions/special/spherical_harmonics.py uploaded.
2102
Uploading sympy/polynomials/tests/test_polynomials.py...
Base file sympy/polynomials/tests/test_polynomials.py uploaded.
And it works. CCing to the sympy list too.
Some things I know about:
* apply the above patch to upload.py
* One bug that I know about is when the patch creates a new file, then
it shows some error.
* It should enforce mercurial to produce patches with the "--git"
option, otherwise the parser I implemented in rietveld will fail.
* the upload base files page should have a field with the path to the
file in the repository, see
http://codereview.appspot.com/1026/diff/1/3#newcode449
* upload of files larger than 1MB will not work
* upload of files only works for Mercurial, not Subversion yet. I also
didn't run any tests for subversion, it may well be broken with my
patch (some regression test suite would really help here, so that I
don't have to test things by hand).
Ondrej
Any comments to this? I had time yesterday and today, but
unfortunately now I will be busy till Monday...
Ondrej