Koulio / rietveld

Automatically exported from code.google.com/p/rietveld
Apache License 2.0
0 stars 0 forks source link

upload.py --rev with subversion shows wrong behaviour #53

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. use upload.py --rev=<number>
   where number is and already committed revision
2. look at the generated side-by-side diff in the issue
3. the changes are reversed. i.e. removal of lines in the revision
   is shown as addition of these lines

What is the expected output? What do you see instead?
The correct diff & base-files for this already committed revision are uploaded.

Please provide any additional information below.

- first stab at this issue is changing the 'svn -r' call in upload.py to
'svn -c' to fetch the diff containing the specified revision. Then the
uploaded diff is correct.
- Next problem is the base file upload. This step seems to look at the
status of the affected files in your local working copy. As this revision
is already committed this status in not valid..

Issue 6653 show the original behavior where you can look at both the
unified diff and the side-by-side diff but all changes are reversed.

Issue 6654 is the one after changing -r -> -c in upload.py. The unified
diff is now correct but the side-by-side diff cannot be shown.

Original issue reported on code.google.com by stefan.h...@gtempaccount.com on 30 Sep 2008 at 12:19

GoogleCodeExporter commented 9 years ago
The --rev option can be used in two ways:

1) "upload.py --rev 123" uploads all changes between revision 123 and your 
current
working tree.
2) "upload.py --rev 122:123" uploads all changes between revision 122 and 123.

I think what you are looking for is 2). It calls "svn diff -r 122:123" which 
produces
the same output as "svn diff -c 123".

Does this answer your question=

Original comment by albrecht.andi on 30 Sep 2008 at 12:35

GoogleCodeExporter commented 9 years ago
This topic was already discussed in the thread [1]. The correct way for this 
process
is to specify --rev=1233:1234 if you want to upload the diff for the already
committed revision 1234.

Original comment by stefan.h...@gtempaccount.com on 30 Sep 2008 at 12:48

GoogleCodeExporter commented 9 years ago
Forgot to attach the link to the thread..

[1]
http://groups.google.com/group/codereview-discuss/browse_thread/thread/abcc69c11
a4c9a36

Original comment by stefan.h...@gtempaccount.com on 30 Sep 2008 at 12:50

GoogleCodeExporter commented 9 years ago
@albrecht.andi:

Yes, i found this out in the meantime, and it solves my problem. Thanks for 
pointing
it out. And thanks for writing the original patch.

Perhaps we should mention this behavior/need somewhere so that other people are 
not
falling into the same trap? Se my comment on the forum thread also.

Original comment by stefan.h...@gtempaccount.com on 30 Sep 2008 at 1:27

GoogleCodeExporter commented 9 years ago

Original comment by albrecht.andi on 1 Oct 2008 at 4:37