Kiln » TortoiseHg » TortoiseHg
Clone URL:  
Pushed to one repository · View In Graph Contained in 2.0.3, 2.0.4, and 2.0.5

stable resolve: show info about the "local" and "other" revisions (closes #458)

This adds two csinfo widgets to the top of the resolve window, containing the
information about the local and the other revisions of a merge.

Note that the resolve window can be open even if we are in the middle of a merge
between two revisions (e.g. when merging local changes during and update). In
those cases the revision information is not trivial and for now it will simply
not be displayed.

Changeset 4862de17b8dd

Parent bcede0150f7e

by Angel Ezquerra

Changes to one file · Browse files at 4862de17b8dd Showing diff from parent bcede0150f7e Diff from another changeset...

 
14
15
16
17
 
18
19
20
 
40
41
42
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
43
44
45
 
14
15
16
 
17
18
19
20
 
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
@@ -14,7 +14,7 @@
   from tortoisehg.util import hglib  from tortoisehg.hgqt.i18n import _ -from tortoisehg.hgqt import qtlib, cmdui, wctxactions, visdiff, thgrepo +from tortoisehg.hgqt import qtlib, cmdui, wctxactions, visdiff, thgrepo, csinfo    MARGINS = (8, 0, 0, 0)   @@ -40,6 +40,40 @@
  hbox.addWidget(tb)   hbox.addWidget(self.stlabel)   + def revisionInfoLayout(repo): + """ + Return a layout containg the revision information (local and other) + """ + hbox = QHBoxLayout() + hbox.setSpacing(0) + hbox.setContentsMargins(*MARGINS) + + vbox = QVBoxLayout() + vbox.setContentsMargins(*MARGINS) + hbox.addLayout(vbox) + localrevtitle = qtlib.LabeledSeparator(_('Local revision information')) + localrevinfo = csinfo.create(repo) + localrevinfo.update(repo[None].p1()) + vbox.addWidget(localrevtitle) + vbox.addWidget(localrevinfo) + vbox.addStretch() + + vbox = QVBoxLayout() + vbox.setContentsMargins(*MARGINS) + hbox.addLayout(vbox) + otherrevtitle = qtlib.LabeledSeparator(_('Other revision information')) + otherrevinfo = csinfo.create(repo) + otherrevinfo.update(repo[None].p2()) + + vbox.addWidget(otherrevtitle) + vbox.addWidget(otherrevinfo) + vbox.addStretch() + + return hbox + + if len(self.repo[None].parents()) > 1: + self.layout().addLayout(revisionInfoLayout(self.repo)) +   unres = qtlib.LabeledSeparator(_('Unresolved conflicts'))   self.layout().addWidget(unres)