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

archive: add to changelog context menu

Changeset a30502187b67

Parent df06edd1c10a

by Johan Samyn

Changes to 3 files · Browse files at a30502187b67 Showing diff from parent df06edd1c10a Diff from another changeset...

 
26
27
28
29
 
30
31
32
 
262
263
264
265
 
266
267
268
 
26
27
28
 
29
30
31
32
 
262
263
264
 
265
266
267
268
@@ -26,7 +26,7 @@
  """ Dialog to archive a particular Mercurial revision """     def __init__(self, ui, repo, rev=None, parent=None): - super(ArchiveDialog, self).__init__(parent=None) + super(ArchiveDialog, self).__init__(parent)     # main layout   self.vbox = QVBoxLayout() @@ -262,7 +262,7 @@
  self.compose_command(path, type)     def compose_command(self, dest, type): - cmdline = ['archive'] + cmdline = ['archive', '--repository', self.repo.root]   rev = self.rev_combo.currentText()   if rev == WD_PARENT:   rev = '.'
 
119
120
121
 
122
123
124
 
166
167
168
 
 
 
169
170
171
 
175
176
177
178
 
179
180
181
 
215
216
217
218
 
219
220
221
 
119
120
121
122
123
124
125
 
167
168
169
170
171
172
173
174
175
 
179
180
181
 
182
183
184
185
 
219
220
221
 
222
223
224
225
@@ -119,6 +119,7 @@
  self.backoutToRev),   ('email', _('Email patch...'), None, None, None,   self.emailRev), + ('archive', _('Archive...'), None, None, None, self.archiveRev),   ('copyhash', _('Copy hash'), None, None, None,   self.copyHash),   ] @@ -166,6 +167,9 @@
  def emailRev(self):   self.emit(SIGNAL('emailRevision'), self.current_rev)   + def archiveRev(self): + self.emit(SIGNAL('archiveRevision'), self.current_rev) +   def copyHash(self):   self.emit(SIGNAL('copyHash'), self.current_rev)   @@ -175,7 +179,7 @@
  def contextMenuEvent(self, event):   menu = QMenu(self)   for act in ['update', 'manifest', 'merge', 'tag', 'backout', - 'email', 'copyhash', None, 'back', 'forward', + 'email', 'archive', 'copyhash', None, 'back', 'forward',   None, 'rebase']:   if act:   menu.addAction(self._actions[act]) @@ -215,7 +219,7 @@
  model = self.model()     for c in range(model.columnCount()): - if model._columns[c] == 'Log': + if model._columns[c] == 'Log':   self.setItemDelegateForColumn(c, self.htmlDelegate)   else:   self.setItemDelegateForColumn(c, self.standardDelegate)
 
18
19
20
21
 
22
23
24
 
44
45
46
47
 
48
49
50
 
156
157
158
 
159
160
161
 
238
239
240
 
 
 
 
241
242
243
 
284
285
286
287
 
288
289
290
 
18
19
20
 
21
22
23
24
 
44
45
46
 
47
48
49
50
 
156
157
158
159
160
161
162
 
239
240
241
242
243
244
245
246
247
248
 
289
290
291
 
292
293
294
295
@@ -18,7 +18,7 @@
 from tortoisehg.hgqt.qtlib import geticon, getfont, QuestionMsgBox  from tortoisehg.hgqt.repomodel import HgRepoListModel  from tortoisehg.hgqt import cmdui, update, tag, manifestdialog, backout, merge -from tortoisehg.hgqt import hgemail +from tortoisehg.hgqt import hgemail, archive    from repoview import HgRepoView  from revdetailswidget import RevDetailsWidget @@ -44,7 +44,7 @@
  self.currentMessage = ''     QWidget.__init__(self) - +   self.load_config()   self.setupUi()   self.createActions() @@ -156,6 +156,7 @@
  connect(view, SIGNAL('tagToRevision'), self.tagToRevision)   connect(view, SIGNAL('backoutToRevision'), self.backoutToRevision)   connect(view, SIGNAL('emailRevision'), self.emailRevision) + connect(view, SIGNAL('archiveRevision'), self.archiveRevision)   connect(view, SIGNAL('copyHash'), self.copyHash)   connect(view, SIGNAL('rebaseRevision'), self.rebaseRevision)   #self.attachQuickBar(view.goto_toolbar) @@ -238,6 +239,10 @@
  dlg = hgemail.EmailDialog(self.repo.ui, self.repo, [str(rev)], self)   dlg.show()   + def archiveRevision(self, rev): + dlg = archive.ArchiveDialog(self.repo.ui, self.repo, rev, self) + dlg.show() +   def copyHash(self, rev):   clip = QApplication.clipboard()   clip.setText(binascii.hexlify(self.repo[rev].node())) @@ -284,7 +289,7 @@
  # store rev to show once it's available (when graph   # filling is still running)   self._reload_rev = rev - +   def _getrepomtime(self):   """Return the last modification time for the repo"""   watchedfiles = [(self.repo.root, ".hg", "store", "00changelog.i"),