Rev 3863: (Marius) Don't access the network when doing `commit --local`. in file:///home/pqm/archives/thelove/bzr/%2Btrunk/
Canonical.com Patch Queue Manager
pqm at pqm.ubuntu.com
Thu Nov 27 07:07:14 GMT 2008
At file:///home/pqm/archives/thelove/bzr/%2Btrunk/
------------------------------------------------------------
revno: 3863
revision-id: pqm at pqm.ubuntu.com-20081127070711-wvjuwbgk18345dek
parent: pqm at pqm.ubuntu.com-20081127060133-uxj1a237vdm65w3d
parent: andrew.bennetts at canonical.com-20081127063237-pgcseubly3tvtili
committer: Canonical.com Patch Queue Manager <pqm at pqm.ubuntu.com>
branch nick: +trunk
timestamp: Thu 2008-11-27 07:07:11 +0000
message:
(Marius) Don't access the network when doing `commit --local`.
modified:
NEWS NEWS-20050323055033-4e00b5db738777ff
bzrlib/branch.py branch.py-20050309040759-e4baf4e0d046576e
bzrlib/mutabletree.py mutabletree.py-20060906023413-4wlkalbdpsxi2r4y-2
bzrlib/tests/commands/test_commit.py test_commit.py-20070913161801-ydrx2k5gmv7k7eiu-1
------------------------------------------------------------
revno: 3815.3.6
revision-id: andrew.bennetts at canonical.com-20081127063237-pgcseubly3tvtili
parent: andrew.bennetts at canonical.com-20081127062956-v0a19icwk85iosx4
committer: Andrew Bennetts <andrew.bennetts at canonical.com>
branch nick: local-commits
timestamp: Thu 2008-11-27 17:32:37 +1100
message:
Add NEWS entry.
modified:
NEWS NEWS-20050323055033-4e00b5db738777ff
------------------------------------------------------------
revno: 3815.3.5
revision-id: andrew.bennetts at canonical.com-20081127062956-v0a19icwk85iosx4
parent: amanic at gmail.com-20081118215010-m679n8qlpc2v2jdj
parent: pqm at pqm.ubuntu.com-20081127052415-9hb2n5pppt7imsb3
committer: Andrew Bennetts <andrew.bennetts at canonical.com>
branch nick: local-commits
timestamp: Thu 2008-11-27 17:29:56 +1100
message:
Merge bzr.dev.
added:
bzrlib/foreign.py foreign.py-20081112170002-olsxmandkk8qyfuq-1
bzrlib/shelf.py prepare_shelf.py-20081005181341-n74qe6gu1e65ad4v-1
bzrlib/shelf_ui.py shelver.py-20081005210102-33worgzwrtdw0yrm-1
bzrlib/tests/test_foreign.py test_foreign.py-20081125004048-ywb901edgp9lluxo-1
bzrlib/tests/test_shelf.py test_prepare_shelf.p-20081005181341-n74qe6gu1e65ad4v-2
bzrlib/tests/test_shelf_ui.py test_shelf_ui.py-20081027155203-wtcuazg85wp9u4fv-1
contrib/convert_to_1.9.py convert_to_dev2.py-20081014130524-z1ydl3mq9b4ehlvv-1
tools/win32/build_release.py build_release.py-20081105204355-2ghh5cv01v1x4rzz-1
modified:
NEWS NEWS-20050323055033-4e00b5db738777ff
bzr bzr.py-20050313053754-5485f144c7006fa6
bzrlib/__init__.py __init__.py-20050309040759-33e65acf91bbcd5d
bzrlib/_readdir_pyx.pyx readdir.pyx-20060609152855-rm6v321vuaqyh9tu-1
bzrlib/branch.py branch.py-20050309040759-e4baf4e0d046576e
bzrlib/branchbuilder.py branchbuilder.py-20070427022007-zlxpqz2lannhk6y8-1
bzrlib/btree_index.py index.py-20080624222253-p0x5f92uyh5hw734-7
bzrlib/builtins.py builtins.py-20050830033751-fc01482b9ca23183
bzrlib/commit.py commit.py-20050511101309-79ec1a0168e0e825
bzrlib/config.py config.py-20051011043216-070c74f4e9e338e8
bzrlib/errors.py errors.py-20050309040759-20512168c4e14fbd
bzrlib/fetch.py fetch.py-20050818234941-26fea6105696365d
bzrlib/help_topics/__init__.py help_topics.py-20060920210027-rnim90q9e0bwxvy4-1
bzrlib/help_topics/en/hooks.txt hooks.txt-20070830033044-xxu2rced13f72dka-1
bzrlib/index.py index.py-20070712131115-lolkarso50vjr64s-1
bzrlib/knit.py knit.py-20051212171256-f056ac8f0fbe1bd9
bzrlib/lockable_files.py control_files.py-20051111201905-bb88546e799d669f
bzrlib/log.py log.py-20050505065812-c40ce11702fe5fb1
bzrlib/msgeditor.py msgeditor.py-20050901111708-ef6d8de98f5d8f2f
bzrlib/option.py option.py-20051014052914-661fb36e76e7362f
bzrlib/osutils.py osutils.py-20050309040759-eeaff12fbf77ac86
bzrlib/plugin.py plugin.py-20050622060424-829b654519533d69
bzrlib/plugins/launchpad/account.py account.py-20071011033320-50y6vfftywf4yllw-1
bzrlib/plugins/launchpad/lp_directory.py lp_indirect.py-20070126012204-de5rugwlt22c7u7e-1
bzrlib/plugins/launchpad/test_account.py test_account.py-20071011033320-50y6vfftywf4yllw-2
bzrlib/python-compat.h pythoncompat.h-20080924041409-9kvi0fgtuuqp743j-1
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/tests/__init__.py selftest.py-20050531073622-8d0e3c8845c97a64
bzrlib/tests/blackbox/test_commit.py test_commit.py-20060212094538-ae88fc861d969db0
bzrlib/tests/blackbox/test_log.py test_log.py-20060112090212-78f6ea560c868e24
bzrlib/tests/branch_implementations/test_stacking.py test_stacking.py-20080214020755-msjlkb7urobwly0f-1
bzrlib/tests/interrepository_implementations/test_fetch.py test_fetch.py-20080425213627-j60cjh782ufm83ry-1
bzrlib/tests/per_repository/test_commit_builder.py test_commit_builder.py-20060606110838-76e3ra5slucqus81-1
bzrlib/tests/per_repository/test_repository.py test_repository.py-20060131092128-ad07f494f5c9d26c
bzrlib/tests/per_repository/test_revision.py testrevprops.py-20051013073044-92bc3c68302ce1bf
bzrlib/tests/per_repository/test_write_group.py test_write_group.py-20070716105516-89n34xtogq5frn0m-1
bzrlib/tests/test_btree_index.py test_index.py-20080624222253-p0x5f92uyh5hw734-13
bzrlib/tests/test_knit.py test_knit.py-20051212171302-95d4c00dd5f11f2b
bzrlib/tests/test_log.py testlog.py-20050728115707-1a514809d7d49309
bzrlib/tests/test_msgeditor.py test_msgeditor.py-20051202041359-920315ec6011ee51
bzrlib/tests/test_pack_repository.py test_pack_repository-20080801043947-eaw0e6h2gu75kwmy-1
bzrlib/tests/test_permissions.py test_permissions.py-20051215004520-ccf475789c80e80c
bzrlib/tests/test_plugins.py plugins.py-20050622075746-32002b55e5e943e9
bzrlib/tests/test_remote.py test_remote.py-20060720103555-yeeg2x51vn0rbtdp-2
bzrlib/tests/test_repository.py test_repository.py-20060131075918-65c555b881612f4d
bzrlib/tests/test_revision.py testrevision.py-20050804210559-46f5e1eb67b01289
bzrlib/tests/test_sftp_transport.py testsftp.py-20051027032739-247570325fec7e7e
bzrlib/tests/test_transform.py test_transaction.py-20060105172520-b3ffb3946550e6c4
bzrlib/tests/test_transport_implementations.py test_transport_implementations.py-20051227111451-f97c5c7d5c49fce7
bzrlib/transform.py transform.py-20060105172343-dd99e54394d91687
bzrlib/transport/__init__.py transport.py-20050711165921-4978aa7ce1285ad5
bzrlib/transport/http/_urllib2_wrappers.py _urllib2_wrappers.py-20060913231729-ha9ugi48ktx481ao-1
bzrlib/transport/remote.py ssh.py-20060608202016-c25gvf1ob7ypbus6-1
bzrlib/versionedfile.py versionedfile.py-20060222045106-5039c71ee3b65490
bzrlib/workingtree.py workingtree.py-20050511021032-29b6ec0a681e02e3
bzrlib/workingtree_4.py workingtree_4.py-20070208044105-5fgpc5j3ljlh5q6c-1
doc/developers/releasing.txt releasing.txt-20080502015919-fnrcav8fwy8ccibu-1
doc/en/user-guide/writing_a_plugin.txt writing_a_plugin.txt-20071114035000-q36a9h57ps06uvnl-7
------------------------------------------------------------
revno: 3815.3.4
revision-id: amanic at gmail.com-20081118215010-m679n8qlpc2v2jdj
parent: amanic at gmail.com-20081115221226-5o8fg93oivxj6mwb
committer: Marius Kruger <amanic at gmail.com>
branch nick: bzr.commit_local
timestamp: Tue 2008-11-18 23:50:10 +0200
message:
When doing a `commit --local`, don't try to connect to the master branch.
(Includes a new test for this)
modified:
bzrlib/branch.py branch.py-20050309040759-e4baf4e0d046576e
bzrlib/mutabletree.py mutabletree.py-20060906023413-4wlkalbdpsxi2r4y-2
bzrlib/tests/commands/test_commit.py test_commit.py-20070913161801-ydrx2k5gmv7k7eiu-1
=== modified file 'NEWS'
--- a/NEWS 2008-11-26 15:57:02 +0000
+++ b/NEWS 2008-11-27 06:32:37 +0000
@@ -34,6 +34,9 @@
* Better message when the user needs to set their Launchpad ID.
(Martin Pool, #289148)
+ * ``bzr commit --local`` doesn't access the master branch anymore.
+ This fixes a regression introduced in 1.9. (Marius Kruger, #299313)
+
* Don't call the system ``chdir()`` with an empty path. Sun OS seems
to give an error in that case. Also, don't count on ``getcwd()``
being able to allocate a new buffer, which is a gnu extension.
=== modified file 'bzrlib/branch.py'
--- a/bzrlib/branch.py 2008-11-25 17:31:02 +0000
+++ b/bzrlib/branch.py 2008-11-27 06:29:56 +0000
@@ -148,9 +148,10 @@
def get_config(self):
return BranchConfig(self)
- def _get_nick(self, possible_transports=None):
+ def _get_nick(self, local=False, possible_transports=None):
config = self.get_config()
- if not config.has_explicit_nickname(): # explicit overrides master
+ # explicit overrides master, but don't look for master if local is True
+ if not local and not config.has_explicit_nickname():
try:
master = self.get_master_branch(possible_transports)
if master is not None:
=== modified file 'bzrlib/mutabletree.py'
--- a/bzrlib/mutabletree.py 2008-10-03 23:42:56 +0000
+++ b/bzrlib/mutabletree.py 2008-11-18 21:50:10 +0000
@@ -184,6 +184,7 @@
possible_master_transports=[]
if not 'branch-nick' in revprops:
revprops['branch-nick'] = self.branch._get_nick(
+ kwargs.get('local', False),
possible_master_transports)
author = kwargs.pop('author', None)
if author is not None:
=== modified file 'bzrlib/tests/commands/test_commit.py'
--- a/bzrlib/tests/commands/test_commit.py 2007-09-18 20:04:21 +0000
+++ b/bzrlib/tests/commands/test_commit.py 2008-11-18 21:50:10 +0000
@@ -58,3 +58,15 @@
message=u'empty commit', unchanged=True)
self.assertEquals(1, len(self.connections))
+ def test_commit_local(self):
+ """Commits with --local should not connect to the master!"""
+ self.start_logging_connections()
+
+ commit = builtins.cmd_commit()
+ # commit do not provide a directory parameter, we have to change dir
+ # manually
+ os.chdir('local')
+ commit.run(message=u'empty commit', unchanged=True, local=True)
+
+ #it shouldn't open any connections
+ self.assertEquals(0, len(self.connections))
More information about the bazaar-commits
mailing list