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 filelistmodel: Only check the subrepo status when .hgsubsate or .hgsub changed

Changeset 0864d6ac64c5

Parent a3ded228ad9b

by Angel Ezquerra

Changes to one file · Browse files at 0864d6ac64c5 Showing diff from parent a3ded228ad9b Diff from another changeset...

 
119
120
121
122
123
124
125
126
127
128
129
130
131
132
 
 
 
 
 
 
 
 
 
 
 
 
133
134
135
 
119
120
121
 
 
 
 
 
 
 
 
 
 
 
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
@@ -119,17 +119,18 @@
    # Add the list of modified subrepos to the top of the list   if not isinstance(self._ctx, patchctx.patchctx): - from mercurial import subrepo - 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] - sp2rev = '' - if ismerge: - sp2rev = self._ctx.p2().substate.get(s, subrepo.nullstate)[1] - if srev != sp1rev or (sp2rev != '' and srev != sp2rev): - wasmerged = ismerge and s in ctxfiles - files.append({'path': s, 'status': 'S', 'parent': parent, - 'wasmerged': wasmerged}) + if ".hgsubstate" in ctxfiles or ".hgsub" in ctxfiles: + from mercurial import subrepo + 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] + sp2rev = '' + if ismerge: + sp2rev = self._ctx.p2().substate.get(s, subrepo.nullstate)[1] + if srev != sp1rev or (sp2rev != '' and srev != sp2rev): + 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