Commits

Anonymous committed 3120cec

repomodel: do not show "Not a head revision" message for empty repositories

Thg was showing the "Not a head revision" message for empty repositories because
the null revision is never part of the _branchheads list. However, showing that
message for empty repos does not make sense since the user _must_ create a new
head to start working on the repo.

Comments (0)

Files changed (1)

tortoisehg/hgqt/repomodel.py

                 msg = '*** ' + _('Working Directory') + ' ***'
 
             for pctx in ctx.parents():
-                if pctx.node() not in self.repo._branchheads:
+                if self.repo._branchheads and pctx.node() not in self.repo._branchheads:
                     text = _('Not a head revision!')
                     msg += " " + qtlib.markup(text, fg='red', weight='bold')