branch closing: referencing open and closed branches/heads
Treat fully closed branches similarly to "inactive" in the output of
'hg branches'. They will be suffixed with "(closed)" where inactive branches
are marked with "(inactive)". If the -a/--active option is given both
inactive and closed branches will not be shown.
Partially closed branches (multiple heads, at least one not closed)
will display the next (tipmost) open head.
Add -a/--active option to "hg heads" which will hide closed heads iff the
option is specified.
In other hg commands, when multiple branch heads exist the branch name will
refer to the tipmost open head, and if none exist, then the tipmost closed
head.
#!/bin/sh
hg init
# Test issue 562: .hgignore requires newline at end
touch foo
touch bar
touch baz
cat > makeignore.py <<EOF
f = open(".hgignore", "w")
f.write("ignore\n")
f.write("foo\n")
# No EOL here
f.write("bar")
f.close()
EOF
python makeignore.py
echo % should display baz only
hg status
rm foo bar baz .hgignore makeignore.py
touch a.o
touch a.c
touch syntax
mkdir dir
touch dir/a.o
touch dir/b.o
touch dir/c.o
hg add dir/a.o
hg commit -m 0
hg add dir/b.o
echo "--" ; hg status
echo "*.o" > .hgignore
echo "--" ; hg status 2>&1 | sed -e 's/abort: .*\.hgignore:/abort: .hgignore:/'
echo ".*\.o" > .hgignore
echo "--" ; hg status
# Check it does not ignore the current directory '.'
echo "^\." > .hgignore
echo "--" ; hg status
echo "glob:**.o" > .hgignore
echo "--" ; hg status
echo "glob:*.o" > .hgignore
echo "--" ; hg status
echo "syntax: glob" > .hgignore
echo "re:.*\.o" >> .hgignore
echo "--" ; hg status
echo "syntax: invalid" > .hgignore
echo "--" ; hg status 2>&1 | sed -e 's/.*\.hgignore:/.hgignore:/'
echo "syntax: glob" > .hgignore
echo "*.o" >> .hgignore
echo "--" ; hg status
echo "relglob:syntax*" > .hgignore
echo "--" ; hg status
echo "relglob:*" > .hgignore
echo "--" ; hg status
cd dir
echo "--" ; hg status .