Rev 4185: (vila) Allows bzr log <FILE> in empty branches in file:///home/pqm/archives/thelove/bzr/%2Btrunk/

Canonical.com Patch Queue Manager pqm at pqm.ubuntu.com
Mon Mar 23 15:52:23 GMT 2009


At file:///home/pqm/archives/thelove/bzr/%2Btrunk/

------------------------------------------------------------
revno: 4185
revision-id: pqm at pqm.ubuntu.com-20090323155219-0l18zejux7xtlqq9
parent: pqm at pqm.ubuntu.com-20090323113212-g753gcfm1e3u3n0k
parent: v.ladeuil+lp at free.fr-20090323145522-4q589a1hm0xza1mb
committer: Canonical.com Patch Queue Manager <pqm at pqm.ubuntu.com>
branch nick: +trunk
timestamp: Mon 2009-03-23 15:52:19 +0000
message:
  (vila) Allows bzr log <FILE> in empty branches
modified:
  NEWS                           NEWS-20050323055033-4e00b5db738777ff
  bzrlib/log.py                  log.py-20050505065812-c40ce11702fe5fb1
  bzrlib/tests/test_log.py       testlog.py-20050728115707-1a514809d7d49309
    ------------------------------------------------------------
    revno: 4184.1.2
    revision-id: v.ladeuil+lp at free.fr-20090323145522-4q589a1hm0xza1mb
    parent: v.ladeuil+lp at free.fr-20090323144826-9q4k10wq1dc3u9u6
    parent: v.ladeuil+lp at free.fr-20090323145146-ereu04up70b4kssz
    committer: Vincent Ladeuil <v.ladeuil+lp at free.fr>
    branch nick: integration
    timestamp: Mon 2009-03-23 15:55:22 +0100
    message:
      Allows bzr log <FILE> in empty branches
    modified:
      NEWS                           NEWS-20050323055033-4e00b5db738777ff
      bzrlib/log.py                  log.py-20050505065812-c40ce11702fe5fb1
      bzrlib/tests/test_log.py       testlog.py-20050728115707-1a514809d7d49309
        ------------------------------------------------------------
        revno: 4183.3.2
        revision-id: v.ladeuil+lp at free.fr-20090323145146-ereu04up70b4kssz
        parent: v.ladeuil+lp at free.fr-20090323100600-jhgg8eiz4afcsi1l
        committer: Vincent Ladeuil <v.ladeuil+lp at free.fr>
        branch nick: 346431-log-unversioned-file
        timestamp: Mon 2009-03-23 15:51:46 +0100
        message:
          Add NEWS entry
        modified:
          NEWS                           NEWS-20050323055033-4e00b5db738777ff
        ------------------------------------------------------------
        revno: 4183.3.1
        revision-id: v.ladeuil+lp at free.fr-20090323100600-jhgg8eiz4afcsi1l
        parent: pqm at pqm.ubuntu.com-20090323043327-txb4jri5i3gssuj5
        committer: Vincent Ladeuil <v.ladeuil+lp at free.fr>
        branch nick: 346431-log-unversioned-file
        timestamp: Mon 2009-03-23 11:06:00 +0100
        message:
          Fix bug #346431 by allowing log._filter_revisions_touching_file_id to be
          called on an empty branch.
          
          * bzrlib/tests/test_log.py:
          (TestGetRevisionsTouchingFileID.test_empty_branch_unknown_file_id):
          Reproduce bug #346431 by trying to log an unknown file in an empty
          branch.
          
          * bzrlib/log.py:
          (_filter_revisions_touching_file_id): Initialize next_keys so we
          can 'del' it later.
        modified:
          bzrlib/log.py                  log.py-20050505065812-c40ce11702fe5fb1
          bzrlib/tests/test_log.py       testlog.py-20050728115707-1a514809d7d49309
    ------------------------------------------------------------
    revno: 4184.1.1
    revision-id: v.ladeuil+lp at free.fr-20090323144826-9q4k10wq1dc3u9u6
    parent: pqm at pqm.ubuntu.com-20090323113212-g753gcfm1e3u3n0k
    committer: Vincent Ladeuil <v.ladeuil+lp at free.fr>
    branch nick: integration
    timestamp: Mon 2009-03-23 15:48:26 +0100
    message:
      (vila) Add NEWS entry about bug #345593.
    modified:
      NEWS                           NEWS-20050323055033-4e00b5db738777ff
=== modified file 'NEWS'
--- a/NEWS	2009-03-23 03:07:13 +0000
+++ b/NEWS	2009-03-23 14:55:22 +0000
@@ -97,6 +97,9 @@
 
 * ``merge --force`` works again. (Robert Collins, #342105)
 
+* No more warnings are issued about ``sha`` being deprecated under python-2.6.
+  (Vincent Ladeuil, #345593)
+
 * Pushing a new branch to a server that has a stacking policy will now
   upgrade from the local branch format when the stacking policy points at
   a branch which is itself stackable, because we know the client can read
@@ -315,6 +318,9 @@
 Bug Fixes
 *********
 
+* Allows ``bzr log <FILE>`` to be called in an empty branch without
+  backtracing. (Vincent Ladeuil, #346431)
+
 * Bazaar now gives a better message including the filename if it's
   unable to read a file in the working directory, for example because
   of a permission error.  (Martin Pool, #338653)

=== modified file 'bzrlib/log.py'
--- a/bzrlib/log.py	2009-03-13 00:13:11 +0000
+++ b/bzrlib/log.py	2009-03-23 10:06:00 +0000
@@ -954,6 +954,7 @@
     # Lookup all possible text keys to determine which ones actually modified
     # the file.
     text_keys = [(file_id, rev_id) for rev_id, revno, depth in view_revisions]
+    next_keys = None
     # Looking up keys in batches of 1000 can cut the time in half, as well as
     # memory consumption. GraphIndex *does* like to look for a few keys in
     # parallel, it just doesn't like looking for *lots* of keys in parallel.

=== modified file 'bzrlib/tests/test_log.py'
--- a/bzrlib/tests/test_log.py	2009-02-27 15:14:34 +0000
+++ b/bzrlib/tests/test_log.py	2009-03-23 10:06:00 +0000
@@ -1499,6 +1499,14 @@
         self.assertAllRevisionsForFileID(tree, 'f1-id', ['XX', 'B', 'A'])
         self.assertAllRevisionsForFileID(tree, 'f2-id', ['D', 'C', 'A'])
 
+    def test_unknown_file_id(self):
+        tree = self.create_tree_with_single_merge()
+        self.assertAllRevisionsForFileID(tree, 'unknown', [])
+
+    def test_empty_branch_unknown_file_id(self):
+        tree = self.make_branch_and_tree('tree')
+        self.assertAllRevisionsForFileID(tree, 'unknown', [])
+
 
 class TestShowChangedRevisions(tests.TestCaseWithTransport):
 




More information about the bazaar-commits mailing list