2

How can I simultaneously open all Bazaar file diffs in multiple tabs within the same Meld window?

Currently, I execute the following command to use Meld to view Bazaar changes:

bzr diff --using meld

When there are multiple files with changes, Meld opens the first file, but not the others. Then, when I exit the Meld window, the diff for the next file opens in a new Meld window. This continues until I've viewed all files with diffs.

Note: I have also tried the following, but it behaved the same as above.

bzr diff --using meld &
Enterprise
  • 12,792

1 Answers1

0

As I can understand we need to pass new tab creation argument to the Meld.

According to its man-page this feature exists in Ubuntu 16.04 LTS (see man meld) and above:

NAME
meld - Visual diff and merge tool for the GNOME Desktop ...
OPTIONS
...
--newtab, -n
Open the comparison as a new tab in an already-running instance.

So we need to pass --newtab option to meld:

meld --newtab /etc/os-release /etc/os-release &
meld --newtab /etc/os-release /etc/os-release &

In Bazaar case we need to find corresponding option in bzr diff subcommand.
According to man bzr we should use --diff-options option:

NAME
bzr - Bazaar next-generation distributed version control
COMMAND REFERENCE
bzr diff [FILE...]
...
--diff-options ARG Pass these options to the external diff program.

Possible solution:

bzr diff --using meld --diff-options --newtab &
bzr diff --using meld --diff-options --newtab &

But in real situation as stated by OP it does not work.
So we need to create an alias for this command:

for f in $( eval "bzr stat --versioned" ); \
do eval "bzr diff --using meld --diff-options --newtab ${f} &"; \
done
N0rbert
  • 103,263