# HG changeset patch # User Saurabh Singh # Date 1507060168 25200 # Node ID 47b9c572ca325abb6f2aa6c1a210c0461df795a7 # Parent 1f5bd3e1a7fe9f068d6dfeff5f693fe706478020 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 diff -r 1f5bd3e1a7fe -r 47b9c572ca32 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 < 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 <> $HGRCPATH