def addVersion(self): """ Creates a new Version, to which Items can be added and removed, and committed. :return: New Version instance. """ return Version.new(self)
def addItem(self, item, message=None): """add a new Item class object""" if message is None: message = 'Adding item %s' % item.path try: v = Version.new(repo=self) v.addItem(item) v.save(message) except VersionError, e: raise RepoError(e)