Skip to content

ozbenh/dirdiff

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

			Dirdiff-2.1.

			Paul Mackerras
			<paulus@samba.org>

Dirdiff is a graphical tool for displaying the differences between
directory trees and for merging changes from one tree into another.
Dirdiff can handle up to 5 trees.  It displays a main window with a
list of the files which are different between the trees, with colored
squares to indicate the relative ages of the versions.  A menu allows
you to display the differences between any two of the versions in
another window.  Another menu allows you to copy the file from one
tree to another.

The differences window basically displays the output of `diff -u' with
colored backgrounds to indicate which version each line comes from.
The differences window also has a series of checkboxes which allow you
to selectively apply changes from one version to another.  You apply
the selected changes using the merge menu.  Dirdiff will then pop up
another window containing the merged file.  You can then edit the
merged version and save it back into file.

Dirdiff now also has a file mode, which can be used for viewing the
differences between files and for merging changes from one file into
another.  This mode is invoked if regular files are specified on the
command line (or in the new directory/file chooser, see below) rather
than directories.  (Dirdiff will exit with an error message if some
files and some directories are specified.)


What's new in dirdiff-2.1.
--------------------------

* The diff display window can now display 3-way, 4-way and 5-way diffs
  as well as the normal 2-way diffs.  When a line is identified as
  coming from multiple files, most of it will be colored for the
  newest of those files, and extra colored bars at the left of the
  line will identify which other files it is in.

* You can now modify the diff display interactively (for example, to
  make it more understandable).  You can use the middle mouse button
  to drag the blue separator bars to expose more context, or drag
  colored diff lines up and down (the movement is constrained so as to
  not alter the meaning of the diff).  Dragging context lines splits
  them into colored diff lines.

* There is now a menu on the diff display window for generating
  patches embodying the changes that could be made with the merge
  menu.  That is, the diff lines that are checked in the diff viewer
  will be made into - and + lines in the generated patch.

* The BitKeeper integration feature has been removed.  I plan to add
  generic features for integration with arbitrary SCM systems in
  future.


What was new in dirdiff-2.0.
----------------------------

* Some great new features from Dorothy Robinson:

  - A dialog box for choosing the directories to be diffed, if dirdiff
    is invoked without specifying any directories or files on the
    command line.

  - Colored icons instead of squares in the file list window.

  - Colored icons in the Diff and Copy/Del menus (provided you are
    using Tk 8.4 or later).

  - Modifications so dirdiff can be used under Windows.

  - A color key showing the ordering of the colors.

  - Use of two-level menus for the Diff, Copy/Del and Patch menus (the
    Diff and Copy/Del menus use two levels only when there are
    sufficient alternatives for it to make things simpler).

  - A filename search function using the filename bar in the file list
    window.

  - Options to allow the user to select external diff and file viewer
    programs.

* There is now a mode for ignoring files in a directory if they match
  any of the patterns listed in the .cvsignore in that directory.
  This is invoked with the -C command-line option or by choosing the
  "Ignore files in .cvsignore" option in the Options menu.

* Some users have requested a mode in which, when a directory exists
  in one tree but not another, dirdiff display the files in that
  directory as existing in the one tree but not the other (rather than
  displaying just a single line for the directory).  This mode is
  enabled by choosing the "Show files that aren't in some dirs" option
  in the Options menu.

* Trees can now be marked as "read-only" in the Options menu.  This
  means that menu options that would modify those trees (in the
  Copy/Del, Touch and Merge menus) will not be offered.

* Files can be added to the excluded file list by selecting them and
  choosing "Exclude selection" under the File menu.

* Changes to the "Underline tabs" mode now take effect immediately.


Installation.
-------------

Dirdiff is a Tcl/TK script, so no compilation is required.  Dirdiff
however can make use of a shared library called filecmp.so.0.0 for
comparing files.  This is optional, but it has two benefits: (a)
comparing files is faster with filecmp.so.0.0 (without it, dirdiff has
to start an external process running `cmp'), and (b) filecmp.so.0.0
can optionally ignore RCS and BK strings when it is comparing two files.

The Makefile in this directory will compile filecmp.so.0.0, and
install it and dirdiff.  By default dirdiff is installed in /usr/bin
and filecmp.so.0.0 is installed in /usr/lib.  Doing `make' will
compile filecmp.so.0.0; `make install' will install dirdiff and
filecmp.so.0.0.


Usage.
------

To use dirdiff, you invoke it from the command line with a list of
directories (between 2 and 5).  For example, suppose I have 3 copies
of the Linux kernel source code, in directories called linux, bk, and
pmac.  I can see the differences between these 3 trees with a command
like:

$ dirdiff linux bk pmac

This will display the file list window and start comparing the trees,
displaying files which differ as they are found.  To see the
differences between two versions, click on the file name and then
select the versions to compare from the Diff menu.  To copy from one
tree to another, click on the file name and select the copy operation
from the Copy menu.

In the differences window, there are checkboxes to the left of all the
sections which are different.  You can use button 1 to select an
individual checkbox, or shift-button 1 or button 3 to select a whole
group.  Selecting a line means that you are asking for that change to
be made when you update either of the files using the Merge menu.  The
line will be removed if it is already present or added if it is not
present.

Starting with dirdiff-2.0, you can start dirdiff without any arguments
and it will pop up a dialog box where you can enter the directories to
be compared.


About

Paul Mackerras' dirdiff with fixes

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published