Rev 3408: Remove erroneous creation of branch-name file in cmd_branch in file:///home/pqm/archives/thelove/bzr/%2Btrunk/

Canonical.com Patch Queue Manager pqm at pqm.ubuntu.com
Tue May 6 12:40:19 BST 2008


At file:///home/pqm/archives/thelove/bzr/%2Btrunk/

------------------------------------------------------------
revno: 3408
revision-id:pqm at pqm.ubuntu.com-20080506114010-jwclr2qtiekvawjg
parent: pqm at pqm.ubuntu.com-20080505231558-7w3zaehbvtcjk7jv
parent: mbp at sourcefrog.net-20080506091432-g34exmtpsgzvctuu
committer: Canonical.com Patch Queue Manager <pqm at pqm.ubuntu.com>
branch nick: +trunk
timestamp: Tue 2008-05-06 12:40:10 +0100
message:
  Remove erroneous creation of branch-name file in cmd_branch
modified:
  NEWS                           NEWS-20050323055033-4e00b5db738777ff
  bzrlib/builtins.py             builtins.py-20050830033751-fc01482b9ca23183
  bzrlib/tests/blackbox/test_branch.py test_branch.py-20060524161337-noms9gmcwqqrfi8y-1
    ------------------------------------------------------------
    revno: 3400.1.3
    revision-id:mbp at sourcefrog.net-20080506091432-g34exmtpsgzvctuu
    parent: mbp at sourcefrog.net-20080502071053-xnxoo5p8r41za1pv
    parent: pqm at pqm.ubuntu.com-20080505231558-7w3zaehbvtcjk7jv
    committer: Martin Pool <mbp at sourcefrog.net>
    branch nick: trivial
    timestamp: Tue 2008-05-06 19:14:32 +1000
    message:
      Merge trunk
    modified:
      NEWS                           NEWS-20050323055033-4e00b5db738777ff
      bzrlib/__init__.py             __init__.py-20050309040759-33e65acf91bbcd5d
      bzrlib/branch.py               branch.py-20050309040759-e4baf4e0d046576e
      bzrlib/config.py               config.py-20051011043216-070c74f4e9e338e8
      bzrlib/debug.py                debug.py-20061102062349-vdhrw9qdpck8cl35-1
      bzrlib/graph.py                graph_walker.py-20070525030359-y852guab65d4wtn0-1
      bzrlib/lockable_files.py       control_files.py-20051111201905-bb88546e799d669f
      bzrlib/repofmt/knitrepo.py     knitrepo.py-20070206081537-pyy4a00xdas0j4pf-1
      bzrlib/repository.py           rev_storage.py-20051111201905-119e9401e46257e3
      bzrlib/status.py               status.py-20050505062338-431bfa63ec9b19e6
      bzrlib/tests/__init__.py       selftest.py-20050531073622-8d0e3c8845c97a64
      bzrlib/tests/blackbox/test_branch.py test_branch.py-20060524161337-noms9gmcwqqrfi8y-1
      bzrlib/tests/blackbox/test_status.py teststatus.py-20050712014354-508855eb9f29f7dc
      bzrlib/tests/repository_implementations/test_repository.py test_repository.py-20060131092128-ad07f494f5c9d26c
      bzrlib/tests/test_config.py    testconfig.py-20051011041908-742d0c15d8d8c8eb
      bzrlib/tests/test_graph.py     test_graph_walker.py-20070525030405-enq4r60hhi9xrujc-1
      bzrlib/tests/test_lockable_files.py test_lockable_files.py-20051225183927-365c7fd99591caf1
      bzrlib/tests/test_osutils.py   test_osutils.py-20051201224856-e48ee24c12182989
      bzrlib/tests/test_status.py    test_status.py-20060516190614-fbf6432e4a6e8aa5
      bzrlib/tests/workingtree_implementations/test_basis_inventory.py test_basis_inventory.py-20051218151655-3650468941091309
    ------------------------------------------------------------
    revno: 3400.1.2
    revision-id:mbp at sourcefrog.net-20080502071053-xnxoo5p8r41za1pv
    parent: mbp at sourcefrog.net-20080502053336-nai827prrl3t21es
    committer: Martin Pool <mbp at sourcefrog.net>
    branch nick: trivial
    timestamp: Fri 2008-05-02 17:10:53 +1000
    message:
      Remove leftover creation in cmd_branch of a branch-name file
    modified:
      NEWS                           NEWS-20050323055033-4e00b5db738777ff
      bzrlib/builtins.py             builtins.py-20050830033751-fc01482b9ca23183
      bzrlib/tests/blackbox/test_branch.py test_branch.py-20060524161337-noms9gmcwqqrfi8y-1
=== modified file 'NEWS'
--- a/NEWS	2008-05-05 20:42:38 +0000
+++ b/NEWS	2008-05-06 09:14:32 +0000
@@ -59,6 +59,10 @@
       RemoteRepository.get_parent_map() fallback code.
       (John Arbash Meinel, #214894)
 
+    * Remove leftover code in ``bzr_branch`` that inappropriately creates 
+      a ``branch-name`` file in the branch control directory.
+      (Martin Pool)
+
     * Set SO_REUSEADDR on server sockets of ``bzr serve`` to avoid problems
       rebinding the socket when starting the server a second time.
       (John Arbash Meinel, Martin Pool, #164288)

=== modified file 'bzrlib/builtins.py'
--- a/bzrlib/builtins.py	2008-04-29 19:13:40 +0000
+++ b/bzrlib/builtins.py	2008-05-02 07:10:53 +0000
@@ -939,10 +939,6 @@
                 revision_id = br_from.last_revision()
             if to_location is None:
                 to_location = urlutils.derive_to_location(from_location)
-                name = None
-            else:
-                name = os.path.basename(to_location) + '\n'
-
             to_transport = transport.get_transport(to_location)
             try:
                 to_transport.mkdir('.')
@@ -963,8 +959,6 @@
                 to_transport.delete_tree('.')
                 msg = "The branch %s has no revision %s." % (from_location, revision[0])
                 raise errors.BzrCommandError(msg)
-            if name:
-                branch.control_files.put_utf8('branch-name', name)
             _merge_tags_if_possible(br_from, branch)
             note('Branched %d revision(s).' % branch.revno())
         finally:

=== modified file 'bzrlib/tests/blackbox/test_branch.py'
--- a/bzrlib/tests/blackbox/test_branch.py	2008-05-01 04:09:39 +0000
+++ b/bzrlib/tests/blackbox/test_branch.py	2008-05-06 09:14:32 +0000
@@ -43,8 +43,9 @@
         self.example_branch('a')
         self.run_bzr('branch a b')
         b = branch.Branch.open('b')
-        self.assertEqual('b\n', b.control_files._transport.get_bytes('branch-name'))
         self.run_bzr('branch a c -r 1')
+        # previously was erroneously created by branching
+        self.assertFalse(b.control_files._transport.has('branch-name'))
         b.bzrdir.open_workingtree().commit(message='foo', allow_pointless=True)
 
     def test_branch_only_copies_history(self):




More information about the bazaar-commits mailing list