What version are you running?
RBTools 0.7.3
What's the URL of the page containing the problem?
http://reviews.internal
What steps will reproduce the problem?
1. Create a mercurial repository with three committed files, fileA, fileB, and fileC. fileA and fileB must have some content, fileC must be empty.
2. Remove fileA. Edit contents of fileB.
3. Create a sub directory and go into it
4. rbt post
What is the expected output? What do you see instead?
I expected the posted review to only contain fileA and fileB. The posted review contains fileC as well.
What operating system are you using? What browser?
Mac OS X, Mercurial 3.4.1
Please provide any additional information below.
The problem is RBT tries to locate newly added empty files by running two commands:
base_files = hg locate -r base
tip_empty_files = hg locate -r tip set:size(0)
newly_added_empty_files = tip_empty_files - base_files
hg locate -r base returns the following:
folder1/subfolder1/fileA.txt
folder2/subfolder2/fileB.txt
folder1/subfolder3/fileC.txt
where as hg locate -r tip set:size(0) returns:
../folder1/subfolder3/fileC.txt
Note that the first command uses a path relative to the root of the repository, the second uses a path relative to the current directory. When calculating the set difference fileC.txt doesn't match and rbt posts it as a newly added file.