Ejemplo n.º 1
0
 def commit(self, msg):
     commit = Commit(self.repository)
     commit.parent = self.parent
     commit.changelog = self.changelog
     commit.schema = self.schema
     commit.msg = msg
     commit.commit_id = hashlib.sha1(json.dumps(commit.toDict())).hexdigest()
     commit.checkedout = True
     self.repository.commits[commit.commit_id] = commit.toDict()
     self.repository.checkouts[commit.commit_id] = commit
     self.repository.branches[self.name] = commit.commit_id
     self.parent = commit
     self.reset()