Kiln » TortoiseHg » TortoiseHg
Clone URL:  
Pushed to one repository · View In Graph Contained in 1.9, 1.9.1, and 1.9.2

commit: emit manufactured progress reports for status refresh

And a few misc cleanups

Changeset 444514586717

Parent 0d8edda0fca0

by Steve Borho

Changes to one file · Browse files at 444514586717 Showing diff from parent 0d8edda0fca0 Diff from another changeset...

 
16
17
18
19
 
 
20
21
22
 
28
29
30
31
32
33
34
35
 
44
45
46
47
48
 
 
49
50
51
 
130
131
132
 
 
 
 
 
 
 
 
 
 
 
 
133
134
135
 
875
876
877
878
879
880
881
882
 
893
894
895
 
896
897
898
 
913
914
915
916
 
917
918
919
920
921
922
 
923
924
925
 
939
940
941
 
942
943
944
 
16
17
18
 
19
20
21
22
23
 
29
30
31
 
 
32
33
34
 
43
44
45
 
 
46
47
48
49
50
 
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
 
886
887
888
 
 
889
890
891
 
902
903
904
905
906
907
908
 
923
924
925
 
926
927
928
929
930
931
932
933
934
935
936
 
950
951
952
953
954
955
956
@@ -16,7 +16,8 @@
 from tortoisehg.hgqt.i18n import _  from tortoisehg.util import hglib, shlib, paths, wconfig   -from tortoisehg.hgqt import qtlib, status, cmdui, branchop, revpanelwidget, thread +from tortoisehg.hgqt import qtlib, status, cmdui, branchop +from tortoisehg.hgqt import revpanelwidget, thread  from tortoisehg.hgqt.sync import loadIniFile    # Technical Debt for CommitWidget @@ -28,8 +29,6 @@
   class CommitWidget(QWidget):   'A widget that encompasses a StatusWidget and commit extras' - loadBegin = pyqtSignal() - loadComplete = pyqtSignal()   commitButtonName = pyqtSignal(str)   showMessage = pyqtSignal(str)   commitComplete = pyqtSignal() @@ -44,8 +43,8 @@
  self.opts = opts # user, date   self.stwidget = status.StatusWidget(pats, opts, root, self)   self.stwidget.showMessage.connect(self.showMessage) - self.stwidget.loadBegin.connect(lambda: self.loadBegin.emit()) - self.stwidget.loadComplete.connect(lambda: self.loadComplete.emit()) + self.stwidget.loadBegin.connect(self.loadBegin) + self.stwidget.loadComplete.connect(self.loadComplete)   self.msghistory = []   self.qref = False   @@ -130,6 +129,18 @@
  self.msgte = msgte   self.msgcombo = msgcombo   + def loadBegin(self): + 'Status widget has started to refresh' + topic, item, pos, total, unit = 'Refresh', '...', 'status', None, None + w = thread.DataWrapper((topic, item, pos, total, unit)) + self.progress.emit(w) + + def loadComplete(self): + 'Status widget refresh has finished' + topic, item, pos, total, unit = 'Refresh', 'status', None, None, None + w = thread.DataWrapper((topic, item, pos, total, unit)) + self.progress.emit(w) +   def details(self):   dlg = DetailsDialog(self.opts, self.userhist, self)   if dlg.exec_() == QDialog.Accepted: @@ -875,8 +886,6 @@
  self.outopts = outopts   QDialog.accept(self)   -# Technical Debt for standalone tool -# add a toolbar for refresh    class CommitDialog(QDialog):   'Standalone commit tool, a wrapper for CommitWidget' @@ -893,6 +902,7 @@
  layout.addWidget(commit, 1)     self.statusbar = cmdui.ThgStatusBar(self) + self.statusbar.setSizeGripEnabled(False)   layout.addWidget(self.statusbar)   commit.showMessage.connect(self.statusbar.showMessage)   commit.progress.connect(self.statusbar.progress) @@ -913,13 +923,14 @@
  commit.restoreState(s.value('commit/state').toByteArray())   self.restoreGeometry(s.value('commit/geom').toByteArray())   commit.loadConfigs(s) - commit.loadComplete.connect(self.updateUndo) + commit.repo.repositoryChanged.connect(self.updateUndo)   commit.commitComplete.connect(self.postcommit)   commit.commitButtonName.connect(self.setButtonName)     self.setWindowTitle('%s - commit' % commit.repo.displayname)   self.commit = commit   self.commit.reload() + self.updateUndo()     def setButtonName(self, name):   self.bb.button(QDialogButtonBox.Ok).setText(name) @@ -939,6 +950,7 @@
  self.reject()   return   elif event.matches(QKeySequence.Refresh): + self.updateUndo()   self.commit.reload()   return super(CommitDialog, self).keyPressEvent(event)