Steve Borho avatar Steve Borho committed b42ad74

synch: strip white space around path

fixes #46

Comments (0)

Files changed (1)

 import threading
 from mercurial import hg, ui, util, extensions
 from dialog import error_dialog, question_dialog, info_dialog
-from hglib import HgThread, toutf, rootpath, RepoError
+from hglib import HgThread, fromutf, toutf, rootpath, RepoError
 import shlib
 import gtklib
 import urllib
         self._exec_cmd(cmd)
         
     def _conf_clicked(self, toolbutton, data=None):
-        newpath = self._pathtext.get_text()
+        newpath = self._pathtext.get_text().strip()
         for name, path in self.paths:
             if path == newpath:
                 newpath = None
         self.fill_path_combo()
 
     def _email_clicked(self, toolbutton, data=None):
-        path = self._pathtext.get_text()
+        path = self._pathtext.get_text().strip()
         if not path:
             info_dialog(self, 'No repository selected',
                     'Select a peer repository to compare with')
         proxy_host = ui.ui().config('http_proxy', 'host', '')
         use_proxy = self._use_proxy.get_active()
         text_entry = self._pathbox.get_child()
-        remote_path = str(text_entry.get_text())
+        remote_path = fromutf(text_entry.get_text().strip())
         
         cmdline = cmd[:]
         cmdline += ['--verbose', '--repository', self.root]
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 ProjectModifiedEvent.java.
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.