# HG changeset patch # User Mads Kiilerich # Date 2012-08-08 16:10:37 # Node ID 2da47de36b6f550f5a7e20b2f182dae34ccfec67 # Parent 2944a6d35158bb9c464f926f360f48d8512d0ad1 check-code: fix check for trailing whitespace on continued lines too The tests in test-annotate.t and test-import-git.t that relied on trailing space in a file created by a here string is now masked by a literal 'EOL' string that is removed. diff --git a/contrib/check-code.py b/contrib/check-code.py --- a/contrib/check-code.py +++ b/contrib/check-code.py @@ -91,7 +91,7 @@ testfilters = [ uprefix = r"^ \$ " utestpats = [ [ - (r'^(\S.*|| \$ .*)[ \t]\n', "trailing whitespace on non-output"), + (r'^(\S.*|| [$>] .*)[ \t]\n', "trailing whitespace on non-output"), (uprefix + r'.*\|\s*sed[^|>\n]*\n', "use regex test output patterns instead of sed"), (uprefix + r'(true|exit 0)', "explicit zero exit unnecessary"), diff --git a/tests/test-annotate.t b/tests/test-annotate.t --- a/tests/test-annotate.t +++ b/tests/test-annotate.t @@ -279,10 +279,10 @@ Test annotate with whitespace options > EOF $ hg ci -Am "adda" adding a - $ cat > a < a < a a > - > + > EOL > b b > EOF $ hg ci -m "changea" diff --git a/tests/test-convert-svn-branches.t b/tests/test-convert-svn-branches.t --- a/tests/test-convert-svn-branches.t +++ b/tests/test-convert-svn-branches.t @@ -3,7 +3,7 @@ $ cat >> $HGRCPATH < [extensions] - > convert = + > convert = > graphlog = > EOF @@ -14,7 +14,7 @@ Convert trunk and branches $ cat > branchmap < old3 newbranch - > + > > > EOF $ hg convert --branchmap=branchmap --datesort -r 10 svn-repo A-hg diff --git a/tests/test-convert-svn-encoding.t b/tests/test-convert-svn-encoding.t --- a/tests/test-convert-svn-encoding.t +++ b/tests/test-convert-svn-encoding.t @@ -3,7 +3,7 @@ $ cat >> $HGRCPATH < [extensions] - > convert = + > convert = > graphlog = > EOF diff --git a/tests/test-convert-svn-move.t b/tests/test-convert-svn-move.t --- a/tests/test-convert-svn-move.t +++ b/tests/test-convert-svn-move.t @@ -3,7 +3,7 @@ $ cat >> $HGRCPATH < [extensions] - > convert = + > convert = > graphlog = > EOF @@ -155,7 +155,7 @@ Test convert progress bar' $ cat >> $HGRCPATH < [extensions] - > progress = + > progress = > [progress] > assume-tty = 1 > delay = 0 diff --git a/tests/test-convert-svn-sink.t b/tests/test-convert-svn-sink.t --- a/tests/test-convert-svn-sink.t +++ b/tests/test-convert-svn-sink.t @@ -16,7 +16,7 @@ $ cat >> $HGRCPATH < [extensions] - > convert = + > convert = > graphlog = > EOF diff --git a/tests/test-convert-svn-source.t b/tests/test-convert-svn-source.t --- a/tests/test-convert-svn-source.t +++ b/tests/test-convert-svn-source.t @@ -3,7 +3,7 @@ $ cat >> $HGRCPATH < [extensions] - > convert = + > convert = > graphlog = > [convert] > svn.trunk = mytrunk diff --git a/tests/test-convert-svn-startrev.t b/tests/test-convert-svn-startrev.t --- a/tests/test-convert-svn-startrev.t +++ b/tests/test-convert-svn-startrev.t @@ -3,7 +3,7 @@ $ cat >> $HGRCPATH < [extensions] - > convert = + > convert = > graphlog = > EOF $ convert() diff --git a/tests/test-convert-svn-tags.t b/tests/test-convert-svn-tags.t --- a/tests/test-convert-svn-tags.t +++ b/tests/test-convert-svn-tags.t @@ -3,7 +3,7 @@ $ cat >> $HGRCPATH < [extensions] - > convert = + > convert = > graphlog = > EOF diff --git a/tests/test-glog.t b/tests/test-glog.t --- a/tests/test-glog.t +++ b/tests/test-glog.t @@ -83,7 +83,7 @@ o (0) root $ cat > printrevset.py < from mercurial import extensions, revset, commands, cmdutil - > + > > def uisetup(ui): > def printrevset(orig, ui, repo, *pats, **opts): > if opts.get('print_revset'): diff --git a/tests/test-import-git.t b/tests/test-import-git.t --- a/tests/test-import-git.t +++ b/tests/test-import-git.t @@ -322,12 +322,12 @@ Multiple binary files: Filenames with spaces: - $ hg import -d "1000000 0" -m spaces - < diff --git a/foo bar b/foo bar > new file mode 100644 > index 0000000..257cc56 > --- /dev/null - > +++ b/foo bar + > +++ b/foo bar EOL > @@ -0,0 +1 @@ > +foo > EOF diff --git a/tests/test-mq-header-date.t b/tests/test-mq-header-date.t --- a/tests/test-mq-header-date.t +++ b/tests/test-mq-header-date.t @@ -128,7 +128,7 @@ > catlogd 6 > > drop 6 - > + > > > echo ==== qnew -u > hg qnew -u jane 6.patch diff --git a/tests/test-mq-qimport.t b/tests/test-mq-qimport.t --- a/tests/test-mq-qimport.t +++ b/tests/test-mq-qimport.t @@ -169,7 +169,7 @@ try to import --push $ cat > appendfoo.diff < append foo - > + > > diff -r 07f494440405 -r 261500830e46 baz > --- /dev/null Thu Jan 01 00:00:00 1970 +0000 > +++ b/baz Thu Jan 01 00:00:00 1970 +0000 @@ -179,7 +179,7 @@ try to import --push $ cat > appendbar.diff < append bar - > + > > diff -r 07f494440405 -r 261500830e46 baz > --- a/baz Thu Jan 01 00:00:00 1970 +0000 > +++ b/baz Thu Jan 01 00:00:00 1970 +0000 diff --git a/tests/test-update-branches.t b/tests/test-update-branches.t --- a/tests/test-update-branches.t +++ b/tests/test-update-branches.t @@ -61,7 +61,7 @@ Test helper functions: > hg up $opt $targetrev > hg parent --template 'parent={rev}\n' > hg stat -S - > } + > } $ norevtest () { > msg=$1 @@ -74,7 +74,7 @@ Test helper functions: > hg up $opt > hg parent --template 'parent={rev}\n' > hg stat -S - > } + > } Test cases are documented in a table in the update function of merge.py. Cases are run as shown in that table, row by row.