CN112947991A - Method and device for acquiring version difference code file, computer equipment and medium - Google Patents

Method and device for acquiring version difference code file, computer equipment and medium Download PDF

Info

Publication number
CN112947991A
CN112947991A CN202110341366.5A CN202110341366A CN112947991A CN 112947991 A CN112947991 A CN 112947991A CN 202110341366 A CN202110341366 A CN 202110341366A CN 112947991 A CN112947991 A CN 112947991A
Authority
CN
China
Prior art keywords
version
current
code file
file
version number
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.)
Pending
Application number
CN202110341366.5A
Other languages
Chinese (zh)
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.)
CCB Finetech Co Ltd
Original Assignee
CCB Finetech Co Ltd
Priority date (The priority date 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 date listed.)
Filing date
Publication date
Application filed by CCB Finetech Co Ltd filed Critical CCB Finetech Co Ltd
Priority to CN202110341366.5A priority Critical patent/CN112947991A/en
Publication of CN112947991A publication Critical patent/CN112947991A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/70Software maintenance or management
    • G06F8/71Version control; Configuration management
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/70Software maintenance or management
    • G06F8/72Code refactoring

Landscapes

  • Engineering & Computer Science (AREA)
  • Software Systems (AREA)
  • General Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Computer Security & Cryptography (AREA)
  • Stored Programmes (AREA)

Abstract

The invention relates to the field of automatic program design and discloses a method and a device for acquiring a version difference code file, computer equipment and a medium. The method comprises the following steps: acquiring a comparison file corresponding to a current update version of a target system, and positioning a current version code file set and a historical version number of a previous version according to the comparison file; identifying the current version code file set to acquire a current version number corresponding to the current update version; and acquiring at least one version difference code file from the current version code file set according to the historical version number of the previous version and the current version number. By using the technical scheme of the invention, the difference file during the updating of the system version can be automatically acquired, so that the problem file can be quickly positioned, and the response time of production problems is reduced.

Description

Method and device for acquiring version difference code file, computer equipment and medium
Technical Field
The embodiment of the invention relates to the technical field of automatic program design and system test, in particular to a method and a device for acquiring a version difference code file, computer equipment and a medium.
Background
Under the condition that the system is various and different versions need to be iterated frequently, when the abnormal response time of the new online system version is too long, the problem file needs to be positioned quickly.
Because the system components are complex and the data of each version of the system is more, the mode of locating the problem file by searching the error log cannot meet the requirements of a large amount of online and frequent version updating of the system. However, in a manner of obtaining a difference file between two online system versions and searching a problem file in the difference file, a user is usually required to download file codes of the two online system versions, record version numbers of the two online system versions, that is, Identity identifiers (identifiers), and obtain the difference file. The mode of manually searching for the difference files is high in cost and low in efficiency, and the problem files cannot be found quickly, so that the production problem is solved quickly.
Disclosure of Invention
The embodiment of the invention provides a method and a device for acquiring a version difference code file, computer equipment and a medium, which are used for automatically acquiring a difference file during system version updating, so that a problem file can be quickly positioned, and the response time of a production problem is shortened.
In a first aspect, an embodiment of the present invention provides a method for acquiring a version difference code file, where the method includes:
acquiring a comparison file corresponding to a current update version of a target system, and positioning a current version code file set and a historical version number of a previous version according to the comparison file;
identifying the current version code file set to acquire a current version number corresponding to the current update version;
and acquiring at least one version difference code file from the current version code file set according to the historical version number of the previous version and the current version number.
In a second aspect, an embodiment of the present invention further provides an apparatus for acquiring a version difference code file, where the apparatus includes:
the historical version number acquisition module is used for acquiring a comparison file corresponding to the current update version of the target system, and positioning a current version code file set and the historical version number of the previous version according to the comparison file;
a historical version number acquisition module, configured to identify the current version code file set and acquire a historical version number corresponding to the current update version;
and the version difference code file acquisition module is used for acquiring at least one version difference code file in the current version code file set according to the historical version number of the previous version and the current version number.
In a third aspect, an embodiment of the present invention further provides a computer device, including a memory, a processor, and a computer program stored on the memory and executable on the processor, where the processor implements the method for obtaining the version difference code file according to any one of the embodiments of the present invention when executing the program.
In a fourth aspect, the present invention further provides a storage medium containing computer-executable instructions, which when executed by a computer processor, are used to execute the method for acquiring a version difference code file according to any one of the embodiments of the present invention.
The embodiment of the invention locates the current version code file set and the historical version number according to the comparison file corresponding to the current update version, obtains the current version number in the current version code file set, and locates the version difference code file in the current version code file set according to the historical version number and the current version number. The problem of among the prior art the mode of manual work seeking difference file, with high costs, inefficiency, can't satisfy the system in a large number of on-line, the frequent demand of renewal of version is solved, difference file when having realized automatic acquisition system version renewal to can fix a position the problem file fast, reduced production problem response time.
Drawings
Fig. 1 is a flowchart of a method for acquiring a version difference code file according to a first embodiment of the present invention;
FIG. 2a is a flowchart of a method for obtaining a version difference code file according to a second embodiment of the present invention;
FIG. 2b is a flowchart of a method for obtaining a version difference code file according to a first specific application scenario of the present invention;
fig. 3 is a schematic structural diagram of an apparatus for acquiring a version difference code file according to a third embodiment of the present invention;
fig. 4 is a schematic structural diagram of a computer device in the fourth embodiment of the present invention.
Detailed Description
The present invention will be described in further detail with reference to the accompanying drawings and examples. It is to be understood that the specific embodiments described herein are merely illustrative of the invention and are not limiting of the invention. It should be further noted that, for the convenience of description, only some of the structures related to the present invention are shown in the drawings, not all of the structures.
Example one
Fig. 1 is a flowchart of a method for acquiring a version difference code file according to an embodiment of the present invention, where the embodiment is applicable to a situation where a system version with abnormal response time is located in a difference code file under the condition that a large number of systems are online and the versions are frequently updated, so as to search a problem file in the difference code file, and the method may be executed by an apparatus for acquiring a version difference code file, where the apparatus may be implemented by software and/or hardware, and is generally integrated in a computer device.
As shown in fig. 1, the technical solution of the embodiment of the present invention specifically includes the following steps:
s110, a comparison file corresponding to the current update version of the target system is obtained, and a current version code file set and a historical version number of a previous version are located according to the comparison file.
The target system is a system which frequently updates versions, and the current update version is a new version of the target system which is online at this time. The comparison file is also a gitdiff file, the gitdiff file is used for recording the historical version number of the previous version of the current update version and the version number of the previous version, and the gitdiff file also records the gitlab library address of the code file set corresponding to the current update version of the target system.
And the current version code file set is stored at the gitlab library address recorded by the gitdiff file, and all the codes corresponding to the current update version of the target system are stored in each file in the current version code file set.
The version number, that is, the commit id (Identity document), is the unique identifier of the version of the target system, the current version number is the version number corresponding to the current update version, and the history version number is the version number corresponding to the previous version of the current update version.
In the embodiment of the invention, the comparison file can be obtained, and the current version code file set is positioned through the comparison file. Meanwhile, the comparison file records the version numbers of the two versions when the versions are compared last time, namely records the historical version number of the previous version of the current update version and the version number of the previous version, and the historical version number of the previous version can be obtained according to the comparison file.
And S120, identifying the current version code file set, and acquiring a current version number corresponding to the current update version.
All codes corresponding to the current update version are stored in each file of the current version code file set, so that the current version number corresponding to the current update version can be identified and obtained in the current version code file set.
For example, a field corresponding to the version number may be searched in the current version code file set, so as to obtain the current version number, and the embodiment does not limit the specific manner of identifying and obtaining the current version number in the current version code file set.
S130, acquiring at least one version difference code file from the current version code file set according to the historical version number of the previous version and the current version number.
The version difference code file is a file between two different versions of the target system, and the code change exists in the file, and can comprise new codes, deleted codes and modified codes.
After the historical version number and the current version number are determined, the fact that the version codes of the current update version and the previous version need to be compared is determined, and a file corresponding to the code change part is obtained and used as a version difference code file.
For example, after determining the historical version number and the current version number, the historical comparison file corresponding to the historical version number may be obtained, the historical version code file set may be located according to the historical comparison file, the historical version code file set may be compared with the current version code file set to determine the code modification portion therein, and the version difference code file may be determined. However, the embodiment does not limit the specific implementation manner of obtaining the version difference code file according to the historical version number and the current version number.
According to the technical scheme of the embodiment, the current version number is obtained from the current version code file set by positioning the current version code file set and the historical version number according to the comparison file corresponding to the current update version, and the version difference code file is positioned in the current version code file set according to the historical version number and the current version number. The problem of among the prior art the mode of manual work seeking difference file, with high costs, inefficiency, can't satisfy the system in a large number of on-line, the frequent demand of renewal of version is solved, difference file when having realized automatic acquisition system version renewal to can fix a position the problem file fast, reduced production problem response time.
Example two
Fig. 2a is a flowchart of a method for acquiring a version difference code file according to a second embodiment of the present invention, where the embodiment of the present invention further embodies a process of locating a current version code file set, a process of acquiring a current version number, and a process of acquiring a version difference code file, and adds a step of acquiring a modifier of each version difference code file, and a step of deleting the current version code file set on the basis of the above embodiment.
Correspondingly, as shown in fig. 2a, the technical solution of the embodiment of the present invention specifically includes the following steps:
s210, judging whether a preset timing condition is met, if so, executing S220, otherwise, returning to execute S210.
In the embodiment of the invention, the timing condition can be set, and the version difference code file can be automatically acquired when the timing condition is met, so that the problem file can be quickly positioned, the response time of the production problem is shortened, and the solution efficiency of the production problem is improved.
Specifically, the timing condition may be that the version difference code file is acquired at preset time intervals. The timing condition may also be that the current update version is detected to be online, and the version difference code file is automatically acquired, which is not limited in this embodiment.
And S220, acquiring a comparison file corresponding to the current update version of the target system.
And S230, acquiring the current data warehouse address corresponding to the current update version according to the comparison file.
The current data warehouse address, namely the corresponding gitlab library address of the current update version, wherein gitlab is a Git warehouse management tool based on the network, Git is used as a code management tool, and Git is a version control tool.
And S240, downloading and storing the current version code file set matched with the current data warehouse address.
And automatically downloading the current version code file set corresponding to the current update version through the current data warehouse address, and storing the current version code file set.
The purpose of downloading and storing the current version code file set is to facilitate obtaining the current version number of the current update version and to facilitate finding the version difference code file in the current version code file set.
And S250, positioning the historical version number of the previous version according to the comparison file.
The two version numbers of the last version difference comparison are stored in the comparison file, when the first version of the target system is on line, the initial value of the version number in the comparison file can be determined by a user, and after the second version of the target system is on line, the version number in the comparison file can be automatically updated.
And S260, identifying a version number field matched with the current update version in the current version code file set through a git log command, and acquiring the current version number.
The git log command is used to identify the current version number of the current updated version in the current version code file set. The git log command has the function of displaying version history information, and the current version number can be obtained by searching in the current version code file set through the git log command.
And S270, updating the version number recorded in the comparison file according to the historical version number and the current version number of the previous version.
After the current version number and the historical version number are obtained, the comparison file can be updated, that is, the historical version number of the previous version and the current version number of the current update version are recorded in the comparison file.
The updating comparison file has the function of facilitating the version difference comparison between the current updating version and the next version when the next version of the current updating version is online.
S280, comparing a historical version code file set matched with the historical version number of the previous version with a current version code file set matched with the current version number through a gitdiff command to obtain at least one version difference code file.
For example, when the historical version number is commit id1 and the current version number is commit id2, a version difference code file corresponding to a change code between the previous version and the current update version can be obtained through a git diffcommit id1 commit id2, which is a name status command.
After at least one version difference code file is obtained, a version difference code file list is generated and provided for a user, so that the user can confirm the version difference code files in sequence, and therefore the problem file is located quickly.
S290, acquiring the modification history of the difference code files of each version in the current version code file set through a git log command.
After the version difference code file list is obtained, the modification history of each file can be obtained according to the file name of each version difference code file. Illustratively, the modification history of each version of the difference code file can be obtained through git log filename command.
S2100, acquiring a modifier of each version of difference code file according to the modification history of each version of difference code file.
After the modification history of each version of the difference code file is obtained, the last modifier of each version of the difference code file can be determined, so that the modifiers are informed to check the version difference code file in time, the problem file is determined, and the problem file is processed in time, so that the response time of production problems is shortened, and the response speed of the production problems is improved.
And S2110, deleting the stored current version code file set so as to release the memory space occupied by the current version code file set. Return to execution S210.
In the embodiment of the invention, after the version difference code file and the corresponding modifier are obtained by positioning, the stored current version code file set can be deleted, so that the storage space is saved.
According to the technical scheme of the embodiment, a current version code file set and a historical version number are located according to a comparison file corresponding to a current update version, a current version number is obtained in the current version code file set through a git log command, version difference code files are located in the current version code file set through a git diff command according to the historical version number and the current version number, and modifiers of the version difference code files are obtained through the git log command. The problem of among the prior art the mode of manual work seeking difference file, with high costs, inefficiency, can't satisfy the system in a large number of on-line, the frequent demand of renewal of version is solved, difference file when having realized automatic acquisition system version renewal to can fix a position the problem file fast, reduced production problem response time.
Specific application scenario 1
Fig. 2b is a flowchart of a method for acquiring a version difference code file according to a first specific application scenario of the present invention, and as shown in fig. 2b, the method includes:
and S1, acquiring a gitdiff file, and acquiring a current version code file set according to the gitdiff file.
The gitdiff file is also the comparison file in the above embodiment, and the gitdiff file stores the gitlab library address of the current update system, that is, the current data warehouse address in the above embodiment. The gitdiff file also stores two commit ids during the last version alignment, which are also the version numbers in the above embodiments.
And S2, acquiring the historical version number of the previous version of the current update version according to the gitdiff file.
And acquiring two commit ids in the last version comparison in the gitdiff file, and taking the second commit id as the historical version number.
And S3, acquiring the current version number in the current version code file set through a git log command.
And S4, updating the gitdiff file according to the historical version number and the current version number.
And S5, acquiring a version difference code file list according to the historical version number and the current version number through a git diff command.
And S6, acquiring the modifier of the difference code file of each version through a git log command.
And S7, deleting the current version code file set.
According to the technical scheme of the embodiment, a current version code file set and a historical version number are located according to a comparison file corresponding to a current update version, a current version number is obtained in the current version code file set through a git log command, version difference code files are located in the current version code file set through a git diff command according to the historical version number and the current version number, and modifiers of the version difference code files are obtained through the git log command. The problem of among the prior art the mode of manual work seeking difference file, with high costs, inefficiency, can't satisfy the system in a large number of on-line, the frequent demand of renewal of version is solved, difference file when having realized automatic acquisition system version renewal to can fix a position the problem file fast, reduced production problem response time.
EXAMPLE III
Fig. 3 is a schematic structural diagram of an apparatus for acquiring a version difference code file according to a third embodiment of the present invention, where the apparatus includes: a history version number obtaining module 310, a history version number obtaining module 320, and a version difference code file obtaining module 330. Wherein:
a historical version number obtaining module 310, configured to obtain a comparison file corresponding to a current update version of a target system, and locate a current version code file set and a historical version number of a previous version according to the comparison file;
a historical version number obtaining module 320, configured to identify the current version code file set, and obtain a historical version number corresponding to the current update version;
a version difference code file obtaining module 330, configured to obtain at least one version difference code file in the current version code file set according to the historical version number of the previous version and the current version number.
According to the technical scheme of the embodiment, the current version number is obtained from the current version code file set by positioning the current version code file set and the historical version number according to the comparison file corresponding to the current update version, and the version difference code file is positioned in the current version code file set according to the historical version number and the current version number. The problem of among the prior art the mode of manual work seeking difference file, with high costs, inefficiency, can't satisfy the system in a large number of on-line, the frequent demand of renewal of version is solved, difference file when having realized automatic acquisition system version renewal to can fix a position the problem file fast, reduced production problem response time.
On the basis of the foregoing embodiment, the historical version number obtaining module 310 includes:
the current data warehouse address acquisition unit is used for acquiring a current data warehouse address corresponding to the current update version according to the comparison file;
and the current version code file set acquisition unit is used for downloading and storing the current version code file set matched with the current data warehouse address.
On the basis of the above embodiment, the comparison file is used for recording the historical version number of the previous version and the version number of the previous version;
the device, still include:
and the comparison file updating module is used for updating the version number recorded in the comparison file according to the historical version number and the current version number of the previous version.
On the basis of the foregoing embodiment, the historical version number obtaining module 310 is configured to:
and identifying a version number field matched with the current update version in the current version code file set through a git log command to obtain the current version number.
On the basis of the foregoing embodiment, the version difference code file obtaining module 330 is configured to:
and comparing the historical version code file set matched with the historical version number of the previous version with the current version code file set matched with the current version number through a gitdiff command to obtain at least one version difference code file.
On the basis of the above embodiment, the apparatus further includes:
the modification history acquisition module is used for acquiring the modification history of the difference code files of each version in the current version code file set through a git log command;
and the modifier obtaining module is used for obtaining the modifiers of the different code files of the versions according to the modification history of the different code files of the versions.
On the basis of the above embodiment, the apparatus further includes:
and the current version code file set deleting module is used for deleting the stored current version code file set so as to release the memory space occupied by the current version code file set.
On the basis of the foregoing embodiment, the historical version number obtaining module 310 includes:
and the preset timing condition judging unit is used for acquiring a comparison file corresponding to the current update version of the target system if the preset timing condition is determined to be met.
The device for acquiring the version difference code file provided by the embodiment of the invention can execute the method for acquiring the version difference code file provided by any embodiment of the invention, and has corresponding functional modules and beneficial effects of the execution method.
Example four
Fig. 4 is a schematic structural diagram of a computer apparatus according to a fourth embodiment of the present invention, as shown in fig. 4, the computer apparatus includes a processor 70, a memory 71, an input device 72, and an output device 73; the number of processors 70 in the computer device may be one or more, and one processor 70 is taken as an example in fig. 4; the processor 70, the memory 71, the input device 72 and the output device 73 in the computer apparatus may be connected by a bus or other means, and the connection by the bus is exemplified in fig. 4.
The memory 71 is used as a computer-readable storage medium for storing software programs, computer-executable programs, and modules, such as modules corresponding to the version difference code file acquiring method in the embodiment of the present invention (for example, a history version number acquiring module 310, a history version number acquiring module 320, and a version difference code file acquiring module 330 in the version difference code file acquiring apparatus). The processor 70 executes various functional applications and data processing of the computer device by running software programs, instructions and modules stored in the memory 71, that is, implements the above-described version difference code file acquisition method. The method comprises the following steps:
acquiring a comparison file corresponding to a current update version of a target system, and positioning a current version code file set and a historical version number of a previous version according to the comparison file;
identifying the current version code file set to acquire a current version number corresponding to the current update version;
and acquiring at least one version difference code file from the current version code file set according to the historical version number of the previous version and the current version number.
The memory 71 may mainly include a storage program area and a storage data area, wherein the storage program area may store an operating system, an application program required for at least one function; the storage data area may store data created according to the use of the terminal, and the like. Further, the memory 71 may include high speed random access memory, and may also include non-volatile memory, such as at least one magnetic disk storage device, flash memory device, or other non-volatile solid state storage device. In some examples, the memory 71 may further include memory located remotely from the processor 70, which may be connected to a computer device over a network. Examples of such networks include, but are not limited to, the internet, intranets, local area networks, mobile communication networks, and combinations thereof.
The input device 72 may be used to receive input numeric or character information and generate key signal inputs relating to user settings and function controls of the computer apparatus. The output device 73 may include a display device such as a display screen.
EXAMPLE five
An embodiment of the present invention further provides a storage medium containing computer-executable instructions, where the computer-executable instructions are executed by a computer processor to perform a method for acquiring a version difference code file, where the method includes:
acquiring a comparison file corresponding to a current update version of a target system, and positioning a current version code file set and a historical version number of a previous version according to the comparison file;
identifying the current version code file set to acquire a current version number corresponding to the current update version;
and acquiring at least one version difference code file from the current version code file set according to the historical version number of the previous version and the current version number.
Of course, the storage medium provided by the embodiment of the present invention contains computer-executable instructions, and the computer-executable instructions are not limited to the method operations described above, and may also perform related operations in the method for acquiring a version difference code file provided by any embodiment of the present invention.
From the above description of the embodiments, it is obvious for those skilled in the art that the present invention can be implemented by software and necessary general hardware, and certainly, can also be implemented by hardware, but the former is a better embodiment in many cases. Based on such understanding, the technical solutions of the present invention may be embodied in the form of a software product, which can be stored in a computer-readable storage medium, such as a floppy disk, a Read-Only Memory (ROM), a Random Access Memory (RAM), a FLASH Memory (FLASH), a hard disk or an optical disk of a computer, and includes several instructions for enabling a computer device (which may be a personal computer, a server, or a network device) to execute the methods according to the embodiments of the present invention.
It should be noted that, in the embodiment of the apparatus for acquiring a version difference code file, each unit and each module included in the embodiment are only divided according to functional logic, but are not limited to the above division, as long as corresponding functions can be implemented; in addition, specific names of the functional units are only for convenience of distinguishing from each other, and are not used for limiting the protection scope of the present invention.
It is to be noted that the foregoing is only illustrative of the preferred embodiments of the present invention and the technical principles employed. It will be understood by those skilled in the art that the present invention is not limited to the particular embodiments described herein, but is capable of various obvious changes, rearrangements and substitutions as will now become apparent to those skilled in the art without departing from the scope of the invention. Therefore, although the present invention has been described in greater detail by the above embodiments, the present invention is not limited to the above embodiments, and may include other equivalent embodiments without departing from the spirit of the present invention, and the scope of the present invention is determined by the scope of the appended claims.

