Kiln » TortoiseHg » TortoiseHg
Clone URL:  
Pushed to one repository · View In Graph Contained in 0.3rc1, 0.3, and 0.4rc1

hggtk/datamine: warn if attempt to annotate directories

Changeset 7af4448bcbb7

Parent ca89e13351fd

by TK Soh

Changes to one file · Browse files at 7af4448bcbb7 Showing diff from parent ca89e13351fd Diff from another changeset...

Change 1 of 1 Show Entire File hggtk/​datamine.py Stacked
 
592
593
594
595
596
597
598
599
600
 
 
 
 
 
 
 
 
601
602
603
 
592
593
594
 
 
595
596
 
 
597
598
599
600
601
602
603
604
605
606
607
@@ -592,12 +592,16 @@
  'include':[], 'exclude':[]   }   - cfiles = [util.canonpath(root, cwd, f) for f in files if os.path.isfile(f)] -   dialog = DataMineDialog(u, repo, cwd, files, cmdoptions, True)   dialog.display() - for f in cfiles: - dialog.add_annotate_page(f, '.') + for f in files: + if os.path.isfile(f): + cf = util.canonpath(root, cwd, f) + dialog.add_annotate_page(cf, '.') + elif os.path.isdir(f): + Prompt('Invalid path', "Can't annotate directory: %s" % f, + dialog).run() +   if not dialog.notebook.get_n_pages():   dialog.add_search_page()