bzr reports huge differences compared to 'diff'

Bug #883207 reported by Scott Moser on 2011-10-28
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Bazaar
Medium
Unassigned
bzr (Ubuntu)
Medium
Unassigned

Bug Description

The goal is to merge nagios-plugins from debian 1.4.15-5 to ubuntu precise.

## check out branches of each
##
$ cd /tmp ; rm -Rf nagios-plugins; bzr init-repo nagios-plugins
$ cd nagios-plugins
$ bzr branch lp:debian/sid/nagios-plugins sid.dist
$ bzr branch lp:ubuntu/precise/nagios-plugins precise.dist
$ ( cd sid.dist && bzr revno )
22
$ ( cd precise.dist && bzr revno )
42

## start the merge
## I just take the debian versions of conflicts for simplicity
$ bzr branch precise.dist precise.merge
$ cd precise.merge
$ bzr merge ../sid.dist
+N debian/patches/16_check_raduis_fix_format-security.dpatch
 M debian/changelog
 M debian/control
 M debian/patches/00list
 M debian/patches/15_check_sensors_fault.dpatch
 M debian/rules
Text conflict in debian/control
Text conflict in debian/patches/00list
2 conflicts encountered.
$ cp ../sid.dist/debian/control debian/control
$ cp ../sid.dist/debian/patches/00list debian/patches/00list
$ bzr resolve debian/control debian/patches/00list

## Now I want to see what changes there are versus the debian version
## ie, what is the Ubuntu delta.
$ bzr diff -r tag:1.4.15-5 > ../bzr-reported.diff

## Attempt to calculate the delta a different way, these should be
## the same thing.
$ cd /tmp/nagios-plugins
$ bzr branch -r tag:1.4.15-5 sid.dist/ 1.4.15-5
$ diff -Naur 1.4.15-5 precise.merge |
  filterdiff --exclude "*/.bzr/*" > diff-reported.diff

## Now, show the diffs reported by 'diff' and reported by bzr.

Note that bzr reports 81 files changed that diff does not see,
These files are identical in the checked out trees, but bzr has
identified them as different files.

I'm not sure what got the branch to this state, but in my opinion,
bzr should recognize a file with the same contents and same path
as the same.

$ diffstat -p1 actual.diff
 debian/changelog | 231 ++++++++++++++++++++++++++
 debian/control | 37 +++-
 debian/nagios-plugins-extra.dirs | 3
 debian/patches/90_hardened_build_fixes.dpatch | 18 ++
 debian/pluginconfig/nt.cfg | 2
 debian/rules | 20 +-
 po/de.po | 40 ++++
 po/fr.po | 51 +++++
 po/nagios-plugins.pot | 40 ++++
 9 files changed, 428 insertions(+), 14 deletions(-)

