def new(self, path, desc=None, bare=True):
        """
        Create a new bare repo.Local instance.

        :param path: Path to new repo.
        :param desc: Repo description.
        :param bare: Create as bare repo.

        :returns: New repo.Local instance.
        """
        if os.path.exists(path):
            raise RepoError('Path already exists: %s' % path)
        try:
            os.mkdir(path)
            if bare:
                Repo.init_bare(path)
            else:
                Repo.init(path)
            repo = Local(path)
            if desc:
                repo.setDescription(desc)
            version = repo.addVersion()
            version.save('Repo Initialization')
            return repo
        except Exception, e:
            traceback.print_exc()
            raise RepoError('Error creating repo')
def new ( self , path , desc = None , bare = True ) : if os . path . exists ( path ) : raise RepoError ( 'Path already exists: %s' % path ) try : os . mkdir ( path ) if bare : Repo . init_bare ( path ) else : Repo . init ( path ) repo = Local ( path ) if desc : repo . setDescription ( desc ) version = repo . addVersion ( ) version . save ( 'Repo Initialization' ) return repo except Exception , e : traceback . print_exc ( ) raise RepoError ( 'Error creating repo' )
Create a new bare repo.Local instance.

        :param path: Path to new repo.
        :param desc: Repo description.
        :param bare: Create as bare repo.

        :returns: New repo.Local instance.