[Pkg-bazaar-commits] ./bzr-loom/unstable r89: New upstream snapshot.
Jelmer Vernooij
jelmer at samba.org
Wed Dec 10 08:33:12 UTC 2008
------------------------------------------------------------
revno: 89
committer: Jelmer Vernooij <jelmer at samba.org>
branch nick: unstable
timestamp: Fri 2008-11-07 16:12:02 +0100
message:
New upstream snapshot.
modified:
CONTRIBUTORS
NEWS
commands.py
debian/changelog
tests/blackbox.py
------------------------------------------------------------
revno: 83.1.1
committer: Jonathan Lange <jml at canonical.com>
branch nick: switch-aliases
timestamp: Wed 2008-07-16 18:56:27 +1000
message:
Make 'switch top:' and 'switch bottom:' switch to the top and bottom
threads respectively.
modified:
commands.py
tests/blackbox.py
------------------------------------------------------------
revno: 84.1.1
committer: Robert Collins <robertc at robertcollins.net>
branch nick: trunk
timestamp: Thu 2008-07-17 19:36:54 +1000
message:
``bzr switch`` now accepts ``top:`` and ``bottom:`` to jump to the top and bottom thread respectively. (Jonathan Lange)
modified:
NEWS
commands.py
tests/blackbox.py
------------------------------------------------------------
revno: 84.1.2
committer: Jonathan Lange <jml at canonical.com>
branch nick: trunk
timestamp: Fri 2008-07-25 15:24:06 +1000
message:
Inclue 'status' improvement in the NEWS file.
modified:
NEWS
------------------------------------------------------------
revno: 84.1.3
committer: Jonathan Lange <jml at canonical.com>
branch nick: trunk
timestamp: Fri 2008-09-12 11:46:18 +1000
message:
Add myself to contributors.
modified:
CONTRIBUTORS
------------------------------------------------------------
revno: 84.2.1
committer: Jonathan Lange <jml at canonical.com>
branch nick: jml-contributed
timestamp: Fri 2008-09-12 11:44:34 +1000
message:
Add myself to contributors.
modified:
CONTRIBUTORS
-------------- next part --------------
=== modified file 'CONTRIBUTORS'
--- a/CONTRIBUTORS 2008-02-28 11:15:18 +0000
+++ b/CONTRIBUTORS 2008-09-12 01:44:34 +0000
@@ -2,3 +2,4 @@
Scott James Remnant <scott at canonical.com>
Aaron Bentley <aaron.bentley at canonical.com>
Rob Weir <rweir at ertius.org>
+Jonathan Lange <jml at mumak.net>
=== modified file 'NEWS'
--- a/NEWS 2008-04-10 00:38:37 +0000
+++ b/NEWS 2008-07-25 05:24:06 +0000
@@ -15,6 +15,12 @@
IMPROVEMENTS:
+ * ``bzr status`` now shows the current thread of the loom. (Jonathan
+ Lange, #232465)
+
+ * ``bzr switch`` now accepts ``top:`` and ``bottom:`` to jump to the top
+ and bottom thread respectively. (Jonathan Lange)
+
* ``bzr push`` now pushes the last-loom rather than creating an empty loom.
(Robert Collins, #201613)
=== modified file 'commands.py'
--- a/commands.py 2008-06-12 02:32:13 +0000
+++ b/commands.py 2008-07-17 09:36:54 +0000
@@ -194,11 +194,26 @@
_original_command = None
+ def _get_thread_name(self, loom, to_location):
+ """Return the name of the thread pointed to by 'to_location'.
+
+ Most of the time this will be the name of the thread, but if
+ 'to_location' is 'bottom:' it will be the name of the bottom thread.
+ If 'to_location' is 'top:', then it'll be the name of the top thread.
+ """
+ aliases = {'bottom:': 0, 'top:': -1}
+ if to_location in aliases:
+ threads = loom.get_loom_state().get_threads()
+ thread = threads[aliases[to_location]]
+ return thread[0]
+ return to_location
+
def run(self, to_location, force=False):
(tree, path) = workingtree.WorkingTree.open_containing('.')
tree = LoomTreeDecorator(tree)
try:
- return tree.down_thread(to_location)
+ thread_name = self._get_thread_name(tree.branch, to_location)
+ return tree.down_thread(thread_name)
except (AttributeError, branch.NoSuchThread):
# When there is no thread its probably an external branch
# that we have been given.
=== modified file 'debian/changelog'
--- a/debian/changelog 2008-06-14 16:38:32 +0000
+++ b/debian/changelog 2008-11-07 15:12:02 +0000
@@ -1,3 +1,9 @@
+bzr-loom (1.4.0~bzr87-1) unstable; urgency=low
+
+ * New upstream snapshot.
+
+ -- Jelmer Vernooij <jelmer at samba.org> Fri, 07 Nov 2008 16:11:37 +0100
+
bzr-loom (1.4.0~bzr84-1) unstable; urgency=low
* Initial release. (Closes: #486242)
=== modified file 'tests/blackbox.py'
--- a/tests/blackbox.py 2008-06-12 02:32:13 +0000
+++ b/tests/blackbox.py 2008-07-17 09:36:54 +0000
@@ -240,6 +240,31 @@
err)
self.assertEqual([rev_id], tree.get_parent_ids())
+ def test_switch_bottom(self):
+ # 'bzr switch bottom:' switches to the bottom thread.
+ tree = self.get_vendor_loom()
+ self._add_patch(tree, 'thread1')
+ self._add_patch(tree, 'thread2')
+ self.assertEqual(tree.branch.nick, 'thread2')
+ out, err = self.run_bzr(['switch', 'bottom:'], retcode=0)
+ self.assertEqual('', out)
+ self.assertEqual(
+ "All changes applied successfully.\nMoved to thread 'vendor'.\n",
+ err)
+
+ def test_switch_top(self):
+ # 'bzr switch top:' switches to the top thread.
+ tree = self.get_vendor_loom()
+ self._add_patch(tree, 'thread1')
+ self._add_patch(tree, 'thread2')
+ LoomTreeDecorator(tree).down_thread('vendor')
+ self.assertEqual(tree.branch.nick, 'vendor')
+ out, err = self.run_bzr(['switch', 'top:'], retcode=0)
+ self.assertEqual('', out)
+ self.assertEqual(
+ "All changes applied successfully.\nMoved to thread 'thread2'.\n",
+ err)
+
class TestRecord(TestsWithLooms):
More information about the Pkg-bazaar-commits
mailing list