Rev 2373: (Ian Clatworthy) Help text fixes for add, commit, and export in http://bzr.arbash-meinel.com/branches/bzr/jam-integration
John Arbash Meinel
john at arbash-meinel.com
Thu Apr 12 15:40:05 BST 2007
At http://bzr.arbash-meinel.com/branches/bzr/jam-integration
------------------------------------------------------------
revno: 2373
revision-id: john at arbash-meinel.com-20070412143944-w1tdz5wvpaf6791p
parent: john at arbash-meinel.com-20070322190703-qx2xft42j64hfp88
parent: ian.clatworthy at internode.on.net-20070412060957-m8l5xx0cte108s3d
committer: John Arbash Meinel <john at arbash-meinel.com>
branch nick: jam-integration
timestamp: Thu 2007-04-12 09:39:44 -0500
message:
(Ian Clatworthy) Help text fixes for add, commit, and export
added:
bzrlib/tests/branch_implementations/test_create_checkout.py test_create_checkout-20070322193723-n2wkp1g03r0404di-1
modified:
NEWS NEWS-20050323055033-4e00b5db738777ff
bzrlib/branch.py branch.py-20050309040759-e4baf4e0d046576e
bzrlib/builtins.py builtins.py-20050830033751-fc01482b9ca23183
bzrlib/bundle/commands.py __init__.py-20050617152058-1b6530d9ab85c11c
bzrlib/cmd_version_info.py __init__.py-20051228204928-697d01fdca29c99b
bzrlib/help_topics.py help_topics.py-20060920210027-rnim90q9e0bwxvy4-1
bzrlib/tests/branch_implementations/__init__.py __init__.py-20060123013057-b12a52c3f361daf4
bzrlib/tests/test_branch.py test_branch.py-20060116013032-97819aa07b8ab3b5
bzrlib/tree.py tree.py-20050309040759-9d5f2496be663e77
bzrlib/workingtree.py workingtree.py-20050511021032-29b6ec0a681e02e3
bzrlib/workingtree_4.py workingtree_4.py-20070208044105-5fgpc5j3ljlh5q6c-1
tools/doc_generate/autodoc_man.py bzrman.py-20050601153041-0ff7f74de456d15e
tools/doc_generate/autodoc_rstx.py autodoc_rstx.py-20060420024836-3e0d4a526452193c
------------------------------------------------------------
revno: 2371.1.9
merged: ian.clatworthy at internode.on.net-20070412060957-m8l5xx0cte108s3d
parent: ian.clatworthy at internode.on.net-20070412060105-p8xvixkc0or94nxp
committer: Ian Clatworthy <ian.clatworthy at internode.on.net>
branch nick: bzr.help-fixes
timestamp: Thu 2007-04-12 16:09:57 +1000
message:
explained selected fail commit failure by design
------------------------------------------------------------
revno: 2371.1.8
merged: ian.clatworthy at internode.on.net-20070412060105-p8xvixkc0or94nxp
parent: ian.clatworthy at internode.on.net-20070402011840-ad1dombhee1vr88x
committer: Ian Clatworthy <ian.clatworthy at internode.on.net>
branch nick: bzr.help-fixes
timestamp: Thu 2007-04-12 16:01:05 +1000
message:
explained selected fail commit failure by design
------------------------------------------------------------
revno: 2371.1.7
merged: ian.clatworthy at internode.on.net-20070402011840-ad1dombhee1vr88x
parent: ian.clatworthy at internode.on.net-20070329091803-1774b7u9isk2z0p4
committer: Ian Clatworthy <ian.clatworthy at internode.on.net>
branch nick: bzr.quick
timestamp: Mon 2007-04-02 11:18:40 +1000
message:
Include feedback from mailing list.
------------------------------------------------------------
revno: 2371.1.6
merged: ian.clatworthy at internode.on.net-20070329091803-1774b7u9isk2z0p4
parent: ian.clatworthy at internode.on.net-20070327003529-dwroi8lgq0nxouov
committer: Ian Clatworthy <ian.clatworthy at internode.on.net>
branch nick: bzr.quick
timestamp: Thu 2007-03-29 19:18:03 +1000
message:
Minor man page fixes for add, commit, export
------------------------------------------------------------
revno: 2371.1.5
merged: ian.clatworthy at internode.on.net-20070327003529-dwroi8lgq0nxouov
parent: ian.clatworthy at internode.on.net-20070326095949-mbs36oe73rer2l3r
committer: Ian Clatworthy <ian.clatworthy at internode.on.net>
branch nick: bzr.quick
timestamp: Tue 2007-03-27 10:35:29 +1000
message:
Improved after feedback from reviewers
------------------------------------------------------------
revno: 2371.1.4
merged: ian.clatworthy at internode.on.net-20070326095949-mbs36oe73rer2l3r
parent: pqm at pqm.ubuntu.com-20070322230820-f8735ba918f51539
committer: Ian Clatworthy <ian.clatworthy at internode.on.net>
branch nick: bzr.quick
timestamp: Mon 2007-03-26 19:59:49 +1000
message:
Help and man page fixes
------------------------------------------------------------
revno: 2371.1.3
merged: pqm at pqm.ubuntu.com-20070322230820-f8735ba918f51539
parent: pqm at pqm.ubuntu.com-20070322225147-c274f2efe3564edc
parent: john at arbash-meinel.com-20070322200752-4b29yobz92a38tqp
committer: Canonical.com Patch Queue Manager<pqm at pqm.ubuntu.com>
branch nick: +trunk
timestamp: Thu 2007-03-22 23:08:20 +0000
message:
(John Arbash Meinel) bug #93854, 'bzr checkout' should create branches in the same format as the source.
------------------------------------------------------------
revno: 2370.3.2
merged: john at arbash-meinel.com-20070322200752-4b29yobz92a38tqp
parent: john at arbash-meinel.com-20070322194159-fxl08l4zah9df24r
committer: John Arbash Meinel <john at arbash-meinel.com>
branch nick: checkout_uses_branch_format_93854
timestamp: Thu 2007-03-22 15:07:52 -0500
message:
Use BzrDir.set_branch_format() rather than setting it directly.
------------------------------------------------------------
revno: 2370.3.1
merged: john at arbash-meinel.com-20070322194159-fxl08l4zah9df24r
parent: pqm at pqm.ubuntu.com-20070321071219-55447700ec71371f
committer: John Arbash Meinel <john at arbash-meinel.com>
branch nick: checkout_uses_branch_format_93854
timestamp: Thu 2007-03-22 14:41:59 -0500
message:
(John Arbash Meinel) Fix bug #93854, make 'bzr checkout' create branches in the same format as the source.
------------------------------------------------------------
revno: 2371.1.2
merged: pqm at pqm.ubuntu.com-20070322225147-c274f2efe3564edc
parent: pqm at pqm.ubuntu.com-20070322213654-32f24e19910c30ef
parent: john at arbash-meinel.com-20070322195543-2eo6deu0aynnstaq
committer: Canonical.com Patch Queue Manager<pqm at pqm.ubuntu.com>
branch nick: +trunk
timestamp: Thu 2007-03-22 22:51:47 +0000
message:
(John Arbash Meinel) Change WorkingTree to not read the inventory until we have a lock.
------------------------------------------------------------
revno: 2334.1.6
merged: john at arbash-meinel.com-20070322195543-2eo6deu0aynnstaq
parent: john at arbash-meinel.com-20070322195430-wi92c7jpx17kiagr
committer: John Arbash Meinel <john at arbash-meinel.com>
branch nick: make_locking_cheaper
timestamp: Thu 2007-03-22 14:55:43 -0500
message:
NEWS for performance fix.
------------------------------------------------------------
revno: 2334.1.5
merged: john at arbash-meinel.com-20070322195430-wi92c7jpx17kiagr
parent: john at arbash-meinel.com-20070322151814-fs1m2j0inf8nu7w0
parent: pqm at pqm.ubuntu.com-20070322152522-228285cac46c0dbc
committer: John Arbash Meinel <john at arbash-meinel.com>
branch nick: make_locking_cheaper
timestamp: Thu 2007-03-22 14:54:30 -0500
message:
[merge] bzr.dev 2371
------------------------------------------------------------
revno: 2334.1.4
merged: john at arbash-meinel.com-20070322151814-fs1m2j0inf8nu7w0
parent: john at arbash-meinel.com-20070321212157-3hmll50umf1nz1z3
committer: John Arbash Meinel <john at arbash-meinel.com>
branch nick: make_locking_cheaper
timestamp: Thu 2007-03-22 10:18:14 -0500
message:
WT2 needs to have an _inventory without a lock.
------------------------------------------------------------
revno: 2334.1.3
merged: john at arbash-meinel.com-20070321212157-3hmll50umf1nz1z3
parent: john at arbash-meinel.com-20070321181557-09nrfljkinlmyjmp
committer: John Arbash Meinel <john at arbash-meinel.com>
branch nick: make_locking_cheaper
timestamp: Wed 2007-03-21 16:21:57 -0500
message:
When upgrading, we can't assume that WorkingTree._inventory is valid, because that is now
done during tree.lock_*
------------------------------------------------------------
revno: 2334.1.2
merged: john at arbash-meinel.com-20070321181557-09nrfljkinlmyjmp
parent: john at arbash-meinel.com-20070321175142-052tm470fx9s0obl
committer: John Arbash Meinel <john at arbash-meinel.com>
branch nick: make_locking_cheaper
timestamp: Wed 2007-03-21 13:15:57 -0500
message:
we don't need _inventory_fp.
The bug is that calling self.read_working_inventory() acquires a read lock,
which has a side effect of reading the working inventory,
and then it reads the working inventory,
and then because the overall tree is not locked (this is all happening in WorkingTree.__init__)
all of this is being thrown away.
So we end up with 2 inventory reads which will be completely thrown away.
------------------------------------------------------------
revno: 2334.1.1
merged: john at arbash-meinel.com-20070321175142-052tm470fx9s0obl
parent: pqm at pqm.ubuntu.com-20070310232535-dd964b3ad4a93236
committer: John Arbash Meinel <john at arbash-meinel.com>
branch nick: make_locking_cheaper
timestamp: Wed 2007-03-21 12:51:42 -0500
message:
Lazily read working inventory in workingtree.py,
this exposes code paths that are not locking the tree before
processing, because they are directly accessing tree._inventory somehow
(one case is Tree.path2id())
------------------------------------------------------------
revno: 2371.1.1
merged: pqm at pqm.ubuntu.com-20070322213654-32f24e19910c30ef
parent: pqm at pqm.ubuntu.com-20070322152522-228285cac46c0dbc
parent: john at arbash-meinel.com-20070322190703-qx2xft42j64hfp88
committer: Canonical.com Patch Queue Manager<pqm at pqm.ubuntu.com>
branch nick: +trunk
timestamp: Thu 2007-03-22 21:36:54 +0000
message:
(Matthew Fuller) Update 'bzr init-repo' help
-------------- next part --------------
=== added file 'bzrlib/tests/branch_implementations/test_create_checkout.py'
--- a/bzrlib/tests/branch_implementations/test_create_checkout.py 1970-01-01 00:00:00 +0000
+++ b/bzrlib/tests/branch_implementations/test_create_checkout.py 2007-03-22 19:41:59 +0000
@@ -0,0 +1,66 @@
+# 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
+
+"""Tests for the Branch.create_checkout"""
+
+from bzrlib import (
+ branch,
+ )
+from bzrlib.tests.branch_implementations.test_branch import TestCaseWithBranch
+
+
+class TestCreateCheckout(TestCaseWithBranch):
+
+ def test_checkout_format(self):
+ """Make sure the new checkout uses the same branch format."""
+ a_branch = self.make_branch('branch')
+ tree = a_branch.create_checkout('checkout')
+ if self.branch_format in branch._legacy_formats:
+ # Legacy formats create checkouts with the default format.
+ # Only newer formats create identical checkouts.
+ expected_format = branch.BranchFormat.get_default_format()
+ else:
+ expected_format = a_branch._format
+ self.assertEqual(expected_format.get_format_string(),
+ tree.branch._format.get_format_string())
+
+ def test_create_revision_checkout(self):
+ """Test that we can create a checkout from an earlier revision."""
+ tree1 = self.make_branch_and_tree('base')
+ self.build_tree(['base/a'])
+ tree1.add(['a'], ['a-id'])
+ tree1.commit('first', rev_id='rev-1')
+ self.build_tree(['base/b'])
+ tree1.add(['b'], ['b-id'])
+ tree1.commit('second', rev_id='rev-2')
+
+ tree2 = tree1.branch.create_checkout('checkout', revision_id='rev-1')
+ self.assertEqual('rev-1', tree2.last_revision())
+ self.failUnlessExists('checkout/a')
+ self.failIfExists('checkout/b')
+
+ def test_create_lightweight_checkout(self):
+ """We should be able to make a lightweight checkout."""
+ tree1 = self.make_branch_and_tree('base')
+ tree2 = tree1.branch.create_checkout('checkout', lightweight=True)
+ self.assertNotEqual(tree1.basedir, tree2.basedir)
+ self.assertEqual(tree1.branch.base, tree2.branch.base)
+
+ def test_create_checkout_exists(self):
+ """We shouldn't fail if the directory already exists."""
+ tree1 = self.make_branch_and_tree('base')
+ self.build_tree('checkout')
+ tree2 = tree1.branch.create_checkout('checkout', lightweight=True)
=== modified file 'NEWS'
--- a/NEWS 2007-03-21 04:28:02 +0000
+++ b/NEWS 2007-03-22 23:08:20 +0000
@@ -8,6 +8,10 @@
lock to an OS write lock. Linux can do this without unlocking, Win32
needs to unlock in between. (John Arbash Meinel)
+ * Fix minor performance regression with bzr-0.15 on pre-dirstate
+ trees. (We were reading the working inventory too many times).
+ (John Arbash Meinel)
+
BUGFIXES:
* Take smtp_server from user config into account.
@@ -22,6 +26,9 @@
* ``bzr status FILENAME`` failed on Windows because of an uncommon
errno. (``ERROR_DIRECTORY == 267 != ENOTDIR``).
(Wouter van Heyst, John Arbash Meinel, #90819)
+
+ * ``bzr checkout source`` should create a local branch in the same
+ format as source. (John Arbash Meinel, #93854)
bzr 0.15rc2 2007-03-14
=== modified file 'bzrlib/branch.py'
--- a/bzrlib/branch.py 2007-03-13 01:00:34 +0000
+++ b/bzrlib/branch.py 2007-03-22 20:07:52 +0000
@@ -690,7 +690,7 @@
format.repository_format = weaverepo.RepositoryFormat7()
else:
format = self.repository.bzrdir.checkout_metadir()
- format.branch_format = self._format
+ format.set_branch_format(self._format)
return format
def create_checkout(self, to_location, revision_id=None,
=== modified file 'bzrlib/builtins.py'
--- a/bzrlib/builtins.py 2007-03-21 04:39:51 +0000
+++ b/bzrlib/builtins.py 2007-04-12 06:09:57 +0000
@@ -148,7 +148,7 @@
unknown
Not versioned and not matching an ignore pattern.
- To see ignored files use 'bzr ignored'. For details in the
+ To see ignored files use 'bzr ignored'. For details on the
changes to file texts, use 'bzr diff'.
--short gives a status flags for each item, similar to the SVN's status
@@ -183,7 +183,8 @@
# TODO: --no-recurse, --recurse options
takes_args = ['file*']
- takes_options = ['show-ids', 'revision', 'short',
+ takes_options = ['show-ids', 'revision',
+ Option('short', help='Give short SVN-style status lines'),
Option('versioned', help='Only show versioned files')]
aliases = ['st', 'stat']
@@ -242,6 +243,8 @@
Since a lightweight checkout is little more than a working tree
this will refuse to run against one.
+
+ To re-create the working tree, use "bzr checkout".
"""
takes_args = ['location?']
@@ -337,7 +340,11 @@
--file-ids-from will try to use the file ids from the supplied path.
It looks up ids trying to find a matching parent directory with the
- same filename, and then by pure path.
+ same filename, and then by pure path. This option is rarely needed
+ but can be useful when adding the same logical file into two
+ branches that will be merged later (without showing the two different
+ adds as a conflict). It is also useful when merging another project
+ into a subdirectory of this one.
"""
takes_args = ['file*']
takes_options = ['no-recurse', 'dry-run', 'verbose',
@@ -917,10 +924,6 @@
out of date [so you cannot commit] but it may be useful (i.e. to examine old
code.)
- --basis is to speed up checking out from remote branches. When specified, it
- uses the inventory and file contents from the basis branch in preference to the
- branch being checked out.
-
See "help checkouts" for more information on checkouts.
"""
takes_args = ['branch_location?', 'to_location?']
@@ -1213,8 +1216,8 @@
If there is a repository in a parent directory of the location, then
the history of the branch will be stored in the repository. Otherwise
- init creates a standalone branch which carries its own history in
- .bzr.
+ init creates a standalone branch which carries its own history
+ in the .bzr directory.
If there is already a branch at the location but it has no working tree,
the tree can be populated with 'bzr checkout'.
@@ -1917,7 +1920,7 @@
class cmd_export(Command):
- """Export past revision to destination directory.
+ """Export current or past revision to a destination directory or archive.
If no revision is specified this exports the last committed revision.
@@ -1925,12 +1928,14 @@
given, try to find the format with the extension. If no extension
is found exports to a directory (equivalent to --format=dir).
- Root may be the top directory for tar, tgz and tbz2 formats. If none
- is given, the top directory will be the root name of the file.
-
- If branch is omitted then the branch containing the CWD will be used.
-
- Note: export of tree with non-ascii filenames to zip is not supported.
+ If root is supplied, it will be used as the root directory inside
+ container formats (tar, zip, etc). If it is not supplied it will default
+ to the exported filename. The root option has no effect for 'dir' format.
+
+ If branch is omitted then the branch containing the current working
+ directory will be used.
+
+ Note: Export of tree with non-ASCII filenames to zip is not supported.
Supported formats Autodetected by extension
----------------- -------------------------
@@ -1966,7 +1971,13 @@
class cmd_cat(Command):
- """Write a file's text from a previous revision."""
+ """Write the contents of a file as of a given revision to standard output.
+
+ If no revision is nominated, the last revision is used.
+
+ Note: Take care to redirect standard output when using this command on a
+ binary file.
+ """
takes_options = ['revision', 'name-from-revision']
takes_args = ['filename']
@@ -2032,8 +2043,23 @@
within it is committed.
A selected-file commit may fail in some cases where the committed
- tree would be invalid, such as trying to commit a file in a
- newly-added directory that is not itself committed.
+ tree would be invalid. Consider::
+
+ bzr init foo
+ mkdir foo/bar
+ bzr add foo/bar
+ bzr commit foo -m "committing foo"
+ bzr mv foo/bar foo/baz
+ mkdir foo/bar
+ bzr add foo/bar
+ bzr commit foo/bar -m "committing bar but not baz"
+
+ In the example above, the last commit will fail by design. This gives
+ the user the opportunity to decide whether they want to commit the
+ rename at the same time, separately first, or not at all. (As a general
+ rule, when in doubt, Bazaar has a policy of Doing the Safe Thing.)
+
+ Note: A selected-file commit after a merge is not yet supported.
"""
# TODO: Run hooks on tree to-be-committed, and after commit.
@@ -2457,19 +2483,17 @@
Examples:
- To merge the latest revision from bzr.dev
- bzr merge ../bzr.dev
+ To merge the latest revision from bzr.dev:
+ bzr merge ../bzr.dev
- To merge changes up to and including revision 82 from bzr.dev
- bzr merge -r 82 ../bzr.dev
+ To merge changes up to and including revision 82 from bzr.dev:
+ bzr merge -r 82 ../bzr.dev
To merge the changes introduced by 82, without previous changes:
- bzr merge -r 81..82 ../bzr.dev
+ bzr merge -r 81..82 ../bzr.dev
merge refuses to run if there are any uncommitted changes, unless
--force is given.
-
- The following merge types are available:
"""
takes_args = ['branch?']
takes_options = ['revision', 'force', 'merge-type', 'reprocess', 'remember',
@@ -2627,6 +2651,7 @@
pending merge, and it lets you specify particular files.
Examples:
+
$ bzr remerge --show-base
Re-do the merge of all conflicted files, and show the base text in
conflict regions, in addition to the usual THIS and OTHER texts.
@@ -2634,8 +2659,7 @@
$ bzr remerge --merge-type weave --reprocess foobar
Re-do the merge of "foobar", using the weave merge algorithm, with
additional processing to reduce the size of conflict regions.
-
- The following merge types are available:"""
+ """
takes_args = ['file*']
takes_options = ['merge-type', 'reprocess',
Option('show-base', help="Show base revision text in "
=== modified file 'bzrlib/bundle/commands.py'
--- a/bzrlib/bundle/commands.py 2006-12-19 08:45:03 +0000
+++ b/bzrlib/bundle/commands.py 2007-03-26 09:59:49 +0000
@@ -86,10 +86,13 @@
bzr bundle-revisions
- Generate a bundle relative to a remembered location
+
bzr bundle-revisions BASE
- Bundle to apply the current tree into BASE
+
bzr bundle-revisions --revision A
- Bundle to apply revision A to remembered location
+
bzr bundle-revisions --revision A..B
- Bundle to transform A into B
"""
=== modified file 'bzrlib/cmd_version_info.py'
--- a/bzrlib/cmd_version_info.py 2006-10-06 07:00:57 +0000
+++ b/bzrlib/cmd_version_info.py 2007-03-26 09:59:49 +0000
@@ -45,7 +45,7 @@
class cmd_version_info(Command):
- """Generate version information about this tree."""
+ """Show version information about this tree."""
takes_options = [Option('format', type=_parse_version_info_format,
help='Select the output format'),
=== modified file 'bzrlib/help_topics.py'
--- a/bzrlib/help_topics.py 2007-02-07 22:31:07 +0000
+++ b/bzrlib/help_topics.py 2007-03-26 09:59:49 +0000
@@ -190,7 +190,7 @@
branch, which could be slow if a network connection is involved. Also, as you
don't have a local branch, then you cannot commit locally.
-Lightwieght checkouts work best when you have fast reliable access to the
+Lightweight checkouts work best when you have fast reliable access to the
master branch. This means that if the master branch is on the same disk or LAN
a lightweight checkout will be faster than a heavyweight one for any commands
that modify the revision history (as only one copy branch needs to be updated).
=== modified file 'bzrlib/tests/branch_implementations/__init__.py'
--- a/bzrlib/tests/branch_implementations/__init__.py 2007-02-15 01:23:29 +0000
+++ b/bzrlib/tests/branch_implementations/__init__.py 2007-03-22 19:41:59 +0000
@@ -42,6 +42,7 @@
'bzrlib.tests.branch_implementations.test_bound_sftp',
'bzrlib.tests.branch_implementations.test_branch',
'bzrlib.tests.branch_implementations.test_break_lock',
+ 'bzrlib.tests.branch_implementations.test_create_checkout',
'bzrlib.tests.branch_implementations.test_commit',
'bzrlib.tests.branch_implementations.test_hooks',
'bzrlib.tests.branch_implementations.test_http',
=== modified file 'bzrlib/tests/test_branch.py'
--- a/bzrlib/tests/test_branch.py 2007-03-14 03:42:40 +0000
+++ b/bzrlib/tests/test_branch.py 2007-03-22 19:41:59 +0000
@@ -175,13 +175,6 @@
BranchFormat.unregister_format(format)
self.make_branch_and_tree('bar')
- def test_checkout_format(self):
- branch = self.make_repository('repository', shared=True)
- branch = self.make_branch('repository/branch',
- format='metaweave')
- tree = branch.create_checkout('checkout')
- self.assertIs(tree.branch.__class__, _mod_branch.BzrBranch5)
-
class TestBranch6(TestCaseWithTransport):
=== modified file 'bzrlib/tree.py'
--- a/bzrlib/tree.py 2007-03-07 03:09:14 +0000
+++ b/bzrlib/tree.py 2007-03-21 17:51:42 +0000
@@ -266,6 +266,7 @@
"file is actually %s" % fp['sha1'],
"store is probably damaged/corrupt"])
+ @needs_read_lock
def path2id(self, path):
"""Return the id for path in this tree."""
return self._inventory.path2id(path)
=== modified file 'bzrlib/workingtree.py'
--- a/bzrlib/workingtree.py 2007-03-10 20:35:58 +0000
+++ b/bzrlib/workingtree.py 2007-03-22 15:18:14 +0000
@@ -277,8 +277,9 @@
hc.write()
if _inventory is None:
+ # This will be acquired on lock_read() or lock_write()
self._inventory_is_modified = False
- self.read_working_inventory()
+ self._inventory = None
else:
# the caller of __init__ has provided an inventory,
# we assume they know what they are doing - as its only
@@ -2296,6 +2297,17 @@
- uses the branch last-revision.
"""
+ def __init__(self, *args, **kwargs):
+ super(WorkingTree2, self).__init__(*args, **kwargs)
+ # WorkingTree2 has more of a constraint that self._inventory must
+ # exist. Because this is an older format, we don't mind the overhead
+ # caused by the extra computation here.
+
+ # Newer WorkingTree's should only have self._inventory set when they
+ # have a read lock.
+ if self._inventory is None:
+ self.read_working_inventory()
+
def lock_tree_write(self):
"""See WorkingTree.lock_tree_write().
=== modified file 'bzrlib/workingtree_4.py'
--- a/bzrlib/workingtree_4.py 2007-03-21 04:14:35 +0000
+++ b/bzrlib/workingtree_4.py 2007-03-22 19:54:30 +0000
@@ -2358,6 +2358,7 @@
# tree during upgrade.
tree._control_files.lock_write()
try:
+ tree.read_working_inventory()
self.create_dirstate_data(tree)
self.update_format(tree)
self.remove_xml_files(tree)
=== modified file 'tools/doc_generate/autodoc_man.py'
--- a/tools/doc_generate/autodoc_man.py 2007-03-06 00:10:57 +0000
+++ b/tools/doc_generate/autodoc_man.py 2007-03-26 09:59:49 +0000
@@ -176,7 +176,7 @@
.I "BZRPATH"
Path where
.B "%(bzrcmd)s"
-is to look for external command.
+is to look for shell plugin external commands.
.TP
.I "BZR_EMAIL"
E-Mail address of the user. Overrides default user config.
@@ -198,7 +198,7 @@
.SH "FILES"
.TP
.I "~/.bazaar/bazaar.conf"
-Contains the users default configuration. The section
+Contains the user's default configuration. The section
.B [DEFAULT]
is used to define general configuration that will be applied everywhere.
The section
=== modified file 'tools/doc_generate/autodoc_rstx.py'
--- a/tools/doc_generate/autodoc_rstx.py 2007-03-02 23:53:16 +0000
+++ b/tools/doc_generate/autodoc_rstx.py 2007-03-27 00:35:29 +0000
@@ -188,7 +188,7 @@
Environment
===========
**BZRPATH**
- Path where **%(bzrcmd)s** is to look for external command.
+ Path where **%(bzrcmd)s** is to look for shell plugin external commands.
**BZR_EMAIL**
E-Mail address of the user. Overrides default user config.
@@ -216,7 +216,7 @@
**On Windows**: ``C:\\Documents and Settings\\username\\Application Data\\bazaar\\2.0\\bazaar.conf``
-Contains the users default configuration. The section ``[DEFAULT]`` is
+Contains the user's default configuration. The section ``[DEFAULT]`` is
used to define general configuration that will be applied everywhere.
The section ``[ALIASES]`` can be used to create command aliases for
commonly used options.
More information about the bazaar-commits
mailing list