changeset 18868 | cafa447a7d3b |
parent 18501 | a3b2dc1aa909 |
child 19131 | af3b651505e2 |
--- a/mercurial/posix.py Wed Apr 03 13:03:50 2013 -0500 +++ b/mercurial/posix.py Wed Apr 03 11:35:27 2013 -0700 @@ -557,3 +557,11 @@ if self.realpath != self.path: okayifmissing(os.unlink, self.realpath) okayifmissing(os.rmdir, os.path.dirname(self.realpath)) + +def statislink(st): + '''check whether a stat result is a symlink''' + return st and stat.S_ISLNK(st.st_mode) + +def statisexec(st): + '''check whether a stat result is an executable file''' + return st and (st.st_mode & 0100 != 0)