Fix problem with displaying java diffs of maven projects in clearcase (main in path) - issue 3857

Review Request #7261 — Created April 29, 2015 and discarded


Review Board


What version are you running?

What's the URL of the page containing the problem?

What steps will reproduce the problem?
1. Post diffs of a java maven project inside a clearcase repo
2. Go to

What is the expected output? What do you see instead?
Filenames of diff are correct.
instead the diff file name ends behind src

For files in the test folder it works "MavenProject/src/test/java/package/"

What operating system are you using? What browser?
Win 2008 Server R2

Please provide any additional information below.
Error in ReviewBoard-2.0.15-py2.7.egg\reviewboard\scmtools\
line 53

# This regular expression can extract from extended_path
# pure system path. It is construct from two main parts.
# First match everything from beginning of line to first
# occurence of /. Second match parts between /main and
# numbers (file version).
# This patch assume each branch present in extended_path
# was derived from /main and there is no file or directory
# called "main" in path.
UNEXTENDED = re.compile(r'^(.+?)/|/?(.+?)/main/?.*?/([0-9]+|CHECKEDOUT)')

As mentioned in the comment, this path is not expected to contain a "/main".

For Maven projects a src/main/java folder is required!

As mentioned in line 74-80:
ClearCase paths contain additional informations about branch
and file version preceded by @@/main/. This function remove this
parts from ClearCase path to make it more readable
For example this function convert extended path::


to the the to regular path::

Clearcase not only add the /main it adds @@/main

Therefore checking the regex for @@/main fixes the problem.
Then, in the line 96 we can get rid of the replace.('@@','').

Best regards, Stefan

Tested with the commit which failed before. (See screenshots)

  1. Tool: PEP8 Style Checker
    Processed Files:
    Tool: Pyflakes
    Processed Files:
Review request changed

Status: Discarded