Rev 3207: merge bzr.dev in file:///v/home/vila/src/bzr/bugs/123363-tmp-pollution/
Vincent Ladeuil
v.ladeuil+lp at free.fr
Tue Jan 29 17:06:52 GMT 2008
At file:///v/home/vila/src/bzr/bugs/123363-tmp-pollution/
------------------------------------------------------------
revno: 3207
revision-id:v.ladeuil+lp at free.fr-20080129170643-rz3wt7z5ryw0s4se
parent: v.ladeuil+lp at free.fr-20080129160337-txsu01vjnpipm5bd
parent: pqm at pqm.ubuntu.com-20080129045844-u41ywp910i6jv8bz
committer: Vincent Ladeuil <v.ladeuil+lp at free.fr>
branch nick: 123363-tmp-pollution
timestamp: Tue 2008-01-29 18:06:43 +0100
message:
merge bzr.dev
modified:
NEWS NEWS-20050323055033-4e00b5db738777ff
bzrlib/builtins.py builtins.py-20050830033751-fc01482b9ca23183
bzrlib/help_topics/__init__.py help_topics.py-20060920210027-rnim90q9e0bwxvy4-1
bzrlib/plugin.py plugin.py-20050622060424-829b654519533d69
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/status.py status.py-20050505062338-431bfa63ec9b19e6
bzrlib/tests/test_plugins.py plugins.py-20050622075746-32002b55e5e943e9
bzrlib/tests/test_remote.py test_remote.py-20060720103555-yeeg2x51vn0rbtdp-2
------------------------------------------------------------
revno: 3199.1.5
revision-id:pqm at pqm.ubuntu.com-20080129045844-u41ywp910i6jv8bz
parent: pqm at pqm.ubuntu.com-20080129012127-1xxr6h8khunihsdx
parent: mbp at sourcefrog.net-20080129032252-ub1r7pug3agdts61
committer: Canonical.com Patch Queue Manager <pqm at pqm.ubuntu.com>
branch nick: +trunk
timestamp: Tue 2008-01-29 04:58:44 +0000
message:
Remove unnecessary decorators from add_inventory and add_revision
modified:
NEWS NEWS-20050323055033-4e00b5db738777ff
bzrlib/remote.py remote.py-20060720103555-yeeg2x51vn0rbtdp-1
bzrlib/repository.py rev_storage.py-20051111201905-119e9401e46257e3
------------------------------------------------------------
revno: 3199.2.1
revision-id:mbp at sourcefrog.net-20080129032252-ub1r7pug3agdts61
parent: pqm at pqm.ubuntu.com-20080129012127-1xxr6h8khunihsdx
parent: mbp at sourcefrog.net-20071026103103-wc6bbhubtbjcby9n
committer: Martin Pool <mbp at sourcefrog.net>
branch nick: cleanup_locks
timestamp: Tue 2008-01-29 14:22:52 +1100
message:
Remove unnecessary decorators from add_inventory and add_revision
modified:
NEWS NEWS-20050323055033-4e00b5db738777ff
bzrlib/remote.py remote.py-20060720103555-yeeg2x51vn0rbtdp-1
bzrlib/repository.py rev_storage.py-20051111201905-119e9401e46257e3
------------------------------------------------------------
revno: 2940.4.1
revision-id:mbp at sourcefrog.net-20071026103103-wc6bbhubtbjcby9n
parent: pqm at pqm.ubuntu.com-20071025022746-ftudwmzir8v2lccc
committer: mbp at sourcefrog.net
branch nick: cleanup
timestamp: Fri 2007-10-26 06:31:03 -0400
message:
Remove write lock decorators from add_inventory and add_revision
modified:
NEWS NEWS-20050323055033-4e00b5db738777ff
bzrlib/remote.py remote.py-20060720103555-yeeg2x51vn0rbtdp-1
bzrlib/repository.py rev_storage.py-20051111201905-119e9401e46257e3
------------------------------------------------------------
revno: 3199.1.4
revision-id:pqm at pqm.ubuntu.com-20080129012127-1xxr6h8khunihsdx
parent: pqm at pqm.ubuntu.com-20080128234850-jaxf44mvz2q8m2v5
parent: bialix at ukr.net-20080128221331-8g8jy7fgd30uc0dt
committer: Canonical.com Patch Queue Manager <pqm at pqm.ubuntu.com>
branch nick: +trunk
timestamp: Tue 2008-01-29 01:21:27 +0000
message:
(bialix) List possible values for BZR_SSH environment variable in
env-variables help topic. (#181842)
modified:
NEWS NEWS-20050323055033-4e00b5db738777ff
bzrlib/help_topics/__init__.py help_topics.py-20060920210027-rnim90q9e0bwxvy4-1
------------------------------------------------------------
revno: 3193.4.2
revision-id:bialix at ukr.net-20080128221331-8g8jy7fgd30uc0dt
parent: bialix at ukr.net-20080128085958-md3v4ij6mpuglvs4
parent: pqm at pqm.ubuntu.com-20080125195940-iwy2onaiiges6k4t
committer: Alexander Belchenko <bialix at ukr.net>
branch nick: bzr_ssh.help
timestamp: Tue 2008-01-29 00:13:31 +0200
message:
merge bzr.dev
modified:
NEWS NEWS-20050323055033-4e00b5db738777ff
bzrlib/__init__.py __init__.py-20050309040759-33e65acf91bbcd5d
bzrlib/builtins.py builtins.py-20050830033751-fc01482b9ca23183
bzrlib/commands.py bzr.py-20050309040720-d10f4714595cf8c3
bzrlib/debug.py debug.py-20061102062349-vdhrw9qdpck8cl35-1
bzrlib/doc/api/__init__.py __init__.py-20051224020744-7b87d590843855bc
bzrlib/help_topics/__init__.py help_topics.py-20060920210027-rnim90q9e0bwxvy4-1
bzrlib/plugin.py plugin.py-20050622060424-829b654519533d69
bzrlib/reconfigure.py reconfigure.py-20070908040425-6ykgo7escxhyrg9p-1
bzrlib/smart/client.py client.py-20061116014825-2k6ada6xgulslami-1
bzrlib/smart/medium.py medium.py-20061103051856-rgu2huy59fkz902q-1
bzrlib/smart/protocol.py protocol.py-20061108035435-ot0lstk2590yqhzr-1
bzrlib/tests/__init__.py selftest.py-20050531073622-8d0e3c8845c97a64
bzrlib/tests/blackbox/test_selftest.py test_selftest.py-20060123024542-01c5f1bbcb596d78
bzrlib/tests/test_osutils.py test_osutils.py-20051201224856-e48ee24c12182989
bzrlib/tests/test_plugins.py plugins.py-20050622075746-32002b55e5e943e9
bzrlib/tests/test_reconfigure.py test_reconfigure.py-20070908040425-6ykgo7escxhyrg9p-2
bzrlib/tests/test_remote.py test_remote.py-20060720103555-yeeg2x51vn0rbtdp-2
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_trace.py testtrace.py-20051110225523-a21117fc7a07eeff
bzrlib/trace.py trace.py-20050309040759-c8ed824bdcd4748a
------------------------------------------------------------
revno: 3193.4.1
revision-id:bialix at ukr.net-20080128085958-md3v4ij6mpuglvs4
parent: pqm at pqm.ubuntu.com-20080118055224-sskoia4bcpxd8wzu
committer: Alexander Belchenko <bialix at ukr.net>
branch nick: bzr_ssh.help
timestamp: Mon 2008-01-28 10:59:58 +0200
message:
List possible values for BZR_SSH environment variable in env-variables help topic. (#181842)
modified:
NEWS NEWS-20050323055033-4e00b5db738777ff
bzrlib/help_topics/__init__.py help_topics.py-20060920210027-rnim90q9e0bwxvy4-1
------------------------------------------------------------
revno: 3199.1.3
revision-id:pqm at pqm.ubuntu.com-20080128234850-jaxf44mvz2q8m2v5
parent: pqm at pqm.ubuntu.com-20080125195940-iwy2onaiiges6k4t
parent: bialix at ukr.net-20080128220453-hrb3yb1v8y3u52pq
committer: Canonical.com Patch Queue Manager <pqm at pqm.ubuntu.com>
branch nick: +trunk
timestamp: Mon 2008-01-28 23:48:50 +0000
message:
(bialix) List possible values for BZR_SSH environment variable in
env-variables help topic. (#181842)
modified:
bzrlib/status.py status.py-20050505062338-431bfa63ec9b19e6
------------------------------------------------------------
revno: 3193.3.3
revision-id:bialix at ukr.net-20080128220453-hrb3yb1v8y3u52pq
parent: bialix at ukr.net-20080128150314-ful6toglzzq7drx2
parent: pqm at pqm.ubuntu.com-20080125195940-iwy2onaiiges6k4t
committer: Alexander Belchenko <bialix at ukr.net>
branch nick: st.short
timestamp: Tue 2008-01-29 00:04:53 +0200
message:
merge bzr.dev
modified:
NEWS NEWS-20050323055033-4e00b5db738777ff
bzrlib/__init__.py __init__.py-20050309040759-33e65acf91bbcd5d
bzrlib/builtins.py builtins.py-20050830033751-fc01482b9ca23183
bzrlib/commands.py bzr.py-20050309040720-d10f4714595cf8c3
bzrlib/debug.py debug.py-20061102062349-vdhrw9qdpck8cl35-1
bzrlib/doc/api/__init__.py __init__.py-20051224020744-7b87d590843855bc
bzrlib/help_topics/__init__.py help_topics.py-20060920210027-rnim90q9e0bwxvy4-1
bzrlib/plugin.py plugin.py-20050622060424-829b654519533d69
bzrlib/reconfigure.py reconfigure.py-20070908040425-6ykgo7escxhyrg9p-1
bzrlib/smart/client.py client.py-20061116014825-2k6ada6xgulslami-1
bzrlib/smart/medium.py medium.py-20061103051856-rgu2huy59fkz902q-1
bzrlib/smart/protocol.py protocol.py-20061108035435-ot0lstk2590yqhzr-1
bzrlib/tests/__init__.py selftest.py-20050531073622-8d0e3c8845c97a64
bzrlib/tests/blackbox/test_selftest.py test_selftest.py-20060123024542-01c5f1bbcb596d78
bzrlib/tests/test_osutils.py test_osutils.py-20051201224856-e48ee24c12182989
bzrlib/tests/test_plugins.py plugins.py-20050622075746-32002b55e5e943e9
bzrlib/tests/test_reconfigure.py test_reconfigure.py-20070908040425-6ykgo7escxhyrg9p-2
bzrlib/tests/test_remote.py test_remote.py-20060720103555-yeeg2x51vn0rbtdp-2
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_trace.py testtrace.py-20051110225523-a21117fc7a07eeff
bzrlib/trace.py trace.py-20050309040759-c8ed824bdcd4748a
------------------------------------------------------------
revno: 3193.3.2
revision-id:bialix at ukr.net-20080128150314-ful6toglzzq7drx2
parent: bialix at ukr.net-20080128084459-1algjfge3awz8ypu
committer: Alexander Belchenko <bialix at ukr.net>
branch nick: st.short
timestamp: Mon 2008-01-28 17:03:14 +0200
message:
better formatting of pending merges (short/no-short): actual length of prefix is used
modified:
bzrlib/status.py status.py-20050505062338-431bfa63ec9b19e6
------------------------------------------------------------
revno: 3193.3.1
revision-id:bialix at ukr.net-20080128084459-1algjfge3awz8ypu
parent: pqm at pqm.ubuntu.com-20080118055224-sskoia4bcpxd8wzu
committer: Alexander Belchenko <bialix at ukr.net>
branch nick: st.short
timestamp: Mon 2008-01-28 10:44:59 +0200
message:
fit very long revision summary to terminal_width-1 for show_pending_merges(short=True).
modified:
bzrlib/status.py status.py-20050505062338-431bfa63ec9b19e6
------------------------------------------------------------
revno: 3199.1.2
revision-id:pqm at pqm.ubuntu.com-20080125195940-iwy2onaiiges6k4t
parent: pqm at pqm.ubuntu.com-20080124050323-gsgsp2em7v1ugtnz
parent: bialix at ukr.net-20080125181906-hnbj8fkesuxz94bc
committer: Canonical.com Patch Queue Manager <pqm at pqm.ubuntu.com>
branch nick: +trunk
timestamp: Fri 2008-01-25 19:59:40 +0000
message:
(bialix) new formatting of `bzr plugins` output.
modified:
NEWS NEWS-20050323055033-4e00b5db738777ff
bzrlib/builtins.py builtins.py-20050830033751-fc01482b9ca23183
bzrlib/plugin.py plugin.py-20050622060424-829b654519533d69
bzrlib/tests/test_plugins.py plugins.py-20050622075746-32002b55e5e943e9
------------------------------------------------------------
revno: 3193.2.4
revision-id:bialix at ukr.net-20080125181906-hnbj8fkesuxz94bc
parent: bialix at ukr.net-20080121233447-2iw2a1jcj0gs1f9f
parent: pqm at pqm.ubuntu.com-20080124050323-gsgsp2em7v1ugtnz
committer: Alexander Belchenko <bialix at ukr.net>
branch nick: plugins.output
timestamp: Fri 2008-01-25 20:19:06 +0200
message:
merge bzr.dev
modified:
NEWS NEWS-20050323055033-4e00b5db738777ff
bzrlib/__init__.py __init__.py-20050309040759-33e65acf91bbcd5d
bzrlib/builtins.py builtins.py-20050830033751-fc01482b9ca23183
bzrlib/commands.py bzr.py-20050309040720-d10f4714595cf8c3
bzrlib/debug.py debug.py-20061102062349-vdhrw9qdpck8cl35-1
bzrlib/doc/api/__init__.py __init__.py-20051224020744-7b87d590843855bc
bzrlib/help_topics/__init__.py help_topics.py-20060920210027-rnim90q9e0bwxvy4-1
bzrlib/reconfigure.py reconfigure.py-20070908040425-6ykgo7escxhyrg9p-1
bzrlib/smart/client.py client.py-20061116014825-2k6ada6xgulslami-1
bzrlib/smart/medium.py medium.py-20061103051856-rgu2huy59fkz902q-1
bzrlib/smart/protocol.py protocol.py-20061108035435-ot0lstk2590yqhzr-1
bzrlib/tests/__init__.py selftest.py-20050531073622-8d0e3c8845c97a64
bzrlib/tests/blackbox/test_selftest.py test_selftest.py-20060123024542-01c5f1bbcb596d78
bzrlib/tests/test_osutils.py test_osutils.py-20051201224856-e48ee24c12182989
bzrlib/tests/test_reconfigure.py test_reconfigure.py-20070908040425-6ykgo7escxhyrg9p-2
bzrlib/tests/test_remote.py test_remote.py-20060720103555-yeeg2x51vn0rbtdp-2
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_trace.py testtrace.py-20051110225523-a21117fc7a07eeff
bzrlib/trace.py trace.py-20050309040759-c8ed824bdcd4748a
------------------------------------------------------------
revno: 3193.2.3
revision-id:bialix at ukr.net-20080121233447-2iw2a1jcj0gs1f9f
parent: bialix at ukr.net-20080121110518-6i2xovfoqjjh75nr
committer: Alexander Belchenko <bialix at ukr.net>
branch nick: plugins.output
timestamp: Tue 2008-01-22 01:34:47 +0200
message:
another formatting variant suggested by John Meinel.
modified:
NEWS NEWS-20050323055033-4e00b5db738777ff
bzrlib/builtins.py builtins.py-20050830033751-fc01482b9ca23183
------------------------------------------------------------
revno: 3193.2.2
revision-id:bialix at ukr.net-20080121110518-6i2xovfoqjjh75nr
parent: bialix at ukr.net-20080121104632-ipdnpm6z4k5piv3q
committer: Alexander Belchenko <bialix at ukr.net>
branch nick: plugins.output
timestamp: Mon 2008-01-21 13:05:18 +0200
message:
new formatting of `bzr plugins` output.
modified:
bzrlib/builtins.py builtins.py-20050830033751-fc01482b9ca23183
------------------------------------------------------------
revno: 3193.2.1
revision-id:bialix at ukr.net-20080121104632-ipdnpm6z4k5piv3q
parent: pqm at pqm.ubuntu.com-20080118055224-sskoia4bcpxd8wzu
committer: Alexander Belchenko <bialix at ukr.net>
branch nick: plugins.output
timestamp: Mon 2008-01-21 12:46:32 +0200
message:
show path to plugin module as *.py instead of *.pyc if python source available
(e.g. C:\bzr.dev\bzrlib\plugins\multiparent.py)
modified:
bzrlib/plugin.py plugin.py-20050622060424-829b654519533d69
bzrlib/tests/test_plugins.py plugins.py-20050622075746-32002b55e5e943e9
------------------------------------------------------------
revno: 3199.1.1
revision-id:pqm at pqm.ubuntu.com-20080124050323-gsgsp2em7v1ugtnz
parent: pqm at pqm.ubuntu.com-20080123180146-9pkott489spjwv8q
parent: andrew.bennetts at canonical.com-20080124032143-srxbec60xf9dt3xy
committer: Canonical.com Patch Queue Manager <pqm at pqm.ubuntu.com>
branch nick: +trunk
timestamp: Thu 2008-01-24 05:03:23 +0000
message:
(andrew) Don't URL-escape relpaths transmitted by the smart protocol
client, fixing an interoperability issue with bzr 1.1 and earlier.
modified:
bzrlib/smart/client.py client.py-20061116014825-2k6ada6xgulslami-1
bzrlib/tests/test_remote.py test_remote.py-20060720103555-yeeg2x51vn0rbtdp-2
------------------------------------------------------------
revno: 3192.2.2
revision-id:andrew.bennetts at canonical.com-20080124032143-srxbec60xf9dt3xy
parent: andrew.bennetts at canonical.com-20080122002742-jq55lz7umd0bcvx1
committer: Andrew Bennetts <andrew.bennetts at canonical.com>
branch nick: smart-path-encoding
timestamp: Thu 2008-01-24 14:21:43 +1100
message:
Just use urllib.unquote, as suggested by John's review.
modified:
bzrlib/smart/client.py client.py-20061116014825-2k6ada6xgulslami-1
------------------------------------------------------------
revno: 3192.2.1
revision-id:andrew.bennetts at canonical.com-20080122002742-jq55lz7umd0bcvx1
parent: pqm at pqm.ubuntu.com-20080118011625-465mgy0mhdz1jiky
committer: Andrew Bennetts <andrew.bennetts at canonical.com>
branch nick: smart-path-encoding
timestamp: Tue 2008-01-22 11:27:42 +1100
message:
Don't transmit URL-escaped relpaths in the smart protocol, which is back to how things worked in bzr 1.1 and earlier.
modified:
bzrlib/smart/client.py client.py-20061116014825-2k6ada6xgulslami-1
bzrlib/tests/test_remote.py test_remote.py-20060720103555-yeeg2x51vn0rbtdp-2
-------------- next part --------------
=== modified file 'NEWS'
--- a/NEWS 2008-01-29 16:03:37 +0000
+++ b/NEWS 2008-01-29 17:06:43 +0000
@@ -12,13 +12,17 @@
* Fetching via bzr+ssh will no longer fill ghosts by default (this is
consistent with pack-0.92 fetching over SFTP). (Robert Collins)
- * ``merge`` now prefers to use the submit branch, but will fall back to
- parent branch. For many users, this has no effect. But some users who
- pull and merge on the same branch will notice a change. This change
- makes it easier to work on a branch on two different machines, pulling
- between the machines, while merging from the upstream.
- ``merge --remember`` can now be used to set the submit_branch.
- (Aaron Bentley)
+ * Formatting of ``bzr plugins`` output is changed to be more human-
+ friendly. Full path of plugins locations will be shown only with
+ ``--verbose`` command-line option. (Alexander Belchenko)
+
+ * ``merge`` now prefers to use the submit branch, but will fall back to
+ parent branch. For many users, this has no effect. But some users who
+ pull and merge on the same branch will notice a change. This change
+ makes it easier to work on a branch on two different machines, pulling
+ between the machines, while merging from the upstream.
+ ``merge --remember`` can now be used to set the submit_branch.
+ (Aaron Bentley)
FEATURES:
@@ -47,6 +51,9 @@
* Cleanly handle connection errors in smart protocol version two, the same
way as they are handled by version one. (Andrew Bennetts)
+ * List possible values for BZR_SSH environment variable in env-variables
+ help topic. (Alexander Belchenko, #181842)
+
* ``reconfigure`` can safely be interrupted while fetching.
(Aaron Bentley, #179316)
@@ -64,6 +71,10 @@
* Classes implementing Merge types like Merge3Merger must now accept (and
honour) a do_merge flag in their constructor. (Aaron Bentley)
+ * ``Repository.add_inventory`` and ``add_revision`` now require the caller
+ to previously take a write lock (and start a write group.)
+ (Martin Pool)
+
TESTING:
* selftest now accepts --load-list <file> to load a test id list. This
=== modified file 'bzrlib/builtins.py'
--- a/bzrlib/builtins.py 2008-01-29 15:16:31 +0000
+++ b/bzrlib/builtins.py 2008-01-29 17:06:43 +0000
@@ -3346,8 +3346,10 @@
class cmd_plugins(Command):
"""List the installed plugins.
- This command displays the list of installed plugins including the
- path where each one is located and a short description of each.
+ This command displays the list of installed plugins including
+ version of plugin and a short description of each.
+
+ --verbose shows the path where each plugin is located.
A plugin is an external component for Bazaar that extends the
revision control system, by adding or replacing code in Bazaar.
@@ -3360,16 +3362,30 @@
install them. Instructions are also provided there on how to
write new plugins using the Python programming language.
"""
+ takes_options = ['verbose']
@display_command
- def run(self):
+ def run(self, verbose=False):
import bzrlib.plugin
from inspect import getdoc
+ result = []
for name, plugin in bzrlib.plugin.plugins().items():
- print plugin.path(), "[%s]" % plugin.__version__
+ version = plugin.__version__
+ if version == 'unknown':
+ version = ''
+ name_ver = '%s %s' % (name, version)
d = getdoc(plugin.module)
if d:
- print '\t', d.split('\n')[0]
+ doc = d.split('\n')[0]
+ else:
+ doc = '(no description)'
+ result.append((name_ver, doc, plugin.path()))
+ for name_ver, doc, path in sorted(result):
+ print name_ver
+ print ' ', doc
+ if verbose:
+ print ' ', path
+ print
class cmd_testament(Command):
=== modified file 'bzrlib/help_topics/__init__.py'
--- a/bzrlib/help_topics/__init__.py 2008-01-22 05:00:42 +0000
+++ b/bzrlib/help_topics/__init__.py 2008-01-28 22:13:31 +0000
@@ -544,6 +544,7 @@
BZR_HOME Directory holding .bazaar config dir. Overrides HOME.
BZR_HOME (Win32) Directory holding bazaar config dir. Overrides APPDATA and HOME.
BZR_REMOTE_PATH Full name of remote 'bzr' command (for bzr+ssh:// URLs).
+BZR_SSH SSH client: paramiko (default), openssh, ssh, plink.
================ =================================================================
"""
=== modified file 'bzrlib/plugin.py'
--- a/bzrlib/plugin.py 2007-11-23 12:01:44 +0000
+++ b/bzrlib/plugin.py 2008-01-21 10:46:32 +0000
@@ -390,7 +390,12 @@
if getattr(self.module, '__path__', None) is not None:
return os.path.abspath(self.module.__path__[0])
elif getattr(self.module, '__file__', None) is not None:
- return os.path.abspath(self.module.__file__)
+ path = os.path.abspath(self.module.__file__)
+ if path[-4:] in ('.pyc', '.pyo'):
+ pypath = path[:-4] + '.py'
+ if os.path.isfile(pypath):
+ path = pypath
+ return path
else:
return repr(self.module)
=== modified file 'bzrlib/remote.py'
--- a/bzrlib/remote.py 2008-01-18 04:07:13 +0000
+++ b/bzrlib/remote.py 2008-01-29 03:22:52 +0000
@@ -649,12 +649,10 @@
committer=committer, revprops=revprops, revision_id=revision_id)
return builder
- @needs_write_lock
def add_inventory(self, revid, inv, parents):
self._ensure_real()
return self._real_repository.add_inventory(revid, inv, parents)
- @needs_write_lock
def add_revision(self, rev_id, rev, inv=None, config=None):
self._ensure_real()
return self._real_repository.add_revision(
=== modified file 'bzrlib/repository.py'
--- a/bzrlib/repository.py 2008-01-17 05:30:53 +0000
+++ b/bzrlib/repository.py 2008-01-29 03:22:52 +0000
@@ -495,7 +495,6 @@
attempted.
"""
- @needs_write_lock
def add_inventory(self, revision_id, inv, parents):
"""Add the inventory inv to the repository as revision_id.
@@ -526,7 +525,6 @@
return inv_vf.add_lines(revision_id, final_parents, lines,
check_content=check_content)[0]
- @needs_write_lock
def add_revision(self, revision_id, rev, inv=None, config=None):
"""Add rev to the revision store as revision_id.
=== modified file 'bzrlib/smart/client.py'
--- a/bzrlib/smart/client.py 2008-01-17 07:47:52 +0000
+++ b/bzrlib/smart/client.py 2008-01-24 03:21:43 +0000
@@ -14,6 +14,7 @@
# along with this program; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+import urllib
from urlparse import urlparse
from bzrlib.smart import protocol
@@ -91,4 +92,5 @@
else:
medium_base = urlutils.join(self._shared_connection.base, '/')
- return urlutils.relative_url(medium_base, transport.base).encode('utf8')
+ rel_url = urlutils.relative_url(medium_base, transport.base)
+ return urllib.unquote(rel_url)
=== modified file 'bzrlib/status.py'
--- a/bzrlib/status.py 2007-10-16 16:02:01 +0000
+++ b/bzrlib/status.py 2008-01-28 15:03:14 +0000
@@ -168,13 +168,15 @@
ignore.add(merge)
try:
from bzrlib.osutils import terminal_width
- width = terminal_width()
+ width = terminal_width() - 1 # we need one extra space to avoid
+ # extra blank lines
m_revision = branch.repository.get_revision(merge)
if short:
- prefix = 'P '
+ prefix = 'P '
else:
- prefix = ' '
- to_file.write(prefix + ' ' + line_log(m_revision, width - 4))
+ prefix = ' '
+ to_file.write(prefix)
+ to_file.write(line_log(m_revision, width - len(prefix)))
to_file.write('\n')
inner_merges = branch.repository.get_ancestry(merge)
assert inner_merges[0] is None
@@ -185,10 +187,11 @@
continue
mm_revision = branch.repository.get_revision(mmerge)
if short:
- prefix = 'P. '
+ prefix = 'P. '
else:
- prefix = ' '
- to_file.write(prefix + ' ' + line_log(mm_revision, width - 5))
+ prefix = ' '
+ to_file.write(prefix)
+ to_file.write(line_log(mm_revision, width - len(prefix)))
to_file.write('\n')
ignore.add(mmerge)
except errors.NoSuchRevision:
=== modified file 'bzrlib/tests/test_plugins.py'
--- a/bzrlib/tests/test_plugins.py 2007-11-13 01:49:34 +0000
+++ b/bzrlib/tests/test_plugins.py 2008-01-21 10:46:32 +0000
@@ -273,6 +273,28 @@
plugin_path = self.test_dir + '/plugin.py'
self.assertIsSameRealPath(plugin_path, normpath(plugin.path()))
+ def test_plugin_get_path_py_not_pyc(self):
+ self.setup_plugin() # after first import there will be plugin.pyc
+ self.teardown_plugin()
+ bzrlib.plugin.load_from_path(['.']) # import plugin.pyc
+ plugins = bzrlib.plugin.plugins()
+ plugin = plugins['plugin']
+ plugin_path = self.test_dir + '/plugin.py'
+ self.assertIsSameRealPath(plugin_path, normpath(plugin.path()))
+
+ def test_plugin_get_path_pyc_only(self):
+ self.setup_plugin() # after first import there will be plugin.pyc
+ self.teardown_plugin()
+ os.unlink(self.test_dir + '/plugin.py')
+ bzrlib.plugin.load_from_path(['.']) # import plugin.pyc
+ plugins = bzrlib.plugin.plugins()
+ plugin = plugins['plugin']
+ if __debug__:
+ plugin_path = self.test_dir + '/plugin.pyc'
+ else:
+ plugin_path = self.test_dir + '/plugin.pyo'
+ self.assertIsSameRealPath(plugin_path, normpath(plugin.path()))
+
def test_no_test_suite_gives_None_for_test_suite(self):
self.setup_plugin()
plugin = bzrlib.plugin.plugins()['plugin']
=== modified file 'bzrlib/tests/test_remote.py'
--- a/bzrlib/tests/test_remote.py 2008-01-17 07:47:52 +0000
+++ b/bzrlib/tests/test_remote.py 2008-01-22 00:27:42 +0000
@@ -26,7 +26,6 @@
from cStringIO import StringIO
from bzrlib import (
- bzrdir,
errors,
graph,
pack,
@@ -166,6 +165,19 @@
self.base = base
+class TestVfsHas(tests.TestCase):
+
+ def test_unicode_path(self):
+ client = FakeClient([(('yes',), )], '/')
+ transport = RemoteTransport('bzr://localhost/', _client=client)
+ filename = u'/hell\u00d8'.encode('utf8')
+ result = transport.has(filename)
+ self.assertEqual(
+ [('call', 'has', (filename,))],
+ client._calls)
+ self.assertTrue(result)
+
+
class TestBzrDirOpenBranch(tests.TestCase):
def test_branch_present(self):
@@ -194,6 +206,19 @@
[('call', 'BzrDir.open_branch', ('quack/',))],
client._calls)
+ def test_url_quoting_of_path(self):
+ # Relpaths on the wire should not be URL-escaped. So "~" should be
+ # transmitted as "~", not "%7E".
+ transport = RemoteTransport('bzr://localhost/~hello/')
+ client = FakeClient([(('ok', ''), ), (('ok', '', 'no', 'no'), )],
+ transport.base)
+ bzrdir = RemoteBzrDir(transport, _client=client)
+ result = bzrdir.open_branch()
+ self.assertEqual(
+ [('call', 'BzrDir.open_branch', ('~hello/',)),
+ ('call', 'BzrDir.find_repository', ('~hello/',))],
+ client._calls)
+
def check_open_repository(self, rich_root, subtrees):
transport = MemoryTransport()
transport.mkdir('quack')
More information about the bazaar-commits
mailing list