diff hgext/evolve.py @ 1630:35c666ef724e

evolve: Fix crush when reading docstring Before this patch, hg evolve --divergent could crush when looking for docstring of function of merge.update. We were checking the docstring to work properly with older version of Mercurial. It could crush if an extension would wrap merge.update without keeping the docstring. This patch fixes the crush.
author Juntao Li <juntaoli@fb.com>
date Thu, 17 Mar 2016 15:04:05 -0700
parents 548195454683
children 7463f5880ce9
line wrap: on
line diff
--- a/hgext/evolve.py	Thu Mar 17 11:31:55 2016 -0700
+++ b/hgext/evolve.py	Thu Mar 17 15:04:05 2016 -0700
@@ -2002,7 +2002,7 @@
         hg.update(repo, divergent.rev())
     repo.ui.note(_('merging divergent changeset\n'))
     if progresscb: progresscb()
-    if 'partial' in merge.update.__doc__:
+    if merge.update.__doc__ is not None and 'partial' in merge.update.__doc__:
         # Mercurial  < 43c00ca887d1 (3.7)
         stats = merge.update(repo,
                              other.node(),