Comment 2 for bug 30159

Revision history for this message
Martin Pool (mbp) wrote : (fwd from bialix@ukr.net) Question about diff output (diff in subdir)

----- Forwarded message from Alexander Belchenko <email address hidden> -----

From: Alexander Belchenko <email address hidden>
Subject: Question about diff output (diff in subdir)
Date: Wed, 01 Feb 2006 14:15:03 +0200
To: Bazaar-NG <email address hidden>

When I do bzr diff in subdir I've got output with filenames relative to
branch root. Is this good?

If I have following use case: some editor (e.g. FTE) has built-in
support for bzr commands by invoking bzr from command line and catching
its output. This editor is able to parse output of diff command and
provide click-n-jump feature, when I from diff could jump to appropriate
location in file. But unfortunately this editor don't know anything
about bzr root dir and the fact that all path is relative to that root.
So when I run bzr diff from subdir I have broken paths in output. And
editor could not jump to appropriate file from diff because path is broken.

Reproduction of problem:

>bzr init
>bzr mkdir dir
added dir
>cd dir
>echo spam > file.txt
>bzr add
added dir/file.txt
>bzr diff
=== added directory 'dir'
=== added file 'dir/file.txt'
--- /dev/null
+++ dir/file.txt
@@ -0,0 +1,1 @@
+spam

--
Alexander

----- End forwarded message -----
--
Martin