Commits

TK Soh committed abc19db

changeset: fix missing parent/child fields in commit headers

caused by empty commit messages in the parent/child changesets

Comments (0)

Files changed (1)

hggtk/changeset.py

         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:'
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for ProjectModifiedEvent.java.
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.