Degenerate behaviour from bzr diff

Paul Moore p.f.moore at gmail.com
Mon Sep 24 20:50:35 BST 2007


I just tried using bzr to manage a quick patching session. Nothing
fancy, grab a small distribution, bzr init, hack a bit, then bzr diff
to create a patch.

Or so I thought. In spite of the changes being pretty small, bzr diff
chose to show the complete file being replaced! Clearly completely
useless as a patch to send back upstream :-(

I was originally using bzr 0.18, but I updated to 0.91 rc 2, and get
the same behaviour.

Any suggestions?

>bzr version
Bazaar (bzr) 0.91.0candidate2
  Python interpreter: C:\Apps\Bazaar\python25.dll 2.5.1.final.0
  Python standard library: C:\Apps\Bazaar\lib\library.zip
  bzrlib: C:\Apps\Bazaar\lib\library.zip\bzrlib
  Bazaar configuration: C:\Documents and Settings\Gustav\Application
Data\bazaar\2.0
  Bazaar log file: C:\Documents and Settings\Gustav\My Documents\.bzr.log

Copyright 2005, 2006, 2007 Canonical Ltd.
http://bazaar-vcs.org/

bzr comes with ABSOLUTELY NO WARRANTY.  bzr is free software, and
you may use, modify and redistribute it under the terms of the GNU
General Public License version 2 or later.

>bzr status
unknown:
  setup.py.new

>bzr diff

>diff -u setup.py setup.py.new
--- setup.py    2007-09-24 20:38:02.343750000 +0100
+++ setup.py.new        2007-09-24 20:36:32.812500000 +0100
@@ -158,19 +158,14 @@

     ssl_incs = [os.environ.get("C_INCLUDE_DIR") or
os.path.join(gnuwin32_dir, "include")]
     ssl_libs = [os.environ.get("C_LIB_DIR") or
os.path.join(gnuwin32_dir, "lib")]
-    libs = ['wsock32']
-    if dynamic:
-       libs = libs + ['ssl', 'crypto']
-       extra_obj = []
-    else:
+    libs = ['ssl', 'crypto', 'wsock32']
+    extra_link_args = []
+    if not dynamic:
        libs = libs + ['gdi32', 'gw32c', 'ole32', 'uuid']
-       extra_obj = [os.path.join(gnuwin32_dir, 'lib', l)
-                     for l in ['libssl.a', 'libcrypto.a']]
-    # I don't know what the 'depends' parameter to an Extension does, but it
-    # breaks rebuilds on Windows with mingw, so I'm ignoring it.
+       extra_link_args = ['-static']
 else:
     ssl_incs, ssl_libs, libs = find_ssl()
-    extra_obj = []
+    extra_link_args = []

 testdir = os.path.join(get_python_lib(False, True), "test")

@@ -226,7 +221,7 @@
                              include_dirs = ssl_incs + [socket_inc],
                              library_dirs = ssl_libs,
                              libraries = libs,
-                             extra_objects=extra_obj)],
+                            extra_link_args = extra_link_args)],
       data_files=[(testdir, ['test/test_ssl.py',
                              'test/keycert.pem',
                              'test/badcert.pem',

>copy setup.py.new setup.py
C:\Data\ssl-1.3\setup.py.new => C:\Data\ssl-1.3\setup.py
     1 file copied

>bzr diff
=== modified file 'setup.py'
--- setup.py    2007-09-24 19:34:45 +0000
+++ setup.py    2007-09-24 19:36:32 +0000
@@ -1,235 +1,230 @@

===> Rest of the diff trimmed - it's the whole file being replaced.

Paul.



More information about the bazaar mailing list