Commits

Patrick Mézard committed ce5837c

svn verify: display extra and missing files separately

Comments (0)

Files changed (2)

hgsubversion/svncommands.py

 
     hgfiles = set(ctx) - util.ignoredfiles
     if hgfiles != svnfiles:
-        missing = set(hgfiles).symmetric_difference(svnfiles)
-        ui.write('missing files: %s\n' % (', '.join(sorted(missing))))
+        unexpected = hgfiles - svnfiles
+        if unexpected:
+            ui.write('unexpected files:\n')
+            for f in sorted(unexpected):
+                ui.write('  %s\n' % f)
+        missing = svnfiles - hgfiles
+        if missing:
+            ui.write('missing files:\n')
+            for f in sorted(missing):
+                ui.write('  %s\n' % f)
         result = 1
 
     return result

tests/test_utility_commands.py

         self.assertEqual("""\
 verifying d51f46a715a1 against file://
 difference in file binary2
-missing files: binary1, binary3
+unexpected files:
+  binary1
+missing files:
+  binary3
 """, output)
 
 def suite():