comparison mercurial/cmdutil.py @ 24013:942a5a34b2d0 stable

log: fix json-formatted output when file copies are listed (issue4523)
author Augie Fackler <augie@google.com>
date Mon, 02 Feb 2015 14:26:47 -0500
parents 448bb32b8ee6
children 8d295ce6e488 ac41aa4a66ab
comparison
equal deleted inserted replaced
24008:873eb5db89c8 24013:942a5a34b2d0
1089 self.ui.write(',\n "files": [%s]' % 1089 self.ui.write(',\n "files": [%s]' %
1090 ", ".join('"%s"' % j(f) for f in ctx.files())) 1090 ", ".join('"%s"' % j(f) for f in ctx.files()))
1091 1091
1092 if copies: 1092 if copies:
1093 self.ui.write(',\n "copies": {%s}' % 1093 self.ui.write(',\n "copies": {%s}' %
1094 ", ".join('"%s": %s' % (j(k), j(copies[k])) 1094 ", ".join('"%s": "%s"' % (j(k), j(v))
1095 for k in copies)) 1095 for k, v in copies))
1096 1096
1097 matchfn = self.matchfn 1097 matchfn = self.matchfn
1098 if matchfn: 1098 if matchfn:
1099 stat = self.diffopts.get('stat') 1099 stat = self.diffopts.get('stat')
1100 diff = self.diffopts.get('patch') 1100 diff = self.diffopts.get('patch')