From: Eric S. Raymond Date: Fri, 7 Nov 2014 21:15:24 +0000 (-0500) Subject: Always check fir exisrence of repo directory. X-Git-Tag: 0.2~43 X-Git-Url: http://thyrsus.com/gitweb/?a=commitdiff_plain;h=2f156bd22c40249a514eb3b9982c8e20ccbf2afc;p=src.git Always check fir exisrence of repo directory. --- diff --git a/src b/src index b3170cf..1e856c7 100755 --- a/src +++ b/src @@ -312,6 +312,8 @@ def init_method(*args): def preamble(cmd, args): "Common setup code." + if not os.path.exists(repodir): + croak("repository subdirectory %s does not exist" % repodir) args = list(args) revspec = None if args: @@ -384,6 +386,8 @@ class lifted: def commit_method(*args): "Commit changes to files." + if not os.path.exists(repodir): + croak("repository subdirectory %s does not exist" % repodir) args = list(args) comment = None if args[0] == '--': @@ -556,6 +560,8 @@ def set_tags(args): def tag_method(*args): "Inspect, create, and delete tags." + if not os.path.exists(repodir): + croak("repository subdirectory %s does not exist" % repodir) args = list(args) if not args: list_tags() @@ -616,7 +622,6 @@ def fast_export_method(*args): sys.stdout.write("data %s\n%s" % (len(item.log), item.log)) if last_commit_mark: sys.stdout.write("from :%d\n" % last_commit_mark) - # FIXME: Process executable bit sys.stdout.write("M %s :%d '%s'\n\n" % (perms, mark, arg)) last_commit_mark = mark mark += 1