Rev 3140: Fix commit for a checkout sharing a repo with its branch (abentley, #177592) in file:///home/pqm/archives/thelove/bzr/%2Btrunk/
Canonical.com Patch Queue Manager
pqm at pqm.ubuntu.com
Fri Dec 21 16:13:25 GMT 2007
At file:///home/pqm/archives/thelove/bzr/%2Btrunk/
------------------------------------------------------------
revno: 3140
revision-id:pqm at pqm.ubuntu.com-20071221161317-zdipotctmw8p1yhx
parent: pqm at pqm.ubuntu.com-20071221145325-erktp9le86ik56j1
parent: abentley at panoramicfeedback.com-20071221151102-7ae90pugm34lykug
committer: Canonical.com Patch Queue Manager <pqm at pqm.ubuntu.com>
branch nick: +trunk
timestamp: Fri 2007-12-21 16:13:17 +0000
message:
Fix commit for a checkout sharing a repo with its branch (abentley, #177592)
modified:
NEWS NEWS-20050323055033-4e00b5db738777ff
bzrlib/commit.py commit.py-20050511101309-79ec1a0168e0e825
bzrlib/tests/test_commit.py test_commit.py-20050914060732-279f057f8c295434
------------------------------------------------------------
revno: 3113.6.8
revision-id:abentley at panoramicfeedback.com-20071221151102-7ae90pugm34lykug
parent: aaron.bentley at utoronto.ca-20071221063427-pavy148wf806gf11
parent: pqm at pqm.ubuntu.com-20071221145325-erktp9le86ik56j1
committer: Aaron Bentley <abentley at panoramicfeedback.com>
branch nick: bzr.ab2
timestamp: Fri 2007-12-21 10:11:02 -0500
message:
Merge with bzr.dev
modified:
NEWS NEWS-20050323055033-4e00b5db738777ff
bzrlib/_patiencediff_c.c _patiencediff_c.c-20070721205602-q3imkipwlgagp3cy-1
bzrlib/branch.py branch.py-20050309040759-e4baf4e0d046576e
bzrlib/builtins.py builtins.py-20050830033751-fc01482b9ca23183
bzrlib/bzrdir.py bzrdir.py-20060131065624-156dfea39c4387cb
bzrlib/diff.py diff.py-20050309040759-26944fbbf2ebbf36
bzrlib/dirstate.py dirstate.py-20060728012006-d6mvoihjb3je9peu-1
bzrlib/errors.py errors.py-20050309040759-20512168c4e14fbd
bzrlib/merge.py merge.py-20050513021216-953b65a438527106
bzrlib/remote.py remote.py-20060720103555-yeeg2x51vn0rbtdp-1
bzrlib/repofmt/pack_repo.py pack_repo.py-20070813041115-gjv5ma7ktfqwsjgn-1
bzrlib/repository.py rev_storage.py-20051111201905-119e9401e46257e3
bzrlib/tests/TestUtil.py TestUtil.py-20050824080200-5f70140a2d938694
bzrlib/tests/__init__.py selftest.py-20050531073622-8d0e3c8845c97a64
bzrlib/tests/blackbox/test_checkout.py test_checkout.py-20060211231752-a5cde67cf70af854
bzrlib/tests/blackbox/test_merge.py test_merge.py-20060323225809-9bc0459c19917f41
bzrlib/tests/bzrdir_implementations/test_bzrdir.py test_bzrdir.py-20060131065642-0ebeca5e30e30866
bzrlib/tests/repository_implementations/__init__.py __init__.py-20060131092037-9564957a7d4a841b
bzrlib/tests/repository_implementations/test_repository.py test_repository.py-20060131092128-ad07f494f5c9d26c
bzrlib/tests/test_bzrdir.py test_bzrdir.py-20060131065654-deba40eef51cf220
bzrlib/tests/test_diff.py testdiff.py-20050727164403-d1a3496ebb12e339
bzrlib/tests/test_http.py testhttp.py-20051018020158-b2eef6e867c514d9
bzrlib/tests/test_merge.py testmerge.py-20050905070950-c1b5aa49ff911024
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_workingtree.py testworkingtree.py-20051004024258-b88d0fe8f101d468
bzrlib/transform.py transform.py-20060105172343-dd99e54394d91687
bzrlib/transport/http/__init__.py http_transport.py-20050711212304-506c5fd1059ace96
bzrlib/transport/http/_pycurl.py pycurlhttp.py-20060110060940-4e2a705911af77a6
bzrlib/transport/http/_urllib.py _urlgrabber.py-20060113083826-0bbf7d992fbf090c
bzrlib/transport/http/_urllib2_wrappers.py _urllib2_wrappers.py-20060913231729-ha9ugi48ktx481ao-1
bzrlib/tree.py tree.py-20050309040759-9d5f2496be663e77
bzrlib/versionedfile.py versionedfile.py-20060222045106-5039c71ee3b65490
bzrlib/workingtree.py workingtree.py-20050511021032-29b6ec0a681e02e3
bzrlib/workingtree_4.py workingtree_4.py-20070208044105-5fgpc5j3ljlh5q6c-1
------------------------------------------------------------
revno: 3113.6.7
revision-id:aaron.bentley at utoronto.ca-20071221063427-pavy148wf806gf11
parent: aaron.bentley at utoronto.ca-20071219060419-afwva4q14cjlzfta
committer: Aaron Bentley <aaron.bentley at utoronto.ca>
branch nick: bzr.ab2
timestamp: Fri 2007-12-21 01:34:27 -0500
message:
Fix commit for a checkout sharing a repo with its branch (abentley, #177592)
modified:
NEWS NEWS-20050323055033-4e00b5db738777ff
bzrlib/commit.py commit.py-20050511101309-79ec1a0168e0e825
bzrlib/tests/test_commit.py test_commit.py-20050914060732-279f057f8c295434
=== modified file 'NEWS'
--- a/NEWS 2007-12-21 14:53:25 +0000
+++ b/NEWS 2007-12-21 15:11:02 +0000
@@ -58,6 +58,9 @@
* build_tree acceleration uses the correct path when a file has been moved.
(Aaron Bentley)
+ * ``commit`` now succeeds when a checkout and its master branch share a
+ repository. (Aaron Bentley, #177592)
+
* Fixed Unicode encoding error in ``ignored`` when the output is
redirected to a pipe. (Lukáš Lalinský)
=== modified file 'bzrlib/commit.py'
--- a/bzrlib/commit.py 2007-12-01 00:20:36 +0000
+++ b/bzrlib/commit.py 2007-12-21 06:34:27 +0000
@@ -381,9 +381,11 @@
# Upload revision data to the master.
# this will propagate merged revisions too if needed.
if self.bound_branch:
- self._set_progress_stage("Uploading data to master branch")
- self.master_branch.repository.fetch(self.branch.repository,
- revision_id=self.rev_id)
+ if not self.master_branch.repository.has_same_location(
+ self.branch.repository):
+ self._set_progress_stage("Uploading data to master branch")
+ self.master_branch.repository.fetch(self.branch.repository,
+ revision_id=self.rev_id)
# now the master has the revision data
# 'commit' to the master first so a timeout here causes the
# local branch to be out of date
=== modified file 'bzrlib/tests/test_commit.py'
--- a/bzrlib/tests/test_commit.py 2007-11-21 22:17:02 +0000
+++ b/bzrlib/tests/test_commit.py 2007-12-21 06:34:27 +0000
@@ -19,6 +19,7 @@
import bzrlib
from bzrlib import (
+ bzrdir,
errors,
lockdir,
osutils,
@@ -740,3 +741,11 @@
rev = tree.branch.repository.get_revision(rev_id)
self.assertEqual('John Doe <jdoe at example.com>',
rev.properties['author'])
+
+ def test_commit_with_checkout_and_branch_sharing_repo(self):
+ repo = self.make_repository('repo', shared=True)
+ # make_branch_and_tree ignores shared repos
+ branch = bzrdir.BzrDir.create_branch_convenience('repo/branch')
+ tree2 = branch.create_checkout('repo/tree2')
+ tree2.commit('message', rev_id='rev1')
+ self.assertTrue(tree2.branch.repository.has_revision('rev1'))
More information about the bazaar-commits
mailing list