comparison hggit/git_handler.py @ 1108:aae2d15de6af

git_handler: store gpgsig header to maintain commit coherence
author Tony Tung <ttung@chanzuckerberg.com <mailto:ttung@chanzuckerberg.com>>
date Tue, 06 Feb 2018 17:04:24 -0800
parents e326b349eba6
children 21264429a8d4
comparison
equal deleted inserted replaced
1107:327d12aeb560 1108:aae2d15de6af
594 commit.message, extra = self.get_git_message_and_extra(ctx) 594 commit.message, extra = self.get_git_message_and_extra(ctx)
595 commit.extra.extend(extra) 595 commit.extra.extend(extra)
596 596
597 if 'encoding' in extra: 597 if 'encoding' in extra:
598 commit.encoding = extra['encoding'] 598 commit.encoding = extra['encoding']
599 if 'gpgsig' in extra:
600 commit.gpgsig = extra['gpgsig']
599 601
600 for obj, nodeid in exporter.update_changeset(ctx): 602 for obj, nodeid in exporter.update_changeset(ctx):
601 if obj.id not in self.git.object_store: 603 if obj.id not in self.git.object_store:
602 self.git.object_store.add_object(obj) 604 self.git.object_store.add_object(obj)
603 605
1026 extra['committer'] = "%s %d %d" % ( 1028 extra['committer'] = "%s %d %d" % (
1027 commit.committer, commit.commit_time, -commit.commit_timezone) 1029 commit.committer, commit.commit_time, -commit.commit_timezone)
1028 1030
1029 if commit.encoding: 1031 if commit.encoding:
1030 extra['encoding'] = commit.encoding 1032 extra['encoding'] = commit.encoding
1033 if commit.gpgsig:
1034 extra['gpgsig'] = commit.gpgsig
1031 1035
1032 if octopus: 1036 if octopus:
1033 extra['hg-git'] = 'octopus-done' 1037 extra['hg-git'] = 'octopus-done'
1034 1038
1035 ctx = context.memctx(self.repo, (p1, p2), text, 1039 ctx = context.memctx(self.repo, (p1, p2), text,