[Pkg-bazaar-commits] r153 ./bzr-builddeb/people/jdw/merge_upstream: Switch to --version for merge-upstream, I have plans for that one.
James Westby
jw+debian at jameswestby.net
Tue Jul 10 21:14:31 UTC 2007
------------------------------------------------------------
revno: 153
committer: James Westby <jw+debian at jameswestby.net>
branch nick: merge_upstream
timestamp: Tue 2007-07-10 22:14:31 +0100
message:
Switch to --version for merge-upstream, I have plans for that one.
modified:
__init__.py
doc/user_manual/normal.rst
-------------- next part --------------
=== modified file '__init__.py'
--- a/__init__.py 2007-07-10 21:02:32 +0000
+++ b/__init__.py 2007-07-10 21:14:31 +0000
@@ -295,6 +295,7 @@
register_command(cmd_builddeb)
+
class cmd_merge_upstream(Command):
"""Merges a new upstream version into the current branch.
@@ -310,14 +311,16 @@
will change the name of the source package then you can use this option
to set the new name.
"""
- takes_args = ['path', 'version']
+ takes_args = ['path']
aliases = ['mu']
package_opt = Option('package', help="The name of the source package.",
type=str)
- takes_options = [package_opt]
+ version_opt = Option('version', help="The version number of the new "
+ "upstream release. (Required).", type=str, short_name='v')
+ takes_options = [package_opt, version_opt]
- def run(self, path, version, package=None):
+ def run(self, path, version=None, package=None):
from bzrlib.errors import (NoSuchTag,
TagAlreadyExists,
@@ -326,6 +329,9 @@
from merge_upstream import merge_upstream
from repack_tarball import repack_tarball
+ if version is None:
+ raise BzrCommandError("You must supply the --version argument.")
+
tree, relpath = WorkingTree.open_containing('.')
config = DebBuildConfig([(local_conf, True), (global_conf, True),
=== modified file 'doc/user_manual/normal.rst'
--- a/doc/user_manual/normal.rst 2007-07-10 20:52:45 +0000
+++ b/doc/user_manual/normal.rst 2007-07-10 21:14:31 +0000
@@ -83,7 +83,7 @@
the tarball you should run::
$ cd scruff/
- $ bzr merge-upstream ../scruff-0.1.tar.gz 0.1 --package scruff
+ $ bzr merge-upstream ../scruff-0.1.tar.gz --version 0.1 --package scruff
This command will work for upstream tarballs that are ``.tar.gz``, ``.tgz``,
``.tar`` or ``.tar.bz2``, or unpacked directories if you have one of those
@@ -225,7 +225,8 @@
For instance when the ``0.2`` version of ``scruff`` is released the command
to update to the new version is::
- $ bzr merge-upstream 0.2 http://scruff.org/releases/scruff-0.2.tar.gz
+ $ bzr merge-upstream --version 0.2 \
+ http://scruff.org/releases/scruff-0.2.tar.gz
This command downloads the new version, and imports it in to the branch. It
then merges in the packaging changes to the new version.
More information about the Pkg-bazaar-commits
mailing list