--- a/mercurial/commands.py Wed Jun 13 19:15:58 2007 -0300
+++ b/mercurial/commands.py Wed Jun 13 19:15:58 2007 -0300
@@ -419,7 +419,7 @@
if i >= len(slist) or not slist[i].startswith(name):
raise util.Abort(_("no match under directory %s!")
% rf)
- elif not stat.S_ISREG(mode):
+ elif not (stat.S_ISREG(mode) or stat.S_ISLNK(mode)):
raise util.Abort(_("can't commit %s: "
"unsupported file type!") % rf)
else:
--- a/tests/test-symlink-basic Wed Jun 13 19:15:58 2007 -0300
+++ b/tests/test-symlink-basic Wed Jun 13 19:15:58 2007 -0300
@@ -1,5 +1,10 @@
#!/bin/sh
+cleanpath()
+{
+ sed -e "s:/.*\(/test-symlink-basic/.*\):...\1:"
+}
+
cat >> readlink.py <<EOF
import os
import sys
@@ -11,6 +16,7 @@
hg init a
cd a
ln -s nothing dangling
+hg commit -m 'commit symlink without adding' -d '0 0' dangling 2>&1 | cleanpath
hg add dangling
hg commit -m 'add symlink' -d '0 0'
--- a/tests/test-symlink-basic.out Wed Jun 13 19:15:58 2007 -0300
+++ b/tests/test-symlink-basic.out Wed Jun 13 19:15:58 2007 -0300
@@ -1,3 +1,4 @@
+abort: file .../test-symlink-basic/a/dangling not tracked!
changeset: 0:cabd88b706fc
tag: tip
user: test