Kiln » TortoiseHg » TortoiseHg
Clone URL:  
Pushed to one repository · View In Graph Contained in 0.8, 0.8.1, and 0.8.2

visdiff: catch common subprocess errors and report them

Changeset 078e88733f7c

Parent d75b6efb403b

by Steve Borho

Changes to one file · Browse files at 078e88733f7c Showing diff from parent d75b6efb403b Diff from another changeset...

Change 1 of 1 Show Entire File hggtk/​visdiff.py Stacked
 
241
242
243
244
 
 
245
246
247
248
 
 
 
249
250
251
 
241
242
243
 
244
245
246
247
248
249
250
251
252
253
254
255
@@ -241,11 +241,15 @@
  util.shellquote(dir1), util.shellquote(dir2)))   else:   cmdline = [self.diffpath] + self.diffopts + [dir1, dir2] - subprocess.Popen(cmdline, shell=False, cwd=tmproot, + try: + subprocess.Popen(cmdline, shell=False, cwd=tmproot,   creationflags=openflags,   stderr=subprocess.PIPE,   stdout=subprocess.PIPE,   stdin=subprocess.PIPE) + except (WindowsError, EnvironmentError), e: + Prompt(_('Tool launch failure'), + _('%s : %s') % (self.diffpath, str(e)), None).run()    def run(pats, **opts):   dialog = FileSelectionDialog(pats, opts)