Rev 2762: Merge bzr.dev. in http://people.ubuntu.com/~robertc/baz2.0/repository
Robert Collins
robertc at robertcollins.net
Thu Sep 13 00:31:03 BST 2007
At http://people.ubuntu.com/~robertc/baz2.0/repository
------------------------------------------------------------
revno: 2762
revision-id: robertc at robertcollins.net-20070912233046-g8nqea1tuj0h83zm
parent: robertc at robertcollins.net-20070912063340-rebmp08maq9lmiyl
parent: pqm at pqm.ubuntu.com-20070912222627-zvqit350mf6gvrbh
committer: Robert Collins <robertc at robertcollins.net>
branch nick: repository
timestamp: Thu 2007-09-13 09:30:46 +1000
message:
Merge bzr.dev.
added:
bzrlib/tests/commands/test_update.py test_update.py-20070910091045-8uyp8v73j926l1g2-1
modified:
NEWS NEWS-20050323055033-4e00b5db738777ff
bzr bzr.py-20050313053754-5485f144c7006fa6
bzrlib/__init__.py __init__.py-20050309040759-33e65acf91bbcd5d
bzrlib/branch.py branch.py-20050309040759-e4baf4e0d046576e
bzrlib/builtins.py builtins.py-20050830033751-fc01482b9ca23183
bzrlib/bzrdir.py bzrdir.py-20060131065624-156dfea39c4387cb
bzrlib/knit.py knit.py-20051212171256-f056ac8f0fbe1bd9
bzrlib/reconcile.py reweave_inventory.py-20051108164726-1e5e0934febac06e
bzrlib/repofmt/knitrepo.py knitrepo.py-20070206081537-pyy4a00xdas0j4pf-1
bzrlib/repository.py rev_storage.py-20051111201905-119e9401e46257e3
bzrlib/tag.py tag.py-20070212110532-91cw79inah2cfozx-1
bzrlib/tests/commands/__init__.py __init__.py-20070520095518-ecfl8531fxgjeycj-1
bzrlib/tests/interrepository_implementations/test_interrepository.py test_interrepository.py-20060220061411-1ec13fa99e5e3eee
bzrlib/tests/test_tag.py test_tag.py-20070212110532-91cw79inah2cfozx-2
bzrlib/tests/test_versionedfile.py test_versionedfile.py-20060222045249-db45c9ed14a1c2e5
bzrlib/versionedfile.py versionedfile.py-20060222045106-5039c71ee3b65490
bzrlib/weave.py knit.py-20050627021749-759c29984154256b
bzrlib/workingtree.py workingtree.py-20050511021032-29b6ec0a681e02e3
------------------------------------------------------------
revno: 2592.1.25.2.7.1.28.1.6.1.3.1.9.2.1.3.74.1.31.3.18.1.9.1.2.1.12
revision-id: pqm at pqm.ubuntu.com-20070912222627-zvqit350mf6gvrbh
parent: pqm at pqm.ubuntu.com-20070912075616-4lsus30tfc3sgwy0
parent: robertc at robertcollins.net-20070912212742-xlzu3nasjo31d5zs
committer: Canonical.com Patch Queue Manager <pqm at pqm.ubuntu.com>
branch nick: +trunk
timestamp: Wed 2007-09-12 23:26:27 +0100
message:
(robertc) Make expensive content checks during knit adds optional and disable them for commit. (Robert Collins)
modified:
NEWS NEWS-20050323055033-4e00b5db738777ff
bzrlib/knit.py knit.py-20051212171256-f056ac8f0fbe1bd9
bzrlib/reconcile.py reweave_inventory.py-20051108164726-1e5e0934febac06e
bzrlib/repofmt/knitrepo.py knitrepo.py-20070206081537-pyy4a00xdas0j4pf-1
bzrlib/repository.py rev_storage.py-20051111201905-119e9401e46257e3
bzrlib/tests/repository_implementations/test_commit_builder.py test_commit_builder.py-20060606110838-76e3ra5slucqus81-1
bzrlib/versionedfile.py versionedfile.py-20060222045106-5039c71ee3b65490
bzrlib/weave.py knit.py-20050627021749-759c29984154256b
------------------------------------------------------------
revno: 2592.1.25.2.7.1.28.1.6.1.3.1.9.2.1.3.74.1.31.3.18.1.9.1.10
revision-id: robertc at robertcollins.net-20070912212742-xlzu3nasjo31d5zs
parent: robertc at robertcollins.net-20070912042151-o2k78pnf1hdwd2xt
parent: pqm at pqm.ubuntu.com-20070912075616-4lsus30tfc3sgwy0
committer: Robert Collins <robertc at robertcollins.net>
branch nick: knits
timestamp: Thu 2007-09-13 07:27:42 +1000
message:
Merge 0.92 opening.
added:
bzrlib/tests/commands/test_update.py test_update.py-20070910091045-8uyp8v73j926l1g2-1
modified:
NEWS NEWS-20050323055033-4e00b5db738777ff
bzr bzr.py-20050313053754-5485f144c7006fa6
bzrlib/__init__.py __init__.py-20050309040759-33e65acf91bbcd5d
bzrlib/branch.py branch.py-20050309040759-e4baf4e0d046576e
bzrlib/builtins.py builtins.py-20050830033751-fc01482b9ca23183
bzrlib/bzrdir.py bzrdir.py-20060131065624-156dfea39c4387cb
bzrlib/repository.py rev_storage.py-20051111201905-119e9401e46257e3
bzrlib/tag.py tag.py-20070212110532-91cw79inah2cfozx-1
bzrlib/tests/commands/__init__.py __init__.py-20070520095518-ecfl8531fxgjeycj-1
bzrlib/tests/interrepository_implementations/test_interrepository.py test_interrepository.py-20060220061411-1ec13fa99e5e3eee
bzrlib/tests/test_tag.py test_tag.py-20070212110532-91cw79inah2cfozx-2
bzrlib/workingtree.py workingtree.py-20050511021032-29b6ec0a681e02e3
------------------------------------------------------------
revno: 2592.1.25.2.7.1.28.1.6.1.3.1.9.2.1.3.74.1.31.3.18.1.9.1.9
revision-id: robertc at robertcollins.net-20070912042151-o2k78pnf1hdwd2xt
parent: robertc at robertcollins.net-20070911041823-pn9kn8l5zmmptnsr
committer: Robert Collins <robertc at robertcollins.net>
branch nick: knits
timestamp: Wed 2007-09-12 14:21:51 +1000
message:
Review feedback.
modified:
NEWS NEWS-20050323055033-4e00b5db738777ff
bzrlib/knit.py knit.py-20051212171256-f056ac8f0fbe1bd9
bzrlib/reconcile.py reweave_inventory.py-20051108164726-1e5e0934febac06e
bzrlib/repofmt/knitrepo.py knitrepo.py-20070206081537-pyy4a00xdas0j4pf-1
bzrlib/repository.py rev_storage.py-20051111201905-119e9401e46257e3
bzrlib/tests/test_versionedfile.py test_versionedfile.py-20060222045249-db45c9ed14a1c2e5
bzrlib/versionedfile.py versionedfile.py-20060222045106-5039c71ee3b65490
bzrlib/weave.py knit.py-20050627021749-759c29984154256b
------------------------------------------------------------
revno: 2592.1.25.2.7.1.28.1.6.1.3.1.9.2.1.3.74.1.31.3.18.1.9.1.2.1.11
revision-id: pqm at pqm.ubuntu.com-20070912075616-4lsus30tfc3sgwy0
parent: pqm at pqm.ubuntu.com-20070912042748-qhmeoj3c8zk7zt01
parent: mbp at sourcefrog.net-20070912012921-x905ro1jgeiddlsm
committer: Canonical.com Patch Queue Manager <pqm at pqm.ubuntu.com>
branch nick: +trunk
timestamp: Wed 2007-09-12 08:56:16 +0100
message:
(mbp) prepare for 0.92 cycle
modified:
NEWS NEWS-20050323055033-4e00b5db738777ff
bzr bzr.py-20050313053754-5485f144c7006fa6
bzrlib/__init__.py __init__.py-20050309040759-33e65acf91bbcd5d
------------------------------------------------------------
revno: 2592.1.25.2.7.1.28.1.6.1.3.1.9.2.1.3.74.1.31.3.18.1.9.1.2.1.9.2.1
revision-id: mbp at sourcefrog.net-20070912012921-x905ro1jgeiddlsm
parent: pqm at pqm.ubuntu.com-20070911055622-a3060rj7l0iy38l2
committer: Martin Pool <mbp at sourcefrog.net>
branch nick: integration
timestamp: Wed 2007-09-12 11:29:21 +1000
message:
Prepare for 0.92 cycle
modified:
NEWS NEWS-20050323055033-4e00b5db738777ff
bzr bzr.py-20050313053754-5485f144c7006fa6
bzrlib/__init__.py __init__.py-20050309040759-33e65acf91bbcd5d
------------------------------------------------------------
revno: 2592.1.25.2.7.1.28.1.6.1.3.1.9.2.1.3.74.1.31.3.18.1.9.1.2.1.10
revision-id: pqm at pqm.ubuntu.com-20070912042748-qhmeoj3c8zk7zt01
parent: pqm at pqm.ubuntu.com-20070911055622-a3060rj7l0iy38l2
parent: robertc at robertcollins.net-20070912031604-lzy05h9u6dyfrfgb
committer: Canonical.com Patch Queue Manager <pqm at pqm.ubuntu.com>
branch nick: +trunk
timestamp: Wed 2007-09-12 05:27:48 +0100
message:
(robertc) Fix fetching of revisions referring to nested trees. (Robert Collins)
modified:
NEWS NEWS-20050323055033-4e00b5db738777ff
bzrlib/repository.py rev_storage.py-20051111201905-119e9401e46257e3
bzrlib/tests/interrepository_implementations/test_interrepository.py test_interrepository.py-20060220061411-1ec13fa99e5e3eee
------------------------------------------------------------
revno: 2592.1.25.2.7.1.28.1.6.1.3.1.9.2.1.3.74.1.31.3.18.1.9.1.2.1.9.1.2
revision-id: robertc at robertcollins.net-20070912031604-lzy05h9u6dyfrfgb
parent: robertc at robertcollins.net-20070912000548-b93ev6hxnfh202ks
committer: Robert Collins <robertc at robertcollins.net>
branch nick: nested-tree
timestamp: Wed 2007-09-12 13:16:04 +1000
message:
Fixup other interrepository tests failing due to the change to test subtrees.
modified:
bzrlib/tests/interrepository_implementations/test_interrepository.py test_interrepository.py-20060220061411-1ec13fa99e5e3eee
------------------------------------------------------------
revno: 2592.1.25.2.7.1.28.1.6.1.3.1.9.2.1.3.74.1.31.3.18.1.9.1.2.1.9.1.1
revision-id: robertc at robertcollins.net-20070912000548-b93ev6hxnfh202ks
parent: pqm at pqm.ubuntu.com-20070911055622-a3060rj7l0iy38l2
committer: Robert Collins <robertc at robertcollins.net>
branch nick: nested-tree
timestamp: Wed 2007-09-12 10:05:48 +1000
message:
* Pushing, pulling and branching branches with subtree references was not
copying the subtree weave, preventing the file graph from being accessed
and causing errors in commits in clones. (Robert Collins)
modified:
NEWS NEWS-20050323055033-4e00b5db738777ff
bzrlib/repository.py rev_storage.py-20051111201905-119e9401e46257e3
bzrlib/tests/interrepository_implementations/test_interrepository.py test_interrepository.py-20060220061411-1ec13fa99e5e3eee
------------------------------------------------------------
revno: 2592.1.25.2.7.1.28.1.6.1.3.1.9.2.1.3.74.1.31.3.18.1.9.1.2.1.9
revision-id: pqm at pqm.ubuntu.com-20070911055622-a3060rj7l0iy38l2
parent: pqm at pqm.ubuntu.com-20070911025457-xd28g5hqu9jco1sm
parent: mbp at sourcefrog.net-20070911031705-ho2pp6ulm4zln3du
committer: Canonical.com Patch Queue Manager <pqm at pqm.ubuntu.com>
branch nick: +trunk
timestamp: Tue 2007-09-11 06:56:22 +0100
message:
(mbp) fix bugs in tags with checkouts
modified:
NEWS NEWS-20050323055033-4e00b5db738777ff
bzrlib/tag.py tag.py-20070212110532-91cw79inah2cfozx-1
bzrlib/tests/test_tag.py test_tag.py-20070212110532-91cw79inah2cfozx-2
------------------------------------------------------------
revno: 2592.1.25.2.7.1.28.1.6.1.3.1.9.2.1.3.74.1.31.3.18.1.9.1.2.6.5
revision-id: mbp at sourcefrog.net-20070911031705-ho2pp6ulm4zln3du
parent: mbp at sourcefrog.net-20070911030714-nzoumditu81hhwtw
committer: Martin Pool <mbp at sourcefrog.net>
branch nick: tags
timestamp: Tue 2007-09-11 13:17:05 +1000
message:
Add another test that tags work ok in checkouts
modified:
bzrlib/tests/test_tag.py test_tag.py-20070212110532-91cw79inah2cfozx-2
------------------------------------------------------------
revno: 2592.1.25.2.7.1.28.1.6.1.3.1.9.2.1.3.74.1.31.3.18.1.9.1.2.6.4
revision-id: mbp at sourcefrog.net-20070911030714-nzoumditu81hhwtw
parent: mbp at sourcefrog.net-20070911030330-8000a0t8feq8g130
parent: pqm at pqm.ubuntu.com-20070911025457-xd28g5hqu9jco1sm
committer: Martin Pool <mbp at sourcefrog.net>
branch nick: tags
timestamp: Tue 2007-09-11 13:07:14 +1000
message:
merge trunk
added:
bzrlib/tests/commands/test_update.py test_update.py-20070910091045-8uyp8v73j926l1g2-1
modified:
NEWS NEWS-20050323055033-4e00b5db738777ff
bzrlib/branch.py branch.py-20050309040759-e4baf4e0d046576e
bzrlib/builtins.py builtins.py-20050830033751-fc01482b9ca23183
bzrlib/bzrdir.py bzrdir.py-20060131065624-156dfea39c4387cb
bzrlib/help_topics.py help_topics.py-20060920210027-rnim90q9e0bwxvy4-1
bzrlib/repofmt/weaverepo.py presplitout.py-20070125045333-wfav3tsh73oxu3zk-1
bzrlib/repository.py rev_storage.py-20051111201905-119e9401e46257e3
bzrlib/tag.py tag.py-20070212110532-91cw79inah2cfozx-1
bzrlib/tests/commands/__init__.py __init__.py-20070520095518-ecfl8531fxgjeycj-1
bzrlib/tests/test_tag.py test_tag.py-20070212110532-91cw79inah2cfozx-2
bzrlib/transport/__init__.py transport.py-20050711165921-4978aa7ce1285ad5
bzrlib/workingtree.py workingtree.py-20050511021032-29b6ec0a681e02e3
doc/developers/HACKING.txt HACKING-20050805200004-2a5dc975d870f78c
------------------------------------------------------------
revno: 2592.1.25.2.7.1.28.1.6.1.3.1.9.2.1.3.74.1.31.3.18.1.9.1.2.6.3
revision-id: mbp at sourcefrog.net-20070911030330-8000a0t8feq8g130
parent: mbp at sourcefrog.net-20070911020916-t0i1xe6jrpmjl4vf
committer: Martin Pool <mbp at sourcefrog.net>
branch nick: tags
timestamp: Tue 2007-09-11 13:03:30 +1000
message:
In checkouts, tags are copied into the master branch when created, changed or deleted, and are copied into the checkout when it is updated. (Martin Pool, #93856, #93860)
modified:
NEWS NEWS-20050323055033-4e00b5db738777ff
bzrlib/tests/test_tag.py test_tag.py-20070212110532-91cw79inah2cfozx-2
------------------------------------------------------------
revno: 2592.1.25.2.7.1.28.1.6.1.3.1.9.2.1.3.74.1.31.3.18.1.9.1.2.6.2
revision-id: mbp at sourcefrog.net-20070911020916-t0i1xe6jrpmjl4vf
parent: mbp at sourcefrog.net-20070910095133-yvlr99xkorynbdue
committer: Martin Pool <mbp at sourcefrog.net>
branch nick: tags
timestamp: Tue 2007-09-11 12:09:16 +1000
message:
Setting and deleting tags should also update the master branch, if any.
modified:
bzrlib/tag.py tag.py-20070212110532-91cw79inah2cfozx-1
bzrlib/tests/test_tag.py test_tag.py-20070212110532-91cw79inah2cfozx-2
------------------------------------------------------------
revno: 2592.1.25.2.7.1.28.1.6.1.3.1.9.2.1.3.74.1.31.3.18.1.9.1.2.6.1
revision-id: mbp at sourcefrog.net-20070910095133-yvlr99xkorynbdue
parent: pqm at pqm.ubuntu.com-20070907145828-hjh5941jv7y8d9z8
committer: Martin Pool <mbp at sourcefrog.net>
branch nick: tags
timestamp: Mon 2007-09-10 19:51:33 +1000
message:
Start adding tests for bug 93860
modified:
bzrlib/tests/test_tag.py test_tag.py-20070212110532-91cw79inah2cfozx-2
------------------------------------------------------------
revno: 2592.1.25.2.7.1.28.1.6.1.3.1.9.2.1.3.74.1.31.3.18.1.9.1.2.1.8
revision-id: pqm at pqm.ubuntu.com-20070911025457-xd28g5hqu9jco1sm
parent: pqm at pqm.ubuntu.com-20070911020027-bmt9h0jgy3zdlge3
parent: mbp at sourcefrog.net-20070911012409-c2ln3x5v53weqf9c
committer: Canonical.com Patch Queue Manager <pqm at pqm.ubuntu.com>
branch nick: +trunk
timestamp: Tue 2007-09-11 03:54:57 +0100
message:
(vila) avoid repeated connections from bzr update
added:
bzrlib/tests/commands/test_update.py test_update.py-20070910091045-8uyp8v73j926l1g2-1
modified:
NEWS NEWS-20050323055033-4e00b5db738777ff
bzrlib/branch.py branch.py-20050309040759-e4baf4e0d046576e
bzrlib/builtins.py builtins.py-20050830033751-fc01482b9ca23183
bzrlib/bzrdir.py bzrdir.py-20060131065624-156dfea39c4387cb
bzrlib/tests/commands/__init__.py __init__.py-20070520095518-ecfl8531fxgjeycj-1
bzrlib/workingtree.py workingtree.py-20050511021032-29b6ec0a681e02e3
------------------------------------------------------------
revno: 2592.1.25.2.7.1.28.1.6.1.3.1.9.2.1.3.74.1.31.3.18.1.9.1.2.1.5.2.2
revision-id: mbp at sourcefrog.net-20070911012409-c2ln3x5v53weqf9c
parent: mbp at sourcefrog.net-20070911002726-xqvjood96a36ue2m
parent: pqm at pqm.ubuntu.com-20070911010353-6lu7ek40rbjhj86o
committer: Martin Pool <mbp at sourcefrog.net>
branch nick: integration
timestamp: Tue 2007-09-11 11:24:09 +1000
message:
merge news
modified:
NEWS NEWS-20050323055033-4e00b5db738777ff
bzrlib/branch.py branch.py-20050309040759-e4baf4e0d046576e
bzrlib/tag.py tag.py-20070212110532-91cw79inah2cfozx-1
bzrlib/tests/test_tag.py test_tag.py-20070212110532-91cw79inah2cfozx-2
------------------------------------------------------------
revno: 2592.1.25.2.7.1.28.1.6.1.3.1.9.2.1.3.74.1.31.3.18.1.9.1.2.1.5.2.1
revision-id: mbp at sourcefrog.net-20070911002726-xqvjood96a36ue2m
parent: pqm at pqm.ubuntu.com-20070910121243-ccy1gej0kqy4feen
parent: v.ladeuil+lp at free.fr-20070910121247-sxf4l4pq1e27380p
committer: Martin Pool <mbp at sourcefrog.net>
branch nick: integration
timestamp: Tue 2007-09-11 10:27:26 +1000
message:
merge vincent and cleanup
added:
bzrlib/tests/commands/test_update.py test_update.py-20070910091045-8uyp8v73j926l1g2-1
modified:
NEWS NEWS-20050323055033-4e00b5db738777ff
bzrlib/branch.py branch.py-20050309040759-e4baf4e0d046576e
bzrlib/builtins.py builtins.py-20050830033751-fc01482b9ca23183
bzrlib/bzrdir.py bzrdir.py-20060131065624-156dfea39c4387cb
bzrlib/tests/commands/__init__.py __init__.py-20070520095518-ecfl8531fxgjeycj-1
bzrlib/workingtree.py workingtree.py-20050511021032-29b6ec0a681e02e3
------------------------------------------------------------
revno: 2592.1.25.2.7.1.28.1.6.1.3.1.9.2.1.3.74.1.31.3.18.1.9.1.2.1.1.2.2
revision-id: v.ladeuil+lp at free.fr-20070910121247-sxf4l4pq1e27380p
parent: v.ladeuil+lp at free.fr-20070910091350-mnrhuokhmj2vxim0
committer: Vincent Ladeuil <v.ladeuil+lp at free.fr>
branch nick: 128076
timestamp: Mon 2007-09-10 14:12:47 +0200
message:
Fix #128076 and #131396 by reusing bound branch transport.
* bzrlib/bzrdir.py:
(BzrDir.open): Add possible_transports as the last parameter.
* bzrlib/builtins.py:
(cmd_update.run): Use possible_transports parameter to obtain the
master branch transport and reuse it.
* bzrlib/branch.py:
(Branch.open, Branch.get_master_branch,
BzrBranch5.get_master_branch, BzrBranch5.update): Add
possible_transports as the last parameter.
* bzrlib/workingtree.py:
(WorkingTree.update): Add possible_transports as the last parameter.
* bzrlib/tests/commands/test_update.py:
(TestUpdate.test_update): Ignore connections from bind.
modified:
NEWS NEWS-20050323055033-4e00b5db738777ff
bzrlib/branch.py branch.py-20050309040759-e4baf4e0d046576e
bzrlib/builtins.py builtins.py-20050830033751-fc01482b9ca23183
bzrlib/bzrdir.py bzrdir.py-20060131065624-156dfea39c4387cb
bzrlib/tests/commands/test_update.py test_update.py-20070910091045-8uyp8v73j926l1g2-1
bzrlib/workingtree.py workingtree.py-20050511021032-29b6ec0a681e02e3
------------------------------------------------------------
revno: 2592.1.25.2.7.1.28.1.6.1.3.1.9.2.1.3.74.1.31.3.18.1.9.1.2.1.1.2.1
revision-id: v.ladeuil+lp at free.fr-20070910091350-mnrhuokhmj2vxim0
parent: pqm at pqm.ubuntu.com-20070910054843-evbkt0bivtk6tpqu
committer: Vincent Ladeuil <v.ladeuil+lp at free.fr>
branch nick: 128076
timestamp: Mon 2007-09-10 11:13:50 +0200
message:
Reproduce #131396 and #128076 in the test suite.
added:
bzrlib/tests/commands/test_update.py test_update.py-20070910091045-8uyp8v73j926l1g2-1
modified:
bzrlib/tests/commands/__init__.py __init__.py-20070520095518-ecfl8531fxgjeycj-1
=== added file 'bzrlib/tests/commands/test_update.py'
--- a/bzrlib/tests/commands/test_update.py 1970-01-01 00:00:00 +0000
+++ b/bzrlib/tests/commands/test_update.py 2007-09-10 12:12:47 +0000
@@ -0,0 +1,40 @@
+# Copyright (C) 2007 Canonical Ltd
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+
+
+from bzrlib import builtins
+from bzrlib.tests.transport_util import TestCaseWithConnectionHookedTransport
+
+
+class TestUpdate(TestCaseWithConnectionHookedTransport):
+
+ def test_update(self):
+ wt1 = self.make_branch_and_tree('branch1')
+ wt2 = self.make_branch_and_tree('branch2')
+ wt2.pull(wt1.branch)
+
+ wt1.commit('empty commit')
+ wt2.commit('empty commit too')
+
+ bind = builtins.cmd_bind()
+ bind.run(location=self.get_url('branch1'))
+
+ self.install_hooks()
+
+ update = builtins.cmd_update()
+ update.run()
+ self.assertEquals(1, len(self.connections))
+
=== modified file 'NEWS'
--- a/NEWS 2007-09-11 04:23:00 +0000
+++ b/NEWS 2007-09-12 23:30:46 +0000
@@ -7,11 +7,40 @@
IN DEVELOPMENT
==============
+ NOTES WHEN UPGRADING:
+
+ FEATURES:
+
+ PERFORMANCE:
+
+ IMPROVEMENTS:
+
+ BUG FIXES:
+
+ API BREAKS:
+
+ * The ``VersionedFile`` interface now allows content checks to be bypassed
+ by supplying check_content=False. This saves nearly 30% of the minimum
+ cost to store a version of a file. (Robert Collins)
+
+ TESTING:
+
+
+bzr 0.91rc2 2007-09-11
+======================
+
+ * Replaced incorrect tarball for previous release; a debug statement was left
+ in bzrlib/remote.py.
+
+bzr 0.91rc1 2007-09-11
+======================
+
CHANGES:
* The default branch and repository format has changed to
``dirstate-tags``, so tag commands are active by default.
This format is compatible with Bazaar 0.15 and later.
+ This incidentally fixes bug #126141.
(Martin Pool)
* ``--quiet`` or ``-q`` is no longer a global option. If present, it
@@ -56,6 +85,10 @@
* ``bzr plugins`` now lists the version number for each plugin in square
brackets after the path. (Robert Collins, #125421)
+ * Pushing, pulling and branching branches with subtree references was not
+ copying the subtree weave, preventing the file graph from being accessed
+ and causing errors in commits in clones. (Robert Collins)
+
* Suppress warning "integer argument expected, got float" from Paramiko,
which sometimes caused false test failures. (Martin Pool)
@@ -126,9 +159,17 @@
* Prompt for an ftp password if none is provided.
(Vincent Ladeuil, #137044)
+ * Reuse bound branch associated transport to avoid multiple
+ connections.
+ (Vincent Ladeuil, #128076, #131396)
+
* Overwrite conflicting tags by ``push`` and ``pull`` if the
``--overwrite`` option is specified. (Lukáš Lalinský, #93947)
+ * In checkouts, tags are copied into the master branch when created,
+ changed or deleted, and are copied into the checkout when it is
+ updated. (Martin Pool, #93856, #93860)
+
IMPROVEMENTS:
* Add the option "--show-diff" to the commit command in order to display
@@ -199,11 +240,6 @@
allows the avoidance of double-sha1 calculations during commit.
(Robert Collins)
- * The ``VersionedFile`` interface no longer protects against misuse when
- lines that are not lines, or are not strings are supplied. This saves
- nearly 30% of the minimum cost to store a version of a file.
- (Robert Collins)
-
* ``Transport.should_cache`` has been removed. It was not called in the
previous release. (Martin Pool)
=== modified file 'bzr'
--- a/bzr 2007-09-03 02:51:50 +0000
+++ b/bzr 2007-09-12 01:29:21 +0000
@@ -88,7 +88,7 @@
import bzrlib.commands
import bzrlib.trace
-if bzrlib.version_info[:3] != (0, 91, 0):
+if bzrlib.version_info[:3] != (0, 92, 0):
sys.stderr.write("bzr: WARNING: bzrlib version doesn't match the bzr program.\n"
"This may indicate an installation problem.\n"
"bzrlib from %s is version %r\n"
=== modified file 'bzrlib/__init__.py'
--- a/bzrlib/__init__.py 2007-08-17 05:16:14 +0000
+++ b/bzrlib/__init__.py 2007-09-12 01:29:21 +0000
@@ -35,7 +35,7 @@
# Python version 2.0 is (2, 0, 0, 'final', 0)." Additionally we use a
# releaselevel of 'dev' for unreleased under-development code.
-version_info = (0, 91, 0, 'dev', 0)
+version_info = (0, 92, 0, 'dev', 0)
# API compatibility version: bzrlib is currently API compatible with 0.18.
api_minimum_version = (0, 18, 0)
=== modified file 'bzrlib/branch.py'
--- a/bzrlib/branch.py 2007-09-11 04:23:00 +0000
+++ b/bzrlib/branch.py 2007-09-12 23:30:46 +0000
@@ -118,13 +118,14 @@
master.break_lock()
@staticmethod
- def open(base, _unsupported=False):
+ def open(base, _unsupported=False, possible_transports=None):
"""Open the branch rooted at base.
For instance, if the branch is at URL/.bzr/branch,
Branch.open(URL) -> a Branch instance.
"""
- control = bzrdir.BzrDir.open(base, _unsupported)
+ control = bzrdir.BzrDir.open(base, _unsupported,
+ possible_transports=possible_transports)
return control.open_branch(_unsupported)
@staticmethod
@@ -321,7 +322,7 @@
return self.repository.get_commit_builder(self, parents, config,
timestamp, timezone, committer, revprops, revision_id)
- def get_master_branch(self):
+ def get_master_branch(self, possible_transports=None):
"""Return the branch we are bound to.
:return: Either a Branch, or None
@@ -1657,7 +1658,7 @@
class BzrBranch5(BzrBranch):
- """A format 5 branch. This supports new features over plan branches.
+ """A format 5 branch. This supports new features over plain branches.
It has support for a master_branch which is the data for bound branches.
"""
@@ -1706,7 +1707,7 @@
return None
@needs_read_lock
- def get_master_branch(self):
+ def get_master_branch(self, possible_transports=None):
"""Return the branch we are bound to.
:return: Either a Branch, or None
@@ -1720,7 +1721,8 @@
if not bound_loc:
return None
try:
- return Branch.open(bound_loc)
+ return Branch.open(bound_loc,
+ possible_transports=possible_transports)
except (errors.NotBranchError, errors.ConnectionError), e:
raise errors.BoundBranchConnectionFailure(
self, bound_loc, e)
@@ -1788,13 +1790,13 @@
return self.set_bound_location(None)
@needs_write_lock
- def update(self):
+ def update(self, possible_transports=None):
"""Synchronise this branch with the master branch if any.
:return: None or the last_revision that was pivoted out during the
update.
"""
- master = self.get_master_branch()
+ master = self.get_master_branch(possible_transports)
if master is not None:
old_tip = _mod_revision.ensure_null(self.last_revision())
self.pull(master, overwrite=True)
=== modified file 'bzrlib/builtins.py'
--- a/bzrlib/builtins.py 2007-09-10 10:05:51 +0000
+++ b/bzrlib/builtins.py 2007-09-11 00:27:26 +0000
@@ -1016,7 +1016,9 @@
def run(self, dir='.'):
tree = WorkingTree.open_containing(dir)[0]
- master = tree.branch.get_master_branch()
+ possible_transports = []
+ master = tree.branch.get_master_branch(
+ possible_transports=possible_transports)
if master is not None:
tree.lock_write()
else:
@@ -1032,8 +1034,9 @@
revno = tree.branch.revision_id_to_revno(last_rev)
note("Tree is up to date at revision %d." % (revno,))
return 0
- conflicts = tree.update(delta._ChangeReporter(
- unversioned_filter=tree.is_ignored))
+ conflicts = tree.update(
+ delta._ChangeReporter(unversioned_filter=tree.is_ignored),
+ possible_transports=possible_transports)
revno = tree.branch.revision_id_to_revno(
_mod_revision.ensure_null(tree.last_revision()))
note('Updated to revision %d.' % (revno,))
=== modified file 'bzrlib/bzrdir.py'
--- a/bzrlib/bzrdir.py 2007-09-09 22:28:46 +0000
+++ b/bzrlib/bzrdir.py 2007-09-12 23:30:46 +0000
@@ -533,12 +533,12 @@
return BzrDir.open(base, _unsupported=True)
@staticmethod
- def open(base, _unsupported=False):
+ def open(base, _unsupported=False, possible_transports=None):
"""Open an existing bzrdir, rooted at 'base' (url)
_unsupported is a private parameter to the BzrDir class.
"""
- t = get_transport(base)
+ t = get_transport(base, possible_transports=possible_transports)
return BzrDir.open_from_transport(t, _unsupported=_unsupported)
@staticmethod
=== modified file 'bzrlib/knit.py'
--- a/bzrlib/knit.py 2007-09-12 06:33:40 +0000
+++ b/bzrlib/knit.py 2007-09-12 23:30:46 +0000
@@ -826,21 +826,21 @@
self._index.check_versions_present(version_ids)
def _add_lines_with_ghosts(self, version_id, parents, lines, parent_texts,
- nostore_sha, random_id):
+ nostore_sha, random_id, check_content):
"""See VersionedFile.add_lines_with_ghosts()."""
- self._check_add(version_id, lines, random_id)
+ self._check_add(version_id, lines, random_id, check_content)
return self._add(version_id, lines, parents, self.delta,
parent_texts, None, nostore_sha)
def _add_lines(self, version_id, parents, lines, parent_texts,
- left_matching_blocks, nostore_sha, random_id):
+ left_matching_blocks, nostore_sha, random_id, check_content):
"""See VersionedFile.add_lines."""
- self._check_add(version_id, lines, random_id)
+ self._check_add(version_id, lines, random_id, check_content)
self._check_versions_present(parents)
return self._add(version_id, lines[:], parents, self.delta,
parent_texts, left_matching_blocks, nostore_sha)
- def _check_add(self, version_id, lines, random_id):
+ def _check_add(self, version_id, lines, random_id, check_content):
"""check that version_id and lines are safe to add."""
if contains_whitespace(version_id):
raise InvalidRevisionId(version_id, self.filename)
@@ -851,6 +851,9 @@
# blanket that we can disable.
if not random_id and self.has_version(version_id):
raise RevisionAlreadyPresent(version_id, self.filename)
+ if check_content:
+ self._check_lines_not_unicode(lines)
+ self._check_lines_are_lines(lines)
def _add(self, version_id, lines, parents, delta, parent_texts,
left_matching_blocks, nostore_sha):
=== modified file 'bzrlib/reconcile.py'
--- a/bzrlib/reconcile.py 2007-09-11 04:23:00 +0000
+++ b/bzrlib/reconcile.py 2007-09-12 23:30:46 +0000
@@ -182,7 +182,7 @@
# reconcile.
new_inventory_vf._check_write_ok()
Weave._add_lines(new_inventory_vf, rev_id, parents,
- self.inventory.get_lines(rev_id), None, None, None, False)
+ self.inventory.get_lines(rev_id), None, None, None, False, True)
else:
new_inventory_vf.add_lines(rev_id, parents, self.inventory.get_lines(rev_id))
=== modified file 'bzrlib/repofmt/knitrepo.py'
--- a/bzrlib/repofmt/knitrepo.py 2007-09-12 06:33:40 +0000
+++ b/bzrlib/repofmt/knitrepo.py 2007-09-12 23:30:46 +0000
@@ -97,8 +97,9 @@
# This class isn't deprecated
pass
- def _inventory_add_lines(self, inv_vf, revid, parents, lines):
- inv_vf.add_lines_with_ghosts(revid, parents, lines)
+ def _inventory_add_lines(self, inv_vf, revid, parents, lines, check_content):
+ inv_vf.add_lines_with_ghosts(revid, parents, lines,
+ check_content=check_content)
@needs_read_lock
def _all_revision_ids(self):
=== modified file 'bzrlib/repository.py'
--- a/bzrlib/repository.py 2007-09-12 06:33:40 +0000
+++ b/bzrlib/repository.py 2007-09-12 23:30:46 +0000
@@ -368,10 +368,16 @@
# Don't change this to add_lines - add_lines_with_ghosts is cheaper
# than add_lines, and allows committing when a parent is ghosted for
# some reason.
+ # Note: as we read the content directly from the tree, we know its not
+ # been turned into unicode or badly split - but a broken tree
+ # implementation could give us bad output from readlines() so this is
+ # not a guarantee of safety. What would be better is always checking
+ # the content during test suite execution. RBC 20070912
try:
return versionedfile.add_lines_with_ghosts(
self._new_revision_id, parents, new_lines,
- nostore_sha=nostore_sha, random_id=self.random_revid)[0:2]
+ nostore_sha=nostore_sha, random_id=self.random_revid,
+ check_content=False)[0:2]
finally:
versionedfile.clear_cache()
@@ -461,16 +467,17 @@
inv_sha1 = osutils.sha_string(inv_text)
inv_vf = self.get_inventory_weave()
self._inventory_add_lines(inv_vf, revision_id, parents,
- osutils.split_lines(inv_text))
+ osutils.split_lines(inv_text), check_content=False)
return inv_sha1
- def _inventory_add_lines(self, inv_vf, revision_id, parents, lines):
+ def _inventory_add_lines(self, inv_vf, revision_id, parents, lines,
+ check_content=True):
final_parents = []
for parent in parents:
if parent in inv_vf:
final_parents.append(parent)
-
- inv_vf.add_lines(revision_id, final_parents, lines)
+ inv_vf.add_lines(revision_id, final_parents, lines,
+ check_content=check_content)
@needs_write_lock
def add_revision(self, revision_id, rev, inv=None, config=None):
@@ -2067,8 +2074,13 @@
@classmethod
def _get_repo_format_to_test(self):
- """Repository format for testing with."""
- return RepositoryFormat.get_default_format()
+ """Repository format for testing with.
+
+ InterSameData can pull from subtree to subtree and from non-subtree to
+ non-subtree, so we test this with the richest repository format.
+ """
+ from bzrlib.repofmt import knitrepo
+ return knitrepo.RepositoryFormatKnit3()
@staticmethod
def is_compatible(source, target):
=== modified file 'bzrlib/tag.py'
--- a/bzrlib/tag.py 2007-09-11 00:15:56 +0000
+++ b/bzrlib/tag.py 2007-09-11 03:07:14 +0000
@@ -82,6 +82,9 @@
# all done with a write lock held, so this looks atomic
self.branch.lock_write()
try:
+ master = self.branch.get_master_branch()
+ if master is not None:
+ master.tags.set_tag(tag_name, tag_target)
td = self.get_tag_dict()
td[tag_name] = tag_target
self._set_tag_dict(td)
@@ -134,6 +137,12 @@
del d[tag_name]
except KeyError:
raise errors.NoSuchTag(tag_name)
+ master = self.branch.get_master_branch()
+ if master is not None:
+ try:
+ master.tags.delete_tag(tag_name)
+ except errors.NoSuchTag:
+ pass
self._set_tag_dict(d)
finally:
self.branch.unlock()
@@ -152,7 +161,7 @@
def _serialize_tag_dict(self, tag_dict):
td = dict((k.encode('utf-8'), v)
- for k,v in tag_dict.items())
+ for k,v in tag_dict.items())
return bencode.bencode(td)
def _deserialize_tag_dict(self, tag_content):
=== modified file 'bzrlib/tests/commands/__init__.py'
--- a/bzrlib/tests/commands/__init__.py 2007-07-15 11:17:19 +0000
+++ b/bzrlib/tests/commands/__init__.py 2007-09-10 09:13:50 +0000
@@ -35,6 +35,7 @@
'bzrlib.tests.commands.test_missing',
'bzrlib.tests.commands.test_pull',
'bzrlib.tests.commands.test_push',
+ 'bzrlib.tests.commands.test_update',
]
loader = TestLoader()
suite = loader.loadTestsFromModuleNames(testmod_names)
=== modified file 'bzrlib/tests/interrepository_implementations/test_interrepository.py'
--- a/bzrlib/tests/interrepository_implementations/test_interrepository.py 2007-08-28 22:19:15 +0000
+++ b/bzrlib/tests/interrepository_implementations/test_interrepository.py 2007-09-12 23:30:46 +0000
@@ -32,7 +32,12 @@
import bzrlib.repofmt.weaverepo as weaverepo
import bzrlib.repository as repository
from bzrlib.revision import NULL_REVISION, Revision
-from bzrlib.tests import TestCase, TestCaseWithTransport, TestSkipped
+from bzrlib.tests import (
+ TestCase,
+ TestCaseWithTransport,
+ TestNotApplicable,
+ TestSkipped,
+ )
from bzrlib.tests.bzrdir_implementations.test_bzrdir import TestCaseWithBzrDir
from bzrlib.transport import get_transport
@@ -294,21 +299,16 @@
# repository.
# 'ghost' is a ghost in missing_ghost and not in with_ghost_rev
- inv = Inventory(revision_id='ghost')
- inv.root.revision = 'ghost'
repo = self.make_repository('with_ghost_rev')
repo.lock_write()
- repo.start_write_group()
- sha1 = repo.add_inventory('ghost', inv, [])
- rev = bzrlib.revision.Revision(timestamp=0,
- timezone=None,
- committer="Foo Bar <foo at example.com>",
- message="Message",
- inventory_sha1=sha1,
- revision_id='ghost')
- rev.parent_ids = []
- repo.add_revision('ghost', rev)
- repo.commit_write_group()
+ builder = repo.get_commit_builder(None, [], None,
+ committer="Foo Bar <foo at example.com>",
+ revision_id='ghost')
+ ie = bzrlib.inventory.InventoryDirectory('TREE_ROOT', '', None)
+ builder.record_entry_contents(ie, [], '', None,
+ ('directory', None, None, None))
+ builder.finish_inventory()
+ builder.commit("Message")
repo.unlock()
repo = self.make_to_repository('missing_ghost')
@@ -338,3 +338,27 @@
# rev must not be corrupt now
rev = repo.get_revision('with_ghost')
self.assertEqual([None, 'ghost', 'with_ghost'], repo.get_ancestry('with_ghost'))
+
+
+class TestFetchDependentData(TestCaseWithInterRepository):
+
+ def test_reference(self):
+ from_tree = self.make_branch_and_tree('tree')
+ to_repo = self.make_to_repository('to')
+ if (not from_tree.supports_tree_reference() or
+ not from_tree.branch.repository._format.supports_tree_reference or
+ not to_repo._format.supports_tree_reference):
+ raise TestNotApplicable("Need subtree support.")
+ subtree = self.make_branch_and_tree('tree/subtree')
+ subtree.commit('subrev 1')
+ from_tree.add_reference(subtree)
+ tree_rev = from_tree.commit('foo')
+ # now from_tree has a last-modified of subtree of the rev id of the
+ # commit for foo, and a reference revision of the rev id of the commit
+ # for subrev 1
+ to_repo.fetch(from_tree.branch.repository, tree_rev)
+ # to_repo should have a file_graph for from_tree.path2id('subtree') and
+ # revid tree_rev.
+ file_vf = to_repo.weave_store.get_weave(
+ from_tree.path2id('subtree'), to_repo.get_transaction())
+ self.assertEqual([tree_rev], file_vf.get_ancestry([tree_rev]))
=== modified file 'bzrlib/tests/test_tag.py'
--- a/bzrlib/tests/test_tag.py 2007-09-07 11:37:13 +0000
+++ b/bzrlib/tests/test_tag.py 2007-09-11 03:17:05 +0000
@@ -26,6 +26,7 @@
_merge_tags_if_possible,
)
from bzrlib.tests import (
+ KnownFailure,
TestCase,
TestCaseWithTransport,
)
@@ -98,3 +99,55 @@
conflicts = a.tags.merge_to(b.tags, overwrite=True)
self.assertEqual(conflicts, [])
self.assertEqual('z', b.tags.lookup_tag('tag-2'))
+
+
+class TestTagsInCheckouts(TestCaseWithTransport):
+
+ def test_update_tag_into_checkout(self):
+ # checkouts are directly connected to the tags of their master branch:
+ # adding a tag in the checkout pushes it to the master
+ # https://bugs.launchpad.net/bzr/+bug/93860
+ master = self.make_branch('master')
+ child = self.make_branch('child')
+ child.bind(master)
+ child.tags.set_tag('foo', 'rev-1')
+ self.assertEquals('rev-1', master.tags.lookup_tag('foo'))
+ # deleting a tag updates the master too
+ child.tags.delete_tag('foo')
+ self.assertRaises(errors.NoSuchTag,
+ master.tags.lookup_tag, 'foo')
+
+ def test_tag_copied_by_initial_checkout(self):
+ # https://bugs.launchpad.net/bzr/+bug/93860
+ master = self.make_branch('master')
+ master.tags.set_tag('foo', 'rev-1')
+ co_tree = master.create_checkout('checkout')
+ self.assertEquals('rev-1',
+ co_tree.branch.tags.lookup_tag('foo'))
+
+ def test_update_updates_tags(self):
+ # https://bugs.launchpad.net/bzr/+bug/93856
+ master = self.make_branch('master')
+ master.tags.set_tag('foo', 'rev-1')
+ child = self.make_branch('child')
+ child.bind(master)
+ child.update()
+ # after an update, the child has all the master's tags
+ self.assertEquals('rev-1', child.tags.lookup_tag('foo'))
+ # add another tag and update again
+ master.tags.set_tag('tag2', 'target2')
+ child.update()
+ self.assertEquals('target2', child.tags.lookup_tag('tag2'))
+
+ def test_tag_deletion_from_master_to_bound(self):
+ master = self.make_branch('master')
+ master.tags.set_tag('foo', 'rev-1')
+ child = self.make_branch('child')
+ child.bind(master)
+ child.update()
+ # and deletion of tags should also propagate
+ master.tags.delete_tag('foo')
+ raise KnownFailure("tag deletion does not propagate: "
+ "https://bugs.launchpad.net/bzr/+bug/138802")
+ self.assertRaises(errors.NoSuchTag,
+ child.tags.lookup_tag, 'foo')
=== modified file 'bzrlib/tests/test_versionedfile.py'
--- a/bzrlib/tests/test_versionedfile.py 2007-09-10 07:11:05 +0000
+++ b/bzrlib/tests/test_versionedfile.py 2007-09-12 23:30:46 +0000
@@ -115,6 +115,16 @@
f = self.reopen_file()
verify_file(f)
+ def test_add_unicode_content(self):
+ # unicode content is not permitted in versioned files.
+ # versioned files version sequences of bytes only.
+ vf = self.get_file()
+ self.assertRaises(errors.BzrBadParameterUnicode,
+ vf.add_lines, 'a', [], ['a\n', u'b\n', 'c\n'])
+ self.assertRaises(
+ (errors.BzrBadParameterUnicode, NotImplementedError),
+ vf.add_lines_with_ghosts, 'a', [], ['a\n', u'b\n', 'c\n'])
+
def test_add_follows_left_matching_blocks(self):
"""If we change left_matching_blocks, delta changes
@@ -132,6 +142,21 @@
left_matching_blocks=[(0, 2, 1), (1, 3, 0)])
self.assertEqual(['a\n', 'a\n', 'a\n'], vf.get_lines('3'))
+ def test_inline_newline_throws(self):
+ # \r characters are not permitted in lines being added
+ vf = self.get_file()
+ self.assertRaises(errors.BzrBadParameterContainsNewline,
+ vf.add_lines, 'a', [], ['a\n\n'])
+ self.assertRaises(
+ (errors.BzrBadParameterContainsNewline, NotImplementedError),
+ vf.add_lines_with_ghosts, 'a', [], ['a\n\n'])
+ # but inline CR's are allowed
+ vf.add_lines('a', [], ['a\r\n'])
+ try:
+ vf.add_lines_with_ghosts('b', [], ['a\r\n'])
+ except NotImplementedError:
+ pass
+
def test_add_reserved(self):
vf = self.get_file()
self.assertRaises(errors.ReservedId,
=== modified file 'bzrlib/versionedfile.py'
--- a/bzrlib/versionedfile.py 2007-09-10 07:11:05 +0000
+++ b/bzrlib/versionedfile.py 2007-09-12 23:30:46 +0000
@@ -78,7 +78,8 @@
raise NotImplementedError(self.has_version)
def add_lines(self, version_id, parents, lines, parent_texts=None,
- left_matching_blocks=None, nostore_sha=None, random_id=False):
+ left_matching_blocks=None, nostore_sha=None, random_id=False,
+ check_content=True):
"""Add a single text on top of the versioned file.
Must raise RevisionAlreadyPresent if the new version is
@@ -93,8 +94,8 @@
terminated \n. If the lines list does meet this constraint the add
routine may error or may succeed - but you will be unable to read
the data back accurately. (Checking the lines have been split
- correctly is expensive and extermely unlikely to catch bugs so it
- is not done at runtime.)
+ correctly is expensive and extremely unlikely to catch bugs so it
+ is not done at runtime unless check_content is True.)
:param parent_texts: An optional dictionary containing the opaque
representations of some or all of the parents of version_id to
allow delta optimisations. VERY IMPORTANT: the texts must be those
@@ -110,6 +111,8 @@
for uniqueness of the resulting key within the versioned file, so
this should only be done when the result is expected to be unique
anyway.
+ :param check_content: If True, the lines supplied are verified to be
+ bytestrings that are correctly formed lines.
:return: The text sha1, the number of bytes in the text, and an opaque
representation of the inserted version which can be provided
back to future add_lines calls in the parent_texts dictionary.
@@ -118,15 +121,16 @@
parents = [osutils.safe_revision_id(v) for v in parents]
self._check_write_ok()
return self._add_lines(version_id, parents, lines, parent_texts,
- left_matching_blocks, nostore_sha, random_id)
+ left_matching_blocks, nostore_sha, random_id, check_content)
def _add_lines(self, version_id, parents, lines, parent_texts,
- left_matching_blocks, nostore_sha, random_id):
+ left_matching_blocks, nostore_sha, random_id, check_content):
"""Helper to do the class specific add_lines."""
raise NotImplementedError(self.add_lines)
def add_lines_with_ghosts(self, version_id, parents, lines,
- parent_texts=None, nostore_sha=None, random_id=False):
+ parent_texts=None, nostore_sha=None, random_id=False,
+ check_content=True):
"""Add lines to the versioned file, allowing ghosts to be present.
This takes the same parameters as add_lines and returns the same.
@@ -135,10 +139,10 @@
parents = [osutils.safe_revision_id(v) for v in parents]
self._check_write_ok()
return self._add_lines_with_ghosts(version_id, parents, lines,
- parent_texts, nostore_sha, random_id)
+ parent_texts, nostore_sha, random_id, check_content)
def _add_lines_with_ghosts(self, version_id, parents, lines, parent_texts,
- nostore_sha, random_id):
+ nostore_sha, random_id, check_content):
"""Helper to do class specific add_lines_with_ghosts."""
raise NotImplementedError(self.add_lines_with_ghosts)
=== modified file 'bzrlib/weave.py'
--- a/bzrlib/weave.py 2007-09-11 04:05:11 +0000
+++ b/bzrlib/weave.py 2007-09-12 04:21:51 +0000
@@ -261,7 +261,7 @@
return idx
def _add_lines(self, version_id, parents, lines, parent_texts,
- left_matching_blocks, nostore_sha, random_id):
+ left_matching_blocks, nostore_sha, random_id, check_content):
"""See VersionedFile.add_lines."""
idx = self._add(version_id, lines, map(self._lookup, parents),
nostore_sha=nostore_sha)
@@ -870,11 +870,12 @@
self._save()
def _add_lines(self, version_id, parents, lines, parent_texts,
- left_matching_blocks, nostore_sha, random_id):
+ left_matching_blocks, nostore_sha, random_id, check_content):
"""Add a version and save the weave."""
self.check_not_reserved_id(version_id)
result = super(WeaveFile, self)._add_lines(version_id, parents, lines,
- parent_texts, left_matching_blocks, nostore_sha, random_id)
+ parent_texts, left_matching_blocks, nostore_sha, random_id,
+ check_content)
self._save()
return result
=== modified file 'bzrlib/workingtree.py'
--- a/bzrlib/workingtree.py 2007-09-09 23:01:47 +0000
+++ b/bzrlib/workingtree.py 2007-09-12 23:30:46 +0000
@@ -2071,7 +2071,7 @@
"""
raise NotImplementedError(self.unlock)
- def update(self, change_reporter=None):
+ def update(self, change_reporter=None, possible_transports=None):
"""Update a working tree along its branch.
This will update the branch if its bound too, which means we have
@@ -2096,7 +2096,7 @@
basis.
- Do a 'normal' merge of the old branch basis if it is relevant.
"""
- if self.branch.get_master_branch() is not None:
+ if self.branch.get_master_branch(possible_transports) is not None:
self.lock_write()
update_branch = True
else:
@@ -2104,7 +2104,7 @@
update_branch = False
try:
if update_branch:
- old_tip = self.branch.update()
+ old_tip = self.branch.update(possible_transports)
else:
old_tip = None
return self._update_tree(old_tip, change_reporter)
More information about the bazaar-commits
mailing list