Kiln » TortoiseHg » TortoiseHg
Clone URL:  
Pushed to one repository · View In Graph Contained in 2.1, 2.1.1, and 2.1.2

Merge with stable

Changeset e94c42632f9c

Parents 801d3279c1c9

Parents 2ac800d3507c

by Steve Borho

Changes to 3 files · Browse files at e94c42632f9c Showing diff from parent 801d3279c1c9 2ac800d3507c Diff from another changeset...

 
109
110
111
 
112
 
 
 
 
113
 
114
115
116
 
119
120
121
122
123
 
 
 
 
 
124
125
126
127
 
 
 
 
 
 
 
 
 
 
128
129
130
131
132
 
133
134
135
 
142
143
144
145
 
 
146
147
148
149
150
151
152
153
 
 
 
 
 
 
154
 
 
155
156
157
 
 
 
158
159
160
 
109
110
111
112
113
114
115
116
117
118
119
120
121
122
 
125
126
127
 
 
128
129
130
131
132
133
134
 
 
135
136
137
138
139
140
141
142
143
144
145
 
 
 
 
146
147
148
149
 
156
157
158
 
159
160
161
 
 
 
 
 
 
 
162
163
164
165
166
167
168
169
170
171
 
 
172
173
174
175
176
177
@@ -109,8 +109,14 @@
  out = []   opts = {'date':None, 'user':None, 'rev':[sfrom]}   if not sfrom: + sstatedesc = 'new'   out.append(_('Subrepo initialized to revision:') + u'\n\n') + elif not sto: + sstatedesc = 'removed' + out.append(_('Subrepo removed from repository.') + u'\n\n') + return out, sstatedesc   else: + sstatedesc = 'changed'   out.append(_('Revision has changed from:') + u'\n\n')   _ui.pushbuffer()   commands.log(_ui, srepo, **opts) @@ -119,17 +125,25 @@
  opts['rev'] = [sto]   _ui.pushbuffer()   commands.log(_ui, srepo, **opts) - out.append(hglib.tounicode(_ui.popbuffer())) - return out + stolog = _ui.popbuffer() + if not stolog: + stolog = _('Initial revision') + out.append(hglib.tounicode(stolog)) + return out, sstatedesc     srev = ctx.substate.get(wfile, subrepo.nullstate)[1] - sub = ctx.sub(wfile) - if isinstance(sub, subrepo.hgsubrepo): + try: + sub = ctx.sub(wfile) + if isinstance(sub, subrepo.hgsubrepo): + srepo = sub._repo + sactual = srepo['.'].hex() + else: + self.error = _('Not a Mercurial subrepo, not previewable') + return + except (util.Abort), e: + sub = ctx.p1().sub(wfile)   srepo = sub._repo - sactual = srepo['.'].hex() - else: - self.error = _('Not a Mercurial subrepo, not previewable') - return + sactual = ''   out = []   _ui = uimod.ui()   _ui.pushbuffer() @@ -142,19 +156,22 @@
  sstatedesc = 'changed'   if ctx.rev() is not None:   sparent = ctx.p1().substate.get(wfile, subrepo.nullstate)[1] - out += genSubrepoRevChangedDescription(sparent, srev) + subrepochange, sstatedesc = genSubrepoRevChangedDescription(sparent, srev) + out += subrepochange   else: - sstatedesc = 'dirty' - if srev == '': - sstatedesc = 'new' - out.append(_('New subrepository') + u'\n\n') - elif srev != sactual: - sstatedesc = 'changed' - out += genSubrepoRevChangedDescription(srev, sactual) + if srev != sactual: + subrepochange, sstatedesc = \ + genSubrepoRevChangedDescription(srev, sactual) + out += subrepochange + if data: + sstatedesc += ' and dirty'   self.contents = u''.join(out) + if not sactual: + sstatedesc = 'removed'   self.flabel += _(' <i>(is a %s sub-repository)</i>' % sstatedesc) - lbl = u' <a href="subrepo:%s">%s...</a>' - self.flabel += lbl % (hglib.tounicode(srepo.root), _('open')) + if sactual: + lbl = u' <a href="subrepo:%s">%s...</a>' + self.flabel += lbl % (hglib.tounicode(srepo.root), _('open'))   except (EnvironmentError, error.RepoError, util.Abort), e:   self.error = _('Error previewing subrepo: %s') % \   hglib.tounicode(str(e))
 
103
104
105
 
106
107
108
 
112
113
114
115
 
 
 
 
 
 
 
 
 
116
117
118
 
103
104
105
106
107
108
109
 
113
114
115
 
116
117
118
119
120
121
122
123
124
125
126
127
@@ -103,6 +103,7 @@
  if not isinstance(self._ctx, patchctx.patchctx):   if ".hgsubstate" in ctxfiles or ".hgsub" in ctxfiles:   from mercurial import subrepo + # Add the list of modified subrepos   for s, sd in self._ctx.substate.items():   srev = self._ctx.substate.get(s, subrepo.nullstate)[1]   sp1rev = self._ctx.p1().substate.get(s, subrepo.nullstate)[1] @@ -112,7 +113,15 @@
  if srev != sp1rev or (sp2rev != '' and srev != sp2rev):   wasmerged = ismerge and s in ctxfiles   files.append({'path': s, 'status': 'S', 'parent': parent, - 'wasmerged': wasmerged}) + 'wasmerged': wasmerged}) + # Add the list of missing subrepos + subreposet = set(self._ctx.substate.keys()) + subrepoparent1set = set(self._ctx.p1().substate.keys()) + missingsubreposet = subrepoparent1set.difference(subreposet) + for s in missingsubreposet: + wasmerged = ismerge and s in ctxfiles + files.append({'path': s, 'status': 'S', 'parent': parent, + 'wasmerged': wasmerged})     if self._fulllist and ismerge:   func = lambda x: True
Show Entire File tortoisehg/​hgqt/​fileview.py Stacked
(No changes)