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

def hgsubversion::svnmeta::SVNMeta::get_source_rev (   self,
  changeid = None,
  ctx = None 
)
Return the source svn revision, the branch name and the svn
branch path or a converted changeset. If supplied revision
has no conversion record, raise KeyError.

If ctx is None, build one from supplied changeid

Definition at line 461 of file svnmeta.py.

                                                     :
        """Return the source svn revision, the branch name and the svn
        branch path or a converted changeset. If supplied revision
        has no conversion record, raise KeyError.

        If ctx is None, build one from supplied changeid
        """
        if ctx is None:
            ctx = self.repo[changeid]
        extra = ctx.extra()
        if 'convert_revision' not in extra:
            raise KeyError('%s has no conversion record' % ctx)
        branchpath, revnum = extra['convert_revision'][40:].rsplit('@', 1)
        branch = self.localname(self.normalize(branchpath))
        if self.layout == 'single':
            branchpath = ''
        if branchpath and branchpath[0] == '/':
            branchpath = branchpath[1:]
        return int(revnum), branch, branchpath


Generated by  Doxygen 1.6.0   Back to index