util: fix url.__str__() for windows file URLs
Before:
>>> str(url('file:///c:/tmp/foo/bar'))
'file:c%3C/tmp/foo/bar'
After:
>>> str(url('file:///c:/tmp/foo/bar'))
'file:///c%3C/tmp/foo/bar'
The previous behaviour had no effect on mercurial itself (clone command for
instance) because we fortunately called .localpath() on the parsed URL.
hgsubversion was not so lucky and cloning a local subversion repository on
Windows no longer worked on the default branch (it works on stable because
de7e2fba4326 defeats the hasdriveletter() test in url class).
I do not know if the %3C is correct or not but svn accepts file:// URLs
containing it. Mads fixed it in
de7e2fba4326, so we can always backport should
the need arise.
$ "$TESTDIR/hghave" inotify || exit 80
$ hg init
$ touch a
$ mkdir dir
$ touch dir/b
$ touch dir/c
$ echo "[extensions]" >> $HGRCPATH
$ echo "inotify=" >> $HGRCPATH
$ hg add dir/c
inserve
$ hg inserve -d --pid-file=hg.pid 2>&1
$ cat hg.pid >> "$DAEMON_PIDS"
$ hg st
A dir/c
? a
? dir/b
? hg.pid
moving dir out
$ mv dir ../tmp-test-inotify-issue1542
status
$ hg st
! dir/c
? a
? hg.pid
$ sleep 1
Are we able to kill the service? if not, the service died on some error
$ kill `cat hg.pid`