[Pkg-bazaar-commits] ./bzr-loom/unstable r102: * New upstream snapshot.

Jelmer Vernooij jelmer at samba.org
Fri Jun 26 23:43:23 UTC 2009


------------------------------------------------------------
revno: 102
committer: Jelmer Vernooij <jelmer at samba.org>
branch nick: unstable
timestamp: Sat 2009-06-27 01:43:23 +0200
message:
  * New upstream snapshot.
   + Fixes compatibility with recent versions of bzr. (Closes: #532947)
  * Bump standards version to 3.8.2.
modified:
  NEWS
  TODO
  branch.py
  debian/changelog
  debian/control
  tests/blackbox.py
  tree.py
    ------------------------------------------------------------
    revno: 84.7.1
    committer: Mark Lee <bzr at lazymalevolence.com>
    branch nick: bzr-loom
    timestamp: Fri 2009-05-22 01:53:44 -0700
    message:
      Make setup.py runnable again (fixed typo).
    modified:
      setup.py
    ------------------------------------------------------------
    revno: 84.7.2
    committer: Mark Lee <bzr at lazymalevolence.com>
    branch nick: bzr-loom
    timestamp: Fri 2009-05-22 02:06:18 -0700
    message:
      Make bzr-loom compatible with bzr-1.15.
    modified:
      branch.py
    ------------------------------------------------------------
    revno: 84.4.10
    committer: Robert Collins <robertc at robertcollins.net>
    branch nick: trunk
    timestamp: Thu 2009-06-18 13:14:14 +1000
    message:
      Merge bugfixes for 379347, 379069, and also fix support for bzr 1.16 at the same time.
    modified:
      NEWS
      branch.py
      setup.py
    ------------------------------------------------------------
    revno: 84.4.11
    committer: Robert Collins <robertc at robertcollins.net>
    branch nick: trunk
    timestamp: Thu 2009-06-18 16:28:18 +1000
    message:
      Merge James Westby's patch for bug 195133.
    modified:
      NEWS
      TODO
      tests/blackbox.py
      tree.py
        ------------------------------------------------------------
        revno: 73.3.1
        committer: James Westby <jw+debian at jameswestby.net>
        branch nick: loom.jw
        timestamp: Sun 2008-02-24 23:00:29 +0000
        message:
          Print a message to the user when doing an up-thread leaves an empty thread.
          
          When the user does an up thread and the resulting merge leaves a tree
          with no conflicts and a tree that does not differ from the one that
          it just came from it means that the thread it has just moved to
          is "empty". This can indicate that the change that was being developed in
          the thread has been fully merged upstream, and so the user may wish to
          combine the thread. We just print a message at this stage so that the
          user is aware of this. We may want to add an option to automatically
          combine the thread later.
        modified:
          tests/blackbox.py
          tree.py
-------------- next part --------------
=== modified file 'NEWS'
--- a/NEWS	2008-11-19 07:18:17 +0000
+++ b/NEWS	2009-06-18 06:28:18 +0000
@@ -27,8 +27,18 @@
     * ``up`` and ``down`` are now aliases for ``up-thread`` and
       ``down-thread`` respectively.
 
+    * ``up-thread`` now notifies when a thread becomes empty. This is a step
+      towards removing it automatically/prompting to do so.
+      (James Westby, #195133)
+
   BUGFIXES:
 
+    * ``pull`` expects the keywork local. (Mark Lee, #379347)
+
+    * ``setup.py`` doesn't actually install. (Mark Lee, #379069)
+
+    * module has no attribute ``PushResult``. (Robert Collins)
+
   API BREAKS:
 
   TESTING:

=== modified file 'TODO'
--- a/TODO	2008-01-20 07:34:29 +0000
+++ b/TODO	2009-06-18 06:28:18 +0000
@@ -95,7 +95,7 @@
   TODO either means changing 'diff's defaults, adding a flag to diff, or using
   a different revspec prefix; or something like that.)
 - export-patch to export the diff from this thread to the lower thread (using -ancestry logic) to a file named as the warp is named. (what about / ?)
-- during up-thread, if we could pull or if there is no diff, then the thread has been merged, offer to remove it.
+- during up-thread, if we could pull or if there is no diff, then the thread has been merged, offer to remove it. (Currently suggests to remove it).
 - loom to have the same 'tree root id' as its branches, to allow nested looms by reference. EEK!.
 - show-loom to allow -r -1.
 - combine-thread to warn if the thread being combined has changes not present in the one below it. I.e. by ancestry, or by doing a merge and recording differences. For bonus points, do the merge, but record the lower thread as the last-revision in the tree still, and set no pending-merges. This preserves the difference whilst still combining the threads.

=== modified file 'branch.py'
--- a/branch.py	2009-04-15 20:04:03 +0000
+++ b/branch.py	2009-06-18 03:14:14 +0000
@@ -437,7 +437,8 @@
 
     @needs_write_lock
     def pull(self, source, overwrite=False, stop_revision=None,
-        run_hooks=True, possible_transports=None, _override_hook_target=None):
+        run_hooks=True, possible_transports=None, _override_hook_target=None,
+        local=False):
         """Pull from a branch into this loom.
 
         If the remote branch is a non-loom branch, the pull is done against the
@@ -743,7 +744,7 @@
 
     @staticmethod
     def make_result():
-        return bzrlib.branch.PushResult()
+        return bzrlib.branch.BranchPushResult()
 
     @staticmethod
     def post_hooks():

=== modified file 'debian/changelog'
--- a/debian/changelog	2009-05-05 15:31:03 +0000
+++ b/debian/changelog	2009-06-26 23:43:23 +0000
@@ -1,3 +1,11 @@
+bzr-loom (1.4.0~bzr97-1) unstable; urgency=low
+
+  * New upstream snapshot.
+   + Fixes compatibility with recent versions of bzr. (Closes: #532947)
+  * Bump standards version to 3.8.2.
+
+ -- Jelmer Vernooij <jelmer at debian.org>  Sat, 27 Jun 2009 01:36:16 +0200
+
 bzr-loom (1.4.0~bzr95-1) unstable; urgency=low
 
   * Move to section vcs.

=== modified file 'debian/control'
--- a/debian/control	2009-03-19 17:13:41 +0000
+++ b/debian/control	2009-06-26 23:43:23 +0000
@@ -6,9 +6,9 @@
 Homepage: https://launchpad.net/bzr-loom
 Build-Depends-Indep: bzr (>= 1.6)
 Build-Depends: python-central (>= 0.5), cdbs (>= 0.4.43), debhelper (>= 5.0.37.2), python-dev
-Standards-Version: 3.8.1
+Standards-Version: 3.8.2
 XS-Python-Version: >= 2.4
-Vcs-Bzr: http://bzr.debian.org/pkg-bazaar/bzr-loom/experimental
+Vcs-Bzr: http://bzr.debian.org/pkg-bazaar/bzr-loom/unstable
 
 Package: bzr-loom
 Architecture: all

=== modified file 'tests/blackbox.py'
--- a/tests/blackbox.py	2008-10-02 01:24:28 +0000
+++ b/tests/blackbox.py	2009-06-18 06:28:18 +0000
@@ -431,7 +431,9 @@
         self.assertEqual('', out)
         self.assertEqual(
             "All changes applied successfully.\n"
-            "Moved to thread 'patch'.\n", err)
+            "Moved to thread 'patch'.\n"
+            'This thread is now empty, you may wish to run "bzr '
+            'combine-thread" to remove it.\n', err)
         self.assertEqual('patch', tree.branch.nick)
         # the tree needs to be updated.
         self.assertEqual(patch_rev, tree.last_revision())
@@ -491,6 +493,55 @@
         branch = _mod_branch.Branch.open('.')
         self.assertEqual('top', branch.nick)
 
+    def test_up_with_clean_merge_leaving_thread_empty(self):
+        """This tests what happens when a thread becomes empty.
+        
+        A thread becomes empty when all its changes are included in
+        a lower thread, and so its diff to the thread below contains
+        nothing.
+        
+        The user should be warned when this happens.
+        """
+        tree = self.get_vendor_loom()
+        self.build_tree(['afile'])
+        tree.add('afile')
+        patch_rev = tree.commit('add afile in base')
+        tree.branch.new_thread('patch')
+        tree.branch.nick = 'patch'
+        # make a change to afile in patch.
+        f = open('afile', 'wb')
+        try:
+            f.write('new contents of afile\n')
+        finally:
+            f.close()
+        patch_rev = tree.commit('make a change to afile')
+        # make the same change in vendor.
+        self.run_bzr(['down-thread'])
+        f = open('afile', 'wb')
+        try:
+            f.write('new contents of afile\n')
+        finally:
+            f.close()
+        vendor_release = tree.commit('make the same change to afile')
+        # check that the trees no longer differ after the up merge,
+        # and that we are 
+        out, err = self.run_bzr(['up-thread'])
+        self.assertEqual('', out)
+        self.assertEqual("All changes applied successfully.\n"
+            "Moved to thread 'patch'.\n"
+            'This thread is now empty, you may wish to run "bzr '
+            'combine-thread" to remove it.\n', err)
+        self.assertEqual('patch', tree.branch.nick)
+        # the tree needs to be updated.
+        self.assertEqual(patch_rev, tree.last_revision())
+        # the branch needs to be updated.
+        self.assertEqual(patch_rev, tree.branch.last_revision())
+        self.assertTrue(tree.has_filename('afile'))
+        # diff should return 0 now as we have no uncommitted changes.
+        self.run_bzr(['diff'])
+        self.assertEqual([patch_rev, vendor_release], tree.get_parent_ids())
+
+
 
 class TestPush(TestsWithLooms):
 

=== modified file 'tree.py'
--- a/tree.py	2008-10-02 01:24:28 +0000
+++ b/tree.py	2009-06-18 06:28:18 +0000
@@ -128,6 +128,11 @@
         # update the branch nick.
         self.tree.branch.nick = new_thread_name
         bzrlib.trace.note("Moved to thread '%s'." % new_thread_name)
+        if (basis_tree is not None and 
+            not result and not
+            self.tree.changes_from(basis_tree).has_changed()):
+            bzrlib.trace.info("This thread is now empty, you may wish to "
+                'run "bzr combine-thread" to remove it.')
         if result != 0:
             return 1
         else:



More information about the Pkg-bazaar-commits mailing list