Edgewall Software

Ticket #8731: 8731-mercurial-r8664.patch

File 8731-mercurial-r8664.patch, 1.2 KB (added by rblank, 3 years ago)

Adds then new reponame and id arguments to MercurialRepository.__init__().

  • tracext/hg/backend.py

    diff --git a/tracext/hg/backend.py b/tracext/hg/backend.py
    a b  
    241241        options.update(repo_options) 
    242242        if not self.ui: 
    243243            self._setup_ui(options.get('hgrc')) 
    244         repos = MercurialRepository(dir, self.log, self.ui, options) 
     244        repos = MercurialRepository(repo_options['name'], repo_options['id'], 
     245                                    dir, self.log, self.ui, options) 
    245246        repos.version_info = self._version_info 
    246247        return repos 
    247248 
     
    323324    additional changeset properties. 
    324325    """ 
    325326 
    326     def __init__(self, path, log, ui, options): 
     327    def __init__(self, reponame, id, path, log, ui, options): 
    327328        self.ui = ui 
    328329        self.options = options 
    329330        self.reponame = None 
     
    346347        if self.path is None: 
    347348            raise TracError(_("%(path)s does not appear to contain a Mercurial" 
    348349                              " repository.", path=path)) 
    349         Repository.__init__(self, 'hg:%s' % path, None, log) 
     350        Repository.__init__(self, reponame, id, 'hg:%s' % path, None, log) 
    350351 
    351352    def hg_time(self, timeinfo): 
    352353        # [hg b47f96a178a3] introduced an API change: