CN102915233B - The baseline version management method of software program and system - Google Patents

The baseline version management method of software program and system Download PDF

Info

Publication number
CN102915233B
CN102915233B CN201110221350.7A CN201110221350A CN102915233B CN 102915233 B CN102915233 B CN 102915233B CN 201110221350 A CN201110221350 A CN 201110221350A CN 102915233 B CN102915233 B CN 102915233B
Authority
CN
China
Prior art keywords
file
program
sound code
standard grade
baseline version
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN201110221350.7A
Other languages
Chinese (zh)
Other versions
CN102915233A (en
Inventor
母天石
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Tencent Technology Shenzhen Co Ltd
Original Assignee
Tencent Technology Shenzhen Co Ltd
Filing date
Publication date
Application filed by Tencent Technology Shenzhen Co Ltd filed Critical Tencent Technology Shenzhen Co Ltd
Priority to CN201110221350.7A priority Critical patent/CN102915233B/en
Publication of CN102915233A publication Critical patent/CN102915233A/en
Application granted granted Critical
Publication of CN102915233B publication Critical patent/CN102915233B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Abstract

The invention provides the baseline version management method of a kind of software program, comprise the following steps: binary program is carried out source code parsing, record the sound code file that described binary program is corresponding;Single state of reaching the standard grade of monitoring binary program;According to the sound code file that the described lookup of state binary program reaching the standard grade single is corresponding, the baseline version number of the described sound code file found is updated.Use said method can get code release accurately under the concurrent product development of software development.Additionally, additionally provide the baseline version management system of a kind of software program.

Description

The baseline version management method of software program and system
[technical field]
The present invention relates to software engineering, particularly relate to baseline version management method and the system of a kind of software program.
[background technology]
In software development, a lot of in the case of be required for Duo Ren team concurrent development, under the pattern of concurrent development, many people Can revise with a code file simultaneously, and the on-line time of amended code file is the most different.When code file is reached the standard grade Time if desired revise code file, traditional way is to obtain the version reached the standard grade of up-to-date success, but, the version that up-to-date success is reached the standard grade Originally it is likely to the failure of even reaching the standard grade of mistake, therefore, under the concurrent product development of traditional software, is difficult to get standard True code release.Additionally, traditional sub-project being in a large project splits, it is impossible to arrange the baseline version of a sub-project This environment, it is also difficult to each get subitem destination code.
[summary of the invention]
Based on this, it is necessary to provide the baseline version manager of a kind of software program that can obtain code release accurately Method.
The baseline version management method of a kind of software program, comprises the following steps:
Binary program is carried out source code parsing, records the sound code file that described binary program is corresponding;
Single state of reaching the standard grade of monitoring binary program;
According to the sound code file that the described lookup of state binary program reaching the standard grade single is corresponding, to the described source code found literary composition The baseline version number of part is updated.
In a preferred embodiment, described sound code file includes the hpp file that cpp file and described cpp file are quoted;Institute Stating and binary program carries out source code parsing, the step of the sound code file that record binary program is corresponding includes:
Perform instruction, obtain compiling intermediate object program;
Described compiling intermediate object program is scanned, obtains cpp file composition and the hpp file composition quoted thereof;
Formed by the described cpp file obtained, hpp file composition recorded binary system with the corresponding relation of binary program Source code resolves in corresponding table.
In a preferred embodiment, the source code literary composition that the lookup of state binary program of reaching the standard grade single described in described basis is corresponding Part, the step being updated the baseline version number of the described sound code file found includes:
When described single state of reaching the standard grade is for reaching the standard grade successful comprehensively, search the sound code file that binary program is corresponding, from version This management server obtains the current version number of described sound code file, is recorded as by the current version number of described sound code file described The current basic line version number that sound code file is corresponding.
In a preferred embodiment, the described step being updated the baseline version number of described sound code file includes:
When described single state of reaching the standard grade is comprehensive rollback, search the sound code file that binary program is corresponding, by described source The current basic line version number modification of code file is last revision number.
In a preferred embodiment, described method also includes: create baseline version tables of data, described baseline version tables of data For recording sound code file and the current basic line version number of sound code file, the corresponding relation of at least one historical baseline version number.
Additionally, there is a need to provide a kind of baseline version that can obtain the software program of code release accurately to manage system System.
A kind of baseline version management system of software program, including:
Source code parsing module, for binary program is carried out source code parsing, records the source that described binary program is corresponding Code file;
Monitoring module, for monitoring single state of reaching the standard grade of binary program;
Baseline version management module, for according to described in reach the standard grade single lookup of state binary program corresponding source code literary composition Part, is updated the baseline version number of the described sound code file found.
In a preferred embodiment, described sound code file includes the hpp file that cpp file and described cpp file are quoted;Institute State source code parsing module to include:
Instruction performs module, is used for performing instruction, obtains compiling intermediate object program;
Scan module, for being scanned described compiling intermediate object program, obtains cpp file composition and the hpp quoted thereof File forms;
Logging modle, for by the described cpp file obtained composition, hpp file composition pass corresponding with binary program System recorded binary system source code and resolves in corresponding table.
In a preferred embodiment, described baseline version management module reaches the standard grade single state for reach the standard grade comprehensively described in working as During success, search the sound code file that binary program is corresponding, obtain the current version of described sound code file from version management server This number, the current version number of described sound code file is recorded as the current basic line version number that described sound code file is corresponding.
In a preferred embodiment, described baseline version management module be additionally operable to when described in reach the standard grade single state for returning comprehensively When moving back, search the sound code file that binary program is corresponding, be upper one edition by the current basic line version number modification of described sound code file This number.
In a preferred embodiment, baseline version tables of data creation module, it is used for creating baseline version tables of data, described base Line edition data table is for recording sound code file and the current basic line version number of sound code file, at least one historical baseline version number Corresponding relation.
The baseline version management method of above-mentioned software program and system, by monitoring single shape of reaching the standard grade of binary program State, is updated according to the baseline version number of sound code file corresponding to single state binary program to reaching the standard grade of reaching the standard grade, due to The baseline version number of the sound code file of binary program is carried out effective management, therefore, it is possible to obtain code version accurately This.
[accompanying drawing explanation]
Fig. 1 is the schematic flow sheet of the baseline version management method of software program in an embodiment;
Fig. 2 is the schematic flow sheet of step S102 in Fig. 1;
Fig. 3 is the structural representation of the baseline version management system of software program in an embodiment;
Fig. 4 is the structural representation of source code parsing module in Fig. 3.
[detailed description of the invention]
The present invention, by binary program carries out source code parsing, records the sound code file that binary program is corresponding, due to During the reaching the standard grade of binary program, single state of reaching the standard grade of binary program can be modified, by monitoring binary system Single state of reaching the standard grade of program, according to single lookup of state of reaching the standard grade to sound code file corresponding to binary program, to find The baseline version number of these sound code files is updated.Due to the difference of the single state of reaching the standard grade according to binary program, can be right The baseline version number of the sound code file that binary program is corresponding is updated, thus the baseline of the sound code file to binary program Version number has carried out effective management, can obtain code release accurately by the baseline version number updated.
In one embodiment, as it is shown in figure 1, the baseline version management method of a kind of software program, comprise the following steps:
Step S10, carries out source code parsing, the sound code file that record binary program is corresponding to binary program.
In one embodiment, the binary program reached the standard grade is to be generated, such as by a series of c/c++ compilation of source code .so file .cgi file etc..Here c/c++ source code includes cpp file and hpp file, and wherein cpp file is by c++ language The source code file (i.e. sound code file) that speech is write, and the header file that hpp file is cpp file.In the present embodiment, to binary system Program carries out source code parsing and includes the parsing to cpp file and the parsing to hpp file.
In one embodiment, as in figure 2 it is shown, the detailed process of step S10 is:
Step S102, performs instruction, obtains compiling intermediate object program.
Step S104, is scanned compiling intermediate object program, obtains cpp file composition and the hpp file composition quoted thereof.
When resolving cpp file, can be by the make instrument of Linux GNU plus specifying parameter to generate the detailed of binary system compiling Feelings (i.e. compile intermediate object program), and this instruction is: make-n-B-i-k file destination program name.Wherein, target program file name is Refer to need the filename carrying out the binary program of source code parsing, such as libA.so, Axx.cgi etc.;-n represents that printing simulation is compiled Translate process, but the most really perform compiling;-B represents that all of target is required for more newly compiled;-i represent ignore upon execution all Mistake;-k represent make mistakes the most out of service.After running above-mentioned instruction, obtain compiling intermediate object program, such as shape such as " g++-g- The text of I/path1-I/path2-I.../pathN-o xxxxx.o.
Text obtained above is scanned, obtains complete cpp file composition.Below with the binary system of a .so Above-mentioned scanning process is described as a example by program.By performing instruction make-n-B libtest.so, obtain exporting text.By solid Determine the separator such as “ r n of feature " text obtained is divided into several rows, every a line is then a .o file (object literary composition Part) generation process;Circulate all line of text obtained above successively, whether there is .cpp/.c literary composition by canonical matching judgment Part, if it is present canonical mates this row, and determines whether to generate .o file, if having generation .o file, then record .cpp/.c with the mapping relations of .o, next line otherwise it is recycled to;If canonical matching judgment is to there is not .cpp/.c file, then Further determining whether to there is .so file, if there is .so file, then canonical matches the institute that current line .so file comprises There is .o file, and record the mapping relations of .so Yu .o;By above-mentioned two mapping relations, i.e. can get .so's Yu .cpp/.c Mapping relations, thus obtain the complete cpp file composition of .so file.
When resolving hpp file, can be by Linux g++ compiler plus specifying parameter to obtain the institute that cpp/c source code is quoted Having .h header file, specific instruction is as follows: g++-MM xxxx.cpp | xxxx.c-I1-I2-I3.Wherein ,-MM represents appointment cpp/c The h of the nonsystematic definition that source code refers to defines file;-I specifies and compiles the h file path that this source program refers to.Run After above-mentioned instruction, obtain compiling intermediate object program, such as shape such as " xxxx.0:xxxx.cpp
hpp1\
hpp2\
hpp3\
Hpp4 " text.
Text obtained above is scanned, i.e. can get the hpp file composition arrived cited in complete cpp file.Should Scanning process is: by the separator of fixed character such as " r n ", the text obtained is divided into several rows;Scanning is every successively A line, remove null and end n and some useless pilot process information;To every a line, perform: if one's own profession includes many Individual .h/.hpp file, then by multiple .h/.hpp file declusterings, be divided into multirow;If one's own profession comprises ../relative path, then recover The absolute path of this document;If one's own profession comprises ./relative path, then recover the absolute path of this document;If one's own profession bag Containing/current path, then recover the absolute path of this document.After scanning all of line of text, all of .h/.hpp file is arranged Weight, then obtain the .h/.hpp file set arrived cited in cpp file.
In one embodiment, remove to scan the file of binary program according to fixed frequency (such as every 3 hours) every day Composition, the cpp file every time obtained after scanning and hpp file are instructed and delete instruction and update in data base by insertion.Example Once binary program liba.so being scanned obtains file consist of a.cpp, b.cpp and c.cpp, Current Scan as front The file obtained consists of a.cpp, b.cpp and d.cpp, the file composition obtained at front single pass due to a.cpp and b.cpp In exist, therefore need not a.cpp and b.cpp process.And d.cpp is in the file composition that front single pass obtains Do not exist, therefore need to perform d.cpp to insert instruction (i.e. Insert instruction), d.cpp is inserted.Separately obtain due to Current Scan File composition in there is not c.cpp, it is therefore desirable to c.cpp perform delete instruction (i.e. Delete instruction), c.cpp is deleted Remove, and more new database.
Step S106, recorded the cpp file obtained composition, hpp file composition with the corresponding relation of binary system degree Binary system source code resolves in corresponding table.
In one embodiment, the corresponding table of binary system source code parsing is as shown in table 1:
Table 1
In table 1, have recorded binary program Libtest.so is carried out all cpp files obtained by after source code parsing and The hpp file that it is quoted.
Step S20, single state of reaching the standard grade of monitoring binary program.
Binary program is reached the standard grade and is referred to the binary program that compiling produces is published to the Internet that user accesses.Each two The upper line process of binary program can use to reach the standard grade and singly carry out record, be such as recorded as " Zhang San 12:00 bill of lading A need reach the standard grade LibA.so, Axx.cgi ", wherein, libA.so, Axx.cgi are the binary program needing to reach the standard grade.Upper at binary program In line process, user revises, according to situation about reaching the standard grade, single state of reaching the standard grade.
Single state of reaching the standard grade of binary program includes the bill of lading, reach the standard grade comprehensively in, reach the standard grade successfully comprehensively, reach the standard grade unsuccessfully comprehensively With comprehensive rollback.Wherein, the bill of lading refers to that submission is reached the standard grade list;Refer in reaching the standard grade that binary program is in the shape reached the standard grade comprehensively State, due to major part internet sites be all made up of some peer server, need once by binary program from some Station server is reached the standard grade one by one, time course of therefore having reached the standard grade;Reach the standard grade comprehensively and successfully refer to that binary program is all reached the standard grade successfully; Failure of comprehensively reaching the standard grade refers to that binary program is reached the standard grade unsuccessfully;Comprehensively rollback refers to that binary program is reached the standard grade after failure, needs upper The binary program of line withdraws the Internet that user accesses, and changes the binary program operating in the Internet into original version This.
Step S30, according to the sound code file that the lookup of state binary program reaching the standard grade single is corresponding, to the source code literary composition found The baseline version number of part is updated.
In one embodiment, said method also includes: create baseline version tables of data, record in baseline version tables of data Sound code file and the current basic line version number of sound code file, the corresponding relation of at least one historical baseline version number.At one In embodiment, in baseline version tables of data, the field of record is as shown in table 2, wherein have recorded two nearest historical baseline versions Number:
Table 2
Sound code file name Current basic line version number Historical baseline version number 1 Historical baseline version number 2
In one embodiment, after binary program is reached the standard grade successfully comprehensively, it is comprehensive that user revises single state of reaching the standard grade Reach the standard grade successfully, when monitoring single state of reaching the standard grade for reaching the standard grade successful comprehensively, search the source code that binary program is corresponding the most immediately File, obtains the current version number of sound code file, the current version number of sound code file is recorded as source from version management server The current basic line version number that code file is corresponding.
In the present embodiment, resolve corresponding table from above-mentioned generation binary system source code and search successful binary system journey of comprehensively reaching the standard grade Sound code file corresponding to sequence.The version management server of above-mentioned embodiment is svn (subversion, a kind of version management Instrument) server, source code can be managed by svn service, and svn service is increased income free, record on svn server The various versions of source code.Such as, A.cpp file is uploaded by Zhang San on January 1st, 2011 and is created in svn server, Svn server be its to be assigned with version number be V1, on February 23rd, 2011 by being revised by Li Si and uploading to svn server, Svn server is that it is assigned with version number V2.In the present embodiment, get the current version number of sound code file from svn server, The current version number got is recorded as the current basic line version number that sound code file is corresponding.In the present embodiment, by get Current version number updates the current basic line version number field in baseline version tables of data, and updates two historical baseline versions accordingly This number.
In another embodiment, after binary program reaches the standard grade failure comprehensively, need the binary system journey that will currently reach the standard grade Sequence withdraws the Internet that user accesses, and changes the binary program of original version into, and single status modifier of reaching the standard grade is then complete by user Face rollback, i.e. return back to the binary program of last revision.When monitoring single state of reaching the standard grade and being comprehensive rollback, search two and enter The sound code file that processing procedure ordered pair is answered, is last revision number by the current basic line version number modification of this sound code file.
In the present embodiment, the binary program searching above-mentioned generation resolves the source code literary composition that binary program in corresponding table is corresponding Part, is last revision number by current basic line version number modification corresponding for this sound code file in baseline version tables of data.Last revision Number may be configured as historical baseline version number 1 or historical baseline version number 2, so, be directly revised as going through by current basic line version number History baseline version number 1 or historical baseline 2, update the historical baseline version number in baseline version tables of data simultaneously.
As it is shown on figure 3, the baseline version management system of a kind of software program, including source code parsing module 10, monitoring module 20 and baseline version management module 30, wherein:
Source code parsing module 10 for carrying out source code parsing to binary program, and the source code that record binary program is corresponding is civilian Part.
In one embodiment, the binary program reached the standard grade is to be generated, such as by a series of c/c++ compilation of source code .so file .cgi file etc..Here c/c++ source code includes cpp file and hpp file, and wherein cpp file is by c++ language The source code file (i.e. sound code file) that speech is write, and the header file that hpp file is cpp file.In the present embodiment, to binary system Program carries out source code parsing and includes the parsing to cpp file and the parsing to hpp file.
In one embodiment, sound code file includes the hpp file that cpp file and cpp file are quoted.As shown in Figure 4, source Code parsing module 10 includes that instruction performs module 110, scan module 120 and logging modle 130, wherein:
Instruction performs module 110 and is used for performing instruction, obtains compiling intermediate object program.
Scan module 120, for being scanned compiling intermediate object program, obtains cpp file composition and the hpp literary composition quoted thereof Part forms.
Source code parsing module 10, can be raw plus specifying parameter by the make instrument of Linux GNU when resolving cpp file Become the details (i.e. compiling intermediate object program) of binary system compiling.Instruction performs the instruction of module 110 execution: make-n-B-i-k mesh Mark program name.Wherein, target program file name refers to the filename needing to carry out the binary program of source code parsing, such as LibA.so, Axx.cgi etc.;-n represents printing simulation compilation process, but the most really performs compiling;-B represents all of target Need more newly compiled;-i represents and ignores all of mistake upon execution;-k represent make mistakes the most out of service.Run above-mentioned instruction After, obtain compiling the literary composition of intermediate object program, such as shape such as " g++-g-I/path1-I/path2-I.../pathN-o xxxxx.o " This.The text is scanned by scan module 120, obtains complete cpp file composition.
When source code parsing module 10 resolves hpp file, can be by Linux g++ compiler plus specifying parameter to obtain cpp/ All .h header files that c source code is quoted.The instruction that instruction performs module 110 execution is as follows: g++-MM xxxx.cpp | xxxx.c- I1-I2-I3.Wherein ,-MM represents that the h of the nonsystematic definition specifying cpp/c source code to refer to defines file;-I specifies compiling The h file path that this source program refers to.After running above-mentioned instruction, obtain compile intermediate object program, such as shape as " xxxx.0: xxxx.cpp
hpp1\
hpp2\
hpp3\
Hpp4 " text.The text obtained is scanned by scan module 120, i.e. can get cited in complete cpp file The hpp file composition arrived.About the scanning algorithm of cpp file and hpp file with reference to mentioned above.
In one embodiment, scan module 120 can go to scan two according to fixed frequency (such as every 3 hours) enter every day The file composition of processing procedure sequence, the cpp file every time obtained after scanning and hpp file are instructed and delete instruction renewal and arrive by insertion In data base.Once be scanned binary program liba.so before such as obtaining file consist of a.cpp, b.cpp and C.cpp, the file that Current Scan obtains consists of a.cpp, b.cpp and d.cpp, owing to a.cpp and b.cpp is at front single pass The file composition obtained exists, therefore need not a.cpp and b.cpp process.And d.cpp obtains at front single pass To file composition in do not exist, therefore d.cpp need to be performed insert instruction (i.e. Insert instruction), by d.cpp insertion.Separately by C.cpp is there is not, it is therefore desirable to c.cpp performs delete instruction, and (i.e. Delete refers in the file composition that Current Scan obtains Make), c.cpp is deleted, and more new database.
Logging modle 130 is for the cpp file composition that will obtain, hpp file composition and the corresponding relation of binary system degree Recorded binary system source code to resolve in corresponding table.
In one embodiment, the corresponding table of binary system source code parsing is as shown in table 1:
In table 1, have recorded binary program Libtest.so is carried out all cpp files obtained by after source code parsing and The hpp file that it is quoted.
Monitoring module 20 is for monitoring single state of reaching the standard grade of binary program.
Binary program is reached the standard grade and is referred to the binary program that compiling produces is published to the Internet that user accesses.Each two The upper line process of binary program can use to reach the standard grade and singly carry out record, be such as recorded as " Zhang San 12:00 bill of lading A need reach the standard grade LibA.so, Axx.cgi ", wherein, libA.so, Axx.cgi are the binary program needing to reach the standard grade.Upper at binary program In line process, user revises, according to situation about reaching the standard grade, single state of reaching the standard grade.
Single state of reaching the standard grade of binary program includes the bill of lading, reach the standard grade comprehensively in, reach the standard grade successfully comprehensively, reach the standard grade unsuccessfully comprehensively With comprehensive rollback.Wherein, the bill of lading refers to that submission is reached the standard grade list;Refer in reaching the standard grade that binary program is in the shape reached the standard grade comprehensively State, due to major part internet sites be all made up of some peer server, need once by binary program from some Station server is reached the standard grade one by one, time course of therefore having reached the standard grade;Reach the standard grade comprehensively and successfully refer to that binary program is all reached the standard grade successfully; Failure of comprehensively reaching the standard grade refers to that binary program is reached the standard grade unsuccessfully;Comprehensively rollback refers to that binary program is reached the standard grade after failure, needs upper The binary program of line withdraws the Internet that user accesses, and changes the binary program operating in the Internet into original version This.
Baseline version management module 30 is for the sound code file corresponding according to the lookup of state binary program reaching the standard grade single, right The baseline version number of the sound code file found is updated.
In one embodiment, said system also includes: baseline version tables of data creation module (not shown), is used for Create baseline version tables of data, baseline version tables of data have recorded sound code file and sound code file current basic line version number, The corresponding relation of at least one historical baseline version number.In one embodiment, the field recorded in baseline version tables of data is such as Shown in table 2, wherein have recorded two nearest historical baseline version numbers.
In one embodiment, after binary program is reached the standard grade successfully comprehensively, it is comprehensive that user revises single state of reaching the standard grade Reach the standard grade successfully.When monitoring modular 20 monitors single state of reaching the standard grade for reaching the standard grade successful comprehensively, then notice baseline version management mould Block 30.Baseline version management module 30, for searching the sound code file that binary program is corresponding, obtains from version management server The current version number of sound code file, is recorded as the current basic line version that sound code file is corresponding by the current version number of sound code file Number.
In the present embodiment, baseline version management module 30 resolves corresponding table from above-mentioned generation binary system source code and searches comprehensively Reach the standard grade the sound code file corresponding to successful binary program.The version management server of above-mentioned embodiment is svn (subversion, a kind of Version) server, source code can be managed by svn service, and svn service is to increase income Free, svn server have recorded the various versions of source code.Such as, A.cpp file on January 1st, 2011 by Zhang San Upload and be created in svn server, svn server be its to be assigned with version number be V1, repair by by Li Si on February 23rd, 2011 Correcting one's mistakes and upload to svn server, svn server is that it is assigned with version number V2.In the present embodiment, obtain from svn server To the current version number of sound code file, the current version number got is recorded as the current basic line version that sound code file is corresponding Number.In the present embodiment, the current version number got is updated the current basic line version number field in baseline version tables of data, And update Liang Ge historical baseline version number accordingly.
In another embodiment, after binary program reaches the standard grade failure comprehensively, need the binary system journey that will currently reach the standard grade Sequence withdraws the Internet that user accesses, and changes the binary program of original version into, and single status modifier of reaching the standard grade is then complete by user Face rollback, i.e. return back to the binary program of last revision.It is comprehensive rollback when monitoring module 20 monitors single state of reaching the standard grade Time, then notice baseline version management module 30.Baseline version management module 30 is for searching the source code literary composition that binary program is corresponding Part, is last revision number by the current basic line version number modification of this sound code file.
In the present embodiment, baseline version management module 30 resolves in corresponding table for searching the binary program of above-mentioned generation The sound code file that binary program is corresponding, by current basic line version number modification corresponding for this sound code file in baseline version tables of data For last revision number.Last revision number may be configured as historical baseline version number 1 or historical baseline version number 2, so, by current base Historical baseline version number 1 or historical baseline 2 are directly revised as in line version number, update going through in baseline version tables of data simultaneously History baseline version number.
In the baseline version management method of above-mentioned software program and system, when binary program is carried out source code parsing, logical Cross the simple instruction of execution can obtain compiling intermediate object program, this intermediate object program is scanned, it is possible to quick obtaining enters to two The sound code file that processing procedure ordered pair is answered.Owing to can be scanned according to fixing frequency, therefore, it is possible to timing updates binary system journey The sound code file composition of sequence.During binary program is reached the standard grade, by monitoring single state of reaching the standard grade of binary program, When single state is reached the standard grade in user's amendment, it is possible to update the baseline version number of sound code file immediately according to the state reaching the standard grade single, logical Cross baseline version tables of data and the baseline version of sound code file has been carried out effective management so that at the concurrent product development of software Under, it is possible to get code release accurately.
In the sub-project being in a large project splits, by the baseline version management method of above-mentioned software program and be System, it is possible to each get subitem destination code easily, therefore can arrange the baseline version environment of a sub-project.This Outward, by the sound code file (such as cpp file, hpp file) of indicated release, can be compiled according to a definite sequence by compilation tool Out a whole set of binary program system, (Common Gateway Interface, CGI(Common gateway interface) are real such as to compile CGI A kind of program technic of existing web terminal http protocol interaction, is by a series of compilation of source code binary program out) program groups Time, by baseline version management method and the system of above-mentioned software program, it is possible to get code release accurately, hence with The baseline version management method of above-mentioned software program and system, it is possible to dispose a brand-new development environment and test environment.
Embodiment described above only have expressed the several embodiments of the present invention, and it describes more concrete and detailed, but also Therefore the restriction to the scope of the claims of the present invention can not be interpreted as.It should be pointed out that, for those of ordinary skill in the art For, without departing from the inventive concept of the premise, it is also possible to make some deformation and improvement, these broadly fall into the guarantor of the present invention Protect scope.Therefore, the protection domain of patent of the present invention should be as the criterion with claims.

Claims (8)

1. a baseline version management method for software program, comprises the following steps:
Binary program is carried out source code parsing, records the sound code file that described binary program is corresponding, described sound code file bag Include cpp file and hpp file that described cpp file is quoted;
Single state of reaching the standard grade of monitoring binary program;
According to the sound code file that the described lookup of state binary program reaching the standard grade single is corresponding, to the described sound code file found Baseline version number is updated;
Described binary program carrying out source code parsing, the step of the sound code file that record binary program is corresponding includes: perform Instruction, obtains compiling intermediate object program, is scanned described compiling intermediate object program, obtains cpp file composition and the hpp quoted thereof File forms, and is formed by the described cpp file obtained, hpp file composition recorded two with the corresponding relation of binary program and enters Source code processed resolves in corresponding table.
The baseline version management method of software program the most according to claim 1, it is characterised in that described according on described The sound code file that the lookup of state binary program of line list is corresponding, is carried out the baseline version number of the described sound code file found The step updated includes:
When described single state of reaching the standard grade is for reaching the standard grade successful comprehensively, search the sound code file that binary program is corresponding, from version pipe Reason server obtains the current version number of described sound code file, and the current version number of described sound code file is recorded as described source code The current basic line version number that file is corresponding.
The baseline version management method of software program the most according to claim 1, it is characterised in that described to described source code The step that the baseline version number of file is updated includes:
When described single state of reaching the standard grade is comprehensive rollback, search the sound code file that binary program is corresponding, by described source code literary composition The current basic line version number modification of part is last revision number.
The baseline version management method of software program the most as claimed in any of claims 1 to 3, it is characterised in that Described method also includes: create baseline version tables of data, and described baseline version tables of data is used for recording sound code file and source code literary composition The current basic line version number of part, the corresponding relation of at least one historical baseline version number.
5. the baseline version management system of a software program, it is characterised in that including:
Source code parsing module, for binary program is carried out source code parsing, records the source code literary composition that described binary program is corresponding Part, described sound code file includes the hpp file that cpp file and described cpp file are quoted;
Monitoring module, for monitoring single state of reaching the standard grade of binary program;
Baseline version management module, for according to described in reach the standard grade single sound code file corresponding to lookup of state binary program, right The baseline version number of the described sound code file found is updated;
Described source code parsing module includes:
Instruction performs module, is used for performing instruction, obtains compiling intermediate object program;
Scan module, for being scanned described compiling intermediate object program, obtains cpp file composition and the hpp file quoted thereof Composition;
Logging modle, for being formed by the described cpp file obtained, hpp file forms and the corresponding relation of binary program is remembered Record binary system source code to resolve in corresponding table.
The baseline version management system of software program the most according to claim 5, it is characterised in that described baseline version pipe Reason module is used for, when described single state of reaching the standard grade is for reaching the standard grade successful comprehensively, searching the sound code file that binary program is corresponding, from Version management server obtains the current version number of described sound code file, and the current version number of described sound code file is recorded as institute State the current basic line version number that sound code file is corresponding.
The baseline version management system of software program the most according to claim 5, it is characterised in that described baseline version pipe Reason module is additionally operable to when described single state of reaching the standard grade is comprehensive rollback, searches the sound code file that binary program is corresponding, by institute The current basic line version number modification stating sound code file is last revision number.
8. manage system according to the baseline version of the software program described in any one in claim 5 to 7, it is characterised in that Baseline version tables of data creation module, is used for creating baseline version tables of data, and described baseline version tables of data is used for recording source code File and the current basic line version number of sound code file, the corresponding relation of at least one historical baseline version number.
CN201110221350.7A 2011-08-03 The baseline version management method of software program and system Active CN102915233B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201110221350.7A CN102915233B (en) 2011-08-03 The baseline version management method of software program and system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201110221350.7A CN102915233B (en) 2011-08-03 The baseline version management method of software program and system

Publications (2)

Publication Number Publication Date
CN102915233A CN102915233A (en) 2013-02-06
CN102915233B true CN102915233B (en) 2016-12-14

Family

ID=

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1987777A (en) * 2005-12-19 2007-06-27 国际商业机器公司 Computer method and apparatus for activity-based version selection in a configuration management system
CN101075901A (en) * 2006-05-18 2007-11-21 大唐移动通信设备有限公司 Method and system for managing network element software
CN101877650A (en) * 2010-05-20 2010-11-03 中兴通讯股份有限公司 Method and system for updating software version automatically
CN102043656A (en) * 2011-01-20 2011-05-04 宇龙计算机通信科技(深圳)有限公司 Software management method and software management server

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1987777A (en) * 2005-12-19 2007-06-27 国际商业机器公司 Computer method and apparatus for activity-based version selection in a configuration management system
CN101075901A (en) * 2006-05-18 2007-11-21 大唐移动通信设备有限公司 Method and system for managing network element software
CN101877650A (en) * 2010-05-20 2010-11-03 中兴通讯股份有限公司 Method and system for updating software version automatically
CN102043656A (en) * 2011-01-20 2011-05-04 宇龙计算机通信科技(深圳)有限公司 Software management method and software management server

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
Java二进制字节码文件解析;jeromezz;《http://wenku.***.com/view/23692b60ddccda38376baf4f.html?from=search》;20100121;正文第1页至第2页 *

Similar Documents

Publication Publication Date Title
CN107958057B (en) Code generation method and device for data migration in heterogeneous database
CN101211312B (en) Device and method for monitoring and managing patch of client
CN106033436B (en) Database merging method
US10387236B2 (en) Processing data errors for a data processing system
CN101405696B (en) A method and system for generating a robust software signature
CN104268216A (en) Data cleaning system based on internet information
US20070022023A1 (en) Method and apparatus for populating a software catalogue with software knowledge gathering
EP2309385A1 (en) Software configuration management method and system
JP2009169609A (en) Fault management program, fault management device and fault management method
GB2590327A (en) System and method for distributed ledger-based software supply chain management
CN106537350A (en) Method for processing data quality exceptions in data processing system
CN104965735A (en) Apparatus for generating upgrade SQL script
CN112711496A (en) Log information full link tracking method and device, computer equipment and storage medium
CN109189798B (en) Spark-based data synchronous updating method
CN115712623B (en) Batch data fault-tolerant collection method based on captured metadata change
CN107577465B (en) Method for correcting webpage code
FI128995B (en) Object grouping in computer aided modeling
KR20100002259A (en) A method and system for populating a software catalogue with related product information
US20130086133A1 (en) Method and apparatus for file revision tracking
JP2012003406A (en) Failure cause determination rule verification device and program therefor
CN103077255A (en) Identification method and system for 3D (three-dimensional) model of nuclear power station
CN112698622B (en) Automatic control method, device and machine readable storage medium
Garcia et al. A framework for obtaining the ground-truth in architectural recovery
CN107066594A (en) A kind of synchronous method of metadata
CN102915233B (en) The baseline version management method of software program and system

Legal Events

Date Code Title Description
PB01 Publication
SE01 Entry into force of request for substantive examination
GR01 Patent grant
TR01 Transfer of patent right

Effective date of registration: 20190807

Address after: 518000 Nanshan District science and technology zone, Guangdong, Zhejiang Province, science and technology in the Tencent Building on the 1st floor of the 35 layer

Co-patentee after: Tencent cloud computing (Beijing) limited liability company

Patentee after: Tencent Technology (Shenzhen) Co., Ltd.

Address before: Shenzhen Futian District City, Guangdong province 518044 Zhenxing Road, SEG Science Park 2 East Room 403

Patentee before: Tencent Technology (Shenzhen) Co., Ltd.