Yuki KODAMA committed 5770fa3

thgconfig: use hglib.get_reponame() function

Comments (0)

Files changed (1)


             root = paths.find_root()
             if root:
                 repo = hg.repository(self.ui, root)
-                name = self.get_reponame(repo)
+                name = hglib.get_reponame(repo)
                 self.ui = repo.ui
                 repo = None
         self.configrepo = combo.get_active() and True or False
-    def get_reponame(self, repo):
-        if repo.ui.config('tortoisehg', 'fullpath', False):
-            name = repo.root
-        else:
-            name = repo.ui.config('web', 'name') \
-                        or os.path.basename(repo.root)
-        return hglib.toutf(name)
     def refresh(self):
         if self.configrepo:
             repo = hg.repository(ui.ui(), self.root)
-            name = self.get_reponame(repo)
+            name = hglib.get_reponame(repo)
             self.rcpath = [os.sep.join([repo.root, '.hg', 'hgrc'])]
             self.set_title(_('TortoiseHg Configure Repository - ') + hglib.toutf(name))
             gtklib.set_tortoise_icon(self, 'settings_repo.ico')
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.