Rev 3511: Add Branch.set_last_revision_ex HPSS verb to accelerate push. (Andrew in file:///home/pqm/archives/thelove/bzr/%2Btrunk/
Canonical.com Patch Queue Manager
pqm at pqm.ubuntu.com
Thu Jun 26 00:07:38 BST 2008
At file:///home/pqm/archives/thelove/bzr/%2Btrunk/
------------------------------------------------------------
revno: 3511
revision-id:pqm at pqm.ubuntu.com-20080625230724-lyux37pu8nx8tq34
parent: pqm at pqm.ubuntu.com-20080625103636-6kxh4e1gmyn82f50
parent: andrew.bennetts at canonical.com-20080625224023-o0uifuw9r14zbqcp
committer: Canonical.com Patch Queue Manager <pqm at pqm.ubuntu.com>
branch nick: +trunk
timestamp: Thu 2008-06-26 00:07:24 +0100
message:
Add Branch.set_last_revision_ex HPSS verb to accelerate push. (Andrew
Bennetts)
modified:
NEWS NEWS-20050323055033-4e00b5db738777ff
bzrlib/branch.py branch.py-20050309040759-e4baf4e0d046576e
bzrlib/remote.py remote.py-20060720103555-yeeg2x51vn0rbtdp-1
bzrlib/smart/branch.py branch.py-20061124031907-mzh3pla28r83r97f-1
bzrlib/smart/request.py request.py-20061108095550-gunadhxmzkdjfeek-1
bzrlib/tests/test_remote.py test_remote.py-20060720103555-yeeg2x51vn0rbtdp-2
bzrlib/tests/test_smart.py test_smart.py-20061122024551-ol0l0o0oofsu9b3t-2
bzrlib/trace.py trace.py-20050309040759-c8ed824bdcd4748a
------------------------------------------------------------
revno: 3441.3.2.1.33
revision-id:andrew.bennetts at canonical.com-20080625224023-o0uifuw9r14zbqcp
parent: andrew.bennetts at canonical.com-20080625222757-qoxz8w75h89hm6mk
committer: Andrew Bennetts <andrew.bennetts at canonical.com>
branch nick: smart-push-gpm
timestamp: Thu 2008-06-26 08:40:23 +1000
message:
Add NEWS entry.
modified:
NEWS NEWS-20050323055033-4e00b5db738777ff
------------------------------------------------------------
revno: 3441.3.2.1.32
revision-id:andrew.bennetts at canonical.com-20080625222757-qoxz8w75h89hm6mk
parent: andrew.bennetts at canonical.com-20080625222421-3awo7n34il23al6e
parent: pqm at pqm.ubuntu.com-20080625103636-6kxh4e1gmyn82f50
committer: Andrew Bennetts <andrew.bennetts at canonical.com>
branch nick: smart-push-gpm
timestamp: Thu 2008-06-26 08:27:57 +1000
message:
Merge bzr.dev.
removed:
bzrlib/store/revision/__init__.py __init__.py-20060303014707-305238f06ae20dae
bzrlib/store/revision/knit.py knit.py-20060303020652-de5fa299e941a3c7
bzrlib/store/revision/text.py text.py-20060303020652-e49155f0da4d14ab
bzrlib/tests/interversionedfile_implementations/ interversionedfile_implementations-20060301230427-f1f3ca8ddd5ff482
bzrlib/tests/interversionedfile_implementations/__init__.py __init__.py-20060302012326-981af525594d02ed
bzrlib/tests/interversionedfile_implementations/test_join.py test_join.py-20060302012326-9b5e9b0f0a03fedc
bzrlib/tests/revisionstore_implementations/ revisionstore_implementations-20060303020702-1d2e36b63cef2706
bzrlib/tests/revisionstore_implementations/__init__.py __init__.py-20060303020702-976c4186a0f99edb
bzrlib/tests/revisionstore_implementations/test_all.py test_all.py-20060303020702-9b2d4c1d75407f31
bzrlib/tests/test_escaped_store.py test_escaped_store.py-20060216023929-6bcb9a067344959f
modified:
NEWS NEWS-20050323055033-4e00b5db738777ff
bzrlib/annotate.py annotate.py-20050922133147-7c60541d2614f022
bzrlib/branch.py branch.py-20050309040759-e4baf4e0d046576e
bzrlib/builtins.py builtins.py-20050830033751-fc01482b9ca23183
bzrlib/bundle/serializer/v4.py v10.py-20070611062757-5ggj7k18s9dej0fr-1
bzrlib/bzrdir.py bzrdir.py-20060131065624-156dfea39c4387cb
bzrlib/check.py check.py-20050309040759-f3a679400c06bcc1
bzrlib/fetch.py fetch.py-20050818234941-26fea6105696365d
bzrlib/inventory.py inventory.py-20050309040759-6648b84ca2005b37
bzrlib/knit.py knit.py-20051212171256-f056ac8f0fbe1bd9
bzrlib/log.py log.py-20050505065812-c40ce11702fe5fb1
bzrlib/memorytree.py memorytree.py-20060906023413-4wlkalbdpsxi2r4y-1
bzrlib/merge.py merge.py-20050513021216-953b65a438527106
bzrlib/multiparent.py __init__.py-20070410133617-n1jdhcc1n1mibarp-1
bzrlib/reconcile.py reweave_inventory.py-20051108164726-1e5e0934febac06e
bzrlib/remote.py remote.py-20060720103555-yeeg2x51vn0rbtdp-1
bzrlib/repofmt/knitrepo.py knitrepo.py-20070206081537-pyy4a00xdas0j4pf-1
bzrlib/repofmt/pack_repo.py pack_repo.py-20070813041115-gjv5ma7ktfqwsjgn-1
bzrlib/repofmt/weaverepo.py presplitout.py-20070125045333-wfav3tsh73oxu3zk-1
bzrlib/repository.py rev_storage.py-20051111201905-119e9401e46257e3
bzrlib/revisiontree.py revisiontree.py-20060724012533-bg8xyryhxd0o0i0h-1
bzrlib/smart/repository.py repository.py-20061128022038-vr5wy5bubyb8xttk-1
bzrlib/store/__init__.py store.py-20050309040759-164dc5173d6406c2
bzrlib/store/text.py text.py-20050928201105-c26468dcb5d9b18b
bzrlib/store/versioned/__init__.py weavestore.py-20050907094258-88262e0434babab9
bzrlib/tests/__init__.py selftest.py-20050531073622-8d0e3c8845c97a64
bzrlib/tests/blackbox/test_info.py test_info.py-20060215045507-bbdd2d34efab9e0a
bzrlib/tests/branch_implementations/test_branch.py testbranch.py-20050711070244-121d632bc37d7253
bzrlib/tests/bzrdir_implementations/test_bzrdir.py test_bzrdir.py-20060131065642-0ebeca5e30e30866
bzrlib/tests/interrepository_implementations/test_fetch.py test_fetch.py-20080425213627-j60cjh782ufm83ry-1
bzrlib/tests/interrepository_implementations/test_interrepository.py test_interrepository.py-20060220061411-1ec13fa99e5e3eee
bzrlib/tests/repository_implementations/__init__.py __init__.py-20060131092037-9564957a7d4a841b
bzrlib/tests/repository_implementations/helpers.py helpers.py-20070924032407-m460yl9j5gu5ju85-2
bzrlib/tests/repository_implementations/test_check.py test_check.py-20070824124512-38g4d135gcqxo4zb-1
bzrlib/tests/repository_implementations/test_check_reconcile.py test_broken.py-20070928125406-62236394w0jpbpd6-2
bzrlib/tests/repository_implementations/test_commit_builder.py test_commit_builder.py-20060606110838-76e3ra5slucqus81-1
bzrlib/tests/repository_implementations/test_fetch.py test_fetch.py-20070814052151-5cxha9slx4c93uog-1
bzrlib/tests/repository_implementations/test_reconcile.py test_reconcile.py-20060223022332-572ef70a3288e369
bzrlib/tests/repository_implementations/test_repository.py test_repository.py-20060131092128-ad07f494f5c9d26c
bzrlib/tests/repository_implementations/test_statistics.py test_statistics.py-20070203082432-6738e8fl0mm7ikre-1
bzrlib/tests/test_bundle.py test.py-20050630184834-092aa401ab9f039c
bzrlib/tests/test_fetch.py testfetch.py-20050825090644-f73e07e7dfb1765a
bzrlib/tests/test_knit.py test_knit.py-20051212171302-95d4c00dd5f11f2b
bzrlib/tests/test_merge.py testmerge.py-20050905070950-c1b5aa49ff911024
bzrlib/tests/test_merge_core.py test_merge_core.py-20050824132511-eb99b23a0eec641b
bzrlib/tests/test_remote.py test_remote.py-20060720103555-yeeg2x51vn0rbtdp-2
bzrlib/tests/test_repository.py test_repository.py-20060131075918-65c555b881612f4d
bzrlib/tests/test_selftest.py test_selftest.py-20051202044319-c110a115d8c0456a
bzrlib/tests/test_smart.py test_smart.py-20061122024551-ol0l0o0oofsu9b3t-2
bzrlib/tests/test_store.py teststore.py-20050826022702-f6caadb647395769
bzrlib/tests/test_upgrade.py test_upgrade.py-20051004040251-555fe1d2bae1bc71
bzrlib/tests/test_versionedfile.py test_versionedfile.py-20060222045249-db45c9ed14a1c2e5
bzrlib/tests/tree_implementations/test_inv.py test_inv.py-20070312023226-0cdvk5uwhutis9vg-1
bzrlib/tree.py tree.py-20050309040759-9d5f2496be663e77
bzrlib/versionedfile.py versionedfile.py-20060222045106-5039c71ee3b65490
bzrlib/weave.py knit.py-20050627021749-759c29984154256b
bzrlib/weave_commands.py weave_commands.py-20060320231507-8e9f300bffc1aa19
bzrlib/workingtree.py workingtree.py-20050511021032-29b6ec0a681e02e3
bzrlib/workingtree_4.py workingtree_4.py-20070208044105-5fgpc5j3ljlh5q6c-1
------------------------------------------------------------
revno: 3441.3.2.1.31
revision-id:andrew.bennetts at canonical.com-20080625222421-3awo7n34il23al6e
parent: andrew.bennetts at canonical.com-20080625221943-u2l0bgub812uuxpv
committer: Andrew Bennetts <andrew.bennetts at canonical.com>
branch nick: smart-push-gpm
timestamp: Thu 2008-06-26 08:24:21 +1000
message:
Add test for allow_diverged flag.
modified:
bzrlib/tests/test_smart.py test_smart.py-20061122024551-ol0l0o0oofsu9b3t-2
------------------------------------------------------------
revno: 3441.3.2.1.30
revision-id:andrew.bennetts at canonical.com-20080625221943-u2l0bgub812uuxpv
parent: andrew.bennetts at canonical.com-20080625081024-0r93tenthlcg1m22
committer: Andrew Bennetts <andrew.bennetts at canonical.com>
branch nick: smart-push-gpm
timestamp: Thu 2008-06-26 08:19:43 +1000
message:
Improve tests for all Branch.set_last_revision* verbs.
modified:
bzrlib/tests/test_smart.py test_smart.py-20061122024551-ol0l0o0oofsu9b3t-2
------------------------------------------------------------
revno: 3441.3.2.1.29
revision-id:andrew.bennetts at canonical.com-20080625081024-0r93tenthlcg1m22
parent: andrew.bennetts at canonical.com-20080625070341-mtvuq1hltikm3axr
committer: Andrew Bennetts <andrew.bennetts at canonical.com>
branch nick: smart-push-gpm
timestamp: Wed 2008-06-25 18:10:24 +1000
message:
More review tweaks: whitespace nits in test_smart, add (and use) ._clear_cached_state_of_remote_branch_only method in bzrlib/remote.py.
modified:
bzrlib/remote.py remote.py-20060720103555-yeeg2x51vn0rbtdp-1
bzrlib/tests/test_smart.py test_smart.py-20061122024551-ol0l0o0oofsu9b3t-2
------------------------------------------------------------
revno: 3441.3.2.1.28
revision-id:andrew.bennetts at canonical.com-20080625070341-mtvuq1hltikm3axr
parent: andrew.bennetts at canonical.com-20080625064825-rda4tckbyjtpbasd
committer: Andrew Bennetts <andrew.bennetts at canonical.com>
branch nick: smart-push-gpm
timestamp: Wed 2008-06-25 17:03:41 +1000
message:
Another review tweak: rename do_not_overwrite_descendant to allow_overwrite_descendant.
modified:
bzrlib/remote.py remote.py-20060720103555-yeeg2x51vn0rbtdp-1
bzrlib/smart/branch.py branch.py-20061124031907-mzh3pla28r83r97f-1
------------------------------------------------------------
revno: 3441.3.2.1.27
revision-id:andrew.bennetts at canonical.com-20080625064825-rda4tckbyjtpbasd
parent: andrew.bennetts at canonical.com-20080625052131-vjkwu35vz03rbxfx
committer: Andrew Bennetts <andrew.bennetts at canonical.com>
branch nick: smart-push-gpm
timestamp: Wed 2008-06-25 16:48:25 +1000
message:
Tweaks suggested by John's review: rename _check_if_descendant_or_diverged, move caching last_revision_info into base Branch, better use of lock decorators.
modified:
bzrlib/branch.py branch.py-20050309040759-e4baf4e0d046576e
bzrlib/remote.py remote.py-20060720103555-yeeg2x51vn0rbtdp-1
------------------------------------------------------------
revno: 3441.3.2.1.26
revision-id:andrew.bennetts at canonical.com-20080625052131-vjkwu35vz03rbxfx
parent: andrew.bennetts at canonical.com-20080619025112-wf4jpdp25lqk422y
parent: andrew.bennetts at canonical.com-20080624225843-8e4tdnekeltv4g1j
committer: Andrew Bennetts <andrew.bennetts at canonical.com>
branch nick: smart-push-gpm
timestamp: Wed 2008-06-25 15:21:31 +1000
message:
Merge old-hpss-branch-implementation-test.
modified:
NEWS NEWS-20050323055033-4e00b5db738777ff
bzrlib/builtins.py builtins.py-20050830033751-fc01482b9ca23183
bzrlib/index.py index.py-20070712131115-lolkarso50vjr64s-1
bzrlib/merge.py merge.py-20050513021216-953b65a438527106
bzrlib/smart/medium.py medium.py-20061103051856-rgu2huy59fkz902q-1
bzrlib/tests/test_selftest.py test_selftest.py-20051202044319-c110a115d8c0456a
bzrlib/tests/test_transport.py testtransport.py-20050718175618-e5cdb99f4555ddce
bzrlib/tests/tree_implementations/__init__.py __init__.py-20060717075546-420s7b0bj9hzeowi-2
bzrlib/tests/tree_implementations/test_tree.py test_tree.py-20061215160206-usu7lwcj8aq2n3br-1
bzrlib/transport/__init__.py transport.py-20050711165921-4978aa7ce1285ad5
bzrlib/workingtree_4.py workingtree_4.py-20070208044105-5fgpc5j3ljlh5q6c-1
------------------------------------------------------------
revno: 3441.3.2.1.25
revision-id:andrew.bennetts at canonical.com-20080619025112-wf4jpdp25lqk422y
parent: andrew.bennetts at canonical.com-20080619010305-3pudocqfsszeapgr
committer: Andrew Bennetts <andrew.bennetts at canonical.com>
branch nick: smart-push-gpm
timestamp: Thu 2008-06-19 12:51:12 +1000
message:
Rename Branch.set_last_revision_descendant verb to Branch.set_last_revision_ex. It's a cop out, but at least it's not misleading.
modified:
bzrlib/remote.py remote.py-20060720103555-yeeg2x51vn0rbtdp-1
bzrlib/smart/branch.py branch.py-20061124031907-mzh3pla28r83r97f-1
bzrlib/smart/request.py request.py-20061108095550-gunadhxmzkdjfeek-1
bzrlib/tests/test_smart.py test_smart.py-20061122024551-ol0l0o0oofsu9b3t-2
------------------------------------------------------------
revno: 3441.3.2.1.24
revision-id:andrew.bennetts at canonical.com-20080619010305-3pudocqfsszeapgr
parent: andrew.bennetts at canonical.com-20080618074641-gletfspa4l47yq6q
committer: Andrew Bennetts <andrew.bennetts at canonical.com>
branch nick: smart-push-gpm
timestamp: Thu 2008-06-19 11:03:05 +1000
message:
Remove RemoteGraph experiment.
modified:
bzrlib/remote.py remote.py-20060720103555-yeeg2x51vn0rbtdp-1
bzrlib/smart/repository.py repository.py-20061128022038-vr5wy5bubyb8xttk-1
bzrlib/smart/request.py request.py-20061108095550-gunadhxmzkdjfeek-1
bzrlib/tests/test_remote.py test_remote.py-20060720103555-yeeg2x51vn0rbtdp-2
bzrlib/tests/test_smart.py test_smart.py-20061122024551-ol0l0o0oofsu9b3t-2
------------------------------------------------------------
revno: 3441.3.2.1.23
revision-id:andrew.bennetts at canonical.com-20080618074641-gletfspa4l47yq6q
parent: andrew.bennetts at canonical.com-20080618072115-ig9jwupw1yeu8iey
committer: Andrew Bennetts <andrew.bennetts at canonical.com>
branch nick: smart-push-gpm
timestamp: Wed 2008-06-18 17:46:41 +1000
message:
Fix test failures.
modified:
bzrlib/remote.py remote.py-20060720103555-yeeg2x51vn0rbtdp-1
bzrlib/smart/branch.py branch.py-20061124031907-mzh3pla28r83r97f-1
bzrlib/tests/test_smart.py test_smart.py-20061122024551-ol0l0o0oofsu9b3t-2
------------------------------------------------------------
revno: 3441.3.2.1.22
revision-id:andrew.bennetts at canonical.com-20080618072115-ig9jwupw1yeu8iey
parent: andrew.bennetts at canonical.com-20080612000214-hc6p2gyvvatrq78d
parent: andrew.bennetts at canonical.com-20080618070236-x1eavwimpg8y4tff
committer: Andrew Bennetts <andrew.bennetts at canonical.com>
branch nick: smart-push-gpm
timestamp: Wed 2008-06-18 17:21:15 +1000
message:
Merge from old-hpss-branch-implementation-test.
modified:
NEWS NEWS-20050323055033-4e00b5db738777ff
bzr bzr.py-20050313053754-5485f144c7006fa6
bzrlib/branch.py branch.py-20050309040759-e4baf4e0d046576e
bzrlib/builtins.py builtins.py-20050830033751-fc01482b9ca23183
bzrlib/decorators.py decorators.py-20060112082512-6bfc2d882df1698d
bzrlib/remote.py remote.py-20060720103555-yeeg2x51vn0rbtdp-1
bzrlib/revisionspec.py revisionspec.py-20050907152633-17567659fd5c0ddb
bzrlib/smart/client.py client.py-20061116014825-2k6ada6xgulslami-1
bzrlib/smart/medium.py medium.py-20061103051856-rgu2huy59fkz902q-1
bzrlib/tests/branch_implementations/test_revision_history.py test_revision_histor-20070326062311-v7co92liyuchb80w-1
bzrlib/tests/test_decorators.py test_decorators.py-20060113063037-0e7bd4566758f4fa
bzrlib/tests/test_lockdir.py test_lockdir.py-20060220222025-33d4221569a3d600
bzrlib/tests/test_remote.py test_remote.py-20060720103555-yeeg2x51vn0rbtdp-2
bzrlib/tests/test_revisionspec.py testrevisionnamespaces.py-20050711050225-8b4af89e6b1efe84
bzrlib/tests/test_smart_transport.py test_ssh_transport.py-20060608202016-c25gvf1ob7ypbus6-2
bzrlib/tests/test_trace.py testtrace.py-20051110225523-a21117fc7a07eeff
bzrlib/trace.py trace.py-20050309040759-c8ed824bdcd4748a
bzrlib/transport/remote.py ssh.py-20060608202016-c25gvf1ob7ypbus6-1
bzrlib/xml_serializer.py xml.py-20050309040759-57d51586fdec365d
doc/developers/releasing.txt releasing.txt-20080502015919-fnrcav8fwy8ccibu-1
------------------------------------------------------------
revno: 3441.3.2.1.21
revision-id:andrew.bennetts at canonical.com-20080612000214-hc6p2gyvvatrq78d
parent: andrew.bennetts at canonical.com-20080611110514-yvj911cxzglska8k
parent: andrew.bennetts at canonical.com-20080612000058-akw5xzm3hmqqg814
committer: Andrew Bennetts <andrew.bennetts at canonical.com>
branch nick: smart-push-gpm
timestamp: Thu 2008-06-12 10:02:14 +1000
message:
Merge from old-hpss-branch-implementation-test
modified:
NEWS NEWS-20050323055033-4e00b5db738777ff
bzrlib/__init__.py __init__.py-20050309040759-33e65acf91bbcd5d
bzrlib/branch.py branch.py-20050309040759-e4baf4e0d046576e
bzrlib/diff.py diff.py-20050309040759-26944fbbf2ebbf36
bzrlib/export/tar_exporter.py tar_exporter.py-20051114235828-1f6349a2f090a5d0
bzrlib/osutils.py osutils.py-20050309040759-eeaff12fbf77ac86
bzrlib/remote.py remote.py-20060720103555-yeeg2x51vn0rbtdp-1
bzrlib/smart/protocol.py protocol.py-20061108035435-ot0lstk2590yqhzr-1
bzrlib/tests/blackbox/test_export.py test_export.py-20051229024010-e6c26658e460fb1c
bzrlib/tests/test_diff.py testdiff.py-20050727164403-d1a3496ebb12e339
bzrlib/tests/test_osutils.py test_osutils.py-20051201224856-e48ee24c12182989
bzrlib/tests/test_smart_transport.py test_ssh_transport.py-20060608202016-c25gvf1ob7ypbus6-2
doc/developers/HACKING.txt HACKING-20050805200004-2a5dc975d870f78c
doc/developers/index.txt index.txt-20070508041241-qznziunkg0nffhiw-1
doc/developers/releasing.txt releasing.txt-20080502015919-fnrcav8fwy8ccibu-1
doc/index.txt index.txt-20070813101924-07gd9i9d2jt124bf-1
------------------------------------------------------------
revno: 3441.3.2.1.20
revision-id:andrew.bennetts at canonical.com-20080611110514-yvj911cxzglska8k
parent: andrew.bennetts at canonical.com-20080611075800-dy5i13vfxf7klxt2
committer: Andrew Bennetts <andrew.bennetts at canonical.com>
branch nick: smart-push-gpm
timestamp: Wed 2008-06-11 21:05:14 +1000
message:
Fix failing test by adding @needs_write_lock to RemoteBranch.last_revision_info, because it uses _last_revision_info_cache.
modified:
bzrlib/remote.py remote.py-20060720103555-yeeg2x51vn0rbtdp-1
------------------------------------------------------------
revno: 3441.3.2.1.19
revision-id:andrew.bennetts at canonical.com-20080611075800-dy5i13vfxf7klxt2
parent: andrew.bennetts at canonical.com-20080610085630-w1wcd9p18n0nr5na
parent: andrew.bennetts at canonical.com-20080611075635-asua1e59xzsxg4te
committer: Andrew Bennetts <andrew.bennetts at canonical.com>
branch nick: smart-push-gpm
timestamp: Wed 2008-06-11 17:58:00 +1000
message:
Merge from old-hpss-branch-implementation-test.
modified:
bzrlib/branch.py branch.py-20050309040759-e4baf4e0d046576e
bzrlib/remote.py remote.py-20060720103555-yeeg2x51vn0rbtdp-1
bzrlib/tests/__init__.py selftest.py-20050531073622-8d0e3c8845c97a64
bzrlib/tests/branch_implementations/test_branch.py testbranch.py-20050711070244-121d632bc37d7253
bzrlib/tests/branch_implementations/test_check.py test_check.py-20080429151303-1sbfclxhddpz0tnj-1
bzrlib/tests/branch_implementations/test_reconcile.py test_reconcile.py-20080429161555-qlmccuyeyt6pvho7-1
------------------------------------------------------------
revno: 3441.3.2.1.18
revision-id:andrew.bennetts at canonical.com-20080610085630-w1wcd9p18n0nr5na
parent: andrew.bennetts at canonical.com-20080610075651-buomfp69nu97yw3m
committer: Andrew Bennetts <andrew.bennetts at canonical.com>
branch nick: smart-push-gpm
timestamp: Tue 2008-06-10 18:56:30 +1000
message:
Fix some test failures.
modified:
bzrlib/branch.py branch.py-20050309040759-e4baf4e0d046576e
bzrlib/remote.py remote.py-20060720103555-yeeg2x51vn0rbtdp-1
bzrlib/smart/branch.py branch.py-20061124031907-mzh3pla28r83r97f-1
------------------------------------------------------------
revno: 3441.3.2.1.17
revision-id:andrew.bennetts at canonical.com-20080610075651-buomfp69nu97yw3m
parent: andrew.bennetts at canonical.com-20080605230514-curu8h29adujufi2
parent: andrew.bennetts at canonical.com-20080610075420-sjzf37kdpxcbra0d
committer: Andrew Bennetts <andrew.bennetts at canonical.com>
branch nick: smart-push-gpm
timestamp: Tue 2008-06-10 17:56:51 +1000
message:
Merge old-hpss-branch-implementation-test.
added:
bzrlib/tests/blackbox/test_alias.py test_alias.py-20080425112253-fbt0yz1c1834jriz-1
bzrlib/tests/blackbox/test_modified.py test_modified.py-20080424085848-nwqjenan4dq2vq3w-1
bzrlib/tests/per_repository_reference/ repository_external_-20080220025549-nnm2s80it1lvcwnc-1
bzrlib/tests/per_repository_reference/__init__.py __init__.py-20080220025549-nnm2s80it1lvcwnc-2
bzrlib/tests/per_repository_reference/test_add_inventory.py test_add_inventory.p-20080220025549-nnm2s80it1lvcwnc-3
bzrlib/tests/per_repository_reference/test_add_revision.py test_add_revision.py-20080220034108-ao1u8qgakqbo5a08-1
bzrlib/tests/per_repository_reference/test_add_signature_text.py test_add_signature_t-20080220041905-1j2g4lyz3c6h34v4-1
bzrlib/tests/per_repository_reference/test_all_revision_ids.py test_all_revision_id-20080220041905-1j2g4lyz3c6h34v4-2
bzrlib/tests/per_repository_reference/test_break_lock.py test_break_lock.py-20080220042825-1f48qmpnuqqp5wg2-1
bzrlib/tests/per_repository_reference/test_check.py test_check.py-20080220044229-sxxe747gzi6q8fyv-1
renamed:
doc/en/user-guide/revnos.txt => doc/en/user-guide/zen.txt revnos.txt-20080111231928-pbntxea0ynh9ww1t-1
modified:
NEWS NEWS-20050323055033-4e00b5db738777ff
bzrlib/branch.py branch.py-20050309040759-e4baf4e0d046576e
bzrlib/builtins.py builtins.py-20050830033751-fc01482b9ca23183
bzrlib/check.py check.py-20050309040759-f3a679400c06bcc1
bzrlib/config.py config.py-20051011043216-070c74f4e9e338e8
bzrlib/counted_lock.py counted_lock.py-20070502135927-7dk86io3ok7ctx6k-1
bzrlib/dirstate.py dirstate.py-20060728012006-d6mvoihjb3je9peu-1
bzrlib/errors.py errors.py-20050309040759-20512168c4e14fbd
bzrlib/fetch.py fetch.py-20050818234941-26fea6105696365d
bzrlib/knit.py knit.py-20051212171256-f056ac8f0fbe1bd9
bzrlib/merge_directive.py merge_directive.py-20070228184838-ja62280spt1g7f4x-1
bzrlib/remote.py remote.py-20060720103555-yeeg2x51vn0rbtdp-1
bzrlib/repository.py rev_storage.py-20051111201905-119e9401e46257e3
bzrlib/tag.py tag.py-20070212110532-91cw79inah2cfozx-1
bzrlib/tests/__init__.py selftest.py-20050531073622-8d0e3c8845c97a64
bzrlib/tests/blackbox/__init__.py __init__.py-20051128053524-eba30d8255e08dc3
bzrlib/tests/blackbox/test_added.py test_added.py-20060119085008-6b8b90369d42a26c
bzrlib/tests/blackbox/test_non_ascii.py test_non_ascii.py-20060105214030-68010be784a5d854
bzrlib/tests/blackbox/test_unknowns.py test_unknowns.py-20070905015344-74tg6s1synijo2oe-1
bzrlib/tests/branch_implementations/test_pull.py test_pull.py-20060410103942-83c35b26657414fc
bzrlib/tests/http_server.py httpserver.py-20061012142527-m1yxdj1xazsf8d7s-1
bzrlib/tests/repository_implementations/__init__.py __init__.py-20060131092037-9564957a7d4a841b
bzrlib/tests/test_config.py testconfig.py-20051011041908-742d0c15d8d8c8eb
bzrlib/tests/test_counted_lock.py test_counted_lock.py-20070502135927-7dk86io3ok7ctx6k-2
bzrlib/tests/test_diff.py testdiff.py-20050727164403-d1a3496ebb12e339
bzrlib/tests/test_dirstate.py test_dirstate.py-20060728012006-d6mvoihjb3je9peu-2
bzrlib/tests/test_lockable_files.py test_lockable_files.py-20051225183927-365c7fd99591caf1
bzrlib/tests/test_merge_directive.py test_merge_directive-20070228184838-ja62280spt1g7f4x-2
bzrlib/tests/test_msgeditor.py test_msgeditor.py-20051202041359-920315ec6011ee51
bzrlib/tests/test_selftest.py test_selftest.py-20051202044319-c110a115d8c0456a
bzrlib/tests/test_transform.py test_transaction.py-20060105172520-b3ffb3946550e6c4
bzrlib/tests/test_transport_implementations.py test_transport_implementations.py-20051227111451-f97c5c7d5c49fce7
bzrlib/tests/test_versionedfile.py test_versionedfile.py-20060222045249-db45c9ed14a1c2e5
bzrlib/transform.py transform.py-20060105172343-dd99e54394d91687
bzrlib/transport/__init__.py transport.py-20050711165921-4978aa7ce1285ad5
bzrlib/versionedfile.py versionedfile.py-20060222045106-5039c71ee3b65490
bzrlib/workingtree_4.py workingtree_4.py-20070208044105-5fgpc5j3ljlh5q6c-1
contrib/bzr_access bzr_access-20071210163004-c9lb1renhra2ncg0-1
doc/en/user-guide/core_concepts.txt core_concepts.txt-20071114035000-q36a9h57ps06uvnl-2
doc/en/user-guide/index.txt index.txt-20060622101119-tgwtdci8z769bjb9-2
doc/en/user-guide/zen.txt revnos.txt-20080111231928-pbntxea0ynh9ww1t-1
------------------------------------------------------------
revno: 3441.3.2.1.16
revision-id:andrew.bennetts at canonical.com-20080605230514-curu8h29adujufi2
parent: andrew.bennetts at canonical.com-20080604064528-q7ie26uexe09pvgd
parent: andrew.bennetts at canonical.com-20080605230341-33kb0jzhn8wi3glg
committer: Andrew Bennetts <andrew.bennetts at canonical.com>
branch nick: smart-push-gpm
timestamp: Fri 2008-06-06 09:05:14 +1000
message:
Merge from old-hpss-branch-implementation-test.
modified:
NEWS NEWS-20050323055033-4e00b5db738777ff
bzrlib/branch.py branch.py-20050309040759-e4baf4e0d046576e
bzrlib/fetch.py fetch.py-20050818234941-26fea6105696365d
bzrlib/remote.py remote.py-20060720103555-yeeg2x51vn0rbtdp-1
bzrlib/repository.py rev_storage.py-20051111201905-119e9401e46257e3
bzrlib/smart/client.py client.py-20061116014825-2k6ada6xgulslami-1
bzrlib/smart/server.py server.py-20061110062051-chzu10y32vx8gvur-1
bzrlib/tests/blackbox/test_uncommit.py test_uncommit.py-20051027212835-84944b63adae51be
bzrlib/tests/branch_implementations/__init__.py __init__.py-20060123013057-b12a52c3f361daf4
bzrlib/tests/bzrdir_implementations/__init__.py __init__.py-20060131065642-34c39b54f42dd048
bzrlib/tests/repository_implementations/__init__.py __init__.py-20060131092037-9564957a7d4a841b
bzrlib/tests/test_smart_transport.py test_ssh_transport.py-20060608202016-c25gvf1ob7ypbus6-2
bzrlib/tests/test_transport_implementations.py test_transport_implementations.py-20051227111451-f97c5c7d5c49fce7
bzrlib/tests/test_workingtree_4.py test_workingtree_4.p-20070223025758-531n3tznl3zacv2o-1
bzrlib/tests/workingtree_implementations/test_parents.py test_set_parents.py-20060807231740-yicmnlci1mj8smu1-1
bzrlib/transport/__init__.py transport.py-20050711165921-4978aa7ce1285ad5
bzrlib/transport/remote.py ssh.py-20060608202016-c25gvf1ob7ypbus6-1
bzrlib/workingtree.py workingtree.py-20050511021032-29b6ec0a681e02e3
bzrlib/workingtree_4.py workingtree_4.py-20070208044105-5fgpc5j3ljlh5q6c-1
------------------------------------------------------------
revno: 3441.3.2.1.15
revision-id:andrew.bennetts at canonical.com-20080604064528-q7ie26uexe09pvgd
parent: andrew.bennetts at canonical.com-20080604064433-xtm2hi90ef1igt1v
committer: Andrew Bennetts <andrew.bennetts at canonical.com>
branch nick: smart-push-gpm
timestamp: Wed 2008-06-04 16:45:28 +1000
message:
Remove obsolete comment.
modified:
bzrlib/remote.py remote.py-20060720103555-yeeg2x51vn0rbtdp-1
------------------------------------------------------------
revno: 3441.3.2.1.14
revision-id:andrew.bennetts at canonical.com-20080604064433-xtm2hi90ef1igt1v
parent: andrew.bennetts at canonical.com-20080604064054-jt6f7bsc220rgrur
parent: pqm at pqm.ubuntu.com-20080603072242-omtkkk586pc5k4d4
committer: Andrew Bennetts <andrew.bennetts at canonical.com>
branch nick: smart-push-gpm
timestamp: Wed 2008-06-04 16:44:33 +1000
message:
Merge from bzr.dev.
modified:
NEWS NEWS-20050323055033-4e00b5db738777ff
bzrlib/__init__.py __init__.py-20050309040759-33e65acf91bbcd5d
bzrlib/branch.py branch.py-20050309040759-e4baf4e0d046576e
bzrlib/builtins.py builtins.py-20050830033751-fc01482b9ca23183
bzrlib/commands.py bzr.py-20050309040720-d10f4714595cf8c3
bzrlib/errors.py errors.py-20050309040759-20512168c4e14fbd
bzrlib/graph.py graph_walker.py-20070525030359-y852guab65d4wtn0-1
bzrlib/lockdir.py lockdir.py-20060220222025-98258adf27fbdda3
bzrlib/log.py log.py-20050505065812-c40ce11702fe5fb1
bzrlib/merge.py merge.py-20050513021216-953b65a438527106
bzrlib/remote.py remote.py-20060720103555-yeeg2x51vn0rbtdp-1
bzrlib/repofmt/knitrepo.py knitrepo.py-20070206081537-pyy4a00xdas0j4pf-1
bzrlib/repository.py rev_storage.py-20051111201905-119e9401e46257e3
bzrlib/revisionspec.py revisionspec.py-20050907152633-17567659fd5c0ddb
bzrlib/smart/client.py client.py-20061116014825-2k6ada6xgulslami-1
bzrlib/smart/message.py message.py-20080222013625-ncqmh3nrxjkxab87-1
bzrlib/symbol_versioning.py symbol_versioning.py-20060105104851-9ecf8af605d15a80
bzrlib/tests/branch_implementations/test_branch.py testbranch.py-20050711070244-121d632bc37d7253
bzrlib/tests/branch_implementations/test_update.py test_update.py-20060305010612-e68efbcbb1baa69f
bzrlib/tests/test_branch.py test_branch.py-20060116013032-97819aa07b8ab3b5
bzrlib/tests/test_errors.py test_errors.py-20060210110251-41aba2deddf936a8
bzrlib/tests/test_graph.py test_graph_walker.py-20070525030405-enq4r60hhi9xrujc-1
bzrlib/tests/test_lockdir.py test_lockdir.py-20060220222025-33d4221569a3d600
bzrlib/tests/test_merge.py testmerge.py-20050905070950-c1b5aa49ff911024
bzrlib/tests/test_revisionspec.py testrevisionnamespaces.py-20050711050225-8b4af89e6b1efe84
bzrlib/tests/test_selftest.py test_selftest.py-20051202044319-c110a115d8c0456a
bzrlib/tests/test_smart_transport.py test_ssh_transport.py-20060608202016-c25gvf1ob7ypbus6-2
bzrlib/tests/test_switch.py test_switch.py-20071116011000-v5lnw7d2wkng9eux-2
bzrlib/tests/test_symbol_versioning.py test_symbol_versioning.py-20060105104851-51d7722c2018d42b
bzrlib/uncommit.py uncommit.py-20050626215513-5ec509fa425b305c
doc/developers/HACKING.txt HACKING-20050805200004-2a5dc975d870f78c
doc/developers/index.txt index.txt-20070508041241-qznziunkg0nffhiw-1
doc/developers/releasing.txt releasing.txt-20080502015919-fnrcav8fwy8ccibu-1
doc/en/user-guide/branching_a_project.txt branching_a_project.-20071122141511-0knao2lklsdsvb1q-2
doc/en/user-guide/partner_intro.txt partner_workflow.txt-20071122141511-0knao2lklsdsvb1q-4
doc/en/user-guide/releasing_a_project.txt releasing_a_project.-20071121073725-0corxykv5irjal00-5
doc/en/user-guide/svn_plugin.txt svn_plugin.txt-20080509065016-cjc90f46407vi9a0-2
doc/en/user-guide/undoing_mistakes.txt undoing_mistakes.txt-20071121092300-8fyacngt1w98e5mp-1
------------------------------------------------------------
revno: 3441.3.2.1.13
revision-id:andrew.bennetts at canonical.com-20080604064054-jt6f7bsc220rgrur
parent: andrew.bennetts at canonical.com-20080529065747-dmdm81xjibjz0bho
committer: Andrew Bennetts <andrew.bennetts at canonical.com>
branch nick: smart-push-gpm
timestamp: Wed 2008-06-04 16:40:54 +1000
message:
Remove unnecessary extra lock_write in _basic_push.
modified:
bzrlib/branch.py branch.py-20050309040759-e4baf4e0d046576e
------------------------------------------------------------
revno: 3441.3.2.1.12
revision-id:andrew.bennetts at canonical.com-20080529065747-dmdm81xjibjz0bho
parent: andrew.bennetts at canonical.com-20080529065015-3ha2jwaf5ft73ey4
parent: andrew.bennetts at canonical.com-20080529065132-rbfcrtmrbdgmqass
committer: Andrew Bennetts <andrew.bennetts at canonical.com>
branch nick: smart-push-gpm
timestamp: Thu 2008-05-29 16:57:47 +1000
message:
Merge from remote-is-at-least.
modified:
bzrlib/remote.py remote.py-20060720103555-yeeg2x51vn0rbtdp-1
bzrlib/smart/medium.py medium.py-20061103051856-rgu2huy59fkz902q-1
bzrlib/tests/test_remote.py test_remote.py-20060720103555-yeeg2x51vn0rbtdp-2
bzrlib/transport/http/_urllib.py _urlgrabber.py-20060113083826-0bbf7d992fbf090c
------------------------------------------------------------
revno: 3441.3.2.1.11
revision-id:andrew.bennetts at canonical.com-20080529065015-3ha2jwaf5ft73ey4
parent: andrew.bennetts at canonical.com-20080527011352-is7v01kyo3yhh8sl
parent: pqm at pqm.ubuntu.com-20080527013230-8qjaju10duxpy3e2
committer: Andrew Bennetts <andrew.bennetts at canonical.com>
branch nick: smart-push-gpm
timestamp: Thu 2008-05-29 16:50:15 +1000
message:
Merge from bzr.dev.
modified:
NEWS NEWS-20050323055033-4e00b5db738777ff
bzrlib/repofmt/pack_repo.py pack_repo.py-20070813041115-gjv5ma7ktfqwsjgn-1
bzrlib/tests/test_repository.py test_repository.py-20060131075918-65c555b881612f4d
bzrlib/transport/fakenfs.py fakenfs.py-20060402223312-0e29c7275aa384dd
------------------------------------------------------------
revno: 3441.3.2.1.10
revision-id:andrew.bennetts at canonical.com-20080527011352-is7v01kyo3yhh8sl
parent: andrew.bennetts at canonical.com-20080522090535-gbzz7xj1t7piw1md
parent: pqm at pqm.ubuntu.com-20080524120232-22xdromy706t0x16
committer: Andrew Bennetts <andrew.bennetts at canonical.com>
branch nick: smart-push-gpm
timestamp: Tue 2008-05-27 11:13:52 +1000
message:
Merge from bzr.dev.
added:
bzrlib/tests/file_utils.py file_utils.py-20080506145406-a1h3ydg2lsh2iriy-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/config.py config.py-20051011043216-070c74f4e9e338e8
bzrlib/graph.py graph_walker.py-20070525030359-y852guab65d4wtn0-1
bzrlib/lockable_files.py control_files.py-20051111201905-bb88546e799d669f
bzrlib/merge.py merge.py-20050513021216-953b65a438527106
bzrlib/osutils.py osutils.py-20050309040759-eeaff12fbf77ac86
bzrlib/remote.py remote.py-20060720103555-yeeg2x51vn0rbtdp-1
bzrlib/repofmt/pack_repo.py pack_repo.py-20070813041115-gjv5ma7ktfqwsjgn-1
bzrlib/repofmt/weaverepo.py presplitout.py-20070125045333-wfav3tsh73oxu3zk-1
bzrlib/repository.py rev_storage.py-20051111201905-119e9401e46257e3
bzrlib/smart/branch.py branch.py-20061124031907-mzh3pla28r83r97f-1
bzrlib/smart/medium.py medium.py-20061103051856-rgu2huy59fkz902q-1
bzrlib/smart/repository.py repository.py-20061128022038-vr5wy5bubyb8xttk-1
bzrlib/tests/blackbox/test_branch.py test_branch.py-20060524161337-noms9gmcwqqrfi8y-1
bzrlib/tests/blackbox/test_ls.py test_ls.py-20060712232047-0jraqpecwngee12y-1
bzrlib/tests/branch_implementations/test_branch.py testbranch.py-20050711070244-121d632bc37d7253
bzrlib/tests/branch_implementations/test_permissions.py test_permissions.py-20060210110243-245c01403bf0fde6
bzrlib/tests/branch_implementations/test_push.py test_push.py-20070130153159-fhfap8uoifevg30j-1
bzrlib/tests/repository_implementations/test_has_same_location.py test_has_same_locati-20070807074648-2i2ah82fbe83iys7-1
bzrlib/tests/test_config.py testconfig.py-20051011041908-742d0c15d8d8c8eb
bzrlib/tests/test_graph.py test_graph_walker.py-20070525030405-enq4r60hhi9xrujc-1
bzrlib/tests/test_http_response.py test_http_response.py-20060628233143-950b2a482a32505d
bzrlib/tests/test_lockable_files.py test_lockable_files.py-20051225183927-365c7fd99591caf1
bzrlib/tests/test_merge_core.py test_merge_core.py-20050824132511-eb99b23a0eec641b
bzrlib/tests/test_osutils.py test_osutils.py-20051201224856-e48ee24c12182989
bzrlib/tests/test_osutils_encodings.py test_osutils_encodin-20061226013130-kkp732tpt3lm91vv-1
bzrlib/tests/test_permissions.py test_permissions.py-20051215004520-ccf475789c80e80c
bzrlib/tests/test_remote.py test_remote.py-20060720103555-yeeg2x51vn0rbtdp-2
bzrlib/tests/test_smart.py test_smart.py-20061122024551-ol0l0o0oofsu9b3t-2
bzrlib/tests/test_smart_transport.py test_ssh_transport.py-20060608202016-c25gvf1ob7ypbus6-2
bzrlib/tests/test_transform.py test_transaction.py-20060105172520-b3ffb3946550e6c4
bzrlib/tests/test_workingtree.py testworkingtree.py-20051004024258-b88d0fe8f101d468
bzrlib/tests/workingtree_implementations/test_basis_inventory.py test_basis_inventory.py-20051218151655-3650468941091309
bzrlib/tests/workingtree_implementations/test_workingtree.py test_workingtree.py-20060203003124-817757d3e31444fb
bzrlib/transform.py transform.py-20060105172343-dd99e54394d91687
bzrlib/transport/http/response.py _response.py-20060613154423-a2ci7hd4iw5c7fnt-1
bzrlib/workingtree.py workingtree.py-20050511021032-29b6ec0a681e02e3
bzrlib/workingtree_4.py workingtree_4.py-20070208044105-5fgpc5j3ljlh5q6c-1
doc/developers/tortoise-strategy.txt tortoisestrategy.txt-20080403024510-2ahdqrvnwqrb5p5t-1
------------------------------------------------------------
revno: 3441.3.2.1.9
revision-id:andrew.bennetts at canonical.com-20080522090535-gbzz7xj1t7piw1md
parent: andrew.bennetts at canonical.com-20080522083634-ysa1m4321kaqwx3c
committer: Andrew Bennetts <andrew.bennetts at canonical.com>
branch nick: smart-push-gpm
timestamp: Thu 2008-05-22 19:05:35 +1000
message:
Simplify _basic_push.
modified:
bzrlib/branch.py branch.py-20050309040759-e4baf4e0d046576e
------------------------------------------------------------
revno: 3441.3.2.1.8
revision-id:andrew.bennetts at canonical.com-20080522083634-ysa1m4321kaqwx3c
parent: andrew.bennetts at canonical.com-20080522082353-0x2qqjcdtlkeg88f
committer: Andrew Bennetts <andrew.bennetts at canonical.com>
branch nick: smart-push-gpm
timestamp: Thu 2008-05-22 18:36:34 +1000
message:
Fix pushing a diverged branch with --overwrite via HPSS.
modified:
bzrlib/branch.py branch.py-20050309040759-e4baf4e0d046576e
------------------------------------------------------------
revno: 3441.3.2.1.7
revision-id:andrew.bennetts at canonical.com-20080522082353-0x2qqjcdtlkeg88f
parent: andrew.bennetts at canonical.com-20080522074906-dcdk44d7y8cdn4no
committer: Andrew Bennetts <andrew.bennetts at canonical.com>
branch nick: smart-push-gpm
timestamp: Thu 2008-05-22 18:23:53 +1000
message:
Fix unbound global.
modified:
bzrlib/remote.py remote.py-20060720103555-yeeg2x51vn0rbtdp-1
------------------------------------------------------------
revno: 3441.3.2.1.6
revision-id:andrew.bennetts at canonical.com-20080522074906-dcdk44d7y8cdn4no
parent: andrew.bennetts at canonical.com-20080522055850-um0u9dj5jpkptkuq
committer: Andrew Bennetts <andrew.bennetts at canonical.com>
branch nick: smart-push-gpm
timestamp: Thu 2008-05-22 17:49:06 +1000
message:
Greatly simplify RemoteBranch.update_revisions. Still needs more tests.
modified:
bzrlib/remote.py remote.py-20060720103555-yeeg2x51vn0rbtdp-1
bzrlib/smart/branch.py branch.py-20061124031907-mzh3pla28r83r97f-1
bzrlib/smart/medium.py medium.py-20061103051856-rgu2huy59fkz902q-1
bzrlib/smart/request.py request.py-20061108095550-gunadhxmzkdjfeek-1
bzrlib/tests/test_smart.py test_smart.py-20061122024551-ol0l0o0oofsu9b3t-2
------------------------------------------------------------
revno: 3441.3.2.1.5
revision-id:andrew.bennetts at canonical.com-20080522055850-um0u9dj5jpkptkuq
parent: andrew.bennetts at canonical.com-20080522052046-jf4hroxln68v7pfn
committer: Andrew Bennetts <andrew.bennetts at canonical.com>
branch nick: smart-push-gpm
timestamp: Thu 2008-05-22 15:58:50 +1000
message:
Some small tweaks and comments.
modified:
bzrlib/remote.py remote.py-20060720103555-yeeg2x51vn0rbtdp-1
bzrlib/tests/test_remote.py test_remote.py-20060720103555-yeeg2x51vn0rbtdp-2
------------------------------------------------------------
revno: 3441.3.2.1.4
revision-id:andrew.bennetts at canonical.com-20080522052046-jf4hroxln68v7pfn
parent: andrew.bennetts at canonical.com-20080521115809-6cw3t8gn4qm0bpg9
committer: Andrew Bennetts <andrew.bennetts at canonical.com>
branch nick: smart-push-gpm
timestamp: Thu 2008-05-22 15:20:46 +1000
message:
Fix test failures, and add some tests for the remote graph heads RPC.
modified:
bzrlib/remote.py remote.py-20060720103555-yeeg2x51vn0rbtdp-1
bzrlib/tests/test_remote.py test_remote.py-20060720103555-yeeg2x51vn0rbtdp-2
bzrlib/tests/test_smart.py test_smart.py-20061122024551-ol0l0o0oofsu9b3t-2
------------------------------------------------------------
revno: 3441.3.2.1.3
revision-id:andrew.bennetts at canonical.com-20080521115809-6cw3t8gn4qm0bpg9
parent: andrew.bennetts at canonical.com-20080521115658-31lutjnj93u3dejf
committer: Andrew Bennetts <andrew.bennetts at canonical.com>
branch nick: smart-push-gpm
timestamp: Wed 2008-05-21 21:58:09 +1000
message:
Remove a bit more debugging cruft.
modified:
bzrlib/remote.py remote.py-20060720103555-yeeg2x51vn0rbtdp-1
------------------------------------------------------------
revno: 3441.3.2.1.2
revision-id:andrew.bennetts at canonical.com-20080521115658-31lutjnj93u3dejf
parent: andrew.bennetts at canonical.com-20080521115344-oofrx0k7yht4564t
committer: Andrew Bennetts <andrew.bennetts at canonical.com>
branch nick: smart-push-gpm
timestamp: Wed 2008-05-21 21:56:58 +1000
message:
Remove various debugging cruft.
modified:
bzrlib/branch.py branch.py-20050309040759-e4baf4e0d046576e
bzrlib/remote.py remote.py-20060720103555-yeeg2x51vn0rbtdp-1
------------------------------------------------------------
revno: 3441.3.2.1.1
revision-id:andrew.bennetts at canonical.com-20080521115344-oofrx0k7yht4564t
parent: andrew.bennetts at canonical.com-20080521024958-1b79jyuv3v9qhuq3
committer: Andrew Bennetts <andrew.bennetts at canonical.com>
branch nick: smart-push-gpm
timestamp: Wed 2008-05-21 21:53:44 +1000
message:
Avoid necessarily calling get_parent_map when pushing.
modified:
bzrlib/branch.py branch.py-20050309040759-e4baf4e0d046576e
bzrlib/remote.py remote.py-20060720103555-yeeg2x51vn0rbtdp-1
bzrlib/smart/repository.py repository.py-20061128022038-vr5wy5bubyb8xttk-1
bzrlib/smart/request.py request.py-20061108095550-gunadhxmzkdjfeek-1
bzrlib/trace.py trace.py-20050309040759-c8ed824bdcd4748a
=== modified file 'NEWS'
--- a/NEWS 2008-06-25 10:06:48 +0000
+++ b/NEWS 2008-06-25 22:40:23 +0000
@@ -14,6 +14,11 @@
to stdout; also ``tar`` and ``tbz2``.
(Martin Pool)
+ * The smart protocol now has improved support for setting branches'
+ revision info directly. This makes operations like push
+ faster. The new request method name is
+ ``Branch.set_last_revision_ex``. (Andrew Bennetts)
+
BUGFIXES:
* Clearer message about how to set the PYTHONPATH if bzrlib can't be
=== modified file 'bzrlib/branch.py'
--- a/bzrlib/branch.py 2008-06-25 10:06:48 +0000
+++ b/bzrlib/branch.py 2008-06-25 22:27:57 +0000
@@ -85,6 +85,7 @@
self.tags = self._make_tags()
self._revision_history_cache = None
self._revision_id_to_revno_cache = None
+ self._last_revision_info_cache = None
def break_lock(self):
"""Break a lock if one is present from another instance.
@@ -361,6 +362,7 @@
"""
self._revision_history_cache = None
self._revision_id_to_revno_cache = None
+ self._last_revision_info_cache = None
def _gen_revision_history(self):
"""Return sequence of revision hashes on to this branch.
@@ -413,11 +415,17 @@
"""Return last revision id, or NULL_REVISION."""
return self.last_revision_info()[1]
+ @needs_read_lock
def last_revision_info(self):
"""Return information about the last revision.
- :return: A tuple (revno, last_revision_id).
+ :return: A tuple (revno, revision_id).
"""
+ if self._last_revision_info_cache is None:
+ self._last_revision_info_cache = self._last_revision_info()
+ return self._last_revision_info_cache
+
+ def _last_revision_info(self):
rh = self.revision_history()
revno = len(rh)
if revno:
@@ -484,16 +492,11 @@
if not overwrite:
if graph is None:
graph = self.repository.get_graph()
- heads = graph.heads([stop_revision, last_rev])
- if heads == set([last_rev]):
- # The current revision is a decendent of the target,
- # nothing to do
+ if self._check_if_descendant_or_diverged(
+ stop_revision, last_rev, graph, other):
+ # stop_revision is a descendant of last_rev, but we aren't
+ # overwriting, so we're done.
return
- elif heads == set([stop_revision, last_rev]):
- # These branches have diverged
- raise errors.DivergedBranches(self, other)
- elif heads != set([stop_revision]):
- raise AssertionError("invalid heads: %r" % heads)
if stop_revno is None:
if graph is None:
graph = self.repository.get_graph()
@@ -854,6 +857,41 @@
def supports_tags(self):
return self._format.supports_tags()
+ def _check_if_descendant_or_diverged(self, revision_a, revision_b, graph,
+ other_branch):
+ """Ensure that revision_b is a descendant of revision_a.
+
+ This is a helper function for update_revisions.
+
+ :raises: DivergedBranches if revision_b has diverged from revision_a.
+ :returns: True if revision_b is a descendant of revision_a.
+ """
+ relation = self._revision_relations(revision_a, revision_b, graph)
+ if relation == 'b_descends_from_a':
+ return True
+ elif relation == 'diverged':
+ raise errors.DivergedBranches(self, other_branch)
+ elif relation == 'a_descends_from_b':
+ return False
+ else:
+ raise AssertionError("invalid heads: %r" % heads)
+
+ def _revision_relations(self, revision_a, revision_b, graph):
+ """Determine the relationship between two revisions.
+
+ :returns: One of: 'a_descends_from_b', 'b_descends_from_a', 'diverged'
+ """
+ heads = graph.heads([revision_a, revision_b])
+ if heads == set([revision_b]):
+ return 'b_descends_from_a'
+ elif heads == set([revision_a, revision_b]):
+ # These branches have diverged
+ return 'diverged'
+ elif heads == set([revision_a]):
+ return 'a_descends_from_b'
+ else:
+ raise AssertionError("invalid heads: %r" % heads)
+
class BranchFormat(object):
"""An encapsulation of the initialization and open routines for a format.
@@ -1887,24 +1925,12 @@
def __init__(self, *args, **kwargs):
super(BzrBranch6, self).__init__(*args, **kwargs)
- self._last_revision_info_cache = None
self._partial_revision_history_cache = []
def _clear_cached_state(self):
super(BzrBranch6, self)._clear_cached_state()
- self._last_revision_info_cache = None
self._partial_revision_history_cache = []
- @needs_read_lock
- def last_revision_info(self):
- """Return information about the last revision.
-
- :return: A tuple (revno, revision_id).
- """
- if self._last_revision_info_cache is None:
- self._last_revision_info_cache = self._last_revision_info()
- return self._last_revision_info_cache
-
def _last_revision_info(self):
revision_string = self._transport.get_bytes('last-revision')
revno, revision_id = revision_string.rstrip('\n').split(' ', 1)
=== modified file 'bzrlib/remote.py'
--- a/bzrlib/remote.py 2008-06-25 10:06:48 +0000
+++ b/bzrlib/remote.py 2008-06-25 22:27:57 +0000
@@ -1201,6 +1201,7 @@
# And the parent's __init__ doesn't do much anyway.
self._revision_id_to_revno_cache = None
self._revision_history_cache = None
+ self._last_revision_info_cache = None
self.bzrdir = remote_bzrdir
if _client is not None:
self._client = _client
@@ -1264,6 +1265,23 @@
if self._lock_mode == 'r':
self._real_branch.lock_read()
+ def _clear_cached_state(self):
+ super(RemoteBranch, self)._clear_cached_state()
+ if self._real_branch is not None:
+ self._real_branch._clear_cached_state()
+
+ def _clear_cached_state_of_remote_branch_only(self):
+ """Like _clear_cached_state, but doesn't clear the cache of
+ self._real_branch.
+
+ This is useful when falling back to calling a method of
+ self._real_branch that changes state. In that case the underlying
+ branch changes, so we need to invalidate this RemoteBranch's cache of
+ it. However, there's no need to invalidate the _real_branch's cache
+ too, in fact doing so might harm performance.
+ """
+ super(RemoteBranch, self)._clear_cached_state()
+
@property
def control_files(self):
# Defer actually creating RemoteBranchLockableFiles until its needed,
@@ -1415,8 +1433,7 @@
raise NotImplementedError(self.dont_leave_lock_in_place)
self._leave_lock = False
- def last_revision_info(self):
- """See Branch.last_revision_info()."""
+ def _last_revision_info(self):
path = self.bzrdir._path_for_remote_call(self._client)
response = self._client.call('Branch.last_revision_info', path)
if response[0] != 'ok':
@@ -1431,32 +1448,55 @@
response_tuple, response_handler = self._client.call_expecting_body(
'Branch.revision_history', path)
if response_tuple[0] != 'ok':
- raise UnexpectedSmartServerResponse(response_tuple)
+ raise errors.UnexpectedSmartServerResponse(response_tuple)
result = response_handler.read_body_bytes().split('\x00')
if result == ['']:
return []
return result
+ def _set_last_revision_descendant(self, revision_id, other_branch,
+ allow_diverged=False, allow_overwrite_descendant=False):
+ path = self.bzrdir._path_for_remote_call(self._client)
+ try:
+ response = self._client.call('Branch.set_last_revision_ex',
+ path, self._lock_token, self._repo_lock_token, revision_id,
+ int(allow_diverged), int(allow_overwrite_descendant))
+ except errors.ErrorFromSmartServer, err:
+ if err.error_verb == 'NoSuchRevision':
+ raise NoSuchRevision(self, revision_id)
+ elif err.error_verb == 'Diverged':
+ raise errors.DivergedBranches(self, other_branch)
+ raise
+ self._clear_cached_state()
+ if len(response) != 3 and response[0] != 'ok':
+ raise errors.UnexpectedSmartServerResponse(response)
+ new_revno, new_revision_id = response[1:]
+ self._last_revision_info_cache = new_revno, new_revision_id
+ self._real_branch._last_revision_info_cache = new_revno, new_revision_id
+
+ def _set_last_revision(self, revision_id):
+ path = self.bzrdir._path_for_remote_call(self._client)
+ self._clear_cached_state()
+ try:
+ response = self._client.call('Branch.set_last_revision',
+ path, self._lock_token, self._repo_lock_token, revision_id)
+ except errors.ErrorFromSmartServer, err:
+ if err.error_verb == 'NoSuchRevision':
+ raise NoSuchRevision(self, revision_id)
+ raise
+ if response != ('ok',):
+ raise errors.UnexpectedSmartServerResponse(response)
+
@needs_write_lock
def set_revision_history(self, rev_history):
# Send just the tip revision of the history; the server will generate
# the full history from that. If the revision doesn't exist in this
# branch, NoSuchRevision will be raised.
- path = self.bzrdir._path_for_remote_call(self._client)
if rev_history == []:
rev_id = 'null:'
else:
rev_id = rev_history[-1]
- self._clear_cached_state()
- try:
- response = self._client.call('Branch.set_last_revision',
- path, self._lock_token, self._repo_lock_token, rev_id)
- except errors.ErrorFromSmartServer, err:
- if err.error_verb == 'NoSuchRevision':
- raise NoSuchRevision(self, rev_id)
- raise
- if response != ('ok',):
- raise errors.UnexpectedSmartServerResponse(response)
+ self._set_last_revision(rev_id)
self._cache_revision_history(rev_history)
def get_parent(self):
@@ -1481,6 +1521,7 @@
@needs_write_lock
def pull(self, source, overwrite=False, stop_revision=None,
**kwargs):
+ self._clear_cached_state_of_remote_branch_only()
self._ensure_real()
return self._real_branch.pull(
source, overwrite=overwrite, stop_revision=stop_revision,
@@ -1505,21 +1546,38 @@
path, self._lock_token, self._repo_lock_token, str(revno), revision_id)
except errors.UnknownSmartMethod:
self._ensure_real()
- self._clear_cached_state()
- return self._real_branch.set_last_revision_info(revno, revision_id)
+ self._clear_cached_state_of_remote_branch_only()
+ self._real_branch.set_last_revision_info(revno, revision_id)
+ self._last_revision_info_cache = revno, revision_id
+ return
except errors.ErrorFromSmartServer, err:
if err.error_verb == 'NoSuchRevision':
raise NoSuchRevision(self, err.error_args[0])
raise
if response == ('ok',):
self._clear_cached_state()
+ self._last_revision_info_cache = revno, revision_id
+ # Update the _real_branch's cache too.
+ if self._real_branch is not None:
+ cache = self._last_revision_info_cache
+ self._real_branch._last_revision_info_cache = cache
else:
raise errors.UnexpectedSmartServerResponse(response)
+ @needs_write_lock
def generate_revision_history(self, revision_id, last_rev=None,
other_branch=None):
+ medium = self._client._medium
+ if not medium._is_remote_before((1, 6)):
+ try:
+ self._set_last_revision_descendant(revision_id, other_branch,
+ allow_diverged=True, allow_overwrite_descendant=True)
+ return
+ except errors.UnknownSmartMethod:
+ medium._remember_remote_is_before((1, 6))
+ self._clear_cached_state_of_remote_branch_only()
self._ensure_real()
- return self._real_branch.generate_revision_history(
+ self._real_branch.generate_revision_history(
revision_id, last_rev=last_rev, other_branch=other_branch)
@property
@@ -1531,12 +1589,44 @@
self._ensure_real()
return self._real_branch.set_push_location(location)
+ @needs_write_lock
def update_revisions(self, other, stop_revision=None, overwrite=False,
graph=None):
- self._ensure_real()
- return self._real_branch.update_revisions(
- other, stop_revision=stop_revision, overwrite=overwrite,
- graph=graph)
+ """See Branch.update_revisions."""
+ other.lock_read()
+ try:
+ if stop_revision is None:
+ stop_revision = other.last_revision()
+ if revision.is_null(stop_revision):
+ # if there are no commits, we're done.
+ return
+ self.fetch(other, stop_revision)
+
+ if overwrite:
+ # Just unconditionally set the new revision. We don't care if
+ # the branches have diverged.
+ self._set_last_revision(stop_revision)
+ else:
+ medium = self._client._medium
+ if not medium._is_remote_before((1, 6)):
+ try:
+ self._set_last_revision_descendant(stop_revision, other)
+ return
+ except errors.UnknownSmartMethod:
+ medium._remember_remote_is_before((1, 6))
+ # Fallback for pre-1.6 servers: check for divergence
+ # client-side, then do _set_last_revision.
+ last_rev = revision.ensure_null(self.last_revision())
+ if graph is None:
+ graph = self.repository.get_graph()
+ if self._check_if_descendant_or_diverged(
+ stop_revision, last_rev, graph, other):
+ # stop_revision is a descendant of last_rev, but we aren't
+ # overwriting, so we're done.
+ return
+ self._set_last_revision(stop_revision)
+ finally:
+ other.unlock()
def _extract_tar(tar, to_dir):
=== modified file 'bzrlib/smart/branch.py'
--- a/bzrlib/smart/branch.py 2008-05-12 04:07:49 +0000
+++ b/bzrlib/smart/branch.py 2008-06-25 07:03:41 +0000
@@ -128,6 +128,54 @@
return SuccessfulSmartServerResponse(('ok',))
+class SmartServerBranchRequestSetLastRevisionEx(SmartServerLockedBranchRequest):
+
+ def do_with_locked_branch(self, branch, new_last_revision_id,
+ allow_divergence, allow_overwrite_descendant):
+ """Set the last revision of the branch.
+
+ New in 1.6.
+
+ :param new_last_revision_id: the revision ID to set as the last
+ revision of the branch.
+ :param allow_divergence: A flag. If non-zero, change the revision ID
+ even if the new_last_revision_id's ancestry has diverged from the
+ current last revision. If zero, a 'Diverged' error will be
+ returned if new_last_revision_id is not a descendant of the current
+ last revision.
+ :param allow_overwrite_descendant: A flag. If zero and
+ new_last_revision_id is not a descendant of the current last
+ revision, then the last revision will not be changed. If non-zero
+ and there is no divergence, then the last revision is always
+ changed.
+
+ :returns: on success, a tuple of ('ok', revno, revision_id), where
+ revno and revision_id are the new values of the current last
+ revision info. The revision_id might be different to the
+ new_last_revision_id if allow_overwrite_descendant was not set.
+ """
+ do_not_overwrite_descendant = not allow_overwrite_descendant
+ try:
+ last_revno, last_rev = branch.last_revision_info()
+ graph = branch.repository.get_graph()
+ if not allow_divergence or do_not_overwrite_descendant:
+ relation = branch._revision_relations(
+ last_rev, new_last_revision_id, graph)
+ if relation == 'diverged' and not allow_divergence:
+ return FailedSmartServerResponse(('Diverged',))
+ if relation == 'a_descends_from_b' and do_not_overwrite_descendant:
+ return SuccessfulSmartServerResponse(
+ ('ok', last_revno, last_rev))
+ new_revno = graph.find_distance_to_null(
+ new_last_revision_id, [(last_rev, last_revno)])
+ branch.set_last_revision_info(new_revno, new_last_revision_id)
+ except errors.GhostRevisionsHaveNoRevno:
+ return FailedSmartServerResponse(
+ ('NoSuchRevision', new_last_revision_id))
+ return SuccessfulSmartServerResponse(
+ ('ok', new_revno, new_last_revision_id))
+
+
class SmartServerBranchRequestSetLastRevisionInfo(
SmartServerLockedBranchRequest):
"""Branch.set_last_revision_info. Sets the revno and the revision ID of
=== modified file 'bzrlib/smart/request.py'
--- a/bzrlib/smart/request.py 2008-05-16 07:05:26 +0000
+++ b/bzrlib/smart/request.py 2008-06-19 02:51:12 +0000
@@ -386,6 +386,9 @@
'Branch.set_last_revision_info', 'bzrlib.smart.branch',
'SmartServerBranchRequestSetLastRevisionInfo')
request_handlers.register_lazy(
+ 'Branch.set_last_revision_ex', 'bzrlib.smart.branch',
+ 'SmartServerBranchRequestSetLastRevisionEx')
+request_handlers.register_lazy(
'Branch.unlock', 'bzrlib.smart.branch', 'SmartServerBranchRequestUnlock')
request_handlers.register_lazy(
'BzrDir.find_repository', 'bzrlib.smart.bzrdir', 'SmartServerRequestFindRepositoryV1')
=== modified file 'bzrlib/tests/test_remote.py'
--- a/bzrlib/tests/test_remote.py 2008-06-25 10:06:48 +0000
+++ b/bzrlib/tests/test_remote.py 2008-06-25 22:27:57 +0000
@@ -641,6 +641,8 @@
def set_last_revision_info(self, revno, revision_id):
self.calls.append(
('set_last_revision_info', revno, revision_id))
+ def _clear_cached_state(self):
+ pass
real_branch = StubRealBranch()
branch._real_branch = real_branch
self.lock_remote_branch(branch)
=== modified file 'bzrlib/tests/test_smart.py'
--- a/bzrlib/tests/test_smart.py 2008-06-11 07:22:00 +0000
+++ b/bzrlib/tests/test_smart.py 2008-06-25 22:27:57 +0000
@@ -397,150 +397,208 @@
request.execute(''))
-class TestSmartServerBranchRequestSetLastRevision(tests.TestCaseWithMemoryTransport):
-
- def test_empty(self):
- backing = self.get_transport()
- request = smart.branch.SmartServerBranchRequestSetLastRevision(backing)
- b = self.make_branch('.')
- branch_token = b.lock_write()
- repo_token = b.repository.lock_write()
- b.repository.unlock()
- try:
- self.assertEqual(SmartServerResponse(('ok',)),
- request.execute(
- '', branch_token, repo_token,
- 'null:'))
- finally:
- b.unlock()
-
- def test_not_present_revision_id(self):
- backing = self.get_transport()
- request = smart.branch.SmartServerBranchRequestSetLastRevision(backing)
- b = self.make_branch('.')
- branch_token = b.lock_write()
- repo_token = b.repository.lock_write()
- b.repository.unlock()
- try:
- revision_id = 'non-existent revision'
- self.assertEqual(
- SmartServerResponse(('NoSuchRevision', revision_id)),
- request.execute(
- '', branch_token, repo_token,
- revision_id))
- finally:
- b.unlock()
-
- def test_revision_id_present(self):
- backing = self.get_transport()
- request = smart.branch.SmartServerBranchRequestSetLastRevision(backing)
- tree = self.make_branch_and_memory_tree('.')
- tree.lock_write()
- tree.add('')
- rev_id_utf8 = u'\xc8'.encode('utf-8')
- r1 = tree.commit('1st commit', rev_id=rev_id_utf8)
- r2 = tree.commit('2nd commit')
- tree.unlock()
- branch_token = tree.branch.lock_write()
- repo_token = tree.branch.repository.lock_write()
- tree.branch.repository.unlock()
- try:
- self.assertEqual(
- SmartServerResponse(('ok',)),
- request.execute(
- '', branch_token, repo_token,
- rev_id_utf8))
- self.assertEqual([rev_id_utf8], tree.branch.revision_history())
- finally:
- tree.branch.unlock()
-
- def test_revision_id_present2(self):
- backing = self.get_transport()
- request = smart.branch.SmartServerBranchRequestSetLastRevision(backing)
- tree = self.make_branch_and_memory_tree('.')
- tree.lock_write()
- tree.add('')
- rev_id_utf8 = u'\xc8'.encode('utf-8')
- r1 = tree.commit('1st commit', rev_id=rev_id_utf8)
- r2 = tree.commit('2nd commit')
- tree.unlock()
- tree.branch.set_revision_history([])
- branch_token = tree.branch.lock_write()
- repo_token = tree.branch.repository.lock_write()
- tree.branch.repository.unlock()
- try:
- self.assertEqual(
- SmartServerResponse(('ok',)),
- request.execute(
- '', branch_token, repo_token,
- rev_id_utf8))
- self.assertEqual([rev_id_utf8], tree.branch.revision_history())
- finally:
- tree.branch.unlock()
-
-
-class TestSmartServerBranchRequestSetLastRevisionInfo(tests.TestCaseWithTransport):
-
- def lock_branch(self, branch):
- branch_token = branch.lock_write()
- repo_token = branch.repository.lock_write()
- branch.repository.unlock()
- self.addCleanup(branch.unlock)
+class SetLastRevisionTestBase(tests.TestCaseWithMemoryTransport):
+ """Base test case for verbs that implement set_last_revision."""
+
+ def setUp(self):
+ tests.TestCaseWithMemoryTransport.setUp(self)
+ backing_transport = self.get_transport()
+ self.request = self.request_class(backing_transport)
+ self.tree = self.make_branch_and_memory_tree('.')
+
+ def lock_branch(self):
+ b = self.tree.branch
+ branch_token = b.lock_write()
+ repo_token = b.repository.lock_write()
+ b.repository.unlock()
return branch_token, repo_token
- def make_locked_branch(self, format=None):
- branch = self.make_branch('.', format=format)
- branch_token, repo_token = self.lock_branch(branch)
- return branch, branch_token, repo_token
-
- def test_empty(self):
+ def unlock_branch(self):
+ self.tree.branch.unlock()
+
+ def set_last_revision(self, revision_id, revno):
+ branch_token, repo_token = self.lock_branch()
+ response = self._set_last_revision(
+ revision_id, revno, branch_token, repo_token)
+ self.unlock_branch()
+ return response
+
+ def assertRequestSucceeds(self, revision_id, revno):
+ response = self.set_last_revision(revision_id, revno)
+ self.assertEqual(SuccessfulSmartServerResponse(('ok',)), response)
+
+
+class TestSetLastRevisionVerbMixin(object):
+ """Mixin test case for verbs that implement set_last_revision."""
+
+ def test_set_null_to_null(self):
"""An empty branch can have its last revision set to 'null:'."""
- b, branch_token, repo_token = self.make_locked_branch()
- backing = self.get_transport()
- request = smart.branch.SmartServerBranchRequestSetLastRevisionInfo(
- backing)
- response = request.execute('', branch_token, repo_token, '0', 'null:')
- self.assertEqual(SmartServerResponse(('ok',)), response)
-
- def assertBranchLastRevisionInfo(self, expected_info, branch_relpath):
- branch = bzrdir.BzrDir.open(branch_relpath).open_branch()
- self.assertEqual(expected_info, branch.last_revision_info())
-
- def test_branch_revision_info_is_updated(self):
- """This method really does update the branch last revision info."""
- tree = self.make_branch_and_memory_tree('.')
- tree.lock_write()
- tree.add('')
- tree.commit('First commit', rev_id='revision-1')
- tree.commit('Second commit', rev_id='revision-2')
- tree.unlock()
- branch = tree.branch
-
- branch_token, repo_token = self.lock_branch(branch)
- backing = self.get_transport()
- request = smart.branch.SmartServerBranchRequestSetLastRevisionInfo(
- backing)
- self.assertBranchLastRevisionInfo((2, 'revision-2'), '.')
- response = request.execute(
- '', branch_token, repo_token, '1', 'revision-1')
- self.assertEqual(SmartServerResponse(('ok',)), response)
- self.assertBranchLastRevisionInfo((1, 'revision-1'), '.')
-
- def test_not_present_revid(self):
- """Some branch formats will check that the revision is present in the
- repository. When that check fails, a NoSuchRevision error is returned
- to the client.
- """
- # Make a knit format branch, because that format checks the values
- # given to set_last_revision_info.
- b, branch_token, repo_token = self.make_locked_branch(format='knit')
- backing = self.get_transport()
- request = smart.branch.SmartServerBranchRequestSetLastRevisionInfo(
- backing)
- response = request.execute(
- '', branch_token, repo_token, '1', 'not-present')
- self.assertEqual(
- SmartServerResponse(('NoSuchRevision', 'not-present')), response)
+ self.assertRequestSucceeds('null:', 0)
+
+ def test_NoSuchRevision(self):
+ """If the revision_id is not present, the verb returns NoSuchRevision.
+ """
+ revision_id = 'non-existent revision'
+ self.assertEqual(
+ FailedSmartServerResponse(('NoSuchRevision', revision_id)),
+ self.set_last_revision(revision_id, 1))
+
+ def make_tree_with_two_commits(self):
+ self.tree.lock_write()
+ self.tree.add('')
+ rev_id_utf8 = u'\xc8'.encode('utf-8')
+ r1 = self.tree.commit('1st commit', rev_id=rev_id_utf8)
+ r2 = self.tree.commit('2nd commit', rev_id='rev-2')
+ self.tree.unlock()
+
+ def test_branch_last_revision_info_is_updated(self):
+ """A branch's tip can be set to a revision that is present in its
+ repository.
+ """
+ # Make a branch with an empty revision history, but two revisions in
+ # its repository.
+ self.make_tree_with_two_commits()
+ rev_id_utf8 = u'\xc8'.encode('utf-8')
+ self.tree.branch.set_revision_history([])
+ self.assertEqual(
+ (0, 'null:'), self.tree.branch.last_revision_info())
+ # We can update the branch to a revision that is present in the
+ # repository.
+ self.assertRequestSucceeds(rev_id_utf8, 1)
+ self.assertEqual(
+ (1, rev_id_utf8), self.tree.branch.last_revision_info())
+
+ def test_branch_last_revision_info_rewind(self):
+ """A branch's tip can be set to a revision that is an ancestor of the
+ current tip.
+ """
+ self.make_tree_with_two_commits()
+ rev_id_utf8 = u'\xc8'.encode('utf-8')
+ self.assertEqual(
+ (2, 'rev-2'), self.tree.branch.last_revision_info())
+ self.assertRequestSucceeds(rev_id_utf8, 1)
+ self.assertEqual(
+ (1, rev_id_utf8), self.tree.branch.last_revision_info())
+
+
+class TestSmartServerBranchRequestSetLastRevision(
+ SetLastRevisionTestBase, TestSetLastRevisionVerbMixin):
+ """Tests for Branch.set_last_revision verb."""
+
+ request_class = smart.branch.SmartServerBranchRequestSetLastRevision
+
+ def _set_last_revision(self, revision_id, revno, branch_token, repo_token):
+ return self.request.execute(
+ '', branch_token, repo_token, revision_id)
+
+
+class TestSmartServerBranchRequestSetLastRevisionInfo(
+ SetLastRevisionTestBase, TestSetLastRevisionVerbMixin):
+ """Tests for Branch.set_last_revision_info verb."""
+
+ request_class = smart.branch.SmartServerBranchRequestSetLastRevisionInfo
+
+ def _set_last_revision(self, revision_id, revno, branch_token, repo_token):
+ return self.request.execute(
+ '', branch_token, repo_token, revno, revision_id)
+
+ def test_NoSuchRevision(self):
+ """Branch.set_last_revision_info does not have to return
+ NoSuchRevision if the revision_id is absent.
+ """
+ raise tests.TestNotApplicable()
+
+
+class TestSmartServerBranchRequestSetLastRevisionEx(
+ SetLastRevisionTestBase, TestSetLastRevisionVerbMixin):
+ """Tests for Branch.set_last_revision_ex verb."""
+
+ request_class = smart.branch.SmartServerBranchRequestSetLastRevisionEx
+
+ def _set_last_revision(self, revision_id, revno, branch_token, repo_token):
+ return self.request.execute(
+ '', branch_token, repo_token, revision_id, 0, 0)
+
+ def assertRequestSucceeds(self, revision_id, revno):
+ response = self.set_last_revision(revision_id, revno)
+ self.assertEqual(
+ SuccessfulSmartServerResponse(('ok', revno, revision_id)),
+ response)
+
+ def test_branch_last_revision_info_rewind(self):
+ """A branch's tip can be set to a revision that is an ancestor of the
+ current tip, but only if allow_overwrite_descendant is passed.
+ """
+ self.make_tree_with_two_commits()
+ rev_id_utf8 = u'\xc8'.encode('utf-8')
+ self.assertEqual(
+ (2, 'rev-2'), self.tree.branch.last_revision_info())
+ # If allow_overwrite_descendant flag is 0, then trying to set the tip
+ # to an older revision ID has no effect.
+ branch_token, repo_token = self.lock_branch()
+ response = self.request.execute(
+ '', branch_token, repo_token, rev_id_utf8, 0, 0)
+ self.assertEqual(
+ SuccessfulSmartServerResponse(('ok', 2, 'rev-2')),
+ response)
+ self.assertEqual(
+ (2, 'rev-2'), self.tree.branch.last_revision_info())
+
+ # If allow_overwrite_descendant flag is 1, then setting the tip to an
+ # ancestor works.
+ response = self.request.execute(
+ '', branch_token, repo_token, rev_id_utf8, 0, 1)
+ self.assertEqual(
+ SuccessfulSmartServerResponse(('ok', 1, rev_id_utf8)),
+ response)
+ self.unlock_branch()
+ self.assertEqual(
+ (1, rev_id_utf8), self.tree.branch.last_revision_info())
+
+ def make_branch_with_divergent_history(self):
+ """Make a branch with divergent history in its repo.
+
+ The branch's tip will be 'child-2', and the repo will also contain
+ 'child-1', which diverges from a common base revision.
+ """
+ self.tree.lock_write()
+ self.tree.add('')
+ r1 = self.tree.commit('1st commit')
+ revno_1, revid_1 = self.tree.branch.last_revision_info()
+ r2 = self.tree.commit('2nd commit', rev_id='child-1')
+ # Undo the second commit
+ self.tree.branch.set_last_revision_info(revno_1, revid_1)
+ self.tree.set_parent_ids([revid_1])
+ # Make a new second commit, child-2. child-2 has diverged from
+ # child-1.
+ new_r2 = self.tree.commit('2nd commit', rev_id='child-2')
+ self.tree.unlock()
+
+ def test_not_allow_diverged(self):
+ """If allow_diverged is not passed, then setting a divergent history
+ returns a Diverged error.
+ """
+ self.make_branch_with_divergent_history()
+ self.assertEqual(
+ FailedSmartServerResponse(('Diverged',)),
+ self.set_last_revision('child-1', 2))
+ # The branch tip was not changed.
+ self.assertEqual('child-2', self.tree.branch.last_revision())
+
+ def test_allow_diverged(self):
+ """If allow_diverged is passed, then setting a divergent history
+ succeeds.
+ """
+ self.make_branch_with_divergent_history()
+ branch_token, repo_token = self.lock_branch()
+ response = self.request.execute(
+ '', branch_token, repo_token, 'child-1', 1, 0)
+ self.assertEqual(
+ SuccessfulSmartServerResponse(('ok', 2, 'child-1')),
+ response)
+ self.unlock_branch()
+ # The branch tip was changed.
+ self.assertEqual('child-1', self.tree.branch.last_revision())
class TestSmartServerBranchRequestLockWrite(tests.TestCaseWithMemoryTransport):
@@ -697,7 +755,7 @@
request.execute, 'subdir')
-class TestSmartServerRepositoryGetParentMap(tests.TestCaseWithTransport):
+class TestSmartServerRepositoryGetParentMap(tests.TestCaseWithMemoryTransport):
def test_trivial_bzipped(self):
# This tests that the wire encoding is actually bzipped
=== modified file 'bzrlib/trace.py'
--- a/bzrlib/trace.py 2008-06-17 01:13:49 +0000
+++ b/bzrlib/trace.py 2008-06-18 07:21:15 +0000
@@ -168,7 +168,11 @@
:param args: A list of substitution variables.
"""
outf = StringIO()
- traceback.print_stack(limit=stacklevel + 1, file=outf)
+ if stacklevel is None:
+ limit = None
+ else:
+ limit = stacklevel + 1
+ traceback.print_stack(limit=limit, file=outf)
formatted_lines = outf.getvalue().splitlines()
formatted_stack = '\n'.join(formatted_lines[:-2])
mutter(fmt + "\nCalled from:\n%s", *(args + (formatted_stack,)))
More information about the bazaar-commits
mailing list