diff mercurial/crecord.py @ 27321:dcdf0a52ad36

crecord: add dictionary to default return value of filterpatch When committing interactively without changes, the user would get a ValueError exception. This patch adds a dictionary to the return value of filterpatch when there are no files to change.
author Laurent Charignon <lcharignon@fb.com>
date Wed, 09 Dec 2015 17:01:27 -0800
parents 55fa7c3900ae
children a801d331a022
line wrap: on
line diff
--- a/mercurial/crecord.py	Wed Dec 02 16:12:15 2015 -0800
+++ b/mercurial/crecord.py	Wed Dec 09 17:01:27 2015 -0800
@@ -451,7 +451,7 @@
 
     # if there are no changed files
     if len(headers) == 0:
-        return []
+        return [], {}
     uiheaders = [uiheader(h) for h in headers]
     # let user choose headers/hunks/lines, and mark their applied flags
     # accordingly