Rev 5594: (spiv) Fix -Drelock warnings in cmd_modified. (Andrew Bennetts) in file:///home/pqm/archives/thelove/bzr/%2Btrunk/

Canonical.com Patch Queue Manager pqm at pqm.ubuntu.com
Tue Jan 11 20:10:37 UTC 2011


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

------------------------------------------------------------
revno: 5594 [merge]
revision-id: pqm at pqm.ubuntu.com-20110111201031-0i87t0t3kyhitwv4
parent: pqm at pqm.ubuntu.com-20110111191129-qxzw738fmkm0run9
parent: andrew.bennetts at canonical.com-20110111162100-gt8wakw2cvx3r7ig
committer: Canonical.com Patch Queue Manager <pqm at pqm.ubuntu.com>
branch nick: +trunk
timestamp: Tue 2011-01-11 20:10:31 +0000
message:
  (spiv) Fix -Drelock warnings in cmd_modified. (Andrew Bennetts)
modified:
  bzrlib/builtins.py             builtins.py-20050830033751-fc01482b9ca23183
  doc/en/release-notes/bzr-2.3.txt NEWS-20050323055033-4e00b5db738777ff
=== modified file 'bzrlib/builtins.py'
--- a/bzrlib/builtins.py	2011-01-10 21:49:51 +0000
+++ b/bzrlib/builtins.py	2011-01-11 16:21:00 +0000
@@ -2050,7 +2050,9 @@
     @display_command
     def run(self, null=False, directory=u'.'):
         tree = WorkingTree.open_containing(directory)[0]
+        self.add_cleanup(tree.lock_read().unlock)
         td = tree.changes_from(tree.basis_tree())
+        self.cleanup_now()
         for path, id, kind, text_modified, meta_modified in td.modified:
             if null:
                 self.outf.write(path + '\0')

=== modified file 'doc/en/release-notes/bzr-2.3.txt'
--- a/doc/en/release-notes/bzr-2.3.txt	2011-01-11 18:36:50 +0000
+++ b/doc/en/release-notes/bzr-2.3.txt	2011-01-11 20:10:31 +0000
@@ -35,6 +35,9 @@
   once.  This avoids some unnecessary IO, and removes a network roundtrip
   when doing ``bzr branch`` to a smart server URL.  (Andrew Bennetts)
 
+* ``bzr modified`` now read-locks the working tree (and branch and
+  repository) just once.  (Andrew Bennetts)
+  
 * ``bzr resolve`` now accepts ``--take-this`` and ``--take-other`` actions
   for text conflicts. This *replace* the whole file with the content
   designated by the action. This will *ignore* all differences that would




More information about the bazaar-commits mailing list