Mercurial > hg-stable
changeset 4572:6a8e1dd18ba2
commands.commit: symlinks are supported
author | Alexis S. L. Carvalho <alexis@cecm.usp.br> |
---|---|
date | Wed, 13 Jun 2007 19:15:58 -0300 |
parents | eb403f295ff1 |
children | 97111071d26c |
files | mercurial/commands.py tests/test-symlink-basic tests/test-symlink-basic.out |
diffstat | 3 files changed, 8 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- 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'