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

thgstatus: add notify option

Changeset c67e5d38717c

Parent 88b75e12a1a7

by Adrian Buehlmann

Changes to one file · Browse files at c67e5d38717c Showing diff from parent 88b75e12a1a7 Diff from another changeset...

 
86
87
88
 
89
90
91
92
93
94
 
 
 
 
 
 
 
95
96
97
98
99
100
 
101
102
103
 
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
@@ -86,18 +86,27 @@
  dirstatus[dirname(fn)] = 'm'   for fn in removed + deleted:   dirstatus[dirname(fn)] = 'r' +   f = open(cachefilepath(repo), 'wb')   for dn in sorted(dirstatus):   e = dirstatus[dn] + dn + '\n'   f.write(e)   showentry(ui.note, e)   f.close() + + if opts.get('notify'): + from mercurial import demandimport + demandimport.disable() + from thgutil import shlib + shlib.shell_notify([os.getcwd()]) + demandimport.enable()   ui.note("thgstatus updated\n")    cmdtable = {   'thgstatus':   (thgstatus,   [ ('', 'delay', None, _('wait until the second ticks over')), + ('n', 'notify', None, _('notify the shell')),   ('', 'remove', None, _('remove the status file')),   ('s', 'show', None, _('just show the contents of '   'the status file (no update)')) ],