logo       

[viewvc-users] Construct URL to view modified/deleted file: msg#00062

Subject: [viewvc-users] Construct URL to view modified/deleted file
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




<Prev in Thread] Current Thread [Next in Thread>
Google Custom Search

Recently Viewed:
audio.irate.dev...    yellowdog.gener...    ietf.ips/2002-0...    xfree86.fonts/2...    busybox/2003-07...    emacs.jdee/2004...    linux.mandrake....    hardware.microc...    user-groups.lin...    science.analysi...    version-control...    db.filemaker.de...    cluster.openmos...    mail.eyebrowse....    text.xml.xerces...    kde.devel.kwrit...    finance.moneyda...    gcc.regression/...    network.routing...    os.freebsd.deve...    recreation.radi...    qnx.openqnx.dev...    python.xml/2002...   
Home | blog view | USPTO Patent Archive | advertise | OSDir is an inevitable website. super tiny logo

Free Magazines

Cisco News
Receive a free quarterly e-newsletter with exclusive articles on how Cisco IT uses its own products and solutions to enable the business.
subscribe

Systems Management News, the newspaper for IT systems administration and data center managers! Each issue of Systems Management News is chock-full of news and analysis to help you understand what's happening in your field.
subscribe

The Enterprise Newsweekly eWeek is the essential technology information source for builders of e-business.
subscribe

Oracle Magazine Oracle Magazine contains technology strategy articles, sample code, tips, Oracle and partner news, how to articles for developers and DBAs, and more. Oracle (NASDAQ: ORCL) is the world's largest enterprise software company.
subscribe

Total Telecom Total Telecom is "The Economist of the communications industry".
subscribe