diff options
author | Shawn O. Pearce <sop@google.com> | 2009-07-03 15:29:02 -0700 |
---|---|---|
committer | Shawn O. Pearce <sop@google.com> | 2009-07-03 20:03:38 -0700 |
commit | cc6c79643e1cafad565424caabe581e7b548bf6f (patch) | |
tree | 29fe305852e0488f54548e1d2a9d3e39f8d39f85 /project.py | |
parent | 2095179beec754d2d5bfe175215e736b7ff838e9 (diff) | |
download | git-repo-cc6c79643e1cafad565424caabe581e7b548bf6f.tar.gz |
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 <sop@google.com>
Diffstat (limited to 'project.py')
-rw-r--r-- | project.py | 8 |
1 files changed, 2 insertions, 6 deletions
@@ -27,7 +27,7 @@ from git_config import GitConfig, IsId | |||
27 | from error import GitError, ImportError, UploadError | 27 | from error import GitError, ImportError, UploadError |
28 | from error import ManifestInvalidRevisionError | 28 | from error import ManifestInvalidRevisionError |
29 | 29 | ||
30 | from git_refs import GitRefs, HEAD, R_HEADS, R_TAGS, R_PUB, R_M | 30 | from git_refs import GitRefs, HEAD, R_HEADS, R_TAGS, R_PUB |
31 | 31 | ||
32 | def _lwrite(path, content): | 32 | def _lwrite(path, content): |
33 | lock = '%s.lock' % path | 33 | lock = '%s.lock' % path |
@@ -598,7 +598,7 @@ class Project(object): | |||
598 | return False | 598 | return False |
599 | 599 | ||
600 | if self.worktree: | 600 | if self.worktree: |
601 | self._InitMRef() | 601 | self.manifest.SetMRefs(self) |
602 | else: | 602 | else: |
603 | self._InitMirrorHead() | 603 | self._InitMirrorHead() |
604 | try: | 604 | try: |
@@ -1080,10 +1080,6 @@ class Project(object): | |||
1080 | remote.ResetFetch(mirror=True) | 1080 | remote.ResetFetch(mirror=True) |
1081 | remote.Save() | 1081 | remote.Save() |
1082 | 1082 | ||
1083 | def _InitMRef(self): | ||
1084 | if self.manifest.branch: | ||
1085 | self._InitAnyMRef(R_M + self.manifest.branch) | ||
1086 | |||
1087 | def _InitMirrorHead(self): | 1083 | def _InitMirrorHead(self): |
1088 | self._InitAnyMRef(HEAD) | 1084 | self._InitAnyMRef(HEAD) |
1089 | 1085 | ||