Version management system using pointers shared by a plurality of versions for indicating active lines of a version5278979Abstract A single entity contains source lines, being operated on by one or more end users. Within the same entity are entity version and level control data. Individual source lines contain version-related identification variables. After each version or level update by a user, a comparison is made between new and old versions; source line identification variables are modified, and new source lines are added; dependent version information is stored in the entity, and control data is updated. Subsequent retrievals of a version are responsive to the dependent version information, and produce indications of any changes that had been made to dependent versions. Claims What is claimed is: Description BACKGROUND OF THE INVENTION
______________________________________
ECD PARTA.........
A B C
1) VCD VER.A,01,00,00,00
LCD TS1=0001,0002,TS2=0001,0002,0003,0005
A B C
2) VCD VER.B,02,01,00,01TS2
LCD TS1=0001,0002,0003
A B C
3) VCD VER.C,03,02,00,01TS2
LCD TS1=0001,0002,0004
______________________________________
In this example, we will assume that three versions of PARTA existed (VER.A, VER.B, and VER.C) and VER.A was changed. Note the second Timestamped Pointer Variable List (indicating a second modification level of VER.A). 1. Referencing the first VCD/LCD Control Data set (VER.A): The Version ID(A) is `01` indicating that this is the first occurrence of this source. The Dependency ID(B) is `00`, indicating that this level is not dependent on any other level. Because the Base ID(B) is `00`, the BLCD internal list for VER.A(C) would indicate that there are no related dependent levels. 2. Referencing the second VCD/LCD Control Data set (VER.B): The Version ID(A) is `02` indicating that this is the second occurrence of this source. The Base ID(B) is `01` indicating that this version is based on the prior Version ID `01`. The BLCD list for VER.B(C) would contain the Version ID `01` (and the proper attached Timestamp `TS2`) upon which VER.B is dependent. 3. Referencing the third VCD/LCD Control Data Set (VER.C): The Version ID(A) is `03` indicating that this is the third occurrence of this source. The Base ID(B) is `02` indicating that this version is based on the prior Version ID `02` (which was based, in turn, on the earlier Version ID `01`). The BLCD list for VER.C(C) would contain the Version ID `01` (and the proper attached Timestamp `TS2`) upon which VER.C is dependent (through VER.B). Note: BLCD Lists may contain multiple entries depending on the number of `underlying` changes made. The timestamp attached to each Version ID provides a specific reference to the version/modification level which was changed. Selected BLCD entries may be deleted under application control via a BLCD reset function. Typically, the BLCD reset function would be used to `turn off` future notification after an end user action has been taken (such as resolving the underlying changes). Logic Flow The SEV Extract Operation: The SEV Display Entity Build operation (see FIG. 1) is invoked when the application program is instructed to retrieve a version of a source entity from a repository. Typically, the retrieved source is reviewed, changed, and then returned to the repository. At 101, selected SEV Entity (input file) is read from the repository and mapped into a processing array. At 102, the VCD Control Data Elements are scanned to find the selected Version ID and its corresponding Pointer Variable List. At 103, the lock flag state is examined: if "on", the "locked state" return code is set 104, and return is made to the calling program; if "off", each source line is then read 105, from the SEV input file until the end of file is detected 106. As each source line is read, the attached Line ID is compared 107 against each entry in the Pointer Variable list. Each Line ID which matches an entry in the Pointer Variable List is written 108 to the Display output file. When the end of file is reached 106 in the SEV input file, the Base Level Change Detection (BLCD) list is examined 109. If BLCD list entries are found 110, the list of entries and a BLCD return code indicator is set to be returned to the calling program. The address of the newly created Display file and the BLCD list, if any, is returned to the calling program 111 with the proper return code indicator. The SEV Store Operation: The SEV Storage Entity Build operation (see FIGS. 2A and 2B) is invoked when the application program is instructed to return a changed file to a repository. Most of the key SEV algorithms and processing logic designed to create and maintain a SEV entity are executed at this time. At 201, a test is made if a SEV file already exists for the specified version or if a new SEV entity should be created. If this is a new SEV entity, the initial value `1` is used 202 as the first pointer variable. The value `1` is assigned to the ADDID variable where it is to be used to tag each line in the source. Next, 203, the ADDID variable is placed in the new Timestamped Pointer Variable List created for this version. The ADDID variable is appended 204 to the beginning of each line in the input file. Each line is placed 205 in the newly created SEV output file, and return is made to the calling program. If the test at 201 showed that this SEV entity already exists, the prior level version is extracted 206 for a comparison. This comparison compares the version of the file to be stored against the prior level of that file 207. If the files are the same, return is made to the caller. If not, 208, the compare program writes the results of the compare to a compare output file. (Details are provided below under "Compare Program".) The compare output file is read 209 to retrieve the relative record number and the actual changed line data. As long as the compare file is not at an end 210, the prior level file is read 211 and sequential count of the number of lines read is kept. This line count enables tracking of the relative position in the file. The relative record number retrieved from the compare program output file is compared 212 against the relative record number of the prior level file. If the compare is not equal, this line (read from the prior level file) is unchanged and is copied directly to the SEV output file 213. If the compare is equal, this line (read from the prior level file) matches a line identified in the compare program output as either an added or deleted line. If the compare data 214 indicates a `Deleted` line, processing is performed as indicated in FIG. 3. First, 301, a new HILINE number is retrieved from the HILINE value in the ECD Control Data Element where it is maintained. The HILINE value always reflects the `last used` Line ID number. The HILINE number is incremented by one, and this incremented number is placed in the DELID variable. The Line ID as it exist on the line identified by the compare program is saved 302. This Line ID will be used to identify and properly update prior references to this deleted line which may exist in prior versions. All the Pointer Variable Lists in the SEV Control data are scanned 303 to find any references to the deleted line. When a matching pointer variable is found, the new DELID variable is appended to that pointer variable list. This action assures that the `deleted` line being processed continues to be properly referenced by all prior versions. The DELID variable is then appended 304 to the beginning of the source line identified in the compare program output. The DELID value is then placed 305 in the HILINE value in the SEV Control Data. If there are multiple `deleted` lines identified in the compare program output file, each of the deleted lines will receive a unique DELID value (HILINE+1) and the same processing of prior version Pointer Variable Lists takes place. The `deleted` source line with the unique DELID variable attached is then placed in the SEV output file 306. (Note: The processing of a `deleted` line involves only the updating of prior version Pointer Variable Lists. No reference to the deleted line will exist in the Pointer Variable List of the version of the source being stored.) The compare output file is then read again (FIG. 2A at 209) to retrieve the next relative record number and the actual changed line data. If the compare data (FIG. 2B at 215) indicates an `Added` line, (assumed the case if not "delete") processing is performed as indicated in FIG. 4. First, 401, a new HILINE number is retrieved from the HILINE value in the ECD Control Data Element where it is maintained. The HILINE value always reflects the `last used` Line ID number. The HILINE number is incremented by one and this incremented number is placed in the ADDID variable. Next, 402, the ADDID variable will be placed in the Pointer Variable List for this new version being processed. This same value will be used to identify all added lines which were identified in the compare program output for this store operation. The ADDID variable is then appended 403 to the beginning of the source line identified in the compare program output. The added source line with the ADDID variable attached is then placed in the SEV output file 404. The compare output file is then read again (FIG. 2A at 209) to retrieve the next relative record number and the actual changed line data. When test 210 detects the end of the compare file, the remainder of the unchanged lines in the prior level file are copied to the SEV output file 216, 217. As noted above, Base Level Change Detection is the SEV feature which records the version ID of the changed source version in the BLCD lists of all dependent versions. The remaining processing shown in FIG. 2B relates to BLCD. At 218, a Scan is done of the Version Dependency chain as contained in the Version ID/Base ID data in the VCD Control Data Element to identify any source versions which are dependent on the version being processed. The scan ends 219 when the end of the dependency chain is reached. For each identified dependent version found 220 in the chain, the version ID of the version being processed in the BLCD list of that dependent version is recorded 221. The resulting BLCD list for each version will then contain a list of each version of the source which is potentially affected by the current version which was changed. (Note: The BLCD list is examined by the SEV Extract process each time the calling program requests a retrieve of a given source version. If a BLCD List exists, it is returned, along with a unique return code, to the calling program. This information serves to notify the calling program of any underlying (or related) version changes.) The last added ADDID or DELID value (the highest of the two values) is then placed (FIG. 2 at 222) in the HILINE value in the ECD Control Data Element so that subsequent processing will utilize the next sequential HILINE value. At the point the HILINE value processing is complete, 222, all necessary control data has been processed and all source lines have been placed in the proper order in the SEV output file. The address of the SEV output file is returned to the calling program 223. The BLCD methodology described in detail above builds BLCD lists which are retained in the SEV VCD Control Data Element. This BLCD processing is executed as a sub-function in the SEV STORE process. An alternative methodology is to initiate BLCD processing wholly as a sub-function of the SEV EXTRACT process rather than partly performed in the STORE process. This alternative would operate as follows: There is no significant change to the SEV constructs except that the BLCD entry lists in the VCD Control Data Element would be replaced with a Version/Level Dependency list. Each dependency list entry would consist of a Version ID and its corresponding Modification level timestamp. A version/level dependency entry is placed in the dependency list each time a version is stored as part of the SEV STORE operation whenever a new version is specified. This entry identifies the specific version and modification level (via its timestamp) from which the new version is derived. In addition, entries might also be entered via a dependency specification command. As part of the EXTRACT operation, SEV processing would compare the timestamp value of each Version/Level dependency entry taken from the version dependency list of the version being extracted and compare this timestamp against the timestamp value of each modification level found in the relevant underlying or related versions. The relevant underlying or related versions are those versions identified in the dependency list of the extracted version (the versions upon which the extracted version is dependent). Any timestamps in the relevant versions/levels which are `higher` than the timestamp of the version/level being compared would indicate that the underlying or related version has been changed since the last time the version being extracted was accessed. Each identified changed version/level is built into a list which would be made available to the using application. As in the former embodiment, if any underlying changed versions are identified, an automatic BLCD notification would be returned to the using application and the changed version list may be accessed. The BLCD Reset operation would be implemented as either deleting a specified Version/Level Dependency entry or updating the specified entry with a higher timestamp. Deleting the entry would cause the version to no longer be identified as a relevant underlying version. Updating the entry with a timestamp equal to the timestamp of a higher (or the highest) underlying modification level would have the effect of continuing to maintain the dependency entry but the compare operation would be reset to only identify `future` underlying changes. Compare Process: As noted above, SEV utilizes a standard compare process to compare the modified file (the updated file being stored) against the original version of that file. The only requirement of the compare process is that its output include a "difference" file. The objective of the compare is to identify differences between the two files in the form of lines which have been either `added` or `deleted`. The compare process assigns reference values called relative line numbers in order to identify each line position within the file. Added and deleted lines (and the number of each) are then identified relative to where they are positioned within the file. This difference information is placed in a compare output file. In this example, the relative line number in the compare output file references the prior level (merge) file. A process therefore, can access the compare output file and the prior level file to build a new merged file. Unchanged lines are copied from the prior level file and the identified added/deleted lines are built into a new resulting file in the appropriate order.
______________________________________
Sample Compare Program Output
Merge file: FILE.A Target file:FILE.B
Rel Line # # of Dels.
# of Adds
______________________________________
C 000005 000002
LINEA - This line was added
LINEB - This line was added
C 000014 000001
LINEC - This line was deleted
C 000055 000001 000002
LINEX - This line was deleted
LINEY - This line was added
LINEZ - This line was added
______________________________________
This example indicates the following: At line number `000005` in the file, 2 lines were added (LINEA and LINEB). At line number `000014` in the file, 1 line was deleted (LINEC). At line number `000055` in the file, 1 line was deleted (LINEX) and 2 lines were added (LINEY and LINEZ). The SEV BLCD Reset Operation The SEV BLCD Reset Operation shown in FIG. 5 is used to delete a BLCD List entry. First, 51, a selected SEV Entity (input file) is read. Then, the selected Version BLCD list is referenced 52 and the specified BLCD List entry is deleted 53. The address of the SEV output file is returned 54 to the calling program. The SEV Erase Operation The SEV Erase Operation shown in FIG. 6 is used to erase an Existing version or modification level. First, 601, a selected SEV Entity (input file) is read. If a version erase is specified 602, both the Version Control Data (VCD) element and all related Level Control Data (LCD) elements are deleted 603. If a modification level erase is specified 604, only the Pointer Variable List in the specified Level Control Data (LCD) element is deleted 605. The Control data is then scanned 606 to determine if there are any `unreferenced` source lines created as a result of the erase. If any are found, those unreferenced lines are deleted 607. The address of the SEV output file is returned 608 to the calling program. The SEV PUTDATA Operation The SEV PUTDATA Operation shown in FIG. 7 is used to copy application-defined data from a specified input file, and record the data within the SEV entity at either the ECD, VCD or LCD control data areas. At 701, a selected SEV entity (input file) is read. Depending on whether the request specified ECD (702), VCD (704) or LCD (706), the input file is copied into the appropriate control data area (703, 705 or 707). The address of the rebuilt SEV output program is returned to the calling program (708). The SEV GETDATA Operation The SEV GETDATA Operation shown in FIG. 8 is used to retrieve application-defined data from either the ECD, VCD or LCD control data area, and write the data to a specified output file. First, 801, a selected SEV entity (input file) is read. Depending on whether the ECD (802), VCD (804) or LCD (806) was specified, the appropriate control data is copied (803, 805 or 807) to the specified output file. Return is then made to the calling program. The SEV LOCK ON/OFF Operation The SEV LOCK ON/OFF Operation shown in FIG. 9 is used to set the on/off "state" of the SEV LOCK flag in either the VCD or LCD control data area of the SEV entity. First, 901, a selected SEV entity (input file) is read. Depending on whether the VCD (902) or LCD (906) was specified, and whether the lock is to be set "on" (904, 908) or "off" (905, 909), (as indicated by tests 903 and 907) the appropriate processing is performed. The address of the rebuilt SEV output file is returned to the calling program (910). EXAMPLES FIG. 11 depicts a conceptual view of a SEV Entity which includes examples of the SEV Control Data Elements. Note that the entire entity is contained in a single encapsulated form. Note also that the pointer variables "0001", "0002", etc., assigned sequentially as noted in STORE processing (FIG. 2), provide a complete history of incremental source change activity identified in the historical order in which the changes occurred. 1. Item 1101 depicts the ECD element (defined abstractly in FIG. 10 at 1001) in which, for example, an application defined name `PARTA` is recorded. 2. Item 1102 depicts the VCD element in which, for example, an application defined version specification (VER.A) is recorded. 3. Item 1103 depicts the LCD element in which, for example, a timestamped pointer variable list is recorded (item 1104) representing the version specified in the corresponding VCD element (item 1102). 4. Item 1105 depicts another VCD element in which, for example, an application defined version specification (VER.B) is recorded. 5. Item 1106 depicts the LCD element in which, for example, a timestamped pointer variable list is recorded (item 1107) representing the version specified in the corresponding VCD element (item 1105). 6. Item 1108 depicts another VCD element in which, for example, an application defined version specification (VER.C.) is recorded. 7. Item 1109 depicts the LCD element in which, for example, two timestamped pointer variable lists are recorded (items 1110 and 1111) representing two modification levels of the version specified in the corresponding VCD element (item 1108). 8. Item 1112 depicts a grouping of source lines prefixed with the pointer variable `0001`. 9. Item 1113 depicts a second grouping of source lines prefixed with the pointer variable `0002`. 10. Item 1114 depicts a third grouping of source lines prefixed with the pointer variables `0003` and `0004`. 11. Item 1115 depicts application defined data that can be recorded within the structure of the three Control Data Elements. Note that the Pointer Variable Lists associated with each version specification contain the proper pointer variables to identify the source lines which, when extracted, collectively constitute the correct representation of the source. SEV Pointer Variable Processing Logic Scenario The following four scenarios depict the logic steps taken to process the initial creation of a source file and subsequent changes to that file. FIG. 12 shows what the edited file would look like to the end user and FIGS. 13-16 show what the SEV file would look like as changes to the file are made. The reference numbers associated with each step reference the flow diagrams contained in FIGS. 1-6. VER.A Initial store of a new data entity (FIG. 12 at 1201). VER.A--A new SEV Entity is initially created with the part name contained in the ECD element, the version `VER.A` is placed in the VCD element, and the timestamped pointer variable list is placed in the LCD element. FIG. 13 illustrates the resulting SEV entity when the edited source is stored. 201 This is a new SEV entity. 202 The initial pointer variable is set to `1`. 203 The variable `1` is placed in a newly created Pointer Variable List for VER.A with an attached timestamp (ts1). 204 The initial pointer variable `1` is appended to each record in the file. 205 Each record is placed in the output file. 222 The ADDID value `1` is placed in the HILINE value field in the control data. 223 The address of the SEV file is returned to the calling program. VER.B Version B was derived from version A and the line `X` was added to the edited file (FIG. 12 at 1202). A new VCD/LCD Control element pair is created identifying the new version `VER.B` and a new timestamped pointer variable table. FIG. 14 illustrates the resulting SEV entity when the edited source is stored. 201 This is an existing SEV entity. 206 Get the Prior Level version (VER.A) for compare. 207 The updated file for VER.B is compared against the prior version (VER.A). 208 The compare process creates the compare file and identifies line X as an added line (with its proper relative record number). 209 The compare file is read and the relative record number and the change (add/delete) information is retrieved. 210 EOF test for compare file. 211 The prior level file is read and a line count of the number of lines read is maintained. 212 Does the line count equal the relative record number. 213 No--Unchanged lines are placed in the output file (until the line count equals the relative record number). 215 The compare output file indicates an `added` record. 401 The HILINE number is retrieved from the control data and incremented by `1`. The Add ID value (ADDID) will equal 2. The ADDID value `2` is assigned as the pointer variable representing line X. 402 The ADDID value `2` is placed in a newly created Pointer Variable List for VER.B (which was derived from the VER.A Pointer Variable List) and given a new timestamp (ts1). 403 The ADDID value `2` is appended to Line X. 404 Line X is placed in the output file. 209 The compare file is read again and an end of file (EOF) indicator is returned. 216, 217 The remainder of the records in the input file are placed in the output file (until EOF from the Prior Level file). 218 Scan the version dependency chain (BLCD test). 219 End of dependency scan (none found). 222 The ADDID value `2` is placed in HILINE number field in the control data. 223 The address of the SEV file is returned to the calling program. VER.C (Modification (Change) level 1) Version C was derived from version B and the line `D` was deleted from the edited file (FIG. 12 at 1203). VER.C (Modification Level 1)--A new VCD/LCD Control element pair is created identifying the new version `VER.C` and a new timestamped pointer variable list. FIG. 15 illustrates the resulting SEV entity when the edited source is stored. 201 This is an existing SEV entity. 206 Get the Prior Level version (VER.A) for compare. 207 The updated file for VER.C is compared to the prior version (VER.B). 208 The compare process creates the compare file and identifies Line D as a deleted line (with its proper relative record number). 209 The compare file is read and the relative record number and the change (add/delete) information is retrieved. 210 EOF test for compare file. 211 The prior level file is read and a line count of the number of lines read is maintained. 212 Does the line count equal the relative record number. 213 No - Unchanged lines are placed in the output file (until the line count equals the relative record number). 214 The compare output file indicates a `deleted` record. 301 The HILINE number `2` is retrieved from the control data and incremented by `1`. The Delete ID value (DELID) will equal 3. The DELID value `3` is assigned as the pointer variable representing Line D. 302 The previous pointer variable for line D `1` is retained. 303 Because line D received a new pointer variable `3`, all prior pointer variable lists are scanned for the value of its previous pointer variable `1`. The pointer variable lists for VER.A and VER.B are found to contain a reference to pointer variable 1, the new DELID value `3` is added to the pointer variable lists for VER.A and VER.B. 304 The DELID value `3` is appended to Line D. 305 the DELID value `3` is placed in the Control Data HILINE number. 306 Line D is placed in the output file. 209 The compare file is read again and an end of file (EOF) indicator is returned. 216, 217 The remainder of the records in the input are placed in the output file (until EOF from the Prior Level file). 218 Scan the version dependency chain (BLCD test). 219 End of dependency scan (none found). 222 The DELID value `3` is placed in the HILINE number in the control data. 223 The address of the SEV file is returned to the calling program. VER.C (Modification (Change) level 2) Version C(2) was derived from version C(1) and the line `B` was changed to `Bn` in the edited file (FIG. 12 at 1204). VER.C (Modification Level 2)--A new timestamped pointer variable list is appended to the existing LCD element. FIG. 16 illustrates the resulting SEV entity when the edited source is stored. 201 This is an existing SEV entity. 206 Get the Prior Level version (VER.A) for compare. 207 The updated file for VER.C(2) is compared against the prior version VER.C(1). 208 The compare process created the output file and identified Line B as a deleted line (with its proper relative record number) and Line Bn as an added line (with its proper relative record number). 209 The compare file is read and the `first` relative record number and the change (add/delete) information is retrieved. 210 EOF test for compare file. 211 The prior level file is read and a line count of the number of lines read is maintained. 212 Does the line count equal the relative record number. 213 No--Unchanged lines are placed in the output file (until the line count equals the relative record number). 214 The compare file output indicates a deleted record. 301 The HILINE number `3` is retrieved from the control data and incremented by 1. The Delete ID value (DELID) will equal 4. The DELID value `4` is assigned as the Pointer Variable representing Line B. 302 The previous pointer variable for line B `1` is retained. 303 Because line B received a new pointer variable `4`, all prior pointer variable lists are scanned for the value of its previous pointer variable `1`. The pointer variable lists for VER.A, VER.B and VER.C(1) are found to contain a reference to pointer variable 1, the new DELID value `4` is added to the pointer variable lists for VER.A, VER.B and VER.C(1). 304 The DELID value `4` is appended to Line B. 305 The DELID value `4` is placed in the Control Data HILINE number. 306 Line B is placed in the output file. 209 The compare file is read again and the `next` relative record number and the change (add/delete) information is retrieved. 210 EOF test for compare file. 211 The prior level file is read and a line count of the number of lines read is maintained. 212 Does the line count equal the relative record number. 213 No--Unchanged lines are placed in the output file until the count equals the relative record number. 215 The compare file output indicates an added record. 401 The HILINE number `4`, is retrieved from the control data and incremented by 1. The Add ID value (ADDID) value will equal 5. The ADDID value `5` is assigned as the Pointer Variable representing Line Bn. 402 The ADDID value `5` is placed in a newly created Pointer Variable list for VER.C(2) (which was derived from the original VER.C(1) Pointer Variable List) and given a new timestamp (ts2). 403 The ADDID value `5` is appended to line Bn. 404 Line Bn is placed in the output file. 209 The Compare file is read again and an EOF indicator is returned. 216,217 The remainder of the records in the input are placed in the output file (until EOF from the Prior Level file). 218 Scan the version dependency chain (BLCD test). 219 End of dependency scan (none found). 222 The last ID value `5` (the ADDID) is placed in the HILINE number in the control data. 223 The address of the SEV file is returned to the calling program. While the invention has been described with reference to preferred embodiments thereof, it will be understood by those skilled in the art that various changes in form and details may be made without departing from the scope of the invention.
|
Same subclass Same class Consider this |
||||||||||
