Commits

Anonymous committed 5313a09

cmenu: create repo in parent directory if a file is passed in

Fix SF Bug #2113989

  • Participants
  • Parent commits 698fc26

Comments (0)

Files changed (1)

File tortoise/contextmenu.py

 
     def _init(self, parent_window):
         dest = self._folder or self._filenames[0]
+        if os.path.isfile(dest):
+            dest = os.path.dirname(dest)
+
         msg = "Create Hg repository in %s?" % (dest)
         title = "Mercurial: init"
         rv = win32ui.MessageBox(msg, title, win32con.MB_OKCANCEL)