Rev 6510: merge trunk in file:///home/vila/src/bzr/bugs/832042-shared-stores/

Vincent Ladeuil v.ladeuil+lp at free.fr
Fri Aug 3 14:23:05 UTC 2012


At file:///home/vila/src/bzr/bugs/832042-shared-stores/

------------------------------------------------------------
revno: 6510 [merge]
revision-id: v.ladeuil+lp at free.fr-20120803142305-nlinjc2kc8zl9jdo
parent: v.ladeuil+lp at free.fr-20120803122225-mkqsnkvppsotdbm9
parent: pqm at pqm.ubuntu.com-20120803100145-jt69roowxjfxv0mx
committer: Vincent Ladeuil <v.ladeuil+lp at free.fr>
branch nick: 832042-shared-stores
timestamp: Fri 2012-08-03 16:23:05 +0200
message:
  merge trunk
modified:
  bzrlib/config.py               config.py-20051011043216-070c74f4e9e338e8
  bzrlib/filter_tree.py          filter_tree.py-20110614035703-dpvxzqjyrhoc47mt-1
  bzrlib/filters/__init__.py     __init__.py-20080416080515-mkxl29amuwrf6uir-2
  bzrlib/tests/__init__.py       selftest.py-20050531073622-8d0e3c8845c97a64
  bzrlib/tests/blackbox/test_config.py test_config.py-20100927150753-x6rf54uibd08r636-1
  bzrlib/win32utils.py           win32console.py-20051021033308-123c6c929d04973d
  doc/en/release-notes/bzr-2.5.txt bzr2.5.txt-20110708125756-587p0hpw7oke4h05-1
  doc/en/whats-new/whats-new-in-2.5.txt whatsnewin2.5.txt-20110711065040-xz9b4xba1qzlwp7m-1
-------------- next part --------------
=== modified file 'bzrlib/config.py'
--- a/bzrlib/config.py	2012-08-03 12:22:25 +0000
+++ b/bzrlib/config.py	2012-08-03 14:23:05 +0000
@@ -89,6 +89,7 @@
     atomicfile,
     controldir,
     debug,
+    directory_service,
     errors,
     lazy_regex,
     library_state,
@@ -4109,6 +4110,7 @@
             remove=False):
         if directory is None:
             directory = '.'
