Changeset 1277 in tailor for vcpx/repository/git/__init__.py
- Timestamp:
- 09/12/06 22:17:43 (7 years ago)
- Hash name:
- 20060912201743-97f81-4c433ecbd1f3b8f0e368793fd3393c7d8cccec18
- File:
-
- 1 edited
-
vcpx/repository/git/__init__.py (modified) (5 diffs)
Legend:
- Unmodified
- Added
- Removed
-
vcpx/repository/git/__init__.py
r1249 r1277 26 26 Repository._load(self, project) 27 27 self.EXECUTABLE = project.config.get(self.name, 'git-command', 'git') 28 self. PARENT_REPO= project.config.get(self.name, 'parent-repo')29 self. BRANCHPOINT= project.config.get(self.name, 'branchpoint', 'HEAD')30 self. BRANCHNAME= project.config.get(self.name, 'branch')31 if self. BRANCHNAME:32 self. BRANCHNAME = 'refs/heads/' + self.BRANCHNAME28 self.parent_repo = project.config.get(self.name, 'parent-repo') 29 self.branch_point = project.config.get(self.name, 'branchpoint', 'HEAD') 30 self.branch_name = project.config.get(self.name, 'branch') 31 if self.branch_name: 32 self.branch_name = 'refs/heads/' + self.branch_name 33 33 34 if self.repository and self. PARENT_REPO:34 if self.repository and self.parent_repo: 35 35 self.log.critical('Cannot make sense of both "repository" and "parent-repo" parameters') 36 36 raise ConfigurationError ('Must specify only one of "repository" and "parent-repo"') 37 37 38 if self. BRANCHNAMEand not self.repository:38 if self.branch_name and not self.repository: 39 39 self.log.critical('Cannot make sense of "branch" if "repository" is not set') 40 40 raise ConfigurationError ('Missing "repository" to make use o "branch"') … … 76 76 return 77 77 78 if self. PARENT_REPO:79 cmd = self.command("clone", "--shared", "-n", self. PARENT_REPO, 'tmp')78 if self.parent_repo: 79 cmd = self.command("clone", "--shared", "-n", self.parent_repo, 'tmp') 80 80 clone = GitExternalCommand(self, cwd=self.basedir, command=cmd) 81 81 clone.execute() … … 86 86 renames(join(self.basedir, 'tmp', '.git'), join(self.basedir, '.git')) 87 87 88 cmd = self.command("reset", "--soft", self. BRANCHPOINT)88 cmd = self.command("reset", "--soft", self.branch_point) 89 89 reset = GitExternalCommand(self, cwd=self.basedir, command=cmd) 90 90 reset.execute() … … 93 93 "%s returned status %s" % (str(reset), reset.exit_status)) 94 94 95 elif self.repository and self. BRANCHNAME:95 elif self.repository and self.branch_name: 96 96 # ...and exists(self.storagedir) ? 97 97 … … 99 99 mkdir(join(self.basedir, self.METADIR)) 100 100 101 bp = self.runCommand(['rev-parse', self. BRANCHPOINT])[0]101 bp = self.runCommand(['rev-parse', self.branch_point])[0] 102 102 self.runCommand(['read-tree', bp]) 103 self.runCommand(['update-ref', self. BRANCHNAME, bp])103 self.runCommand(['update-ref', self.branch_name, bp]) 104 104 #self.runCommand(['checkout-index']) 105 105
Note: See TracChangeset
for help on using the changeset viewer.
