Fossil User Forum

Timeline Diff of further down commit and export
Login

Timeline Diff of further down commit and export

Timeline Diff of further down commit and export

(1) By smd (scottdoctor) on 2023-06-13 01:25:23 [link] [source]

Two things I am trying to do, but seem to be at a loss how to do it.

First:

I have a local fossil repository with many commits. When I click the last commit I see the diff with the previous commit. I want to see a complete diff of a specific commit with a commit several commits earlier. How do I do that?

Second:

Assuming I can see a diff between two commits separated by several other commits, How can I export the diff? I am working with a remote team. The commits I made to my local fossil repository were while doing a hardware development which involved much hardware experimentation. What I need to do is document the changes I made to the released version of the code (a commit about 12 commits back) so that I can send those changes to the remote software guys to have them officially put the changes into the official version. I suggested that I just make the changes, but politics, along with bosses that really do not understand anything, want me to send the changes I made to the firmware to the remote guys to have them update the official version.

Basically, I want to export the diff in such a way that I can put it into a word document, without simply doing screen shots. How do I do that?

Scott

(2.1) By John Rouillard (rouilj) on 2023-06-13 03:35:20 edited from 2.0 in reply to 1 [source]

Hi Scott:

want to see a complete diff of a specific commit with a commit several commits earlier. How do I do that?

In the timeline, click on the little circle (you have to have javascript enabled) on the timeline rail corresponding to your commit several commits ago. You should see the circle filled with a dot (the color depend on your skin).

Then click on the little circle for the specific commit you want. The diff shown will be the diff between these two commits.

This is not useful for sending the diff. You can copy/paste but applying it is a pain.

How can I export the diff?

When looking at your diff you will see the two version specifiers. E.G.

  Difference From c2b38f0aad8c253b To 619d51440fa5b95f

So navigate to a checked out copy of the repo on the command line. On the command line run:

  fossil diff -from c2b38f0 -to 619d514 > changes.patch

This can be emailed as an attachment, copied etc. to the people maintaining the master repo. They can apply it using patch.

If they are using fossil to manage the master repo, you can take advantage of fossil's native change packaging mode called a bundle.

To generate a bundle, on the command line run:

  fossil bundle export changes.bundle -from c2b38f0 -to 619d514

Copy changes.bundle upstream and they can use:

  fossil bundle import BUNDLE ?--publish?

Documented at https://fossil-scm.org/home/help?cmd=bundle.

Good luck.

(P.S. there is also a fossil patch command, but given your constraints, I don't believe it is an option.)

(3) By Daniel Dumitriu (danield) on 2023-06-13 11:19:26 in reply to 2.1 [link] [source]

Then click on the little circle for the specific commit you want. The diff shown will be the diff between these two commits.

This is not useful for sending the diff. You can copy/paste but applying it is a pain.

You can use the web interface for this, too, if you prefer it: in the diff view, click on the Patch link in the second menu row; it will give you the same text in (unified) diff/patch format as John's command line recipe.