Mercurial > hgsubversion
changeset 881:ce5837c64b12
svn verify: display extra and missing files separately
author | Patrick Mezard <patrick@mezard.eu> |
---|---|
date | Fri, 20 Apr 2012 17:58:55 +0200 |
parents | d4312a6f7a87 |
children | 07234759a3f7 |
files | hgsubversion/svncommands.py tests/test_utility_commands.py |
diffstat | 2 files changed, 14 insertions(+), 3 deletions(-) [+] |
line wrap: on
line diff
--- a/hgsubversion/svncommands.py +++ b/hgsubversion/svncommands.py @@ -73,8 +73,16 @@ def verify(ui, repo, args=None, **opts): 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
--- a/tests/test_utility_commands.py +++ b/tests/test_utility_commands.py @@ -261,7 +261,10 @@ class UtilityTests(test_util.TestBase): self.assertEqual("""\ verifying d51f46a715a1 against file:// difference in file binary2 -missing files: binary1, binary3 +unexpected files: + binary1 +missing files: + binary3 """, output) def suite():