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

graph, repomodel: always add revision entry for working dir

irrespective of if there are changes in the working dir.

Before this change, the working dir node was only shown if there were
changes in the working dir.

Changeset 88b1e44cd177

Parent 2b853f3fda3e

by Adrian Buehlmann

Changes to 2 files · Browse files at 88b1e44cd177 Showing diff from parent 2b853f3fda3e Diff from another changeset...

 
103
104
105
106
107
108
109
110
 
103
104
105
 
 
106
107
108
@@ -103,8 +103,6 @@
    If branch is set, only generated the subtree for the given named branch.   """ - if start_rev is None and repo.status() == ([],)*7: - start_rev = len(repo.changelog)   assert start_rev is None or start_rev >= stop_rev   curr_rev = start_rev   revs = []
 
69
70
71
72
 
73
74
75
 
158
159
160
161
162
163
164
 
302
303
304
305
306
307
308
309
310
311
312
313
314
315
 
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
 
384
385
386
387
388
389
390
391
 
69
70
71
 
72
73
74
75
 
158
159
160
 
161
162
163
 
301
302
303
 
 
 
 
 
 
 
 
304
305
306
 
359
360
361
 
 
 
 
 
 
 
 
 
 
 
 
 
362
363
 
 
 
 
364
365
366
@@ -69,7 +69,7 @@
  if msg:   msg = msg.splitlines()[0]   else: - msg = "WORKING DIRECTORY (locally modified)" + msg = "WORKING DIRECTORY"   return msg    # XXX maybe it's time to make these methods of the model... @@ -158,7 +158,6 @@
  if self._hasmq:   self.mqueues = self.repo.mq.series[:]   self.wd_revs = [ctx.rev() for ctx in wdctxs] - self.wd_status = [self.repo.status(ctx.node(), None)[:4] for ctx in wdctxs]   self._user_colors = {}   self._branch_colors = {}   grapher = revision_grapher(self.repo, start_rev=fromhead, @@ -302,14 +301,6 @@
  return QtCore.QVariant(_columnmap[column](self, ctx, gnode))   elif role == QtCore.Qt.ToolTipRole:   msg = "<b>Branch:</b> %s<br>\n" % ctx.branch() - if gnode.rev in self.wd_revs: - msg += " <i>Working Directory position" - states = 'modified added removed deleted'.split() - status = self.wd_status[self.wd_revs.index(gnode.rev)] - status = [state for st, state in zip(status, states) if st] - if status: - msg += ' (%s)' % (', '.join(status)) - msg += "</i><br>\n"   msg += _tooltips.get(column, _columnmap[column])(self, ctx, gnode)   return QtCore.QVariant(msg)   elif role == QtCore.Qt.ForegroundRole: @@ -368,24 +359,8 @@
  tags = set(ctx.tags())   icn = None   - modified = False - atwd = False - if gnode.rev in self.wd_revs: - atwd = True - status = self.wd_status[self.wd_revs.index(gnode.rev)] - if [True for st in status if st]: - modified = True - - if gnode.rev is None: - # WD is displayed only if there are local - # modifications, so let's use the modified icon - icn = geticon('modified') - elif tags.intersection(self.mqueues): + if tags.intersection(self.mqueues):   icn = geticon('mqpatch') - #elif modified: - # icn = geticon('modified') - elif atwd: - icn = geticon('clean')     if icn:   icn.paint(painter, dot_x-5, dot_y-5, 17, 17)