diff -Nru bzr-rewrite-0.6.2+bzr238/commands.py bzr-rewrite-0.6.2+bzr242/commands.py --- bzr-rewrite-0.6.2+bzr238/commands.py 2011-01-30 16:34:17.000000000 +0000 +++ bzr-rewrite-0.6.2+bzr242/commands.py 2011-09-27 10:09:04.000000000 +0000 @@ -34,6 +34,9 @@ note, ) +from bzrlib.plugins.rewrite import gettext + + class cmd_rebase(Command): """Re-base a branch. @@ -101,8 +104,8 @@ rebase_todo, ) if revision is not None and pending_merges: - raise BzrCommandError( - "--revision and --pending-merges are mutually exclusive") + raise BzrCommandError(gettext( + "--revision and --pending-merges are mutually exclusive")) wt = WorkingTree.open_containing(directory)[0] wt.lock_write() @@ -114,16 +117,16 @@ else: upstream_location = wt.branch.get_parent() if upstream_location is None: - raise BzrCommandError("No upstream branch specified.") - note("Rebasing on %s", upstream_location) + raise BzrCommandError(gettext("No upstream branch specified.")) + note(gettext("Rebasing on %s"), upstream_location) upstream = Branch.open_containing(upstream_location)[0] upstream_repository = upstream.repository upstream_revision = upstream.last_revision() # Abort if there already is a plan file if state.has_plan(): - raise BzrCommandError("A rebase operation was interrupted. " + raise BzrCommandError(gettext("A rebase operation was interrupted. " "Continue using 'bzr rebase-continue' or abort using 'bzr " - "rebase-abort'") + "rebase-abort'")) start_revid = None stop_revid = None @@ -137,16 +140,16 @@ if revision[1] is not None: stop_revid = revision[1].as_revision_id(wt.branch) else: - raise BzrCommandError( - "--revision takes only one or two arguments") + raise BzrCommandError(gettext( + "--revision takes only one or two arguments")) if pending_merges: wt_parents = wt.get_parent_ids() if len(wt_parents) in (0, 1): - raise BzrCommandError("No pending merges present.") + raise BzrCommandError(gettext("No pending merges present.")) elif len(wt_parents) > 2: - raise BzrCommandError( - "Rebasing more than one pending merge not supported") + raise BzrCommandError(gettext( + "Rebasing more than one pending merge not supported")) stop_revid = wt_parents[1] assert stop_revid is not None, "stop revid invalid" @@ -172,11 +175,11 @@ if start_revid is None: if not onto_unique: - self.outf.write("No revisions to rebase.\n") + self.outf.write(gettext("No revisions to rebase.\n")) return if not our_new: - self.outf.write("Base branch is descendant of current " - "branch. Pulling instead.\n") + self.outf.write(gettext("Base branch is descendant of current " + "branch. Pulling instead.\n")) if not dry_run: wt.pull(upstream, onto) return @@ -194,7 +197,7 @@ if verbose or dry_run: todo = list(rebase_todo(wt.branch.repository, replace_map)) - note('%d revisions will be rebased:' % len(todo)) + note(gettext('%d revisions will be rebased:') % len(todo)) for revid in todo: note("%s" % revid) @@ -208,9 +211,9 @@ WorkingTreeRevisionRewriter(wt, state, merge_type=merge_type)) except ConflictsInTree: - raise BzrCommandError("A conflict occurred replaying a " + raise BzrCommandError(gettext("A conflict occurred replaying a " "commit. Resolve the conflict and run " - "'bzr rebase-continue' or run 'bzr rebase-abort'.") + "'bzr rebase-continue' or run 'bzr rebase-abort'.")) # Remove plan file state.remove_plan() finally: @@ -269,14 +272,14 @@ replayer = WorkingTreeRevisionRewriter(wt, state, merge_type=merge_type) # Abort if there are any conflicts if len(wt.conflicts()) != 0: - raise BzrCommandError("There are still conflicts present. " + raise BzrCommandError(gettext("There are still conflicts present. " "Resolve the conflicts and then run " - "'bzr resolve' and try again.") + "'bzr resolve' and try again.")) # Read plan file try: replace_map = state.read_plan()[1] except NoSuchFile: - raise BzrCommandError("No rebase to continue") + raise BzrCommandError(gettext("No rebase to continue")) oldrevid = state.read_active_revid() if oldrevid is not None: oldrev = wt.branch.repository.get_revision(oldrevid) @@ -285,9 +288,9 @@ # Start executing plan from current Branch.last_revision() rebase(wt.branch.repository, replace_map, replayer) except ConflictsInTree: - raise BzrCommandError("A conflict occurred replaying a commit." + raise BzrCommandError(gettext("A conflict occurred replaying a commit." " Resolve the conflict and run 'bzr rebase-continue' or " - "run 'bzr rebase-abort'.") + "run 'bzr rebase-abort'.")) # Remove plan file state.remove_plan() finally: @@ -318,12 +321,12 @@ try: replace_map = state.read_plan()[1] except NoSuchFile: - raise BzrCommandError("No rebase in progress") + raise BzrCommandError(gettext("No rebase in progress")) currentrevid = state.read_active_revid() if currentrevid is not None: - note("Currently replaying: %s" % currentrevid) + note(gettext("Currently replaying: %s") % currentrevid) for revid in rebase_todo(wt.branch.repository, replace_map): - note("%s -> %s" % (revid, replace_map[revid][0])) + note(gettext("{0} -> {1}").format(revid, replace_map[revid][0])) finally: wt.unlock() @@ -365,10 +368,10 @@ for revno in range(from_revno, to_revno + 1): todo.append(from_branch.get_rev_id(revno)) else: - raise BzrCommandError( - "--revision takes only one or two arguments") + raise BzrCommandError(gettext( + "--revision takes only one or two arguments")) else: - raise BzrCommandError("--revision is mandatory") + raise BzrCommandError(gettext("--revision is mandatory")) wt = WorkingTree.open(directory) wt.lock_write() @@ -378,7 +381,7 @@ pb = ui.ui_factory.nested_progress_bar() try: for revid in todo: - pb.update("replaying commits", todo.index(revid), len(todo)) + pb.update(gettext("replaying commits"), todo.index(revid), len(todo)) wt.branch.repository.fetch(from_branch.repository, revid) newrevid = regenerate_default_revid(wt.branch.repository, revid) replayer(revid, newrevid, [wt.last_revision()]) @@ -456,12 +459,12 @@ stored_loc = branch_to.get_parent() if new_base is None: if stored_loc is None: - raise BzrCommandError("No pull location known or" - " specified.") + raise BzrCommandError(gettext("No pull location known or" + " specified.")) else: display_url = urlutils.unescape_for_display(stored_loc, self.outf.encoding) - self.outf.write("Using saved location: %s\n" % display_url) + self.outf.write(gettext("Using saved location: %s\n") % display_url) new_base = Branch.open(stored_loc) else: new_base = Branch.open(new_base) @@ -495,7 +498,7 @@ branch_to.unlock() if renames == {}: - note("Nothing to do.") + note(gettext("Nothing to do.")) if idmap_file is not None: f = open(idmap_file, 'w') diff -Nru bzr-rewrite-0.6.2+bzr238/debian/bzr-builddeb.conf bzr-rewrite-0.6.2+bzr242/debian/bzr-builddeb.conf --- bzr-rewrite-0.6.2+bzr238/debian/bzr-builddeb.conf 1970-01-01 00:00:00.000000000 +0000 +++ bzr-rewrite-0.6.2+bzr242/debian/bzr-builddeb.conf 2011-08-23 00:09:01.000000000 +0000 @@ -0,0 +1,6 @@ +[BUILDDEB] +upstream-branch = lp:bzr-rewrite +export-upstream-revision = tag:bzr-rewrite-$UPSTREAM_VERSION + +[HOOKS] +merge-upstream = ./debian/update-deps.py diff -Nru bzr-rewrite-0.6.2+bzr238/debian/changelog bzr-rewrite-0.6.2+bzr242/debian/changelog --- bzr-rewrite-0.6.2+bzr238/debian/changelog 2011-09-06 19:08:36.000000000 +0000 +++ bzr-rewrite-0.6.2+bzr242/debian/changelog 2012-02-27 05:21:20.000000000 +0000 @@ -1,3 +1,21 @@ +bzr-rewrite (0.6.2+bzr242-1ubuntu1) precise; urgency=low + + * Sync on Debian (LP: #941763, #935046) + * fix LP: #791041 - Add transitional package (bzr-rebase) to ease the + LTS -> LTS transition; This can be dropped after 12.04; Change bzr-rewrite + Conflicts to Breaks since they're versioned; Add Replaces on bzr-rebase + for bzr-rewrite + - update debian/control + + -- Micah Gersten Sun, 26 Feb 2012 23:19:47 -0600 + +bzr-rewrite (0.6.2+bzr242-1) unstable; urgency=low + + * New upstream snapshot. + + Fixes compatibility with newer versions of bzr. Closes: #660726 + + -- Jelmer Vernooij Tue, 21 Feb 2012 10:42:01 +0100 + bzr-rewrite (0.6.2+bzr238-1) unstable; urgency=low * Re-arrange | condition in build deps to make sbuild happy. diff -Nru bzr-rewrite-0.6.2+bzr238/debian/control bzr-rewrite-0.6.2+bzr242/debian/control --- bzr-rewrite-0.6.2+bzr238/debian/control 2011-09-06 19:05:50.000000000 +0000 +++ bzr-rewrite-0.6.2+bzr242/debian/control 2012-02-27 05:21:43.000000000 +0000 @@ -1,7 +1,8 @@ Source: bzr-rewrite Section: vcs Priority: optional -Maintainer: Debian Bazaar Maintainers +Maintainer: Ubuntu Developers +XSBC-Original-Maintainer: Debian Bazaar Maintainers Uploaders: Jelmer Vernooij Homepage: http://bazaar-vcs.org/Rewrite Build-Depends-Indep: bzr (<< 2.6~), bzr (>= 1.14~) @@ -17,7 +18,8 @@ Package: bzr-rewrite Architecture: all Depends: bzr (<< 2.6~), bzr (>= 1.14~), ${misc:Depends}, ${python:Depends} -Conflicts: bzr-rebase (<< 0.6.0), bzr-svn (<< 0.6.0) +Breaks: bzr-rebase (<< 0.6.0), bzr-svn (<< 0.6.0) +Replaces: bzr-rebase Enhances: bzr Provides: bzr-rebase Description: History rewriting plugin for Bazaar @@ -29,3 +31,12 @@ using the 'rebase-abort' command. . Other commands provided include 'replay' and 'rebase-foreign'. + +Package: bzr-rebase +Architecture: all +Depends: bzr-rewrite, ${misc:Depends} +Description: transitional dummy package for bzr-rewrite + This is a dummy package to ease transition to the new package name, + bzr-rewrite. + . + It can be safely removed from the system. diff -Nru bzr-rewrite-0.6.2+bzr238/__init__.py bzr-rewrite-0.6.2+bzr242/__init__.py --- bzr-rewrite-0.6.2+bzr238/__init__.py 2011-03-02 12:52:54.000000000 +0000 +++ bzr-rewrite-0.6.2+bzr242/__init__.py 2011-12-18 01:08:13.000000000 +0000 @@ -21,16 +21,26 @@ 'rebase-continue' command or abort using the 'rebase-abort' command. """ +from __future__ import absolute_import + import bzrlib import bzrlib.api from bzrlib.commands import plugin_cmds -from info import ( +from bzrlib.plugins.rewrite.info import ( bzr_commands, bzr_plugin_version as version_info, bzr_compatible_versions, ) +try: + from bzrlib.i18n import load_plugin_translations +except ImportError: # No translations for bzr < 2.5 + gettext = lambda x: x +else: + translation = load_plugin_translations("bzr-rewrite") + gettext = translation.ugettext + if version_info[3] == 'final': version_string = '%d.%d.%d' % version_info[:3] else: @@ -41,7 +51,7 @@ bzrlib.api.require_any_api(bzrlib, bzr_compatible_versions) if __name__ == 'bzrlib.plugins.rebase': - raise ImportError("The rebase plugin has been renamed to rewrite. Please rename the directory in ~/.bazaar/plugins") + raise ImportError(gettext("The rebase plugin has been renamed to rewrite. Please rename the directory in ~/.bazaar/plugins")) for cmd in bzr_commands: plugin_cmds.register_lazy("cmd_%s" % cmd, [], diff -Nru bzr-rewrite-0.6.2+bzr238/Makefile bzr-rewrite-0.6.2+bzr242/Makefile --- bzr-rewrite-0.6.2+bzr238/Makefile 2010-07-28 15:08:19.000000000 +0000 +++ bzr-rewrite-0.6.2+bzr242/Makefile 2011-09-27 11:31:51.000000000 +0000 @@ -44,3 +44,20 @@ $(CTAGS) -R . ctags:: tags + +.PHONY: update-pot po/bzr-rewrite.pot +update-pot: po/bzr-rewrite.pot + +TRANSLATABLE_PYFILES:=$(shell find . -name '*.py' \ + | grep -v 'tests/' \ + ) + +po/bzr-rewrite.pot: $(PYFILES) $(DOCFILES) + BZR_PLUGINS_AT=rewrite@$(shell pwd) bzr export-pot \ + --plugin=rewrite > po/bzr-rewrite.pot + echo $(TRANSLATABLE_PYFILES) | xargs \ + xgettext --package-name "bzr-rewrite" \ + --msgid-bugs-address "" \ + --copyright-holder "Jelmer Vernooij " \ + --from-code ISO-8859-1 --sort-by-file --join --add-comments=i18n: \ + -d bzr-rewrite -p po -o bzr-rewrite.pot diff -Nru bzr-rewrite-0.6.2+bzr238/NEWS bzr-rewrite-0.6.2+bzr242/NEWS --- bzr-rewrite-0.6.2+bzr238/NEWS 2011-08-23 00:05:08.000000000 +0000 +++ bzr-rewrite-0.6.2+bzr242/NEWS 2011-10-04 20:56:10.000000000 +0000 @@ -4,6 +4,10 @@ * Mark as compatible with the Bazaar 2.5 API. (Jelmer Vernooij) + FEATURES + + * Internationalization support. (Jonathan Riddell) + 0.6.2 2011-03-02 BUG FIXES diff -Nru bzr-rewrite-0.6.2+bzr238/po/bzr-rewrite.pot bzr-rewrite-0.6.2+bzr242/po/bzr-rewrite.pot --- bzr-rewrite-0.6.2+bzr238/po/bzr-rewrite.pot 1970-01-01 00:00:00.000000000 +0000 +++ bzr-rewrite-0.6.2+bzr242/po/bzr-rewrite.pot 2011-09-27 10:57:22.000000000 +0000 @@ -0,0 +1,234 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) YEAR Jelmer Vernooij +# This file is distributed under the same license as the PACKAGE package. +# FIRST AUTHOR , YEAR. +# +#, fuzzy +msgid "" +msgstr "" +"Project-Id-Version: bzr-rewrite\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2011-09-27 11:57+0100\n" +"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" +"Last-Translator: FULL NAME \n" +"Language-Team: LANGUAGE \n" +"Language: \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=CHARSET\n" +"Content-Transfer-Encoding: 8bit\n" + +#: __init__.py:55 +msgid "" +"The rebase plugin has been renamed to rewrite. Please rename the directory " +"in ~/.bazaar/plugins" +msgstr "" + +#: commands.py:108 +msgid "--revision and --pending-merges are mutually exclusive" +msgstr "" + +#: commands.py:120 +msgid "No upstream branch specified." +msgstr "" + +#: commands.py:121 +#, python-format +msgid "Rebasing on %s" +msgstr "" + +#: commands.py:127 +msgid "" +"A rebase operation was interrupted. Continue using 'bzr rebase-continue' or " +"abort using 'bzr rebase-abort'" +msgstr "" + +#: commands.py:144 commands.py:372 +msgid "--revision takes only one or two arguments" +msgstr "" + +#: commands.py:149 +msgid "No pending merges present." +msgstr "" + +#: commands.py:152 +msgid "Rebasing more than one pending merge not supported" +msgstr "" + +#: commands.py:178 +msgid "No revisions to rebase.\n" +msgstr "" + +#: commands.py:181 +msgid "Base branch is descendant of current branch. Pulling instead.\n" +msgstr "" + +#: commands.py:200 +#, python-format +msgid "%d revisions will be rebased:" +msgstr "" + +#: commands.py:214 commands.py:291 +msgid "" +"A conflict occurred replaying a commit. Resolve the conflict and run 'bzr " +"rebase-continue' or run 'bzr rebase-abort'." +msgstr "" + +#: commands.py:275 +msgid "" +"There are still conflicts present. Resolve the conflicts and then run 'bzr " +"resolve' and try again." +msgstr "" + +#: commands.py:282 +msgid "No rebase to continue" +msgstr "" + +#: commands.py:324 +msgid "No rebase in progress" +msgstr "" + +#: commands.py:327 +#, python-format +msgid "Currently replaying: %s" +msgstr "" + +#: commands.py:329 +msgid "{0} -> {1}" +msgstr "" + +#: commands.py:374 +msgid "--revision is mandatory" +msgstr "" + +#: commands.py:384 +msgid "replaying commits" +msgstr "" + +#: commands.py:462 +msgid "No pull location known or specified." +msgstr "" + +#: commands.py:467 +#, python-format +msgid "Using saved location: %s\n" +msgstr "" + +#: commands.py:501 +msgid "Nothing to do." +msgstr "" + +#: commands.py:41 +msgid "Re-base a branch." +msgstr "" + +#: commands.py:43 +msgid "" +"Rebasing is the process of taking a branch and modifying the history so\n" +"that it appears to start from a different point. This can be useful\n" +"to clean up the history before submitting your changes. The tree at the\n" +"end of the process will be the same as if you had merged the other branch,\n" +"but the history will be different." +msgstr "" + +#: commands.py:49 +msgid "" +"The command takes the location of another branch on to which the branch in\n" +"the specified directory (by default, the current working directory) \n" +"will be rebased. If a branch is not specified then the parent branch \n" +"is used, and this is usually the desired result." +msgstr "" + +#: commands.py:54 +msgid "" +"The first step identifies the revisions that are in the current branch that\n" +"are not in the parent branch. The current branch is then set to be at the\n" +"same revision as the target branch, and each revision is replayed on top\n" +"of the branch. At the end of the process it will appear as though your\n" +"current branch was branched off the current last revision of the target." +msgstr "" + +#: commands.py:60 +msgid "" +"Each revision that is replayed may cause conflicts in the tree. If this\n" +"happens the command will stop and allow you to fix them up. Resolve the\n" +"commits as you would for a merge, and then run 'bzr resolve' to marked\n" +"them as resolved. Once you have resolved all the conflicts you should\n" +"run 'bzr rebase-continue' to continue the rebase operation." +msgstr "" + +#: commands.py:66 +msgid "" +"If conflicts are encountered and you decide that you do not wish to " +"continue\n" +"you can run 'bzr rebase-abort'." +msgstr "" + +#: commands.py:69 +msgid "" +"The '--onto' option allows you to specify a different revision in the\n" +"target branch to start at when replaying the revisions. This means that\n" +"you can change the point at which the current branch will appear to be\n" +"branched from when the operation completes." +msgstr "" + +# help of 'dry-run' option of 'rebase' command +#: commands.py:77 +msgid "Show what would be done, but don't actually do anything." +msgstr "" + +# help of 'always-rebase-merges' option of 'rebase' command +#: commands.py:79 +msgid "Don't skip revisions that merge already present revisions." +msgstr "" + +# help of 'pending-merges' option of 'rebase' command +#: commands.py:81 +msgid "Rebase pending merges onto local branch." +msgstr "" + +# help of 'onto' option of 'rebase' command +#: commands.py:82 +msgid "Different revision to replay onto." +msgstr "" + +#: commands.py:224 +msgid "Abort an interrupted rebase." +msgstr "" + +#: commands.py:254 +msgid "Continue an interrupted rebase after resolving conflicts." +msgstr "" + +#: commands.py:301 +msgid "" +"Print list of revisions that still need to be replayed as part of the\n" +"current rebase operation." +msgstr "" + +#: commands.py:415 +msgid "" +"Rebase revisions based on a branch created with a different import tool." +msgstr "" + +#: commands.py:417 +msgid "" +"This will change the identity of revisions whose parents\n" +"were mapped from revisions in the other version control system." +msgstr "" + +#: commands.py:420 +msgid "" +"You are recommended to run \"bzr check\" in the local repository\n" +"after running this command." +msgstr "" + +# help of 'idmap-file' option of 'rebase-foreign' command +#: commands.py:425 +msgid "Write map with old and new revision ids." +msgstr "" + +# help of 'directory' option of 'rebase' command +#: commands.py:429 +msgid "" +"Branch to replay onto, rather than the one containing the working directory." +msgstr "" diff -Nru bzr-rewrite-0.6.2+bzr238/rebase.py bzr-rewrite-0.6.2+bzr242/rebase.py --- bzr-rewrite-0.6.2+bzr238/rebase.py 2011-08-31 11:47:24.000000000 +0000 +++ bzr-rewrite-0.6.2+bzr242/rebase.py 2012-01-19 13:27:32.000000000 +0000 @@ -19,9 +19,10 @@ import os from bzrlib import ( + config as _mod_config, osutils, + version_info as bzrlib_version, ) -from bzrlib.config import Config from bzrlib.errors import ( BzrError, NoSuchFile, @@ -455,10 +456,15 @@ revprops = dict(oldrev.properties) revprops[REVPROP_REBASE_OF] = oldrevid + if bzrlib_version >= (2, 5): + kwargs = {"config_stack": _mod_config.GlobalStack()} + else: + kwargs = {"config": _mod_config.Config()} + builder = self.repository.get_commit_builder(branch=None, - parents=new_parents, config=Config(), committer=oldrev.committer, + parents=new_parents, committer=oldrev.committer, timestamp=oldrev.timestamp, timezone=oldrev.timezone, - revprops=revprops, revision_id=newrevid) + revprops=revprops, revision_id=newrevid, **kwargs) try: # Check what new_ie.file_id should be # use old and new parent inventories to generate new_id map diff -Nru bzr-rewrite-0.6.2+bzr238/setup.py bzr-rewrite-0.6.2+bzr242/setup.py --- bzr-rewrite-0.6.2+bzr238/setup.py 2010-03-27 15:38:21.000000000 +0000 +++ bzr-rewrite-0.6.2+bzr242/setup.py 2011-10-04 20:56:10.000000000 +0000 @@ -2,6 +2,15 @@ from info import * +command_classes = {} +try: + from bzrlib.bzr_distutils import build_mo +except ImportError: + pass +else: + command_classes['build_mo'] = build_mo + + if __name__ == '__main__': from distutils.core import setup @@ -20,5 +29,6 @@ Hooks into Bazaar and provides commands for rebasing. """, package_dir={'bzrlib.plugins.rewrite':'.'}, - packages=['bzrlib.plugins.rewrite', 'bzrlib.plugins.rewrite.tests'] + packages=['bzrlib.plugins.rewrite', 'bzrlib.plugins.rewrite.tests'], + cmdclass=command_classes, )