Claims (15)

1. A method for acquiring a version difference code file is characterized by comprising the following steps:
acquiring a comparison file corresponding to a current update version of a target system, and positioning a current version code file set and a historical version number of a previous version according to the comparison file;
identifying the current version code file set to acquire a current version number corresponding to the current update version;
and acquiring at least one version difference code file from the current version code file set according to the historical version number of the previous version and the current version number.
2. The method of claim 1, wherein locating a set of current version code files from the comparison file comprises:
acquiring a current data warehouse address corresponding to the current update version according to the comparison file;
and downloading and storing the current version code file set matched with the current data warehouse address.
3. The method of claim 1, wherein the comparison file is used to record a historical version number of a previous version and a version number of a previous version of the previous version;
after obtaining the current version number corresponding to the current updated version, the method further includes:
and updating the version number recorded in the comparison file according to the historical version number and the current version number of the previous version.
4. The method of claim 1, wherein identifying the set of current version code files and obtaining a current version number corresponding to the current updated version comprises:
and identifying a version number field matched with the current update version in the current version code file set through a git log command to obtain the current version number.
5. The method of claim 4, wherein obtaining at least one version difference code file in the current version code file set according to the historical version number of the previous version and the current version number comprises:
and comparing the historical version code file set matched with the historical version number of the previous version with the current version code file set matched with the current version number through a gitdiff command to obtain at least one version difference code file.
6. The method of claim 5, after obtaining at least one version difference code file from the current set of version code files, further comprising:
acquiring the modification history of each version difference code file in the current version code file set through a git log command;
and acquiring a modifier of each version of the difference code file according to the modification history of each version of the difference code file.
7. The method of claim 2, after obtaining at least one version difference code file from the current set of version code files, further comprising:
and deleting the stored current version code file set so as to release the memory space occupied by the current version code file set.
8. The method of any one of claims 1-7, wherein obtaining the comparison file corresponding to the current updated version of the target system comprises:
and if the comparison file meets the preset timing condition, acquiring a comparison file corresponding to the current update version of the target system.
9. An apparatus for acquiring a version difference code file, comprising:
the historical version number acquisition module is used for acquiring a comparison file corresponding to the current update version of the target system, and positioning a current version code file set and the historical version number of the previous version according to the comparison file;
a historical version number acquisition module, configured to identify the current version code file set and acquire a historical version number corresponding to the current update version;
and the version difference code file acquisition module is used for acquiring at least one version difference code file in the current version code file set according to the historical version number of the previous version and the current version number.
10. The apparatus of claim 9, wherein the historical version number obtaining module comprises:
the current data warehouse address acquisition unit is used for acquiring a current data warehouse address corresponding to the current update version according to the comparison file;
and the current version code file set acquisition unit is used for downloading and storing the current version code file set matched with the current data warehouse address.
11. The apparatus of claim 9, wherein the historical version number obtaining module is configured to:
and identifying a version number field matched with the current update version in the current version code file set through a git log command to obtain the current version number.
12. The apparatus of claim 11, wherein the version difference code file obtaining module is configured to:
and comparing the historical version code file set matched with the historical version number of the previous version with the current version code file set matched with the current version number through a gitdiff command to obtain at least one version difference code file.
13. The apparatus of claim 12, further comprising:
the modification history acquisition module is used for acquiring the modification history of the difference code files of each version in the current version code file set through a git log command;
and the modifier obtaining module is used for obtaining the modifiers of the different code files of the versions according to the modification history of the different code files of the versions.
14. A computer device comprising a memory, a processor and a computer program stored on the memory and executable on the processor, characterized in that the processor implements the method of acquiring a version difference code file according to any one of claims 1 to 8 when executing the program.
15. A storage medium containing computer-executable instructions for performing the method of retrieving a version difference code file according to any one of claims 1 to 8 when executed by a computer processor.
CN202110341366.5A 2021-03-30 2021-03-30 Method and device for acquiring version difference code file, computer equipment and medium Pending CN112947991A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202110341366.5A CN112947991A (en) 2021-03-30 2021-03-30 Method and device for acquiring version difference code file, computer equipment and medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202110341366.5A CN112947991A (en) 2021-03-30 2021-03-30 Method and device for acquiring version difference code file, computer equipment and medium

Publications (1)

Publication Number Publication Date
CN112947991A true CN112947991A (en) 2021-06-11

Family

ID=76230686

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202110341366.5A Pending CN112947991A (en) 2021-03-30 2021-03-30 Method and device for acquiring version difference code file, computer equipment and medium

Country Status (1)

Country Link
CN (1) CN112947991A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN117852521A (en) * 2024-03-07 2024-04-09 成都中科合迅科技有限公司 Data calculation result file comparison method, system and comparison configuration system

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107688541A (en) * 2017-09-15 2018-02-13 广州酷狗计算机科技有限公司 File reviewing method, device, server and computer-readable recording medium
CN110221968A (en) * 2019-05-20 2019-09-10 平安普惠企业管理有限公司 Method for testing software and Related product
CN110895472A (en) * 2018-09-13 2020-03-20 北京京东尚科信息技术有限公司 Method and device for identifying service change

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107688541A (en) * 2017-09-15 2018-02-13 广州酷狗计算机科技有限公司 File reviewing method, device, server and computer-readable recording medium
CN110895472A (en) * 2018-09-13 2020-03-20 北京京东尚科信息技术有限公司 Method and device for identifying service change
CN110221968A (en) * 2019-05-20 2019-09-10 平安普惠企业管理有限公司 Method for testing software and Related product

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN117852521A (en) * 2024-03-07 2024-04-09 成都中科合迅科技有限公司 Data calculation result file comparison method, system and comparison configuration system
CN117852521B (en) * 2024-03-07 2024-06-07 成都中科合迅科技有限公司 Data calculation result file comparison method, system and comparison configuration system

