1. Marek Stój
  2. thg-keyboard-friendly

Commits

TK Soh  committed abc19db

changeset: fix missing parent/child fields in commit headers

caused by empty commit messages in the parent/child changesets

  • Participants
  • Parent commits 2b6373a
  • Branches default

Comments (0)

Files changed (1)

File hggtk/changeset.py

View file
  • Ignore whitespace
         title_line('user/date:', ctx.user() + '\t' + date, 'changeset')
         for p in parents:
             pctx = self.repo.changectx(p)
-            summary = pctx.description().splitlines()[0]
-            summary = toutf(summary)
+            try:
+                summary = pctx.description().splitlines()[0]
+                summary = toutf(summary)
+            except:
+                summary = ""
             change = str(p) + ':' + short(self.repo.changelog.node(p))
             title = 'parent:'
             title += ' ' * (12 - len(title))
             buf.insert(eob, "\n")
         for n in self.repo.changelog.children(ctx.node()):
             cctx = self.repo.changectx(n)
-            summary = cctx.description().splitlines()[0]
-            summary = toutf(summary)
+            try:
+                summary = cctx.description().splitlines()[0]
+                summary = toutf(summary)
+            except:
+                summary = ""
             childrev = self.repo.changelog.rev(n)
             change = str(childrev) + ':' + short(n)
             title = 'child:'