Logo Search packages:      
Sourcecode: hgsubversion version File versions  Download package

def hgsubversion::svnmeta::SVNMeta::get_parent_revision (   self,
  number,
  branch,
  exact = False 
)
Get the parent revision hash for a commit on a specific branch.

Definition at line 438 of file svnmeta.py.

                                                              :
        '''Get the parent revision hash for a commit on a specific branch.
        '''
        tag = self.get_path_tag(self.remotename(branch))
        if tag:
            # Reference a tag being created
            if tag in self.addedtags:
                tbranch, trev = self.addedtags[tag]
                fromtag = self.get_path_tag(self.remotename(tbranch))
                if not fromtag:
                    # Created from a regular branch, not another tag
                    tagged = self.get_parent_svn_branch_and_rev(trev, tbranch)
                    return node.hex(self.revmap[tagged])
                tag = fromtag
            # Reference an existing tag
            limitedtags = maps.Tags(self.repo, endrev=number-1)
            if tag in limitedtags:
                return limitedtags[tag]
        r, br = self.get_parent_svn_branch_and_rev(number - 1, branch, exact)
        if r is not None:
            return self.revmap[r, br]
        return revlog.nullid


Generated by  Doxygen 1.6.0   Back to index