Kiln » TortoiseHg » TortoiseHg
Clone URL:  
Pushed to one repository · View In Graph Contained in 0.9, 0.9.1, and 0.9.1.1

merge with stable

Changeset 32f72ec98922

Parents baafd54e400f

Parents 181a4945dbab

by Steve Borho

Changes to 5 files · Browse files at 32f72ec98922 Showing diff from parent baafd54e400f 181a4945dbab Diff from another changeset...

 
14
15
16
 
17
18
19
 
26
27
28
29
30
31
32
 
14
15
16
17
18
19
20
 
27
28
29
 
30
31
32
@@ -14,6 +14,7 @@
 import nautilus  import gnomevfs  import os +import sys    try:   from mercurial import demandimport @@ -26,7 +27,6 @@
 demandimport.enable()    import subprocess -import sys  import urllib    from mercurial import hg, ui, match, util
Change 1 of 2 Show Entire File hggtk/​status.py Stacked
 
846
847
848
849
850
851
852
 
853
854
855
 
916
917
918
919
920
 
921
922
923
 
846
847
848
 
849
850
 
851
852
853
854
 
915
916
917
 
 
918
919
920
921
@@ -846,10 +846,9 @@
  return   wfile = self.filemodel[paths[0]][FM_PATH]   difftext = [_('===== Diff to first parent =====\n')] - wfiles = [self.repo.wjoin(wfile)]   wctx = self.repo[None]   pctxs = wctx.parents() - matcher = cmdutil.match(self.repo, wfiles, self.opts) + matcher = cmdutil.matchfiles(self.repo, [wfile])   for s in patch.diff(self.repo, pctxs[0].node(), None,   match=matcher, opts=patch.diffopts(self.ui, self.opts)):   difftext.extend(s.splitlines(True)) @@ -916,8 +915,7 @@
  difftext.writelines(lines)   difftext.seek(0)   else: - wfiles = [self.repo.wjoin(wfile)] - matcher = cmdutil.match(self.repo, wfiles, self.opts) + matcher = cmdutil.matchfiles(self.repo, [wfile])   diffopts = mdiff.diffopts(git=True, nodates=True)   for s in patch.diff(self.repo, self._node1, self._node2,   match=matcher, opts=diffopts):
Change 1 of 4 Show Entire File thgtaskbar.py Stacked
 
6
7
8
 
9
10
11
 
22
23
24
25
 
26
27
28
 
59
60
61
62
 
63
64
65
 
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
255
256
257
 
6
7
8
9
10
11
12
 
23
24
25
 
26
27
28
29
 
60
61
62
 
63
64
65
66
 
239
240
241
 
 
 
 
 
 
 
 
 
 
 
 
 
 
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
@@ -6,6 +6,7 @@
 import sys  import time  import threading +import cStringIO  import Queue    from win32api import * @@ -22,7 +23,7 @@
 from mercurial import demandimport  demandimport.ignore.append('win32com.shell')  demandimport.enable() -from mercurial import ui +from mercurial import ui, error  from thgutil import thread2, paths, shlib    if hasattr(sys, "frozen"): @@ -59,7 +60,7 @@
  action = NIM_ADD   try:   Shell_NotifyIcon(action, nid) - except error: + except e:   # This is common when windows is starting, and this code is hit   # before the taskbar has been created.   print "Failed to add the taskbar icon - is explorer running?" @@ -238,20 +239,32 @@
  if roots:   _ui = ui.ui();   failedroots = set() - for r in sorted(roots): - try: - shlib.update_thgstatus(_ui, r, wait=False) - shlib.shell_notify([r]) - logger.msg('Updated ' + r) - except (IOError, OSError): - print "IOError or OSError on updating %s (check permissions)" % r - logger.msg('Failed updating %s (check permissions)' % r) - failedroots.add(r) - notifypaths -= failedroots - if notifypaths: - time.sleep(2) - shlib.shell_notify(list(notifypaths)) - logger.msg('Shell notified') + errorstream = cStringIO.StringIO() + _stderr = sys.stderr + sys.stderr = errorstream + try: + for r in sorted(roots): + try: + shlib.update_thgstatus(_ui, r, wait=False) + shlib.shell_notify([r]) + logger.msg('Updated ' + r) + except (IOError, OSError): + print "IOError or OSError on updating %s (check permissions)" % r + logger.msg('Failed updating %s (check permissions)' % r) + failedroots.add(r) + except (error.Abort, error.ConfigError, error.RepoError), e: + logger.msg('Failed updating %s (%s)' % (r, str(e))) + failedroots.add(r) + notifypaths -= failedroots + if notifypaths: + time.sleep(2) + shlib.shell_notify(list(notifypaths)) + logger.msg('Shell notified') + errmsg = errorstream.getvalue() + if errmsg: + logger.msg('stderr: %s' % errmsg) + finally: + sys.stderr = _stderr    requests = Queue.Queue(0)  
 
89
90
91
 
 
 
92
93
94
 
101
102
103
104
 
105
106
107
 
109
110
111
112
 
113
114
115
 
89
90
91
92
93
94
95
96
97
 
104
105
106
 
107
108
109
110
 
112
113
114
 
115
116
117
118
@@ -89,6 +89,9 @@
  {"guess", "Guess Renames",   "Detect renames and copies",   "detect_rename.ico", 0}, + {"grep", "Search History", + "Search file revisions for patterns", + "menurepobrowse.ico", 0},     /* Add new items here */   @@ -101,7 +104,7 @@
 {   Commit, Init, Clone, Status, Shelve, Add, Revert, Remove, Rename,   Log, Synch, Serve, Update, Recover, Thgstatus, Userconf, Repoconf, - About, Datamine, VDiff, Ignore, Guess, + About, Datamine, VDiff, Ignore, Guess, Grep,   /* Add new items here */   Separator, EndOfList  }; @@ -109,7 +112,7 @@
 menuDescListEntries RepoNoFilesMenu[] =  {   Commit, Status, Shelve, VDiff, Separator, - Log, Update, Datamine, Thgstatus, Separator, + Log, Update, Grep, Thgstatus, Separator,   Synch, Serve, Clone, Init, Separator,   Ignore, Guess, Recover, Separator,   Repoconf, Userconf, Separator,