I had to replay this quest three times before I could finish it without all of Diamond City becoming hostile to me. The first time I talked the Mayor into releasing Geneva and then insisted he stand trial. He and Piper began shooting at each other but he was not hostile toward me so when I (thinking that I didn't like him shooting at Piper) shot him dead, Geneva, and then Piper, became hostile, followed by the guards and the rest of Diamond City. The second was a variation of that except I didn't attack him but somehow in the shootout between Piper and McDonough Geneva became hostile toward me and all hell broke loose again. The third and final time I stood in such a way that funneled Geneva out of the door so she was no longer in the room and in McDonough's line of sight. Then I just let him and Piper shoot it out.
So... this is a bug, right? Forcing the player to do nothing while Piper and the former Synth Mayor shoot at each other? Cos if not, it kinda svcks. Just my two cents.