diff is incomplete against a git branch

Bug #1030347 reported by Jared Silva
12
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Bazaar Git Plugin
Triaged
Low
Unassigned
Breezy
Fix Released
Medium
Jelmer Vernooij

Bug Description

diff is incomplete against a git branch. git diff shows changes for all files. bzr diff shows changes only for one file.

$ git diff
diff --git a/README b/README
index 13704d5..ca866cd 100644
--- a/README
+++ b/README
...
diff --git a/etc/samba/smb.conf b/etc/samba/smb.conf
index 9228fbf..de3e641 100644
--- a/etc/samba/smb.conf
+++ b/etc/samba/smb.conf
...

$ bzr diff
=== modified file 'etc/samba/smb.conf'
--- etc/samba/smb.conf 2012-07-18 03:08:55 +0000
+++ etc/samba/smb.conf 2012-07-28 02:21:05 +0000
...

Tags: workingtree
Revision history for this message
Martin Packman (gz) wrote :

This is not true in the general case, and I assume is the same branch as you got the error with `bzr st` on? So, marking as duplicate given this is probably just fallout.

Revision history for this message
Martin Packman (gz) wrote :

Actually, probably not, though it works for me so may be a recent regression. What versions of bzr, bzr-git and dulwich are you using?

Changed in bzr-git:
status: New → Incomplete
Revision history for this message
Jared Silva (jayrod) wrote :

This is the general case for me, as I see the problem in all branches/repos I have checked.

from dpkg -l ...
ii bzr 2.5.1-0ubuntu2 easy to use distributed version control system
ii bzr-explorer 1.2.2-1 GUI application for using Bazaar
ii bzr-fastimport 0.13.0-1 Fast-import/fast-export plugin for Bazaar
ii bzr-git 0.6.8-1 Bazaar plugin providing Git integration
ii bzr-rewrite 0.6.3-1ubuntu1 History rewriting plugin for Bazaar
ii bzr-svn 1.2.1-1 Bazaar plugin providing Subversion integration
ii python-bzrlib 2.5.1-0ubuntu2 distributed version control system - python library
ii qbzr 0.22.2-1 Graphical interface for Bazaar using the Qt toolkit
ii git 1:1.7.9.5-1 fast, scalable, distributed revision control system
ii git-gui 1:1.7.9.5-1 fast, scalable, distributed revision control system (GUI)
ii git-man 1:1.7.9.5-1 fast, scalable, distributed revision control system (manual pages)
ii git-svn 1:1.7.9.5-1 fast, scalable, distributed revision control system (svn interoperability)
ii gitk 1:1.7.9.5-1 fast, scalable, distributed revision control system (revision tree visualizer)
ii python-dulwich 0.8.5-2 Python Git library

$ bzr --version
Bazaar (bzr) 2.5.1
  Python interpreter: /usr/bin/python 2.7.3
  Python standard library: /usr/lib/python2.7
  Platform: Linux-3.2.0-27-generic-x86_64-with-Ubuntu-12.04-precise
  bzrlib: /usr/lib/python2.7/dist-packages/bzrlib
  Bazaar configuration: /home/jayrod/.bazaar
  Bazaar log file: /home/jayrod/.bzr.log

$ bzr plugins
bash_completion 2.5.1
  Generate a shell function for bash command line completion.

changelog_merge 2.5.1
  Merge hook for GNU-format ChangeLog files

explorer 1.2.2
  Version Control for Human Beings.

fastimport 0.13.0
  FastImport Plugin

git 0.6.8
  A GIT branch and repository format implementation for bzr.

launchpad 2.5.1
  Launchpad.net integration plugin for Bazaar.

netrc_credential_store 2.5.1
  Use ~/.netrc as a credential store for authentication.conf.

news_merge 2.5.1
  Merge hook for bzr's NEWS file.

po_merge 2.5.1
  Merge hook for ``.po`` files.

qbzr 0.22.2
  QBzr - Qt-based frontend for Bazaar

rewrite 0.6.3
  Rebase support.

svn 1.2.1
  Support for Subversion branches

weave_fmt 2.5.1
  Weave formats.

Revision history for this message
Jelmer Vernooij (jelmer) wrote :

As Martin mentions, can you please provide a way to reproduce this? I can't reproduce this on the git repositories I have here with the latest version of bzr-git.

Revision history for this message
Jared Silva (jayrod) wrote :

In the middle of it...seems to be related to file modifications at the top level and file additions.

Revision history for this message
Jared Silva (jayrod) wrote :

$ git clone https://github.com/kevinmehall/pithos.git
$ cd pithos
$ bzr diff -c6
$ bzr diff -c7
$ bzr diff -c8

6 has a file added and a file modified at the top level.
7 has 2 files modified at the top level.
8 is a merge.

$ bzr diff -c9
...

You will see a lot of diff information.

$ bzr diff -c9 | grep setup.py

You will not see diff information for setup.py, which was a file modification at the top level.

Revision history for this message
Jared Silva (jayrod) wrote :

$ bzr diff -c2
...

You will see diff information, but not for any of the many file additions.

Revision history for this message
Jared Silva (jayrod) wrote :

$ bzr diff -c213

This is a good test case. There is no diff output and the revision has a file additon, deletion, and top level modification.

Revision history for this message
Jelmer Vernooij (jelmer) wrote :

Okay, I can reproduce it with revision 6 from that repository.

Changed in bzr-git:
status: Incomplete → Triaged
importance: Undecided → Low
tags: added: workingtree
Revision history for this message
Jared Silva (jayrod) wrote :

Jelmer, do you think or know if this problem is in bzr-git or dulwich? I am trying to at least look, but it is hard, for me, to see how all of these things piece together and where the problem actually could be.

Jelmer Vernooij (jelmer)
Changed in brz-git:
status: New → Fix Released
importance: Undecided → Medium
assignee: nobody → Jelmer Vernooij (jelmer)
Jelmer Vernooij (jelmer)
Changed in brz-git:
milestone: none → integration
Jelmer Vernooij (jelmer)
affects: brz-git → brz
Changed in brz:
milestone: integration → none
milestone: none → 3.0.0
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Duplicates of this bug

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.