Tony,

there is a SCM used on IBM Mainframes called ENDEVOR that gives this
type of history. see https://en.wikipedia.org/wiki/Endevor

and https://www.ca.com/us/products/ca-endevor-software-change-manager.h
tml

The other products were called Panvalet and Librarian.

I can no longer provide cut & paste examples, but maybe someone on the
list can. Maybe the CA sites have some examples.




The rough algorithm is illustrated by the following example.



The way it works is that the first "check-in" is level 0, say, in May
1990. Say the code is in COBOL. There is no DIFF, as it is the first
add.

Say the code is lines 500 to 503:
500 0000  MOVE SPACES TO CUST-NAME.
501 0000  MOVE ZEROES TO CUST-PHONE.
502 0000  MOVE "BEER" TO CUST-FAVE-DRINK.

The code is "checked-out" (and locked or owned) by a developer in Dec
1990, modified with an modification and a deletion, and then "checked-
in" in Feb 1991. This is level 1.

500 0000  MOVE SPACES TO CUST-NAME.
501 -001  MOVE ZEROES TO CUST-PHONE.
502 -001  MOVE "BEER" TO CUST-FAVE-DRINK.
502 +001  MOVE "CIDER" TO
CUST-FAVE-DRINK.

In March 1992, another developer, "checked-out" and then "checked-in" (level 2) 
one new line.

500 0000  MOVE SPACES TO CUST-NAME.
501 -001  MOVE ZEROES TO CUST-PHONE.
502 +002  MOVE "RASBERRY" TO CUST-FAVE-JAM-OR-CONSERVE.
503 -001  MOVE "BEER" TO CUST-FAVE-DRINK.
503 +001  MOVE "CIDER" TO CUST-FAVE-DRINK.


The diff output can be toggled to give the current "check-in", in this case the 
"BEER" line and the CUST-PHONE line would not be shown. Or, deleted lines are 
excluded. Modified lines are inserts(+) and deletes(-).

Note, the parallel diff with colours in Fossil wouldn't quite suit a 3 or 4 
version comparison. 


Large block inserts and deletes, and changing indentation were a challenge.




COBOL has a line structure:

Cols 1-6, numbering (optional)
Col 7 - either space for a code line or '*' for a comment line
Cols 8 thru 72 the code or comment
Cols 73 thru 80, numbering (optional) - some people used these columns for 
version control - effectively a small inline comment 

This 'fixed' format made it a bit easier.

regs,

Kev






-----------
Date: Tue, 1 Aug 2017 15:01:18 +0300
From: "Tony Papadimitriou" <to...@acm.org>
To: "Fossil SCM user's discussion" <fossil-users@lists.fossil-scm.org>
Subject: [fossil-users] Is there a way to see history
(e.g.,    annotate)
        for a single line of code?

When doing ‘annotate’ on a certain file version I see the most recent
commit responsible for each line in the file.  That’s great!

However, if I want to know which previous commits (history) touched one
specific line, is there some way to do this?

Thanks.
_______________________________________________
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