I am currently setting up the integration between Jira and ViewVC. This
will enable users to navigate from Subversion change set in Jira to view
diff of the specific files in ViewVC. However, currently Jira provides
only 3 variables that will be replaced at runtime to construct the URL
to ViewVC:
${path} - Path to the changed file or directory
${rev} - Subversion revision of the change
${rev-1} - Subversion revision of the change, minus 1
When viewing a file modified or deleted, this causes problem if the
previous revision of the file is not equals ${rev-1}.
For example, if I want to view the diff of the modified file in rev 5,
the url will look like this:
http://my.host.com/viewvc/repos/path/to/aFile?revision=5&r1=5&r2=4
However, if the file is not edited in rev 4, in other words, if rev 4's
changeset does not contain this file, the above URL will result in an
exception:
An Exception Has Occurred
Invalid path(s) or revision(s) passed to diff
HTTP Response Status
400 Bad Request
Python Traceback
Traceback (most recent call last):
File "/usr/local/viewvc-1.0.4/lib/viewvc.py", line 3665, in main
request.run_viewvc()
File "/usr/local/viewvc-1.0.4/lib/viewvc.py", line 388, in run_viewvc
self.view_func(self)
File "/usr/local/viewvc-1.0.4/lib/viewvc.py", line 2678, in view_diff
p1, p2, rev1, rev2, sym1, sym2 = setup_diff(request)
File "/usr/local/viewvc-1.0.4/lib/viewvc.py", line 2629, in setup_diff
p2 = _get_diff_path_parts(request, 'p2', rev2, request.pathrev)
File "/usr/local/viewvc-1.0.4/lib/viewvc.py", line 2579, in
_get_diff_path_parts
'to diff', '400 Bad Request')
ViewVCException: 400 Bad Request: Invalid path(s) or revision(s) passed
to diff
So the question is, whether it is possible to construct correct URL for
viewing modified or deleted file in this case, providing that Jira gives
us only 3 variables as described.
Regards,
Vairoj
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@xxxxxxxxxxxxxxxxx
For additional commands, e-mail: users-help@xxxxxxxxxxxxxxxxx
|