vc-dwim [option...]vc-dwim [option...]vc-dwim [option...]vc-dwim [option...]vc-dwim [option...]
By default, each command line argument should be a locally modified,
version-controlled ChangeLog file. If there is no command line
vc-dwim tries to use the ChangeLog file in
the current directory. In this default mode,
vc-dwim works by
first computing diffs of those files and parsing the diff output to
determine which named files are being changed. Then, it diffs the
affected files and prints the resulting output. One advantage of using
this tool is that before printing any diffs, it warns you if it sees
that a ChangeLog or an affected file has unsaved changes. It
detects that by searching for an editor temporary file corresponding to
each affected file. Another common error you can avoid with this tool
is the one where you create a new file, add its name to
Makefiles, etc., mention the addition in ChangeLog but
forget to e.g.,
git add (or
hg add, etc.) the file to the
version control system.
vc-dwim detects this discrepancy and
fails with a diagnostic explaining the probable situation. You might
also have simply mistyped the file name in the ChangeLog.
Once you are happy with your ChangeLog-derived diffs, you can commit those changes and the ChangeLog simply by rerunning the command with the --commit option.
But what if you’d like to use
vc-dwim on a project that
doesn’t have or want a ChangeLog file? In that case, you can
maintain your own ChangeLog file. This is what the
--initialize option sets up for you, or you can perform
equivalent steps by hand (see Initializing vc-dwim).
vc-dwim accepts the following options:
Display help and exit.
Output version information and exit.
Specify the user name and email address of the author of this change set.
Perform the commit, too.
Print the commands that would be run instead of running them.
Determine which version control system manages the first file, then use that to print diffs of the named files. If no file is specified, print all diffs for the current hierarchy.
Print the list of recognized version control names, then exit.
Prepare a source tree with no ChangeLog file for use with vc-dwim (see Initializing vc-dwim).
Generate verbose output.
Generate debug output; implies --verbose.
This tool can be useful to you only if you use a version control system. It’s most useful if you maintain a ChangeLog file and create a log entry per file per “commit” operation.
Relies on fairly strict adherence to recommended ChangeLog syntax. Detects editor temporaries created by Emacs and Vim. Patches to detect temporaries created by other editors are welcome.