def commit_method(*args):
"Commit changes to files."
if not os.path.exists(repodir):
- croak("repository subdirectory %s does not exist" % repodir)
+ try:
+ os.mkdir(repodir)
+ except OSError:
+ croak(" %s creation failed, check directory permissions." % repodir)
args = list(args)
comment = CommentContext("commit", args)
ctx = CommandContext("commit", args, require_empty=True)
comment.edit()
for arg in ctx.args:
if not os.path.exists(backend.master(arg)):
- if not os.path.exists(repodir):
- try:
- os.mkdir(repodir)
- except OSError:
- croak(" %s creation failed, check directory permissions." % repodir)
backend.add(arg)
- with backend.lifter(arg):
- backend.checkin(arg, comment.content())
- if not quiet and len(args) > 1:
- announce("%s -> %d" % (arg, len(History(arg))))
+ with backend.lifter(arg):
+ backend.checkin(arg, comment.content())
+ if not quiet and len(args) > 1:
+ announce("%s -> %d" % (arg, len(History(arg))))
def amend_method(*args):
"Amend comments in stored revisions."
src $TESTOPTS ls | diff -u testfile16 -
check "ls"
-src $TESTOPTS add testfile16
-src $TESTOPTS status testfile16 | grep "^A" >/dev/null
-check "A status check after registration"
-
src $TESTOPTS commit -m "Another sample" testfile16
src $TESTOPTS status testfile16 | grep "^[.]" >/dev/null
check ". status check after first commit"