Skip to Content
Linux Shell Scripting Cookbook - Third Edition
book

Linux Shell Scripting Cookbook - Third Edition

by Clif Flynt, Sarath Lakshman, Shantanu Tushar
May 2017
Beginner
552 pages
28h 47m
English
Packt Publishing
Content preview from Linux Shell Scripting Cookbook - Third Edition

How to do it...

The fossil diff command has several options. When looking for the code that introduced a problem, we generally want to perform a diff on two versions of a file. The -from and -to options to fossil diff perform this action:

    $ fossil diff -from ID-1 -to ID-2FILENAME

ID-1 and ID-2 are identifiers used in the repository. They may be SHA-1 hashes, tags or dates, and so on. The FILENAME is the file that was committed to fossil.

For example, to find the difference between two revisions of main.tcl use the following command:

    $ fossil diff -from 47c85 -to 7a7e25 main.tcl

    Index: main.tcl
    ==================================================================
    --- main.tcl
    +++ main.tcl
    @@ -9,10 +9,5 @@

    set max 10
    set min 1
 + while ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

Mastering Linux Shell Scripting - Second Edition

Mastering Linux Shell Scripting - Second Edition

Mokhtar Ebrahim, Andrew Mallett

Publisher Resources

ISBN: 9781785881985