summaryrefslogtreecommitdiffstats
path: root/subcmds/sync.py
diff options
context:
space:
mode:
authorConley Owens <cco3@android.com>2012-10-01 16:12:28 -0700
committerConley Owens <cco3@android.com>2012-10-25 17:48:35 -0700
commitc9129d90deb7377324b5178a231657e3d8c74019 (patch)
treef0dd3f9ade22e48f4ab9cb8447a360e2e01a5aca /subcmds/sync.py
parent57365c98cc227255f50ab3d71462204c804eb975 (diff)
downloadgit-repo-c9129d90deb7377324b5178a231657e3d8c74019.tar.gz
Update PGP keys during _PostRepoUpgrade in `sync`
Previously, if a key was added, a client wouldn't add the key during the sync step. This would cause issues if a new key were added and a subsequent release were signed by that key. Change-Id: I4fac317573cd9d0e8da62aa42e00faf08bfeb26c
Diffstat (limited to 'subcmds/sync.py')
-rw-r--r--subcmds/sync.py8
1 files changed, 6 insertions, 2 deletions
diff --git a/subcmds/sync.py b/subcmds/sync.py
index a4ca344a..a7df7c89 100644
--- a/subcmds/sync.py
+++ b/subcmds/sync.py
@@ -46,6 +46,7 @@ except ImportError:
46 46
47from git_command import GIT 47from git_command import GIT
48from git_refs import R_HEADS, HEAD 48from git_refs import R_HEADS, HEAD
49from main import WrapperModule
49from project import Project 50from project import Project
50from project import RemoteSpec 51from project import RemoteSpec
51from command import Command, MirrorSafeCommand 52from command import Command, MirrorSafeCommand
@@ -537,7 +538,7 @@ uncommitted changes are present' % project.relpath
537 mp.PreSync() 538 mp.PreSync()
538 539
539 if opt.repo_upgraded: 540 if opt.repo_upgraded:
540 _PostRepoUpgrade(self.manifest) 541 _PostRepoUpgrade(self.manifest, opt)
541 542
542 if not opt.local_only: 543 if not opt.local_only:
543 mp.Sync_NetworkHalf(quiet=opt.quiet, 544 mp.Sync_NetworkHalf(quiet=opt.quiet,
@@ -611,7 +612,10 @@ uncommitted changes are present' % project.relpath
611 if self.manifest.notice: 612 if self.manifest.notice:
612 print self.manifest.notice 613 print self.manifest.notice
613 614
614def _PostRepoUpgrade(manifest): 615def _PostRepoUpgrade(manifest, opt):
616 wrapper = WrapperModule()
617 if wrapper.NeedSetupGnuPG():
618 wrapper.SetupGnuPG(opt.quiet)
615 for project in manifest.projects.values(): 619 for project in manifest.projects.values():
616 if project.Exists: 620 if project.Exists:
617 project.PostRepoUpgrade() 621 project.PostRepoUpgrade()