Author: waldi Date: Fri May 28 09:27:44 2010 New Revision: 762 Log: debian/bin/genorig.py: Always use specified (or tip) tag. Modified: trunk/xen-3/debian/bin/genorig.py Modified: trunk/xen-3/debian/bin/genorig.py =============================================================================--- trunk/xen-3/debian/bin/genorig.py Fri May 28 09:14:04 2010 (r761) +++ trunk/xen-3/debian/bin/genorig.py Fri May 28 09:27:44 2010 (r762) @@ -24,7 +24,6 @@ import tempfile self.dir = tempfile.mkdtemp(prefix = ''genorig'', dir = ''debian'') try: - self.do_update() self.do_version() self.orig_dir = "%s-%s" % (self.source, self.version) @@ -36,15 +35,6 @@ finally: shutil.rmtree(self.dir) - def do_update(self): - if not self.options.tag: - return - - self.log(''Updating to tag %s.\n'' % self.options.tag) - p = subprocess.Popen((''hg'', ''update'', ''-r'', self.options.tag), cwd=self.repo) - if p.wait(): - raise RuntimeError - def do_version(self): if self.options.version: self.version = self.options.version @@ -55,7 +45,7 @@ self.log("Create archive.\n") arg_dir = os.path.join(os.path.realpath(self.dir), self.orig_dir) - args = (''hg'', ''archive'', arg_dir) + args = (''hg'', ''archive'', ''-r'', self.options.tag, arg_dir) p = subprocess.Popen(args, cwd=self.repo) if p.wait(): raise RuntimeError @@ -64,7 +54,7 @@ self.log("Exporting changelog.\n") log = open("%s/%s/Changelog" % (self.dir, self.orig_dir), ''w'') - args = (''hg'', ''log'') + args = (''hg'', ''log'', ''-r'', ''%s:0'' % self.options.tag) p = subprocess.Popen(args, cwd=self.repo, stdout=log) if p.wait(): raise RuntimeError @@ -82,7 +72,7 @@ if __name__ == ''__main__'': from optparse import OptionParser p = OptionParser(prog=sys.argv[0], usage=''%prog [OPTION]... DIR'') - p.add_option("-t", "--tag", dest="tag") + p.add_option("-t", "--tag", dest="tag", default=''tip'') p.add_option("-v", "--version", dest="version") options, args = p.parse_args() if len(args) != 1: