Changeset - b84a4ec93ab6
[Not reviewed]
beta
0 2 0
Marcin Kuzminski - 13 years ago 2012-11-04 13:16:11
marcin@python-works.com
hanlde stripped or removed changesets on changeset info function
2 files changed with 9 insertions and 6 deletions:
0 comments (0 inline, 0 general)
rhodecode/controllers/changeset.py
Show inline comments
 
@@ -445,10 +445,13 @@ class ChangesetController(BaseRepoContro
 
            return True
 
        else:
 
            raise HTTPForbidden()
 

	
 
    @jsonify
 
    def changeset_info(self, repo_name, revision):
 
        if request.is_xhr or 1:
 
            return c.rhodecode_repo.get_changeset(revision)
 
        if request.is_xhr:
 
            try:
 
                return c.rhodecode_repo.get_changeset(revision)
 
            except ChangesetDoesNotExistError, e:
 
                return EmptyChangeset(message=str(e))
 
        else:
 
            raise HTTPBadRequest()
rhodecode/lib/vcs/backends/base.py
Show inline comments
 
@@ -924,18 +924,18 @@ class EmptyChangeset(BaseChangeset):
 
    """
 
    An dummy empty changeset. It's possible to pass hash when creating
 
    an EmptyChangeset
 
    """
 

	
 
    def __init__(self, cs='0' * 40, repo=None, requested_revision=None,
 
                 alias=None):
 
                 alias=None, message='', author='', date=''):
 
        self._empty_cs = cs
 
        self.revision = -1
 
        self.message = ''
 
        self.author = ''
 
        self.date = ''
 
        self.message = message
 
        self.author = author
 
        self.date = date
 
        self.repository = repo
 
        self.requested_revision = requested_revision
 
        self.alias = alias
 

	
 
    @LazyProperty
 
    def raw_id(self):
0 comments (0 inline, 0 general)