From 2f156bd22c40249a514eb3b9982c8e20ccbf2afc Mon Sep 17 00:00:00 2001 From: "Eric S. Raymond" Date: Fri, 7 Nov 2014 16:15:24 -0500 Subject: [PATCH] Always check fir exisrence of repo directory. --- src | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) 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 -- 2.43.0