fsmonitor: use vfs instead of opener (
issue5938)
"opener" of localrepository object was dropped at Mercurial 4.3 (or
a7e210167c28). "vfs" should be used instead.
wlock is required to write into a file under .hg directory.
For efficiency, we should change _cmpsets() from:
1. acquire wlock
2. open log file under .hg directory with write mode
3. compare between result of watchman and Mercurial's dirstate logic
4. write out error info into a file, if error is detected
5. release wlock
to:
1. compare between result of watchman and Mercurial's dirstate logic
2. acquire wlock, if error is detected
3. open and write error info into a file
4. release wlock
But this is another issue.
#require test-repo
Enable obsolescence to avoid the warning issue when obsmarker are found
$ . "$TESTDIR/helpers-testrepo.sh"
Go back in the hg repo
$ cd $TESTDIR/..
$ REVSET='not public() and ::. and not desc("# no-check-commit")'
$ mkdir "$TESTTMP/p"
$ REVS=`testrepohg log -r "$REVSET" -T.`
$ if [ -n "$REVS" ] ; then
> testrepohg export --git -o "$TESTTMP/p/%n-%h" -r "$REVSET"
> for f in `ls "$TESTTMP/p"`; do
> contrib/check-commit < "$TESTTMP/p/$f" > "$TESTTMP/check-commit.out"
> if [ $? -ne 0 ]; then
> node="${f##*-}"
> echo "Revision $node does not comply with rules"
> echo '------------------------------------------------------'
> cat ${TESTTMP}/check-commit.out
> echo
> fi
> done
> fi