def precommit(self, event):
#self.record("commit")
pass
+ def supercheckin(self, commit, path, legend, state=None):
+ "You knew the job was dangerous when you took it."
+ if self.roundtrip:
+ comment = event.email_out()
+ else:
+ comment = event.comment
+ self.checkin(commit, comment, path, legend, state=None)
+ loud_remove(path)
def modify(self, event, path, mode, copyfile):
"Perform RCS file checkins and modifications,"
self.sanecheck(event, path, mode, copyfile)
self.instantiate(path, copyfile)
- self.checkin(event, path, "modify")
+ self.supercheckin(event, path, "modify")
#self.record("M", path)
def copy(self, commit, source, target, legend="Copy"):
"Perform RCS copies. Start the copy with no history."
self.checkout(commit, source, legend)
self.instantiate(target)
loud_rename(source, target)
- self.checkin(commit, target, legend="copy")
+ self.supercheckin(commit, target, legend="copy")
#self.record("C", source)
#self.record("T", target)
def delete(self, commit, path, legend="delete"):
"Mark a path deleted, but don't actually remove the master."
self.instantiate(path)
open(path, "w").close()
- self.checkin(commit, path, legend="delete", state="Deleted")
+ self.supercheckin(commit, path, legend="delete", state="Deleted")
#self.record("D", path)
class RCS(Generic):
def sanecheck(self, event, path, mode, copyfile):
if mode == "160000":
raise FatalException("ignoring a submodule link %s", path)
- def checkin(self, commit, path, legend, state=None):
+ def checkin(self, commit, comment, path, legend, state=None):
"Check in a new revision - also used to create new masters."
- if self.roundtrip:
- comment = event.email_out()
- else:
- comment = event.comment
command = "ci -l"
if state:
command += " -s" + state
command += ' -m"%s"' % comment.replace('"', '\\"')
command += " " + path + " " + self.master(path)
do_or_die(command, legend)
- loud_remove(path)
def checkout(self, commit, source, legend):
# FIXME: not presently adjusted for commit's branch
do_or_die("co %s" % self.master(source), legend)