test-convert-cvs: make test compatible with chg
authorSaurabh Singh <singhsrb@fb.com>
Tue, 03 Oct 2017 12:49:28 -0700
changeset 34450 47b9c572ca32
parent 34449 1f5bd3e1a7fe
child 34451 6981d120c9d7
test-convert-cvs: make test compatible with chg The test uses the 'print' method instead of writing to stdout using 'ui.write' which leads to incompatibility with chg. This commit modifies the test to use the 'ui' object instead which fixes the problem. Test Plan: Ran the test 'test-convert-cvs.t' with and without '--chg' option. Differential Revision: https://phab.mercurial-scm.org/D923
tests/test-convert-cvs.t
--- a/tests/test-convert-cvs.t	Tue Oct 03 12:09:23 2017 -0700
+++ b/tests/test-convert-cvs.t	Tue Oct 03 12:49:28 2017 -0700
@@ -12,10 +12,10 @@
   $ echo "convert = " >> $HGRCPATH
   $ cat > cvshooks.py <<EOF
   > def cvslog(ui,repo,hooktype,log):
-  >     print("%s hook: %d entries"%(hooktype,len(log)))
+  >     ui.write('%s hook: %d entries\n' % (hooktype,len(log)))
   > 
   > def cvschangesets(ui,repo,hooktype,changesets):
-  >     print("%s hook: %d changesets"%(hooktype,len(changesets)))
+  >     ui.write('%s hook: %d changesets\n' % (hooktype,len(changesets)))
   > EOF
   $ hookpath=`pwd`
   $ cat <<EOF >> $HGRCPATH