Question

Old File : /vobs/code1/dir1/file1.c@@/main/branch1/4 .
New File : /vobs/code1/dir1/file1.c@@/main/branch1/mybranch/1

$ diff -q /vobs/code1/dir1/file1.c@@/main/branch1/4 /vobs/code1/dir1/file1.c@@/main/branch1/mybranch/1 Files /vobs/code1/dir1/file1.c@@/main/branch1/4 and /vobs/code1/dir1/file1.c@@/main/branch1/mybranch/1 differ

$ post-review --server http://reviewserver.oursite.com --revision-range='/vobs/code1/dir1/file1.c@@/main/branch1/4:/vobs/code1/dir1/file1.c@@/main/branch1/mybranch/1' There don't seem to be any diffs! $

Why i am getting above message when there are difference in files ?

Was it helpful?

Solution

Generate unified diffs of all files using option -U of GNU diff command:
    diff -U 100000 file1.c@@/main/4      file1.c@@/main/10          >   uni_diffs
    diff -U 100000 file2.c@@/main/br1/3  file2.c@@/main/branch2/4   >>  uni_diffs
    diff -U 100000 file3.c@@/main/abc/4  file3.c@@/main/30          >>  uni_diffs
    ....

Note 100000 is passed so that complete file can also be viewed on review board.
Assuming file length is less than 1000000.

Post the above unified diff file to review board :
    post-review --diff-filename=uni_diffs ....

Deepak

OTHER TIPS

In many RBTool versions there is a mistake in class ClearCaseClient, function diff_between_revisions.

Problematic part in postreview.py looks like this:

    revision_range = revision_range.split(';')

Two ways to handle this issue if staying with current version of Review Board and RBTools:

1) Changing semicolon to colon in the postreview.py code

2) Using semicolon as delimiter in the command line argument.

Choose the preferred solution and use it. ;-)

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top