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

merge with stable

Changeset 806416afa1c6

Parents 68d248291aca

Parents a4a7861b9245

by Steve Borho

Changes to 4 files · Browse files at 806416afa1c6 Showing diff from parent 68d248291aca a4a7861b9245 Diff from another changeset...

Change 1 of 1 Show Entire File hggtk/​commit.py Stacked
 
281
282
283
 
 
 
 
284
285
286
 
281
282
283
284
285
286
287
288
289
290
@@ -281,6 +281,10 @@
  c_btn = self.get_toolbutton('_Commit')   c_btn.set_label('QRefresh')   c_btn.set_tooltip(self.tooltips, self.mqmode and 'QRefresh' or 'QNew') + else: + c_btn = self.get_toolbutton('_Commit') + c_btn.set_label('_Commit') + c_btn.set_tooltip(self.tooltips, 'commit')   self.branchentry.set_sensitive(not mqmode)     def _commit_clicked(self, toolbutton, data=None):
Change 1 of 1 Show Entire File hggtk/​hgshelve.py Stacked
 
434
435
436
437
 
438
439
440
 
434
435
436
 
437
438
439
440
@@ -434,7 +434,7 @@
  else:   basenode = repo.dirstate.parents()[0]   - changes = repo.status(match=match)[:5] + changes = repo.status(node1=basenode, match=match)[:5]   modified, added, removed = changes[:3]   files = modified + added + removed   diffopts = mdiff.diffopts(git=True, nodates=True)
Change 1 of 6 Show Entire File hggtk/​status.py Stacked
 
16
17
18
19
 
20
21
22
 
58
59
60
 
61
62
63
 
151
152
153
154
 
155
156
157
 
518
519
520
521
522
 
 
 
523
524
525
 
 
 
 
 
 
 
 
 
526
527
528
529
530
 
531
532
533
 
534
535
536
 
537
538
539
540
541
542
543
 
 
 
 
 
544
545
546
 
547
548
549
 
560
561
562
563
 
564
565
566
 
587
588
589
590
 
591
592
593
 
16
17
18
 
19
20
21
22
 
58
59
60
61
62
63
64
 
152
153
154
 
155
156
157
158
 
519
520
521
 
 
522
523
524
525
 
 
526
527
528
529
530
531
532
533
534
535
 
 
 
 
536
537
 
 
538
539
540
 
541
542
 
 
 
 
 
 
543
544
545
546
547
548
549
 
550
551
552
553
 
564
565
566
 
567
568
569
570
 
591
592
593
 
594
595
596
597
@@ -16,7 +16,7 @@
 import pango    from mercurial.i18n import _ -from mercurial import cmdutil, util, ui, hg, commands, patch, mdiff +from mercurial import cmdutil, util, ui, hg, commands, patch, mdiff, extensions  from mercurial import merge as merge_  from shlib import shell_notify  from hglib import toutf, fromutf, rootpath, diffexpand @@ -58,6 +58,7 @@
    def init(self):   GDialog.init(self) + self.mode = 'status'     def auto_check(self):   if self.test_opt('check'): @@ -151,7 +152,7 @@
  if revs:   r = ':'.join(revs)   return ' '.join([root, 'status', r]) + ' '.join(self.pats) - elif self.mqmode and hasattr(self, 'text'): + elif self.mqmode and self.mode != 'status':   patch = self.repo.mq.lookup('qtip')   return root + ' applied MQ patch ' + patch   else: @@ -518,32 +519,35 @@
  ### End of overrides ###     def _do_reload_status(self): - """Clear out the existing ListStore model and reload it from the repository status. - Also recheck and reselect files that remain in the list. + """Clear out the existing ListStore model and reload it from the + repository status. Also recheck and reselect files that remain + in the list.   """ - self.repo.dirstate.invalidate() - self.repo.invalidate() + repo = self.repo + # TODO - SJB - just realloc the repository here + repo.dirstate.invalidate() + repo.invalidate() + if hasattr(repo, 'mq'): + mq = extensions.find('mq') + repo.mq = mq.queue(repo.ui, repo.join("")) + self.mqmode = repo.mq.applied + self.set_title(self.get_title())   - # The following code was copied from the status function in - # mercurial\commands.py and modified slightly to work here - - if self.mqmode and not self.opts.get('rev') and hasattr(self, 'text'): + if self.mqmode and self.mode != 'status':   # when a patch is applied, show diffs to parent of top patch - self._node1 = self.repo.lookup(-3) - self._node2 = None + n1, n2 = repo.lookup(-3), None   else:   # node2 is None (the working dir) when 0 or 1 rev is specificed - self._node1, self._node2 = cmdutil.revpair(self.repo, self.opts.get('rev')) + n1, n2 = cmdutil.revpair(repo, self.opts.get('rev'))   - matcher = cmdutil.match(self.repo, self.pats, self.opts) - status = [n for n in self.repo.status(node1=self._node1, node2=self._node2, - match=matcher, - ignored=self.test_opt('ignored'), - clean=self.test_opt('clean'), - unknown=self.test_opt('unknown'))] + matcher = cmdutil.match(repo, self.pats, self.opts) + status = repo.status(node1=n1, node2=n2, match=matcher, + ignored=self.test_opt('ignored'), + clean=self.test_opt('clean'), + unknown=self.test_opt('unknown'))     (modified, added, removed, deleted, unknown, ignored, clean) = status - self.modified = modified + self._node1, self._node2, self.modified = n1, n2, modified     changetypes = (('modified', 'M', modified),   ('added', 'A', added), @@ -560,7 +564,7 @@
  reselect = [model[path][FM_PATH] for path in paths]     # merge-state of files - ms = merge_.mergestate(self.repo) + ms = merge_.mergestate(repo)     # Load the new data into the tree's model   self.filetree.hide() @@ -587,7 +591,7 @@
  self._show_diff_hunks(files)     self.filetree.show() - if hasattr(self, 'text'): + if self.mode == 'commit':   self.text.grab_focus()   else:   self.filetree.grab_focus()
 
32
33
34
 
35
36
37
 
32
33
34
35
36
37
38
@@ -32,6 +32,7 @@
    def init(self):   GStatus.init(self) + self.mode = 'shelve'     def parse_opts(self):   GStatus.parse_opts(self)