+        directory = directory_service.directories.dereference(directory)
         directory = urlutils.normalize_url(directory)
         if remove and all:
             raise errors.BzrError(

=== modified file 'bzrlib/filter_tree.py'
--- a/bzrlib/filter_tree.py	2011-12-19 13:23:58 +0000
+++ b/bzrlib/filter_tree.py	2012-08-02 14:14:36 +0000
@@ -46,9 +46,9 @@
 
     def get_file_text(self, file_id, path=None):
         chunks = self.backing_tree.get_file_lines(file_id, path)
-        filters = self.filter_stack_callback(path)
         if path is None:
             path = self.backing_tree.id2path(file_id)
+        filters = self.filter_stack_callback(path)
         context = ContentFilterContext(path, self, None)
         contents = filtered_output_bytes(chunks, filters, context)
         content = ''.join(contents)

=== modified file 'bzrlib/filters/__init__.py'
--- a/bzrlib/filters/__init__.py	2012-03-29 14:54:16 +0000
+++ b/bzrlib/filters/__init__.py	2012-08-02 11:28:25 +0000
@@ -90,7 +90,6 @@
         # Cached values
         self._revision_id = None
         self._revision = None
-        self._config = None
 
     def relpath(self):
         """Relative path of file to tree-root."""
@@ -131,16 +130,6 @@
                 self._revision = repo.get_revision(rev_id)
         return self._revision
 
-    def config(self):
-        """The Config object to search for configuration settings."""
-        if self._config is None:
-            branch = getattr(self._tree, 'branch', None)
-            if branch is not None:
-                self._config = branch.get_config()
-            else:
-                self._config = config.GlobalConfig()
-        return self._config
-
 
 def filtered_input_file(f, filters):
     """Get an input file that converts external to internal content.

=== modified file 'bzrlib/tests/__init__.py'
--- a/bzrlib/tests/__init__.py	2012-08-03 11:23:55 +0000
+++ b/bzrlib/tests/__init__.py	2012-08-03 14:23:05 +0000
@@ -2625,13 +2625,16 @@
         real branch.
         """
         root = TestCaseWithMemoryTransport.TEST_ROOT
-        # Make sure we get a readable and accessible home for .bzr.log
-        # and/or config files, and not fallback to weird defaults (see
-        # http://pad.lv/825027).
-        self.assertIs(None, os.environ.get('BZR_HOME', None))
-        os.environ['BZR_HOME'] = root
-        wt = controldir.ControlDir.create_standalone_workingtree(root)
-        del os.environ['BZR_HOME']
+        try:
+            # Make sure we get a readable and accessible home for .bzr.log
+            # and/or config files, and not fallback to weird defaults (see
+            # http://pad.lv/825027).
+            self.assertIs(None, os.environ.get('BZR_HOME', None))
+            os.environ['BZR_HOME'] = root
+            wt = controldir.ControlDir.create_standalone_workingtree(root)
+            del os.environ['BZR_HOME']
+        except Exception, e:
+            self.fail("Fail to initialize the safety net: %r\n" % (e,))
         # Hack for speed: remember the raw bytes of the dirstate file so that
         # we don't need to re-open the wt to check it hasn't changed.
         TestCaseWithMemoryTransport._SAFETY_NET_PRISTINE_DIRSTATE = (

=== modified file 'bzrlib/tests/blackbox/test_config.py'
--- a/bzrlib/tests/blackbox/test_config.py	2012-02-13 17:14:34 +0000
+++ b/bzrlib/tests/blackbox/test_config.py	2012-08-01 09:27:40 +0000
@@ -382,3 +382,15 @@
         self.assertLength(5, self.hpss_calls)
         self.assertLength(1, self.hpss_connections)
         self.assertThat(self.hpss_calls, ContainsNoVfsCalls)
+
+
+class TestConfigDirectory(tests.TestCaseWithTransport):
+
+    def test_parent_alias(self):
+        t = self.make_branch_and_tree('base')
+        t.branch.get_config_stack().set('test', 'base')
+        clone = t.branch.bzrdir.sprout('clone').open_branch()
+        clone.get_config_stack().set('test', 'clone')
+        out, err = self.run_bzr(['config', '-d', ':parent', 'test'],
+                                working_dir='clone')
+        self.assertEquals('base\n', out)

=== modified file 'bzrlib/win32utils.py'
--- a/bzrlib/win32utils.py	2011-12-21 14:17:33 +0000
+++ b/bzrlib/win32utils.py	2012-07-28 12:13:40 +0000
@@ -515,7 +515,7 @@
                                   default.
     :return: A list of unicode strings.
     """
-    # First, spit the command line
+    # First, split the command line
     s = cmdline.Splitter(command_line, single_quotes_allowed=single_quotes_allowed)
     
     # Bug #587868 Now make sure that the length of s agrees with sys.argv 

=== modified file 'doc/en/release-notes/bzr-2.5.txt'
--- a/doc/en/release-notes/bzr-2.5.txt	2012-06-29 08:12:32 +0000
+++ b/doc/en/release-notes/bzr-2.5.txt	2012-08-01 09:27:40 +0000
@@ -32,6 +32,9 @@
 .. Fixes for situations where bzr would previously crash or give incorrect
    or undesirable results.
 
+* ``bzr config`` properly handles aliases and references in the
+  ``--directory`` parameter (Vincent Ladeuil, Wouter van Heyst, #947049)
+
 * Revert use of --no-tty when gpg signing commits. (Jelmer Vernooij, #1014570)
 
 Documentation

=== modified file 'doc/en/whats-new/whats-new-in-2.5.txt'
--- a/doc/en/whats-new/whats-new-in-2.5.txt	2012-05-22 14:06:21 +0000
+++ b/doc/en/whats-new/whats-new-in-2.5.txt	2012-07-28 12:13:40 +0000
@@ -2,7 +2,7 @@
 What's New in Bazaar 2.5?
 *************************
 
-Bazaar 2.5 bas been released on the 24th of February 2012 and marks the
+Bazaar 2.5 has been released on the 24th of February 2012 and marks the
 start of a new long-term-stable series. From here, we will only make bugfix
 releases on the 2.5 series (2.5.1, etc, and support it until April 2017),
 while 2.6 will become our new development series.



More information about the bazaar-commits mailing list