def create_tag(self, dir, tagid, name, version, push): rc = self.process.system( 'hg tag -m"Tagged %(name)s %(version)s." "%(tagid)s"' % locals()) if rc != 0: err_exit('Tag failed') if push: if self.is_remote_sandbox(dir): rc = self.process.system('hg push default') if rc != 0: err_exit('Push failed') else: warn('No default path found; not pushing the tag') return rc
def create_tag(self, dir, tagid, name, version, push): rc = self.process.system( 'hg tag -m"Tagged %(name)s %(version)s." "%(tagid)s"' % locals()) if rc != 0: err_exit('Tag failed') if push: if self.is_remote_sandbox(dir): rc = self.process.system( 'hg push default') if rc != 0: err_exit('Push failed') else: warn('No default path found; not pushing the tag') return rc
def create_tag(self, dir, tagid, name, version, push): rc = self.process.system( 'git tag -m"Tagged %(name)s %(version)s." "%(tagid)s"' % locals()) if rc != 0: err_exit('Tag failed') remote = self.get_remote_from_sandbox(dir) if push and remote: branch = self.get_branch_from_sandbox(dir) tracked = self.get_tracked_branch_from_sandbox(dir) if tracked: rc = self.process.system( 'git push "%(remote)s" tag "%(tagid)s"' % locals()) if rc != 0: err_exit('Push failed') else: warn('%(branch)s does not track any branch - ' 'not pushing the tag' % locals()) return rc
def checkin_sandbox(self, dir, name, version, push): rc = self.process.system( 'git commit -m"Prepare %(name)s %(version)s." .' % locals()) if rc not in (0, 1): err_exit('Commit failed') rc = 0 remote = self.get_remote_from_sandbox(dir) if push and remote: branch = self.get_branch_from_sandbox(dir) tracked = self.get_tracked_branch_from_sandbox(dir) if tracked: rc = self.process.system( 'git push "%(remote)s" "%(branch)s:%(tracked)s"' % locals()) if rc != 0: err_exit('Push failed') else: warn('%(branch)s does not track any branch - ' 'not pushing the commit' % locals()) return rc
def commit_sandbox(self, dir, name, version, push): rc = self.process.system( 'hg commit -v -m"Prepare %(name)s %(version)s." .' % locals()) if rc not in (0, 1): # 1 means empty commit err_exit('Commit failed') rc = 0 if push: if self.is_remote_sandbox(dir): rc = self.process.system('hg push default') if self.version_info[:2] >= (2, 1): if rc not in (0, 1): # 1 means empty push err_exit('Push failed') rc = 0 else: if rc != 0: err_exit('Push failed') else: warn('No default path found; not pushing the commit') return rc
def create_tag(self, dir, tagid, name, version, push): rc = self.process.system( 'git tag -m"Tagged %(name)s %(version)s." "%(tagid)s"' % locals()) if rc != 0: err_exit('Tag failed') if push: branch = self.get_branch_from_sandbox(dir) remote = self.get_remote_from_sandbox(dir) if remote: tracked = self.get_tracked_branch_from_sandbox(dir) if tracked: rc = self.process.system( 'git push "%(remote)s" tag "%(tagid)s"' % locals()) if rc != 0: err_exit('Push failed') return rc warn('%(branch)s does not track a remote branch; ' 'not pushing the tag' % locals()) return rc
def commit_sandbox(self, dir, name, version, push): rc = self.process.system( 'hg commit -v -m"Prepare %(name)s %(version)s." .' % locals()) if rc not in (0, 1): # 1 means empty commit err_exit('Commit failed') rc = 0 if push: if self.is_remote_sandbox(dir): rc = self.process.system( 'hg push default') if self.version_info[:2] >= (2, 1): if rc not in (0, 1): # 1 means empty push err_exit('Push failed') rc = 0 else: if rc != 0: err_exit('Push failed') else: warn('No default path found; not pushing the commit') return rc
def commit_sandbox(self, dir, name, version, push): rc = self.process.system( 'git commit -m"Prepare %(name)s %(version)s." .' % locals()) if rc not in (0, 1): err_exit('Commit failed') rc = 0 if push: branch = self.get_branch_from_sandbox(dir) remote = self.get_remote_from_sandbox(dir) if remote: tracked = self.get_tracked_branch_from_sandbox(dir) if tracked: rc = self.process.system( 'git push "%(remote)s" "%(branch)s:%(tracked)s"' % locals()) if rc != 0: err_exit('Push failed') return rc warn('%(branch)s does not track a remote branch; ' 'not pushing the commit' % locals()) return rc