Changeset - e87c6aa9c5e7
[Not reviewed]
beta
0 1 0
Marcin Kuzminski - 13 years ago 2012-06-06 18:03:53
marcin@python-works.com
Add method for fetching repos by full path
1 file changed with 5 insertions and 0 deletions:
0 comments (0 inline, 0 general)
rhodecode/model/db.py
Show inline comments
 
@@ -535,6 +535,11 @@ class Repository(Base, BaseModel):
 
        return q.scalar()
 

	
 
    @classmethod
 
    def get_by_full_path(cls, repo_full_path):
 
        repo_name = repo_full_path.split(cls.base_path(), 1)[-1]
 
        return cls.get_by_repo_name(repo_name.strip(URL_SEP))
 

	
 
    @classmethod
 
    def get_repo_forks(cls, repo_id):
 
        return cls.query().filter(Repository.fork_id == repo_id)
 

	
0 comments (0 inline, 0 general)