Angel Ezquerra committed 99340db

repofilter: expand ui.username when creating automatic "author" query

The ui.username is one that mercurial normally expands taking into account
environment variables. We must do the same when creating the "author" query
that is automatically added to the repofilter filter combobox.

Comments (0)

Files changed (1)


 # This software may be used and distributed according to the terms
 # of the GNU General Public License, incorporated herein by reference.
+import os
 from PyQt4.QtCore import *
 from PyQt4.QtGui import *
         self._permanent_queries = list(_permanent_queries)
         username = repo.ui.config('ui', 'username')
         if username:
-            self._permanent_queries.insert(0, hgrevset.formatspec('author(%s)', username))
+            self._permanent_queries.insert(0,
+                hgrevset.formatspec('author(%s)', os.path.expandvars(username)))
         self.filterEnabled = True
         #Check if the font contains the glyph needed by the branch combo