diffΒΆ

Purpose:

Show differences in the working tree, between revisions or branches.

Usage:

bzr diff [FILE...]

Options:
--old=ARG

Branch/tree to compare from.

-v, --verbose

Display more information.

-q, --quiet

Only display errors and warnings.

-p ARG, --prefix=ARG
 

Set prefixes added to old and new filenames, as two values separated by a colon. (eg “old/:new/”).

--using=ARG

Use this command to compare files.

--usage

Show usage message and options.

--new=ARG

Branch/tree to compare to.

-r ARG, --revision=ARG
 

See “help revisionspec” for details.

--diff-options=ARG
 

Pass these options to the external diff program.

-c ARG, --change=ARG
 

Select changes introduced by the specified revision. See also “help revisionspec”.

-h, --help

Show help message.

Description:

If no arguments are given, all changes for the current tree are listed. If files are given, only the changes in those files are listed. Remote and multiple branches can be compared by using the –old and –new options. If not provided, the default for both is derived from the first argument, if any, or the current tree if no arguments are given.

“bzr diff -p1” is equivalent to “bzr diff –prefix old/:new/”, and produces patches suitable for “patch -p1”.

Exit values:

1 - changed 2 - unrepresentable changes 3 - error 0 - no change

Examples:

Shows the difference in the working tree versus the last commit:

bzr diff

Difference between the working tree and revision 1:

bzr diff -r1

Difference between revision 3 and revision 1:

bzr diff -r1..3

Difference between revision 3 and revision 1 for branch xxx:

bzr diff -r1..3 xxx

To see the changes introduced in revision X:

bzr diff -cX

Note that in the case of a merge, the -c option shows the changes compared to the left hand parent. To see the changes against another parent, use:

bzr diff -r<chosen_parent>..X

The changes introduced by revision 2 (equivalent to -r1..2):

bzr diff -c2

Show just the differences for file NEWS:

bzr diff NEWS

Show the differences in working tree xxx for file NEWS:

bzr diff xxx/NEWS

Show the differences from branch xxx to this working tree:

bzr diff –old xxx

Show the differences between two branches for file NEWS:

bzr diff --old xxx --new yyy NEWS

Same as ‘bzr diff’ but prefix paths with old/ and new/:

bzr diff --prefix old/:new/
Aliases:

di, dif

See also:

status

Previous topic

deleted

Next topic

export

This Page