[diff-markup] not visible on lxr/source, not functional as well
Brought to you by:
ajlittoz
On the localhost/lxr/source page I do not see [diff-markup]. Do I need to do anything to configure it to work ?
If I connect to localhost/lxr/diff, I can see diff-markup but still not sure if its working.
What needs to be done to make diff-markup work across trees or 2 diff'erent version files ?
Snapshots are attached.
1/ As stated in the documentation, LXR does not diff directories (shameful, I admit; perhaps could be done through DB traversal?).
This is why you have no "diff markup" button with //localhost/lxr/source which targets the LXR root directory.
2/ To enable "diff markup", first display a file: "diff markup" becomes visible.
3/ "diff markup" in LXR has strong limitations compared to command line utility diff:
- it compares files in a single tree only (you cannot compare a file in, say, the Linux kernel tree and your own development tree),
- it compares files with the same name (you cannot compare files A and B, only A and A) in the same relative position in the tree (= their path from LXR root directory is the same),
- the compared files (with the same name) are located in different versions, i.e. different version subdirectories of the tree.
This was done on purpose to offer quick and easy view on changes.
How does it work?
The presently displayed file defines implicitly the final state of the file.
Click on "diff markup". This leads you to the selection screen for initial state of the file (note the usage of final/initial somewhat exchanged compared to common usage).
Click on the desired version (or select from the menu(s)).
Difference view appears with initial version on the left and final on the right. Coloured line background indicate the differences.
In your case, you apparently chose to host different applications as "versions" of a single tree. Of course, that's possible and it works. I used this trick when configuring for multiple trees was tedious (my LXR server has now 20 trees!). But you can't compare files between "versions" because the names are likely to be really different. Even if you happen to have the "same" file in two "versions", diff will probably be meaningless.
If you didn't choose that configuration, it means you didn't store this single version in a subdirectory. I remind you that 'sourceroot' points to a directory containing subdirectories 1.0, 1.0.1, 1.1, 1.2-beta, ... each of these containing a source version (with files and directories). The names of these subdirectories are written in 'v' => 'range'. I even wrote a function for 'range' which dynamically computes the set of "version" directories so that you don't bother about 'range' when aggressively developing and creating new versions (feature included in the new interactive configurator).
Once again, you'll say I stutter like an old man, switch to the most recent release with which you can configure for multiple trees or add afterwards new trees. You can even store your trees in local CVS, Subversion, Git or Mercurial (this latter one rather experimental) repositories which would really ease your concern about sync'ing your repo without having to check out something for LXR. In multiple trees context, LXR has "speed switch" buttons to navigate to other trees. Have a look at the demo on SourceForge ((only 2 trees but 2>1, one in classical files, the second in CVS).
The User's Manual describing all features is separately downloadable on SourceForge. Till now, I had no feedback about it and don't know if is useful or not.
Cheers,
ajl
Thank you !
I was not knowing, how diff-markup ctivates. So as you rightly said, once I open the source file, I see the option of [diff-markup] and I am happy to share, that its diffing across "versions" ( my versions, as you know them ).
One more reason to be happy to use LXR !
This ticket can be closed.
cheers