Rev 4720: Remove plan_to_base.py, add NEWS entry about fixing bug #40412 in http://bazaar.launchpad.net/~jameinel/bzr/2.1-40412-show-base-weave

John Arbash Meinel john at arbash-meinel.com
Thu Dec 10 21:49:37 GMT 2009


At http://bazaar.launchpad.net/~jameinel/bzr/2.1-40412-show-base-weave

------------------------------------------------------------
revno: 4720
revision-id: john at arbash-meinel.com-20091210214920-oiwetcplojnswhn3
parent: john at arbash-meinel.com-20091210171619-ehdcxjbl8afhq9g1
committer: John Arbash Meinel <john at arbash-meinel.com>
branch nick: 2.1-40412-show-base-weave
timestamp: Thu 2009-12-10 15:49:20 -0600
message:
  Remove plan_to_base.py, add NEWS entry about fixing bug #40412
-------------- next part --------------
=== modified file 'NEWS'
--- a/NEWS	2009-12-10 01:30:32 +0000
+++ b/NEWS	2009-12-10 21:49:20 +0000
@@ -49,16 +49,21 @@
 * ``bzr log -n0 -rN`` should not return revisions beyond its merged revisions.
   (#325618, #484109, Marius Kruger)
 
+* ``bzr merge --weave`` and ``--lca`` will now create ``.BASE`` files for
+  files with conflicts (similar to ``--merge3``). The contents of the file
+  is a synthesis of all bases used for the merge.
+  (John Arbash Meinel, #40412)
+
 * ``bzr mv --quiet`` really is quiet now.  (Gordon Tyler, #271790)
 
 * ``bzr serve`` is more clear about the risk of supplying --allow-writes.
   (Robert Collins, #84659)
 
+* ``bzr serve --quiet`` really is quiet now.  (Gordon Tyler, #252834)
+
 * Fix bug with redirected URLs over authenticated HTTP.
   (Glen Mailer, Neil Martinsen-Burrell, Vincent Ladeuil, #395714)
 
-* ``bzr serve --quiet`` really is quiet now.  (Gordon Tyler, #252834)
-
 * Interactive merge doesn't leave branch locks behind.  (Aaron Bentley)
 
 * Lots of bugfixes for the test suite on Windows. We should once again

=== removed file 'plan_to_base.py'
--- a/plan_to_base.py	2009-12-03 23:06:11 +0000
+++ b/plan_to_base.py	1970-01-01 00:00:00 +0000
@@ -1,76 +0,0 @@
-#!/usr/bin/env python
-# Copyright (C) 2009 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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
-
-"""A script that converts a bzr merge .plan file into a .BASE file."""
-
-import sys
-
-
-def plan_lines_to_base_lines(plan_lines):
-    _ghost_warning = False
-    base_lines = []
-    for line in plan_lines:
-        action, content = line.split('|', 1)
-        action = action.strip()
-        if action in ('killed-a', 'killed-b', 'killed-both', 'unchanged'):
-            # If lines were removed by a or b or both, then they must have been
-            # in the base. if unchanged, then they are copied from the base
-            base_lines.append(content)
-        elif action in ('killed-base', 'irrelevant', 'ghost-a', 'ghost-b',
-                        'new-a', 'new-b'):
-            # The first 4 are ones that are always suppressed
-            # the last 2 are lines that are in A or B, but *not* in BASE, so we
-            # ignore them
-            continue
-        else:
-            sys.stderr.write('Unknown action: %s\n' % (action,))
-    return base_lines
-
-
-def plan_file_to_base_file(plan_filename):
-    if not plan_filename.endswith('.plan'):
-        sys.stderr.write('"%s" does not look like a .plan file\n'
-                         % (plan_filename,))
-        return
-    plan_file = open(plan_filename, 'rb')
-    try:
-        plan_lines = plan_file.readlines()
-    finally:
-        plan_file.close()
-    base_filename = plan_filename[:-4] + 'BASE'
-    base_lines = plan_lines_to_base_lines(plan_lines)
-    f = open(base_filename, 'wb')
-    try:
-        f.writelines(base_lines)
-    finally:
-        f.close()
-
-
-def main(args):
-    import optparse
-    p = optparse.OptionParser('%prog foo.plan*')
-
-    opts, args = p.parse_args(args)
-    if len(args) < 1:
-        sys.stderr.write('You must supply exactly a .plan file.\n')
-        return 1
-    for arg in args:
-        plan_file_to_base_file(arg)
-
-
-if __name__ == '__main__':
-    sys.exit(main(sys.argv[1:]))



More information about the bazaar-commits mailing list