# merge the unmerged files
errors = False
for path in files:
+ # remove additional files that might be generated for some
+ # newer versions of GIT
+ for suffix in [base, head1, head2]:
+ if not suffix:
+ continue
+ fname = path + '~' + suffix
+ if os.path.exists(fname):
+ os.remove(fname)
+
stages = files[path]
if gitmergeonefile.merge(stages['1'][1], stages['2'][1],
stages['3'][1], path, stages['1'][0],