summaryrefslogtreecommitdiff
path: root/paste
diff options
context:
space:
mode:
authorianb <devnull@localhost>2005-09-21 07:44:38 +0000
committerianb <devnull@localhost>2005-09-21 07:44:38 +0000
commitd9b750d2836b6c58c4d5e0795d6c51927f0be845 (patch)
treed4677235650ff7d801e1ea73fe4c37b9ac0f518b /paste
parent331964abd61c410c132fc4ed50220d528d72a4ce (diff)
downloadpastedeploy-d9b750d2836b6c58c4d5e0795d6c51927f0be845.tar.gz
Check out the directory when you are through
Diffstat (limited to 'paste')
-rw-r--r--paste/deploy/tag.py19
1 files changed, 19 insertions, 0 deletions
diff --git a/paste/deploy/tag.py b/paste/deploy/tag.py
index 40e507c..00cbb8a 100644
--- a/paste/deploy/tag.py
+++ b/paste/deploy/tag.py
@@ -72,6 +72,7 @@ class tag(Command):
self.update_setup_cfg()
run_command(['svn', 'commit', '--message',
'Auto-update of version strings', self.build])
+ self.checkout_tag(tag_url)
def update_setup_py(self):
setup_py = os.path.join(self.build, 'setup.py')
@@ -118,6 +119,24 @@ class tag(Command):
if not content.strip():
log.info('%s empty; deleting' % setup_cfg)
run_command(['svn', 'rm', '--force', setup_cfg])
+
+ def checkout_tag(self, tag_url):
+ # Put it in the parent directory:
+ ext = ''
+ while 1:
+ base = os.path.join(os.path.dirname(os.getcwd()),
+ '%s-%s%s' % (self.distribution.metadata.name, self.version, ext))
+ if os.path.exists(base):
+ log.warn('Directory %s exists' % base)
+ if ext:
+ ext += 1
+ else:
+ ext = 0
+ else:
+ break
+ run_command(['svn', 'checkout', tag_url, base])
+ log.info('Checked out tag into %s' % base)
+
def run_command(command_list, stdin=None):
log.info('Running %s', format_command(command_list))