From 438ee1cad98ac32509718976e63c36a449bfb679 Mon Sep 17 00:00:00 2001 From: "Shawn O. Pearce" Date: Mon, 3 Nov 2008 09:59:36 -0800 Subject: Catch symlink creation failures and report a better error Some users have noticed that repo doesn't work on VFAT, as we require a POSIX filesystem with POSIX symlink support. Catching the OSError during our symlink creation and raising a GitError with a more descriptive message will help users to troubleshoot and fix their own installation problems. Signed-off-by: Shawn O. Pearce --- project.py | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) (limited to 'project.py') diff --git a/project.py b/project.py index ffbdfd1c..874a40bd 100644 --- a/project.py +++ b/project.py @@ -12,6 +12,7 @@ # See the License for the specific language governing permissions and # limitations under the License. +import errno import filecmp import os import re @@ -864,8 +865,14 @@ class Project(object): 'refs', 'rr-cache', 'svn']: - os.symlink(os.path.join(relgit, name), - os.path.join(dotgit, name)) + try: + os.symlink(os.path.join(relgit, name), + os.path.join(dotgit, name)) + except OSError, e: + if e.errno == errno.EPERM: + raise GitError('filesystem must support symlinks') + else: + raise rev = self.GetRemote(self.remote.name).ToLocal(self.revision) rev = self.bare_git.rev_parse('%s^0' % rev) -- cgit v1.2.3-54-g00ecf