Comments
Patch
@@ -122,7 +122,7 @@ FIXER_ATTRS = {
'command': None,
'linerange': None,
'fileset': None,
- 'pattern': None,
+ 'pattern': '.',
'priority': 0,
}
@@ -288,17 +288,28 @@ we ignore a file that doesn't match any
$ cd ..
+A config file missing a :pattern suboption to match issue6077
+
+ $ REMOVE_WS=$TESTTMP/remove-trailing-whitespace.hgrc
+ $ cat >> $REMOVE_WS <<EOF
+ > [extensions]
+ > fix =
+ > [fix]
+ > trailing-whitespace:command = sed
+ > trailing-whitespace:linerange = -e '{first},{last}s/\s\+$//'
+ > EOF
+
Fixing the working directory should still work if there are no revisions.
$ hg init norevisions
$ cd norevisions
- $ printf "something\n" > something.whole
+ $ printf "something \n" > something.whole
$ hg add
adding something.whole
- $ hg fix --working-dir
+ $ HGRCPATH=$REMOVE_WS hg fix --working-dir
$ cat something.whole
- SOMETHING
+ something
$ cd ..