Yeah, ultimately they're would be four files, and they would represent, for the use-case that I'm designing this for:
- A1: The beginning of the branch
- A2: The end of the branch
- B1: Master before the changes from the branch
- B2: Master after the changes from the branch
A1 and A2 would be diffed, then B1 and B2, and then the diffs would be diffed. If there are any differences, this might indicate that some change was missed. It would also be useful for joining any two branches together, whether remastering or merging, though often there there is a common file and a 3-way compare can be used.
I'd add it as a fourth option on new tabs, alongside "File", "Folder", and "Version Control". Working label is "Diff", but I don't particularly like it.
Once clicked, you'd get a couple combo boxes that would each let you pick, depending on how much I get done:
- An existing File diff
- "Pick Two Files", whereupon it would be replaced with two drop-downs for files, ideally with a way to go back. If the user chose this for both then yes, they'd pass in four files.
- An existing diff of another type
- If one was a File diff and one wasn't, the resulting tab would be an intermediate tab that lets you pick the second File much like those tabs currently let you pick the only File.
- If both were not Files, I'm not sure what to do:
- You would probably pick a diff in each and click Compare to compare those diffs.
- Maybe it would calculate the Diff Diff of the Folder/Version Control.
- Currently a stretch, but if it's easy by then or I'm motivated, I might do this
- It would first check that the same files were added or removed
- Then it would go through all the diffs to make sure that they are the same from one side to the other
- From the results, the user could pick which diff diff you wanted to look at
- Maybe there would be a way to look at a single diff, but I haven't thought of an elegant way to display that option
- Scroll lock for these would be nice if possible
- Ideally, the user'd be able to select two differently-named diffs, but that would probably involve solving issue #11, which is yet more of a stretch
- "New Diff"
- The resulting tab would have that half filled by the New Tab options (minus the new Diff option)
- If both halves where New Diff, the user would have to select both to compare
- Otherwise, this would be an intermediate tab like above, perhaps before one of the intermediate tabs above.
- This is my least favorite, but might be easiest
Once the user got to the diff of the File diffs, they'd see:
- A diff of the patches, two panels side-by-side like normal (Line numbers would be ignored and maybe removed)
-
Maybe have a patch of the patches in a short full-width panel underneath the diff of patches
- I'd want the user to be able to hide it easily, perhaps by a draggable bar between them or a rotating triangle, or if necessary a button or checkbox
- Keeping it in sync with the changes above would be nice, but one more option to display
-
Ideally the user'd be able to move it to the top or bottom of the screen, but if it is stuck at the bottom, that's fine
- The things needed to do this are similar to those needed to add patches to normal File diffs; I'd probably do that if I went through all this work and it was as similar as I'm imagining
- Perhaps at the top have the two diffs side-by-side
- Would benefit from all the optional features of the patch at the bottom, but syncing would be harder
- I'd try to figure out a scroll lock solution but that's tough since much of code between the two sets of diffs would be different, just unchanged in its pair
- Probably wouldn't add meta-blocks around the blocks of changes showing how they have changed; that's just too confusing. But if I think of a good way to display that information, I might.
- If I get the gumption, connect the differences in these to the patches. This would open up the possibility of having that the patches below diffs and in sync in regular File diffs. It might open it up for Folder diffs and Diff diffs too. Definitely a stretch, though.
I also make all the files read-only by default, perhaps with a setting to change that default.
I'll plan on just making my own fork for now. I'll try to incorporate anything that makes sense in base Meld, like adding patches under diffs or having a read-only-by-default option.
I think ideally I'd make a plugin, but plugin support seems very difficult to add, and so it's probably not worth it. (If I'm wrong about this, let me know. I'd be willing to do the work to add plugin support if it's not too difficult, though that'd still entail some guidance and help with code on your part.) Other than plugin support, I haven't run across anything that needs changing to make my stuff easier, but I'll let you know.
I am having trouble using Glade. It says, "Failed to load [path]\meld\resources\ui\appwindow.ui. The following required catalogs are unavailable: meld.ui.gladesupport.", and when I open new-diff-tab I get "Unable to create object with type MeldFileChooserDialog". I see there's a \meld\ui\gladesupport.py, but I don't know how to use it or if that's what I need.
Thanks for the help, and for all the dev on Meld. It was the best differ I found to base this off of.
Have a stupendous day!
Sincerely,
Waldo