On 09/23/17 10:18, John P. Rouillard wrote:
I am trying to find out when a line dissapeared from a file.

I've long wanted a reverse annotate command. Rather than show when each line was most recently modified or added, it would show when each line is next modified or removed.

I haven't taken any steps toward implementation because this will be harder to use (certainly harder to implement) than normal annotation. Annotate works as well as it does because each revision has only one primary predecessor, so there's no ambiguity. Reverse annotate won't magically know the intended "next" version with which to compare. My best guess at how to handle this is to ask for a target version, and the path from the current version to the target version is the one along which changes are examined.

I am managing a configuration file and one of the config options lines
is no longer there.

I initially thought of trying to bisect the file if I can identify
when the system was properly configured. If I guess wrong I could end
up having to run multiple bisects to find the last removal of the
option line.

Does fossil have something like "perforce annotate -a" or "git log -S"
or "hg grep"?

perforce annotate -a sounds interesting.

"All lines, including deleted lines and lines no longer present at the head revision, are included. Each line includes a starting and ending revision."

https://www.perforce.com/perforce/r14.2/manuals/cmdref/p4_annotate.html

Though I suspect it could result in an extremely messy report should the lines be reorganized multiple times.

Not exactly what you're asking, but you can search across many files and many revisions of many files using the fusefs command. fossil fusefs will make all revisions available in the filesystem so you can use standard programs like grep to examine them. However...

If there is no equivalent in fossil, I am considering running:

   fossil finfo _filename_

... You'll still need a list of versions to examine, though the above command will provide.

to get a list of all the revisions where the file was changed then for
each revision:

   fossil --checkin _revision_ _filename_ | grep "option name"

Assuming you meant to have a "cat" in there somewhere. Also I was unaware the -r option could be spelled out as -checkin.

Anybody have any answers, thoughts, comments or quips?

I think your cat approach is solid. Bisect could work too, though it'll make many changes to your checkout directory.

This process can be scripted. Pay attention to what you end up doing because your experience may end up contributing to the requirements for a reverse annotate feature.

--
Andy Goth | <andrew.m.goth/at/gmail/dot/com>
_______________________________________________
fossil-users mailing list
fossil-users@lists.fossil-scm.org
http://lists.fossil-scm.org:8080/cgi-bin/mailman/listinfo/fossil-users

Reply via email to