changeset 34449:47b9c572ca32

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
author Saurabh Singh <singhsrb@fb.com>
date Tue, 03 Oct 2017 12:49:28 -0700
parents 1f5bd3e1a7fe
children 6981d120c9d7
files tests/test-convert-cvs.t
diffstat 1 files changed, 2 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- 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