Changeset - 6d599a3c0d67
[Not reviewed]
beta
0 1 0
Marcin Kuzminski - 13 years ago 2012-12-08 01:41:34
marcin@python-works.com
implemented children for git changesets
1 file changed with 15 insertions and 0 deletions:
0 comments (0 inline, 0 general)
rhodecode/lib/vcs/backends/git/changeset.py
Show inline comments
 
@@ -180,6 +180,21 @@ class GitChangeset(BaseChangeset):
 
        return [self.repository.get_changeset(parent)
 
                for parent in self._commit.parents]
 

	
 
    @LazyProperty
 
    def children(self):
 
        """
 
        Returns list of children changesets.
 
        """
 
        so, se = self.repository.run_git_command(
 
            "rev-list --all --children | grep '^%s'" % self.raw_id
 
        )
 

	
 
        children = []
 
        for l in so.splitlines():
 
            childs = l.split(' ')[1:]
 
            children.extend(childs)
 
        return [self.repository.get_changeset(cs) for cs in children]
 

	
 
    def next(self, branch=None):
 

	
 
        if branch and self.branch != branch:
0 comments (0 inline, 0 general)