pre-upload: Fix comparison between absolute and relative path.

In _check_for_uprev(), affected_paths, set of relative paths the CL
affects was compared with a set of full paths of affected ebuild files.

TEST=Unit tests: check that new unit test fails before change, pass after.
Check that CL that failed verification (cl/233233) now passes.

Change-Id: I74ed0ab8d75d1ccab6d3e2e11464fecaf0b4c317
Signed-off-by: Gwendal Grignou <>
diff --git a/ b/
index ffa6eae..c469824 100755
--- a/
+++ b/
@@ -497,7 +497,8 @@
   # Look through each directory.  If it's got an ebuild in it then we'll
   # consider this as a case when we need a revbump.
-  affected_paths = set([FinalName(x) for x in affected_path_objs])
+  affected_paths = set(os.path.join(project_top, FinalName(x))
+                       for x in affected_path_objs)
   for dir_path in dirs_to_check:
     contents = os.listdir(dir_path)
     ebuilds = [os.path.join(dir_path, path)
diff --git a/ b/
index 395126d..5f2af69 100755
--- a/
+++ b/
@@ -792,6 +792,11 @@
         DiffEntry(src_file='c/p/p-0-r1.ebuild', src_mode='120000',
                   dst_file='c/p/p-0-r2.ebuild', dst_mode='120000', status='R')])
+  def testModifiedFilesWith9999(self):
+    """Accept 9999 ebuilds and changes in files/."""
+    self.assertAccepted([DiffEntry(src_file='c/p/files/f', status='M'),
+                         DiffEntry(src_file='c/p/p-9999.ebuild', status='M')])
 if __name__ == '__main__':