1. cvshg
  2. tcvshg

Commits

Angel Ezquerra  committed 8c73fa3

qtlib: gracefully handle a call to editfiles with no files to edit

Previously it could fail with a cryptic error message.

  • Participants
  • Parent commits 2d7e05e
  • Branches stable

Comments (0)

Files changed (1)

File tortoisehg/hgqt/qtlib.py

View file
  • Ignore whitespace
 
 def editfiles(repo, files, lineno=None, search=None, parent=None, editor=None):
     if len(files) == 1:
-        path = repo.wjoin(files[0])
+        filename = files[0].strip()
+        if not filename:
+            return
+        files = [filename]
+        path = repo.wjoin(filename)
         cwd = os.path.dirname(path)
         files = [os.path.basename(path)]
     else: