Rev 3204: Remove unnecessary decorators from add_inventory and add_revision in file:///home/pqm/archives/thelove/bzr/%2Btrunk/

Canonical.com Patch Queue Manager pqm at pqm.ubuntu.com
Tue Jan 29 04:58:50 GMT 2008


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

------------------------------------------------------------
revno: 3204
revision-id:pqm at pqm.ubuntu.com-20080129045844-u41ywp910i6jv8bz
parent: pqm at pqm.ubuntu.com-20080129012127-1xxr6h8khunihsdx
parent: mbp at sourcefrog.net-20080129032252-ub1r7pug3agdts61
committer: Canonical.com Patch Queue Manager <pqm at pqm.ubuntu.com>
branch nick: +trunk
timestamp: Tue 2008-01-29 04:58:44 +0000
message:
  Remove unnecessary decorators from add_inventory and add_revision
modified:
  NEWS                           NEWS-20050323055033-4e00b5db738777ff
  bzrlib/remote.py               remote.py-20060720103555-yeeg2x51vn0rbtdp-1
  bzrlib/repository.py           rev_storage.py-20051111201905-119e9401e46257e3
    ------------------------------------------------------------
    revno: 3203.1.1
    revision-id:mbp at sourcefrog.net-20080129032252-ub1r7pug3agdts61
    parent: pqm at pqm.ubuntu.com-20080129012127-1xxr6h8khunihsdx
    parent: mbp at sourcefrog.net-20071026103103-wc6bbhubtbjcby9n
    committer: Martin Pool <mbp at sourcefrog.net>
    branch nick: cleanup_locks
    timestamp: Tue 2008-01-29 14:22:52 +1100
    message:
      Remove unnecessary decorators from add_inventory and add_revision
    modified:
      NEWS                           NEWS-20050323055033-4e00b5db738777ff
      bzrlib/remote.py               remote.py-20060720103555-yeeg2x51vn0rbtdp-1
      bzrlib/repository.py           rev_storage.py-20051111201905-119e9401e46257e3
    ------------------------------------------------------------
    revno: 2940.4.1
    revision-id:mbp at sourcefrog.net-20071026103103-wc6bbhubtbjcby9n
    parent: pqm at pqm.ubuntu.com-20071025022746-ftudwmzir8v2lccc
    committer: mbp at sourcefrog.net
    branch nick: cleanup
    timestamp: Fri 2007-10-26 06:31:03 -0400
    message:
      Remove write lock decorators from add_inventory and add_revision
    modified:
      NEWS                           NEWS-20050323055033-4e00b5db738777ff
      bzrlib/remote.py               remote.py-20060720103555-yeeg2x51vn0rbtdp-1
      bzrlib/repository.py           rev_storage.py-20051111201905-119e9401e46257e3
=== modified file 'NEWS'
--- a/NEWS	2008-01-28 22:13:31 +0000
+++ b/NEWS	2008-01-29 03:22:52 +0000
@@ -68,6 +68,10 @@
     * Classes implementing Merge types like Merge3Merger must now accept (and
       honour) a do_merge flag in their constructor.  (Aaron Bentley)
 
+    * ``Repository.add_inventory`` and ``add_revision`` now require the caller
+      to previously take a write lock (and start a write group.)
+      (Martin Pool)
+
   TESTING:
 
    * selftest now accepts --load-list <file> to load a test id list. This

=== modified file 'bzrlib/remote.py'
--- a/bzrlib/remote.py	2008-01-18 04:07:13 +0000
+++ b/bzrlib/remote.py	2008-01-29 03:22:52 +0000
@@ -649,12 +649,10 @@
                 committer=committer, revprops=revprops, revision_id=revision_id)
         return builder
 
-    @needs_write_lock
     def add_inventory(self, revid, inv, parents):
         self._ensure_real()
         return self._real_repository.add_inventory(revid, inv, parents)
 
-    @needs_write_lock
     def add_revision(self, rev_id, rev, inv=None, config=None):
         self._ensure_real()
         return self._real_repository.add_revision(

=== modified file 'bzrlib/repository.py'
--- a/bzrlib/repository.py	2008-01-17 05:30:53 +0000
+++ b/bzrlib/repository.py	2008-01-29 03:22:52 +0000
@@ -495,7 +495,6 @@
         attempted.
         """
 
-    @needs_write_lock
     def add_inventory(self, revision_id, inv, parents):
         """Add the inventory inv to the repository as revision_id.
         
@@ -526,7 +525,6 @@
         return inv_vf.add_lines(revision_id, final_parents, lines,
             check_content=check_content)[0]
 
-    @needs_write_lock
     def add_revision(self, revision_id, rev, inv=None, config=None):
         """Add rev to the revision store as revision_id.
 




More information about the bazaar-commits mailing list