Kiln » TortoiseHg » TortoiseHg
Clone URL:  
Pushed to one repository · View In Graph Contained in 0.6, 0.7, and 0.7.1

status: add rename menu to file context menus

Changeset 0bd3aa3236e3

Parent 813ae72b13ee

by TK Soh

Changes to one file · Browse files at 0bd3aa3236e3 Showing diff from parent 813ae72b13ee Diff from another changeset...

Change 1 of 3 Show Entire File hggtk/​status.py Stacked
 
29
30
31
 
32
33
34
 
79
80
81
 
82
83
84
 
510
511
512
 
 
 
 
 
 
 
 
513
514
515
 
29
30
31
32
33
34
35
 
80
81
82
83
84
85
86
 
512
513
514
515
516
517
518
519
520
521
522
523
524
525
@@ -29,6 +29,7 @@
 from shlib import shell_notify  from hglib import toutf, rootpath  from gdialog import * +from dialog import entry_dialog    class GStatus(GDialog):   """GTK+ based dialog for displaying repository status @@ -79,6 +80,7 @@
  # clean   (('_view', self._view_file),   ('re_move', self._remove_file), + ('re_name', self._rename_file),   ('l_og', self._log_file)),   # ignored   (('_view', self._view_file), @@ -510,6 +512,14 @@
  return True     + def _rename_file(self, stat, file): + fdir, fname = os.path.split(file) + newfile = entry_dialog(self, "Rename file to:", True, fname) + if newfile and newfile != fname: + self._hg_move([file, os.path.join(fdir, newfile)]) + return True + +   def _hg_remove(self, files):   wfiles = [self.repo.wjoin(x) for x in files]   if self.count_revs() > 1: