Rev 2759: Merge bzr.dev and knits fixes. in http://people.ubuntu.com/~robertc/baz2.0/repository

Robert Collins robertc at robertcollins.net
Tue Sep 11 05:23:14 BST 2007


At http://people.ubuntu.com/~robertc/baz2.0/repository

------------------------------------------------------------
revno: 2759
revision-id: robertc at robertcollins.net-20070911042300-hd063aao8izk1hz8
parent: robertc at robertcollins.net-20070910071105-2v9edutj05b4ww20
parent: robertc at robertcollins.net-20070911041823-pn9kn8l5zmmptnsr
committer: Robert Collins <robertc at robertcollins.net>
branch nick: repository
timestamp: Tue 2007-09-11 14:23:00 +1000
message:
  Merge bzr.dev and knits fixes.
modified:
  NEWS                           NEWS-20050323055033-4e00b5db738777ff
  bzrlib/branch.py               branch.py-20050309040759-e4baf4e0d046576e
  bzrlib/builtins.py             builtins.py-20050830033751-fc01482b9ca23183
  bzrlib/help_topics.py          help_topics.py-20060920210027-rnim90q9e0bwxvy4-1
  bzrlib/reconcile.py            reweave_inventory.py-20051108164726-1e5e0934febac06e
  bzrlib/repository.py           rev_storage.py-20051111201905-119e9401e46257e3
  bzrlib/tag.py                  tag.py-20070212110532-91cw79inah2cfozx-1
  bzrlib/tests/test_tag.py       test_tag.py-20070212110532-91cw79inah2cfozx-2
  bzrlib/transport/__init__.py   transport.py-20050711165921-4978aa7ce1285ad5
  bzrlib/weave.py                knit.py-20050627021749-759c29984154256b
  doc/developers/HACKING.txt     HACKING-20050805200004-2a5dc975d870f78c
    ------------------------------------------------------------
    revno: 2592.1.25.2.7.1.28.1.6.1.3.1.9.2.1.3.74.1.31.3.18.1.9.1.8
    revision-id: robertc at robertcollins.net-20070911041823-pn9kn8l5zmmptnsr
    parent: robertc at robertcollins.net-20070911040511-g0wxzi6iyr3u379q
    parent: pqm at pqm.ubuntu.com-20070911020027-bmt9h0jgy3zdlge3
    committer: Robert Collins <robertc at robertcollins.net>
    branch nick: knits
    timestamp: Tue 2007-09-11 14:18:23 +1000
    message:
      Merge bzr.dev.
    modified:
      NEWS                           NEWS-20050323055033-4e00b5db738777ff
      bzrlib/branch.py               branch.py-20050309040759-e4baf4e0d046576e
      bzrlib/builtins.py             builtins.py-20050830033751-fc01482b9ca23183
      bzrlib/help_topics.py          help_topics.py-20060920210027-rnim90q9e0bwxvy4-1
      bzrlib/repofmt/weaverepo.py    presplitout.py-20070125045333-wfav3tsh73oxu3zk-1
      bzrlib/repository.py           rev_storage.py-20051111201905-119e9401e46257e3
      bzrlib/tag.py                  tag.py-20070212110532-91cw79inah2cfozx-1
      bzrlib/tests/test_tag.py       test_tag.py-20070212110532-91cw79inah2cfozx-2
      bzrlib/transport/__init__.py   transport.py-20050711165921-4978aa7ce1285ad5
      doc/developers/HACKING.txt     HACKING-20050805200004-2a5dc975d870f78c
        ------------------------------------------------------------
        revno: 2592.1.25.2.7.1.28.1.6.1.3.1.9.2.1.3.74.1.31.3.18.1.9.1.2.1.7
        revision-id: pqm at pqm.ubuntu.com-20070911020027-bmt9h0jgy3zdlge3
        parent: pqm at pqm.ubuntu.com-20070911010353-6lu7ek40rbjhj86o
        parent: robertc at robertcollins.net-20070911002917-53h2vb7ex4xh00u7
        committer: Canonical.com Patch Queue Manager <pqm at pqm.ubuntu.com>
        branch nick: +trunk
        timestamp: Tue 2007-09-11 03:00:27 +0100
        message:
          (robertc) Use a better api during commit to reduce overhead when adding texts. (Robert Collins)
        modified:
          NEWS                           NEWS-20050323055033-4e00b5db738777ff
          bzrlib/repofmt/weaverepo.py    presplitout.py-20070125045333-wfav3tsh73oxu3zk-1
          bzrlib/repository.py           rev_storage.py-20051111201905-119e9401e46257e3
            ------------------------------------------------------------
            revno: 2592.1.25.2.7.1.28.1.6.1.3.1.9.2.1.3.74.1.31.3.18.1.11
            revision-id: robertc at robertcollins.net-20070911002917-53h2vb7ex4xh00u7
            parent: robertc at robertcollins.net-20070909220156-wmm9up3q0mzisrb2
            committer: Robert Collins <robertc at robertcollins.net>
            branch nick: commit-builder
            timestamp: Tue 2007-09-11 10:29:17 +1000
            message:
              Add comment for igc.
            modified:
              bzrlib/repository.py           rev_storage.py-20051111201905-119e9401e46257e3
        ------------------------------------------------------------
        revno: 2592.1.25.2.7.1.28.1.6.1.3.1.9.2.1.3.74.1.31.3.18.1.9.1.2.1.6
        revision-id: pqm at pqm.ubuntu.com-20070911010353-6lu7ek40rbjhj86o
        parent: pqm at pqm.ubuntu.com-20070910121243-ccy1gej0kqy4feen
        parent: mbp at sourcefrog.net-20070911001556-7lji6zrw4xw9vv1f
        committer: Canonical.com Patch Queue Manager <pqm at pqm.ubuntu.com>
        branch nick: +trunk
        timestamp: Tue 2007-09-11 02:03:53 +0100
        message:
          (lukas) Overwrite conflicting tags by push|pull --overwrite
        modified:
          NEWS                           NEWS-20050323055033-4e00b5db738777ff
          bzrlib/branch.py               branch.py-20050309040759-e4baf4e0d046576e
          bzrlib/tag.py                  tag.py-20070212110532-91cw79inah2cfozx-1
          bzrlib/tests/test_tag.py       test_tag.py-20070212110532-91cw79inah2cfozx-2
            ------------------------------------------------------------
            revno: 2592.1.25.2.7.1.28.1.6.1.3.1.9.2.1.3.74.1.31.3.18.1.9.1.2.1.5.1.1
            revision-id: mbp at sourcefrog.net-20070911001556-7lji6zrw4xw9vv1f
            parent: pqm at pqm.ubuntu.com-20070910121243-ccy1gej0kqy4feen
            parent: lalinsky at gmail.com-20070907113713-9xb7l82n81g2amdn
            committer: Martin Pool <mbp at sourcefrog.net>
            branch nick: tag-overwrite
            timestamp: Tue 2007-09-11 10:15:56 +1000
            message:
              merge push|pull --overwrite and tweak
            modified:
              NEWS                           NEWS-20050323055033-4e00b5db738777ff
              bzrlib/branch.py               branch.py-20050309040759-e4baf4e0d046576e
              bzrlib/tag.py                  tag.py-20070212110532-91cw79inah2cfozx-1
              bzrlib/tests/test_tag.py       test_tag.py-20070212110532-91cw79inah2cfozx-2
            ------------------------------------------------------------
            revno: 2592.1.25.2.7.1.28.1.6.1.3.1.9.2.1.3.74.1.31.3.18.1.9.1.1.3.1
            revision-id: lalinsky at gmail.com-20070907113713-9xb7l82n81g2amdn
            parent: pqm at pqm.ubuntu.com-20070906063814-iiwx3hccoukt499k
            committer: Lukáš Lalinský <lalinsky at gmail.com>
            branch nick: overwrite-tags
            timestamp: Fri 2007-09-07 13:37:13 +0200
            message:
              Overwrite conflicting tags by push|pull --overwrite.
            modified:
              NEWS                           NEWS-20050323055033-4e00b5db738777ff
              bzrlib/branch.py               branch.py-20050309040759-e4baf4e0d046576e
              bzrlib/tag.py                  tag.py-20070212110532-91cw79inah2cfozx-1
              bzrlib/tests/test_tag.py       test_tag.py-20070212110532-91cw79inah2cfozx-2
        ------------------------------------------------------------
        revno: 2592.1.25.2.7.1.28.1.6.1.3.1.9.2.1.3.74.1.31.3.18.1.9.1.2.1.5
        revision-id: pqm at pqm.ubuntu.com-20070910121243-ccy1gej0kqy4feen
        parent: pqm at pqm.ubuntu.com-20070910105743-72rhm2629qiijbsj
        parent: mbp at sourcefrog.net-20070910095545-1wuzua8ly1tdee9o
        committer: Canonical.com Patch Queue Manager <pqm at pqm.ubuntu.com>
        branch nick: +trunk
        timestamp: Mon 2007-09-10 13:12:43 +0100
        message:
          Old fix from Alexander: set_tag_dict should lock the branch
        modified:
          bzrlib/tag.py                  tag.py-20070212110532-91cw79inah2cfozx-1
            ------------------------------------------------------------
            revno: 2592.1.25.2.7.1.28.1.6.1.3.1.9.2.1.3.74.1.31.3.18.1.9.1.2.5.1
            revision-id: mbp at sourcefrog.net-20070910095545-1wuzua8ly1tdee9o
            parent: pqm at pqm.ubuntu.com-20070907145828-hjh5941jv7y8d9z8
            committer: Martin Pool <mbp at sourcefrog.net>
            branch nick: tag-lock
            timestamp: Mon 2007-09-10 19:55:45 +1000
            message:
              Old fix from Alexander: set_tag_dict should lock the branch
            modified:
              bzrlib/tag.py                  tag.py-20070212110532-91cw79inah2cfozx-1
        ------------------------------------------------------------
        revno: 2592.1.25.2.7.1.28.1.6.1.3.1.9.2.1.3.74.1.31.3.18.1.9.1.2.1.4
        revision-id: pqm at pqm.ubuntu.com-20070910105743-72rhm2629qiijbsj
        parent: pqm at pqm.ubuntu.com-20070910100551-cw3iuntfi1kwj8jg
        parent: mbp at sourcefrog.net-20070910092754-v85j56whbxh75acb
        committer: Canonical.com Patch Queue Manager <pqm at pqm.ubuntu.com>
        branch nick: +trunk
        timestamp: Mon 2007-09-10 11:57:43 +0100
        message:
          Transport.ensure_base should ignore PermissionDenied when trying to create the directory (Axel Kollmorgen)
        modified:
          bzrlib/transport/__init__.py   transport.py-20050711165921-4978aa7ce1285ad5
            ------------------------------------------------------------
            revno: 2592.1.25.2.7.1.28.1.6.1.3.1.9.2.1.3.74.1.31.3.18.1.9.1.2.4.1
            revision-id: mbp at sourcefrog.net-20070910092754-v85j56whbxh75acb
            parent: pqm at pqm.ubuntu.com-20070907145828-hjh5941jv7y8d9z8
            committer: Martin Pool <mbp at sourcefrog.net>
            branch nick: integration
            timestamp: Mon 2007-09-10 19:27:54 +1000
            message:
              Transport.ensure_base should ignore PermissionDenied when trying to create the directory (Axel Kollmorgen)
            modified:
              bzrlib/transport/__init__.py   transport.py-20050711165921-4978aa7ce1285ad5
        ------------------------------------------------------------
        revno: 2592.1.25.2.7.1.28.1.6.1.3.1.9.2.1.3.74.1.31.3.18.1.9.1.2.1.3
        revision-id: pqm at pqm.ubuntu.com-20070910100551-cw3iuntfi1kwj8jg
        parent: pqm at pqm.ubuntu.com-20070910085701-36pk2aye9gf2vc0t
        parent: mbp at sourcefrog.net-20070906012710-fu7nkpp26k72a70n
        committer: Canonical.com Patch Queue Manager <pqm at pqm.ubuntu.com>
        branch nick: +trunk
        timestamp: Mon 2007-09-10 11:05:51 +0100
        message:
          (mbp) coding standard and doc updates
        modified:
          bzrlib/builtins.py             builtins.py-20050830033751-fc01482b9ca23183
          doc/developers/HACKING.txt     HACKING-20050805200004-2a5dc975d870f78c
            ------------------------------------------------------------
            revno: 2592.1.25.2.7.1.28.1.6.1.3.1.9.2.1.3.74.1.31.3.18.1.1.1.3
            revision-id: mbp at sourcefrog.net-20070906012710-fu7nkpp26k72a70n
            parent: mbp at sourcefrog.net-20070905064242-642im0o3ookdlmqw
            committer: Martin Pool <mbp at sourcefrog.net>
            branch nick: doc
            timestamp: Thu 2007-09-06 11:27:10 +1000
            message:
              clarify spacing for function parameters
            modified:
              doc/developers/HACKING.txt     HACKING-20050805200004-2a5dc975d870f78c
            ------------------------------------------------------------
            revno: 2592.1.25.2.7.1.28.1.6.1.3.1.9.2.1.3.74.1.31.3.18.1.1.1.2
            revision-id: mbp at sourcefrog.net-20070905064242-642im0o3ookdlmqw
            parent: mbp at sourcefrog.net-20070905051221-ubcur9dfodsozr28
            committer: Martin Pool <mbp at sourcefrog.net>
            branch nick: doc
            timestamp: Wed 2007-09-05 16:42:42 +1000
            message:
              emacs indent additions from vila
            modified:
              bzrlib/builtins.py             builtins.py-20050830033751-fc01482b9ca23183
              doc/developers/HACKING.txt     HACKING-20050805200004-2a5dc975d870f78c
            ------------------------------------------------------------
            revno: 2592.1.25.2.7.1.28.1.6.1.3.1.9.2.1.3.74.1.31.3.18.1.1.1.1
            revision-id: mbp at sourcefrog.net-20070905051221-ubcur9dfodsozr28
            parent: pqm at pqm.ubuntu.com-20070905001648-0iigag4tq1u8mywn
            committer: Martin Pool <mbp at sourcefrog.net>
            branch nick: doc
            timestamp: Wed 2007-09-05 15:12:21 +1000
            message:
              Document code layout stuff
            modified:
              doc/developers/HACKING.txt     HACKING-20050805200004-2a5dc975d870f78c
        ------------------------------------------------------------
        revno: 2592.1.25.2.7.1.28.1.6.1.3.1.9.2.1.3.74.1.31.3.18.1.9.1.2.1.2
        revision-id: pqm at pqm.ubuntu.com-20070910085701-36pk2aye9gf2vc0t
        parent: pqm at pqm.ubuntu.com-20070910054843-evbkt0bivtk6tpqu
        parent: ian.clatworthy at internode.on.net-20070910080059-yzwto88w0irifgk6
        committer: Canonical.com Patch Queue Manager <pqm at pqm.ubuntu.com>
        branch nick: +trunk
        timestamp: Mon 2007-09-10 09:57:01 +0100
        message:
          branches and standalone-trees documentation (Ian Clatworthy)
        modified:
          NEWS                           NEWS-20050323055033-4e00b5db738777ff
          bzrlib/help_topics.py          help_topics.py-20060920210027-rnim90q9e0bwxvy4-1
            ------------------------------------------------------------
            revno: 2592.1.25.2.7.1.28.1.6.1.3.1.9.2.1.3.74.1.31.3.18.1.9.1.2.1.1.1.1
            revision-id: ian.clatworthy at internode.on.net-20070910080059-yzwto88w0irifgk6
            parent: pqm at pqm.ubuntu.com-20070910054843-evbkt0bivtk6tpqu
            parent: ian.clatworthy at internode.on.net-20070907034241-vt2rgf4lqqwjbttm
            committer: Ian Clatworthy <ian.clatworthy at internode.on.net>
            branch nick: ianc-integration
            timestamp: Mon 2007-09-10 18:00:59 +1000
            message:
              branches and standalone-trees documentation (Ian Clatworthy)
            modified:
              NEWS                           NEWS-20050323055033-4e00b5db738777ff
              bzrlib/help_topics.py          help_topics.py-20060920210027-rnim90q9e0bwxvy4-1
            ------------------------------------------------------------
            revno: 2592.1.25.2.7.1.28.1.6.1.3.1.9.2.1.3.74.1.31.3.18.1.9.1.1.2.1
            revision-id: ian.clatworthy at internode.on.net-20070907034241-vt2rgf4lqqwjbttm
            parent: pqm at pqm.ubuntu.com-20070906063814-iiwx3hccoukt499k
            committer: Ian Clatworthy <ian.clatworthy at internode.on.net>
            branch nick: bzr.concepts
            timestamp: Fri 2007-09-07 13:42:41 +1000
            message:
              add branches and standalone-trees as help topics
            modified:
              NEWS                           NEWS-20050323055033-4e00b5db738777ff
              bzrlib/help_topics.py          help_topics.py-20060920210027-rnim90q9e0bwxvy4-1
        ------------------------------------------------------------
        revno: 2592.1.25.2.7.1.28.1.6.1.3.1.9.2.1.3.74.1.31.3.18.1.9.1.2.1.1
        revision-id: pqm at pqm.ubuntu.com-20070910054843-evbkt0bivtk6tpqu
        parent: pqm at pqm.ubuntu.com-20070907145828-hjh5941jv7y8d9z8
        parent: ian.clatworthy at internode.on.net-20070910050624-9iwn4y6n8b3fyjwn
        committer: Canonical.com Patch Queue Manager <pqm at pqm.ubuntu.com>
        branch nick: +trunk
        timestamp: Mon 2007-09-10 06:48:43 +0100
        message:
          selftest --benchmark verbose again by default (Ian Clatworthy)
        modified:
          NEWS                           NEWS-20050323055033-4e00b5db738777ff
          bzrlib/builtins.py             builtins.py-20050830033751-fc01482b9ca23183
        ------------------------------------------------------------
        revno: 2592.1.25.2.7.1.28.1.6.1.3.1.9.2.1.3.74.1.31.3.18.1.9.1.2.2.1
        revision-id: ian.clatworthy at internode.on.net-20070910050624-9iwn4y6n8b3fyjwn
        parent: pqm at pqm.ubuntu.com-20070907145828-hjh5941jv7y8d9z8
        parent: ian.clatworthy at internode.on.net-20070910021814-fpu0zjjmebnc10tn
        committer: Ian Clatworthy <ian.clatworthy at internode.on.net>
        branch nick: ianc-integration
        timestamp: Mon 2007-09-10 15:06:24 +1000
        message:
          selftest --benchmark verbose again by default (Ian Clatworthy)
        modified:
          NEWS                           NEWS-20050323055033-4e00b5db738777ff
          bzrlib/builtins.py             builtins.py-20050830033751-fc01482b9ca23183
        ------------------------------------------------------------
        revno: 2592.1.25.2.7.1.28.1.6.1.3.1.9.2.1.3.74.1.31.3.18.1.9.1.2.3.1
        revision-id: ian.clatworthy at internode.on.net-20070910021814-fpu0zjjmebnc10tn
        parent: pqm at pqm.ubuntu.com-20070907145828-hjh5941jv7y8d9z8
        committer: Ian Clatworthy <ian.clatworthy at internode.on.net>
        branch nick: bzr.verbose-benchmarks
        timestamp: Mon 2007-09-10 12:18:14 +1000
        message:
          Fix selftest --benchmark so verbose by default again
        modified:
          NEWS                           NEWS-20050323055033-4e00b5db738777ff
          bzrlib/builtins.py             builtins.py-20050830033751-fc01482b9ca23183
    ------------------------------------------------------------
    revno: 2592.1.25.2.7.1.28.1.6.1.3.1.9.2.1.3.74.1.31.3.18.1.9.1.7
    revision-id: robertc at robertcollins.net-20070911040511-g0wxzi6iyr3u379q
    parent: robertc at robertcollins.net-20070910035304-iwf9nmqoxeshjaki
    committer: Robert Collins <robertc at robertcollins.net>
    branch nick: knits
    timestamp: Tue 2007-09-11 14:05:11 +1000
    message:
      Unbreak weaves.
    modified:
      bzrlib/reconcile.py            reweave_inventory.py-20051108164726-1e5e0934febac06e
      bzrlib/weave.py                knit.py-20050627021749-759c29984154256b
=== modified file 'NEWS'
--- a/NEWS	2007-09-10 07:11:05 +0000
+++ b/NEWS	2007-09-11 04:23:00 +0000
@@ -126,6 +126,9 @@
    * Prompt for an ftp password if none is provided.
      (Vincent Ladeuil, #137044)
 
+   * Overwrite conflicting tags by ``push`` and ``pull`` if the
+     ``--overwrite`` option is specified.  (Lukáš Lalinský, #93947)
+
   IMPROVEMENTS:
 
    * Add the option "--show-diff" to the commit command in order to display
@@ -176,6 +179,10 @@
    * HACKING has been extended with a large section on core developer tasks.
      (Ian Clatworthy)
 
+   * Add ``branches`` and ``standalone-trees`` as online help topics and
+     include them as Concepts within the User Reference.
+     (Paul Moore, Ian Clatworthy)
+
   API BREAKS:
 
    * ``Branch.append_revision`` is removed altogether; please use 

=== modified file 'bzrlib/branch.py'
--- a/bzrlib/branch.py	2007-09-03 23:30:44 +0000
+++ b/bzrlib/branch.py	2007-09-11 04:23:00 +0000
@@ -1494,7 +1494,7 @@
                 if stop_revision is None:
                     stop_revision = source.last_revision()
                 self.generate_revision_history(stop_revision)
-            result.tag_conflicts = source.tags.merge_to(self.tags)
+            result.tag_conflicts = source.tags.merge_to(self.tags, overwrite)
             result.new_revno, result.new_revid = self.last_revision_info()
             if _hook_master:
                 result.master_branch = _hook_master
@@ -1603,7 +1603,7 @@
                 raise
         if overwrite:
             target.set_revision_history(self.revision_history())
-        result.tag_conflicts = self.tags.merge_to(target.tags)
+        result.tag_conflicts = self.tags.merge_to(target.tags, overwrite)
         result.new_revno, result.new_revid = target.last_revision_info()
         return result
 

=== modified file 'bzrlib/builtins.py'
--- a/bzrlib/builtins.py	2007-09-05 08:18:57 +0000
+++ b/bzrlib/builtins.py	2007-09-10 10:05:51 +0000
@@ -2552,7 +2552,7 @@
                      ]
     encoding_type = 'replace'
 
-    def run(self, testspecs_list=None, verbose=None, one=False,
+    def run(self, testspecs_list=None, verbose=False, one=False,
             transport=None, benchmark=None,
             lsprof_timed=None, cache_dir=None,
             first=False, list_only=False,
@@ -2578,14 +2578,12 @@
             pattern = ".*"
         if benchmark:
             test_suite_factory = benchmarks.test_suite
-            if verbose is None:
-                verbose = True
+            # Unless user explicitly asks for quiet, be verbose in benchmarks
+            verbose = not is_quiet()
             # TODO: should possibly lock the history file...
             benchfile = open(".perf_history", "at", buffering=1)
         else:
             test_suite_factory = None
-            if verbose is None:
-                verbose = False
             benchfile = None
         try:
             result = selftest(verbose=verbose,
@@ -3867,7 +3865,7 @@
 
     encoding_type = 'exact'
 
-    _see_also = ['merge', 'doc/configuration.txt']
+    _see_also = ['merge']
 
     takes_args = ['submit_branch?', 'public_branch?']
 

=== modified file 'bzrlib/help_topics.py'
--- a/bzrlib/help_topics.py	2007-09-03 01:33:49 +0000
+++ b/bzrlib/help_topics.py	2007-09-07 03:42:41 +0000
@@ -446,6 +446,37 @@
                this will update the tree to match the branch.
 """
 
+
+_branches = \
+"""Branches
+
+A branch consists of the state of a project, including all of its
+history. All branches have a repository associated (which is where the
+branch history is stored), but multiple branches may share the same
+repository (a shared repository). Branches can be copied and merged.
+
+Related commands::
+
+  init    Make a directory into a versioned branch.
+  branch  Create a new copy of a branch.
+  merge   Perform a three-way merge.
+"""
+
+
+_standalone_trees = \
+"""Standalone Trees
+
+A standalone tree is a working tree with an associated repository. It
+is an independently usable branch, with no dependencies on any other.
+Creating a standalone tree (via bzr init) is the quickest way to put
+an existing project under version control.
+
+Related Commands::
+
+  init    Make a directory into a versioned branch.
+"""
+
+
 _status_flags = \
 """Status Flags
 
@@ -516,6 +547,7 @@
 """
 
 
+# Register help topics
 topic_registry.register("revisionspec", _help_on_revisionspec,
                         "Explain how to use --revision")
 topic_registry.register('basic', _basic_help, "Basic commands", SECT_HIDDEN)
@@ -528,8 +560,6 @@
                         'Options that can be used with any command')
 topic_registry.register('global-options', _global_options,
                     'Options that control how Bazaar runs')
-topic_registry.register('checkouts', _checkouts,
-                        'Information on what a checkout is', SECT_CONCEPT)
 topic_registry.register('urlspec', _help_on_transport,
                         "Supported transport protocols")
 topic_registry.register('status-flags', _status_flags,
@@ -538,15 +568,28 @@
     from bzrlib import bugtracker
     return "Bug Trackers\n\n" + bugtracker.tracker_registry.help_topic(topic)
 topic_registry.register('bugs', get_bugs_topic, 'Bug tracker support')
+topic_registry.register('env-variables', _env_variables,
+                        'Environment variable names and values')
+topic_registry.register('files', _files,
+                        'Information on configuration and log files')
+
+
+# Register concept topics.
+# Note that we might choose to remove these from the online help in the
+# future or implement them via loading content from files. In the meantime,
+# please keep them concise.
+topic_registry.register('branches', _branches,
+                        'Information on what a branch is', SECT_CONCEPT)
+topic_registry.register('checkouts', _checkouts,
+                        'Information on what a checkout is', SECT_CONCEPT)
 topic_registry.register('repositories', _repositories,
                         'Basic information on shared repositories.',
                         SECT_CONCEPT)
+topic_registry.register('standalone-trees', _standalone_trees,
+                        'Information on what a standalone tree is',
+                        SECT_CONCEPT)
 topic_registry.register('working-trees', _working_trees,
                         'Information on working trees', SECT_CONCEPT)
-topic_registry.register('env-variables', _env_variables,
-                        'Environment variable names and values')
-topic_registry.register('files', _files,
-                        'Information on configuration and log files')
 
 
 class HelpTopicIndex(object):

=== modified file 'bzrlib/reconcile.py'
--- a/bzrlib/reconcile.py	2007-09-05 06:08:29 +0000
+++ b/bzrlib/reconcile.py	2007-09-11 04:23:00 +0000
@@ -182,7 +182,7 @@
                 # reconcile.
                 new_inventory_vf._check_write_ok()
                 Weave._add_lines(new_inventory_vf, rev_id, parents,
-                    self.inventory.get_lines(rev_id), None, None, None)
+                    self.inventory.get_lines(rev_id), None, None, None, False)
             else:
                 new_inventory_vf.add_lines(rev_id, parents, self.inventory.get_lines(rev_id))
 

=== modified file 'bzrlib/repository.py'
--- a/bzrlib/repository.py	2007-09-10 07:11:05 +0000
+++ b/bzrlib/repository.py	2007-09-11 04:23:00 +0000
@@ -2545,10 +2545,13 @@
     def _add_text_to_weave(self, file_id, new_lines, parents, nostore_sha):
         versionedfile = self.repository.weave_store.get_weave_or_empty(
             file_id, self.repository.get_transaction())
+        # Don't change this to add_lines - add_lines_with_ghosts is cheaper
+        # than add_lines, and allows committing when a parent is ghosted for
+        # some reason.
         try:
             return versionedfile.add_lines_with_ghosts(
                 self._new_revision_id, parents, new_lines,
-                nostore_sha=nostore_sha, random_id=self.random_id)[0:2]
+                nostore_sha=nostore_sha, random_id=self.random_revid)[0:2]
         finally:
             versionedfile.clear_cache()
 

=== modified file 'bzrlib/tag.py'
--- a/bzrlib/tag.py	2007-04-19 19:28:39 +0000
+++ b/bzrlib/tag.py	2007-09-11 00:15:56 +0000
@@ -62,7 +62,7 @@
     lookup_tag = _not_supported
     delete_tag = _not_supported
 
-    def merge_to(self, to_tags):
+    def merge_to(self, to_tags, overwrite=False):
         # we never have anything to copy
         pass
 
@@ -143,7 +143,7 @@
 
         :param new_dict: Dictionary from tag name to target.
         """
-        self.branch.lock_read()
+        self.branch.lock_write()
         try:
             self.branch._transport.put_bytes('tags',
                 self._serialize_tag_dict(new_dict))
@@ -170,7 +170,7 @@
             raise ValueError("failed to deserialize tag dictionary %r: %s"
                 % (tag_content, e))
 
-    def merge_to(self, to_tags):
+    def merge_to(self, to_tags, overwrite=False):
         """Copy tags between repositories if necessary and possible.
         
         This method has common command-line behaviour about handling 
@@ -180,9 +180,7 @@
         exist keep their existing definitions.
 
         :param to_tags: Branch to receive these tags
-        :param just_warn: If the destination doesn't support tags and the 
-            source does have tags, just give a warning.  Otherwise, raise
-            TagsNotSupported (default).
+        :param overwrite: Overwrite conflicting tags in the target branch
 
         :returns: A list of tags that conflicted, each of which is 
             (tagname, source_target, dest_target).
@@ -200,20 +198,22 @@
         to_tags.branch.lock_write()
         try:
             dest_dict = to_tags.get_tag_dict()
-            result, conflicts = self._reconcile_tags(source_dict, dest_dict)
+            result, conflicts = self._reconcile_tags(source_dict, dest_dict,
+                                                     overwrite)
             if result != dest_dict:
                 to_tags._set_tag_dict(result)
         finally:
             to_tags.branch.unlock()
         return conflicts
 
-    def _reconcile_tags(self, source_dict, dest_dict):
+    def _reconcile_tags(self, source_dict, dest_dict, overwrite):
         """Do a two-way merge of two tag dictionaries.
 
         only in source => source value
         only in destination => destination value
         same definitions => that
-        different definitions => keep destination value, give a warning
+        different definitions => if overwrite is False, keep destination
+            value and give a warning, otherwise use the source value
 
         :returns: (result_dict,
             [(conflicting_tag, source_target, dest_target)])
@@ -221,7 +221,7 @@
         conflicts = []
         result = dict(dest_dict) # copy
         for name, target in source_dict.items():
-            if name not in result:
+            if name not in result or overwrite:
                 result[name] = target
             elif result[name] == target:
                 pass

=== modified file 'bzrlib/tests/test_tag.py'
--- a/bzrlib/tests/test_tag.py	2007-03-14 03:42:40 +0000
+++ b/bzrlib/tests/test_tag.py	2007-09-07 11:37:13 +0000
@@ -78,3 +78,23 @@
         old_branch.tags.merge_to(new_branch.tags)
         self.assertRaises(errors.TagsNotSupported,
             new_branch.tags.merge_to, old_branch.tags)
+
+    def test_merge_to(self):
+        a = self.make_branch_supporting_tags('a')
+        b = self.make_branch_supporting_tags('b')
+        # simple merge
+        a.tags.set_tag('tag-1', 'x')
+        b.tags.set_tag('tag-2', 'y')
+        a.tags.merge_to(b.tags)
+        self.assertEqual('x', b.tags.lookup_tag('tag-1'))
+        self.assertEqual('y', b.tags.lookup_tag('tag-2'))
+        self.assertRaises(errors.NoSuchTag, a.tags.lookup_tag, 'tag-2')
+        # conflicting merge
+        a.tags.set_tag('tag-2', 'z')
+        conflicts = a.tags.merge_to(b.tags)
+        self.assertEqual(conflicts, [('tag-2', 'z', 'y')])
+        self.assertEqual('y', b.tags.lookup_tag('tag-2'))
+        # overwrite conflicts
+        conflicts = a.tags.merge_to(b.tags, overwrite=True)
+        self.assertEqual(conflicts, [])
+        self.assertEqual('z', b.tags.lookup_tag('tag-2'))

=== modified file 'bzrlib/transport/__init__.py'
--- a/bzrlib/transport/__init__.py	2007-08-27 04:25:39 +0000
+++ b/bzrlib/transport/__init__.py	2007-09-11 04:23:00 +0000
@@ -369,10 +369,10 @@
         """
         # The default implementation just uses "Easier to ask for forgiveness
         # than permission". We attempt to create the directory, and just
-        # suppress a FileExists exception.
+        # suppress FileExists and PermissionDenied (for Windows) exceptions.
         try:
             self.mkdir('.')
-        except errors.FileExists:
+        except (errors.FileExists, errors.PermissionDenied):
             return False
         else:
             return True

=== modified file 'bzrlib/weave.py'
--- a/bzrlib/weave.py	2007-09-10 03:53:04 +0000
+++ b/bzrlib/weave.py	2007-09-11 04:05:11 +0000
@@ -261,7 +261,7 @@
         return idx
 
     def _add_lines(self, version_id, parents, lines, parent_texts,
-       left_matching_blocks, nostore_sha):
+       left_matching_blocks, nostore_sha, random_id):
         """See VersionedFile.add_lines."""
         idx = self._add(version_id, lines, map(self._lookup, parents),
             nostore_sha=nostore_sha)
@@ -874,7 +874,7 @@
         """Add a version and save the weave."""
         self.check_not_reserved_id(version_id)
         result = super(WeaveFile, self)._add_lines(version_id, parents, lines,
-            parent_texts, left_matching_blocks, nostore_sha)
+            parent_texts, left_matching_blocks, nostore_sha, random_id)
         self._save()
         return result
 

=== modified file 'doc/developers/HACKING.txt'
--- a/doc/developers/HACKING.txt	2007-09-06 02:39:24 +0000
+++ b/doc/developers/HACKING.txt	2007-09-10 10:05:51 +0000
@@ -624,12 +624,93 @@
 Coding Style Guidelines
 =======================
 
+Code layout
+-----------
+
 Please write PEP-8__ compliant code.  
 
+__ http://www.python.org/peps/pep-0008.html
+
 One often-missed requirement is that the first line of docstrings
 should be a self-contained one-sentence summary.
 
-__ http://www.python.org/peps/pep-0008.html
+We use 4 space indents for blocks, and never use tab characters.  (In vim,
+``set expandtab``.)
+
+Lines should be no more than 79 characters if at all possible.
+Lines that continue a long statement may be indented in either of 
+two ways:
+
+within the parenthesis or other character that opens the block, e.g.::
+
+    my_long_method(arg1,
+                   arg2,
+                   arg3)
+
+or indented by four spaces::
+
+    my_long_method(arg1,
+        arg2,
+        arg3)
+
+The first is considered clearer by some people; however it can be a bit
+harder to maintain (e.g. when the method name changes), and it does not
+work well if the relevant parenthesis is already far to the right.  Avoid
+this::
+
+     self.legbone.kneebone.shinbone.toebone.shake_it(one,
+                                                     two,
+                                                     three)
+
+but rather ::
+
+     self.legbone.kneebone.shinbone.toebone.shake_it(one,
+         two,
+         three)
+
+or ::
+
+     self.legbone.kneebone.shinbone.toebone.shake_it(
+         one, two, three)
+
+For long lists, we like to add a trailing comma and put the closing
+character on the following line.  This makes it easier to add new items in
+future::
+
+    from bzrlib.goo import (
+        jam,
+        jelly,
+        marmalade,
+        )
+
+There should be spaces between function paramaters, but not between the
+keyword name and the value::
+
+    call(1, 3, cheese=quark)
+
+In emacs::
+
+    ;(defface my-invalid-face
+    ;  '((t (:background "Red" :underline t)))
+    ;  "Face used to highlight invalid constructs or other uglyties"
+    ;  )
+
+    (defun my-python-mode-hook ()
+     ;; setup preferred indentation style.
+     (setq fill-column 79)
+     (setq indent-tabs-mode nil) ; no tabs, never, I will not repeat
+    ;  (font-lock-add-keywords 'python-mode
+    ;                         '(("^\\s *\t" . 'my-invalid-face) ; Leading tabs
+    ;                            ("[ \t]+$" . 'my-invalid-face)  ; Trailing spaces
+    ;                            ("^[ \t]+$" . 'my-invalid-face)); Spaces only
+    ;                          )
+     )
+
+    (add-hook 'python-mode-hook 'my-python-mode-hook)
+
+The lines beginning with ';' are comments. They can be activated
+if one want to have a strong notice of some tab/space usage
+violations.
 
 
 Module Imports



More information about the bazaar-commits mailing list