comparison 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
comparison
equal deleted inserted replaced
27319:b64b6fdc5c9b 27321:dcdf0a52ad36
449 # with curses. create a list of headers only. 449 # with curses. create a list of headers only.
450 headers = [c for c in chunks if isinstance(c, patchmod.header)] 450 headers = [c for c in chunks if isinstance(c, patchmod.header)]
451 451
452 # if there are no changed files 452 # if there are no changed files
453 if len(headers) == 0: 453 if len(headers) == 0:
454 return [] 454 return [], {}
455 uiheaders = [uiheader(h) for h in headers] 455 uiheaders = [uiheader(h) for h in headers]
456 # let user choose headers/hunks/lines, and mark their applied flags 456 # let user choose headers/hunks/lines, and mark their applied flags
457 # accordingly 457 # accordingly
458 ret = chunkselector(ui, uiheaders) 458 ret = chunkselector(ui, uiheaders)
459 appliedhunklist = [] 459 appliedhunklist = []