$ diffstat -p0 bzr.diff
 NP-VERSION-GEN | 106
 debian/changelog | 231 ++
 debian/control | 37
 debian/nagios-plugins-extra.dirs | 3
 debian/patches/90_hardened_build_fixes.dpatch | 18
 debian/pluginconfig/nt.cfg | 2
 debian/rules | 20
 gl/alignof.h | 106
 gl/arpa_inet.in.h | 194 -
 gl/btowc.c | 78
 gl/errno.in.h | 320 +-
 gl/fcntl.in.h | 558 ++---
 gl/m4/00gnulib.m4 | 60
 gl/m4/btowc.m4 | 214 -
 gl/m4/errno_h.m4 | 230 +-
 gl/m4/fcntl_h.m4 | 86
 gl/m4/gnulib-cache.m4 | 106
 gl/m4/hostent.m4 | 90
 gl/m4/locale-fr.m4 | 370 +--
 gl/m4/locale-ja.m4 | 214 -
 gl/m4/locale-zh.m4 | 184 -
 gl/m4/mbrtowc.m4 | 770 +++----
 gl/m4/mbsinit.m4 | 64
 gl/m4/mktime.m4 | 468 ++--
 gl/m4/multiarch.m4 | 130 -
 gl/m4/netdb_h.m4 | 82
 gl/m4/onceonly.m4 | 182 -
 gl/m4/open.m4 | 148 -
 gl/m4/printf.m4 | 2832 +++++++++++++-------------
 gl/m4/servent.m4 | 94
 gl/m4/time_h.m4 | 218 +-
 gl/m4/time_r.m4 | 108
 gl/m4/timegm.m4 | 80
 gl/m4/wcrtomb.m4 | 186 -
 gl/m4/write.m4 | 40
 gl/mbrtowc.c | 772 +++----
 gl/mbsinit.c | 94
 gl/mktime.c | 1338 ++++++------
 gl/netdb.in.h | 440 ++--
 gl/open.c | 332 +--
 gl/stdio-write.c | 296 +-
 gl/streq.h | 352 +--
 gl/time.in.h | 458 ++--
 gl/time_r.c | 90
 gl/timegm.c | 78
 gl/verify.h | 326 +-
 gl/wcrtomb.c | 106
 gl/write.c | 124 -
 lib/tests/test_ini1.c | 218 +-
 lib/tests/test_ini1.t | 12
 lib/tests/test_ini3.c | 66
 lib/tests/test_ini3.t | 68
 lib/tests/test_opts1.c | 278 +-
 lib/tests/test_opts1.t | 12
 lib/tests/test_opts2.c | 242 +-
 lib/tests/test_opts2.t | 14
 lib/tests/test_opts3.c | 62
 lib/tests/test_opts3.t | 80
 plugins-scripts/t/check_ifoperstatus.t | 186 -
 plugins-scripts/t/check_ifstatus.t | 134 -
 plugins/t/check_dig.t | 168 -
 po/de.po | 40
 po/fr.po | 51
 po/nagios-plugins.pot | 40
 release | 2
 tap/Makefile.am | 26
 tap/Makefile.in | 2562 +++++++++++------------
 tap/README | 22
 tap/tap.c | 870 +++----
 tap/tap.h | 182 -
 70 files changed, 9592 insertions(+), 9178 deletions(-)

ProblemType: Bug
DistroRelease: Ubuntu 11.10
Package: bzr 2.4.1-1ubuntu1
ProcVersionSignature: Ubuntu 3.0.0-12.20-generic 3.0.4
Uname: Linux 3.0.0-12-generic x86_64
ApportVersion: 1.23-0ubuntu3
Architecture: amd64
Date: Fri Oct 28 13:37:01 2011
EcryptfsInUse: Yes
InstallationMedia: Ubuntu 11.10 "Oneiric Ocelot" - Release amd64 (20111012)
PackageArchitecture: all
ProcEnviron:
 PATH=(custom, user)
 LANG=en_US.UTF-8
 SHELL=/bin/bash
SourcePackage: bzr
UpgradeStatus: No upgrade log present (probably fresh install)

Scott Moser (smoser) wrote :
Martin Pool (mbp) wrote :

If you still have the diffs, please attach them to this bug. (I realize it should be reproducible but it will help us be sure we're seeing the same thing.)

tags: added: affects-ubuntu diff
Changed in bzr:
status: New → Confirmed
importance: Undecided → Medium
Jelmer Vernooij (jelmer) on 2011-11-10
Changed in bzr (Ubuntu):
status: New → Triaged
importance: Undecided → Medium
Scott Moser (smoser) wrote :

Martin,
  I just now saw the request for the diffs.
  I've attached a 'script' output of walking through the basic outline of the report, but hopefully making it more reproducible.
  At the end, I did a 'cat diff-actual.diff' and 'cat bzr-reported.diff', so they're included in-line here.

Scott Moser (smoser) wrote :

lp:ubuntu/python-boto is another branch that exhibits this annoying behavior.

Jelmer Vernooij (jelmer) on 2017-11-09
tags: added: check-for-breezy
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers