templatefilters: add new stripdir filter
Adds a new template filter for removing directory levels from a
string. Examples:
{foo|stripdir} -> 'foo'
{foo/bar|stripdir} -> 'foo'
{foo/bar/more|stripdir} -> 'foo/bar'
{foo/bar/more|stripdir|stripdir} -> 'foo'
#!/bin/sh
"$TESTDIR/hghave" symlink || exit 80
hg init a
ln -s a link
cd a
echo foo > foo
hg status
hg status ../link