The Absolute Naming of Each Line

MD5delta + . + lineno-in-delta

Each line in the weave was contributed by some delta. That delta may have been responsible for a number of lines.

Here’s an annotated weave, with X:Y where X is the serial number, and Y is the line number starting at 1 of lines in the originating delta.

X:Y Weave

	^AI 1
1:1	#include <stdio.h>
1:2	main()
1:3	{
	^AD 2
1:4	printf("Hello World\n");
	^AE 2
	^AI 2
2:1	sub("Hello World\n");
	^AE 2
1:5	}
	^AI 2
2:2
2:3	sub(char *s)
2:4	{
2:5		return (printf("%s", %s));
2:6	}
	^AE 2
	^AE 1

The output for serial 2 looks like (with serial replaced by md5key): 1:1 #include <stdio.h> 1:2 main() 1:3 { 2:1 sub("Hello World\n"); 1:5 } 2:2 2:3 sub(char *s) 2:4 { 2:5 return (printf("%s", %s)); 2:6 }

Interface

Command line: bk get -O (the old sequence number interface) Doesn’t work with -a formatted. Should it?

sccs_get() flags: GET_LINENAME - defined as the last bit in the GET_* flags. Question: do we want to use up the last bit for this?

Code

In getRegBody(): make a mdbm namddb: (serial → md5name) which is lazily filled by printing make lnum: s→nextserial size array of u32 that counts line numbers that could get big .. what are other options?