Similar Documents

Publication Publication Date Title
US10887171B2 (en) Routing configuration method of view files, storage medium, terminal device and apparatus
CN107368513B (en) Method and device for updating client database
CN110968478A (en) Log collection method, server and computer storage medium
CN110297808B (en) File modification method and device for container application, computer equipment and storage medium
CN106843947B (en) Method and device for processing code defects
CN113760306A (en) Method and device for installing software, electronic equipment and storage medium
CN109271194B (en) Branch access method and device based on distributed version control system
CN112947991A (en) Method and device for acquiring version difference code file, computer equipment and medium
CN111047434A (en) Operation record generation method and device, computer equipment and storage medium
CN112395307A (en) Statement execution method, statement execution device, server and storage medium
CN110780944B (en) Method and device for starting application permission and machine-readable storage medium
CN110765125B (en) Method and device for storing data
CN114611039B (en) Analysis method and device of asynchronous loading rule, storage medium and electronic equipment
CN110955562A (en) Data recovery method, system, equipment and readable storage medium
CN113535206B (en) Multi-version code upgrading method and system
CN114610516A (en) Application program repairing method and device, computer equipment and storage medium
CN112100479A (en) Application access method and device, electronic equipment and storage medium
CN110059071B (en) Data comparison monitoring method, system, equipment and medium based on storage process
CN108804148B (en) Method and device for establishing binding relationship between equipment and drive
CN109522014B (en) Algorithm processing method based on new product development, electronic device and readable storage medium
US10866993B2 (en) Managing online help information in a data center
CN112650713A (en) File system operation method, device, equipment and storage medium
CN112416383A (en) Hot updating method and device for golang program and computer equipment
CN117407369B (en) Operation log recording method and device and electronic equipment
CN116339717B (en) Data execution method, device, equipment and medium

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
RJ01 Rejection of invention patent application after publication
RJ01 Rejection of invention patent application after publication

Application publication date: 20210611