From cc6c79643e1cafad565424caabe581e7b548bf6f Mon Sep 17 00:00:00 2001 From: "Shawn O. Pearce" Date: Fri, 3 Jul 2009 15:29:02 -0700 Subject: Make refs/remotes/m management the manifest object's responsibility I plan to have the new submodule manifest format use a different layout for the m refs than the XML manifest format has used in the past. Thus we need to move the behavior management into the manifest object, and out of the project, so we can change it. Signed-off-by: Shawn O. Pearce --- project.py | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) (limited to 'project.py') diff --git a/project.py b/project.py index bedc91ee..6188ca72 100644 --- a/project.py +++ b/project.py @@ -27,7 +27,7 @@ from git_config import GitConfig, IsId from error import GitError, ImportError, UploadError from error import ManifestInvalidRevisionError -from git_refs import GitRefs, HEAD, R_HEADS, R_TAGS, R_PUB, R_M +from git_refs import GitRefs, HEAD, R_HEADS, R_TAGS, R_PUB def _lwrite(path, content): lock = '%s.lock' % path @@ -598,7 +598,7 @@ class Project(object): return False if self.worktree: - self._InitMRef() + self.manifest.SetMRefs(self) else: self._InitMirrorHead() try: @@ -1080,10 +1080,6 @@ class Project(object): remote.ResetFetch(mirror=True) remote.Save() - def _InitMRef(self): - if self.manifest.branch: - self._InitAnyMRef(R_M + self.manifest.branch) - def _InitMirrorHead(self): self._InitAnyMRef(HEAD) -- cgit v1.2.3-54-g00ecf