CN107463371B - Code management and control method and system - Google Patents

Code management and control method and system Download PDF

Info

Publication number
CN107463371B
CN107463371B CN201710528477.0A CN201710528477A CN107463371B CN 107463371 B CN107463371 B CN 107463371B CN 201710528477 A CN201710528477 A CN 201710528477A CN 107463371 B CN107463371 B CN 107463371B
Authority
CN
China
Prior art keywords
code
auditing
module
version management
server
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
CN201710528477.0A
Other languages
Chinese (zh)
Other versions
CN107463371A (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.)
Guangzhou Shiyuan Electronics Thecnology Co Ltd
Original Assignee
Guangzhou Shiyuan Electronics Thecnology 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 Guangzhou Shiyuan Electronics Thecnology Co Ltd filed Critical Guangzhou Shiyuan Electronics Thecnology Co Ltd
Priority to CN201710528477.0A priority Critical patent/CN107463371B/en
Publication of CN107463371A publication Critical patent/CN107463371A/en
Application granted granted Critical
Publication of CN107463371B publication Critical patent/CN107463371B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

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

Landscapes

  • Engineering & Computer Science (AREA)
  • Software Systems (AREA)
  • General Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Computer Security & Cryptography (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Information Transfer Between Computers (AREA)

Abstract

A code management and control method, comprising: the code auditing server audits a plurality of source codes respectively filed by a plurality of version management tools in real time; after receiving a current code submission application, the version management tool inquires the auditing condition of the source code corresponding to the current code from the code auditing server and judges whether the auditing condition passes; and if so, the version management tool receives and stores the current code. In the invention, the code auditing server simultaneously supports the code management and control of a plurality of version management tools, and meets the response requirement of the order business for cooperative processing. In addition, after the version management tool receives and stores the current code, the code auditing server audits the current code, namely, the requirements of first entering a warehouse and then auditing are met.

Description

Code management and control method and system
Technical Field
The invention relates to the technical field of code management and control, in particular to a code management and control method and system.
Background
The version management tool mainly used by the television software has multiple version management tools such as SVN (singular value decomposition), GIT (family information technology) and the like, and in order to ensure that each version software program can be traced back to the corresponding source code, an engineer is required to firstly submit the corresponding source code to the version management tool for archiving when modifying an order program.
At present, the television software is generally used for an engineer to perform order support on a client site, and an order program is modified on the site, and the operation process of the television software is as follows: the engineer A just provided a version of software at the customer site of C1S 1 for customer test validation; after the engineer provides the software and leaves the customer of C1, the customer of C1 puts forward a new request R1 for urgent modification of the software; at this time, if the scene of the engineer A cannot modify the code, other colleagues B are requested to assist; the engineer B downloads the source code corresponding to the software S1, modifies the new requirements R1 of the client, submits the source code to a version management tool for archiving, and sends the updated software S2 to the client.
In the operation process, before submitting the source code to the version management tool for archiving, the source code can be submitted to a code warehouse in the version management tool for archiving after being checked and passed by the code checking tool, namely, the source code is required to be checked first and then put into the warehouse. In addition, the code auditing tool in the prior art can only support one version management tool in SVN or GIT at the same time, so that the auditing rule is single, and the response requirement of the order service cooperatively processed by multiple persons in different places is difficult to meet.
Disclosure of Invention
Based on this, the invention aims to provide a code management and control method and system.
A code management and control method, comprising:
the code auditing server audits a plurality of source codes respectively filed by a plurality of version management tools in real time;
after receiving a current code submission application, the version management tool inquires the auditing condition of the source code corresponding to the current code from the code auditing server and judges whether the auditing condition passes;
and if so, the version management tool receives and stores the current code.
In the code management and control method, after the version management tool receives a current code submission application, it queries an audit condition of a source code corresponding to the current code from the code audit server, and determines whether the audit condition passes, the code management and control method further includes:
if not, the version management tool refuses to receive the current code and sends a code checking acceleration request to the code checking server;
and the code auditing server accelerates the completion of auditing the source code.
In the above code management and control method, after the step of receiving and storing the current code by the version management tool, the code management and control method further includes:
the version management tool stores the current code in a storage position of the source code and covers the source code to form new source code;
and the code auditing server audits the new source code.
In the above code management and control method, the code management and control method further includes:
the code auditing server detects whether data modification information exists in each version management tool in real time;
and if so, the code auditing server acquires the data modification information and archives the data modification information.
In the code management and control method, the step of detecting, by the code audit server, the data modification information in each version management tool in real time specifically includes:
the code auditing server at least allocates one thread to each version management tool, and detects data modification information in each version management tool through the thread.
A code management and control system comprises a code auditing server and a plurality of version management tools, wherein the code auditing server comprises an auditing module, the version management tools comprise a query module and a receiving and storing module,
the auditing module is used for auditing a plurality of source codes respectively filed by a plurality of version management tools in real time;
the query module is used for querying the auditing condition of the source code corresponding to the current code from the code auditing server after receiving the current code submission application and judging whether the auditing condition passes;
and the receiving and storing module is used for receiving and storing the current code when the checking condition is judged to pass by the inquiring module.
In the code management and control system, the version management tool further includes a sending module, the auditing module includes a first auditing sub-module, wherein,
the sending module is used for sending a code auditing acceleration request to the code auditing server when the query module judges that the auditing condition is not passed and the version management tool refuses to receive the current code;
the first auditing submodule is used for accelerating the completion of auditing the source code.
In the code management and control system, the receiving and storing module includes a storing sub-module, the auditing module further includes a second auditing sub-module, wherein,
the storage submodule is used for storing the current code in the storage position of the source code and covering the source code to form new source code;
and the second examination and check sub-module is used for examining and checking the new source code.
In the code management and control system, the code auditing server further comprises a detection module and an acquisition module, wherein,
the detection module is used for detecting whether data modification information exists in each version management tool in real time;
the acquisition module is used for acquiring and archiving the data modification information when the detection module detects that the data modification information exists in each version management tool.
In the code management and control system, the code auditing server further includes an allocation module, wherein,
the distribution module is used for distributing at least one thread to each version management tool, and the detection module detects the data modification information in each version management tool through the thread.
Compared with the prior art, in the code management and control method and system, the code auditing server simultaneously supports code management and control of a plurality of version management tools, and response requirements of cooperative order processing business are met. In addition, after the version management tool receives and stores the current code, the code auditing server audits the current code, namely, the requirements of first entering a warehouse and then auditing are met.
Drawings
Fig. 1 is a flowchart of a code management method according to a first embodiment of the present invention;
FIG. 2 is a flowchart of a code management method according to a second embodiment of the present invention;
FIG. 3 is a flowchart of a code management method according to a third embodiment of the present invention;
FIG. 4 is a flowchart of a code management method according to a fourth embodiment of the present invention;
fig. 5 is a block diagram of a code management system according to the first, second, third and fourth embodiments of the present invention.
Description of the main element symbols:
code management and control system 100 Code auditing server 11
Auditing module 111 First audit submodule 1111
Second trial nucleus module 1112 Detection module 112
Acquisition module 113 Dispensing module 114
Version tubeCleaning tool 12 Query module 121
Receiving storage module 122 Storage submodule 1221
Transmission module 123
The following detailed description will further illustrate the invention in conjunction with the above-described figures.
Detailed Description
To facilitate an understanding of the invention, the invention will now be described more fully with reference to the accompanying drawings. Several embodiments of the invention are presented in the drawings. This invention may, however, be embodied in many different forms and should not be construed as limited to the embodiments set forth herein. Rather, these embodiments are provided so that this disclosure will be thorough and complete.
It will be understood that when an element is referred to as being "secured to" another element, it can be directly on the other element or intervening elements may also be present. When an element is referred to as being "connected" to another element, it can be directly connected to the other element or intervening elements may also be present. The terms "vertical," "horizontal," "left," "right," and the like as used herein are for illustrative purposes only.
Unless defined otherwise, all technical and scientific terms used herein have the same meaning as commonly understood by one of ordinary skill in the art to which this invention belongs. The terminology used in the description of the invention herein is for the purpose of describing particular embodiments only and is not intended to be limiting of the invention. As used herein, the term "and/or" includes any and all combinations of one or more of the associated listed items.
Referring to fig. 1, a code management and control method according to a first embodiment of the present invention is provided, where the code management and control method includes:
step S101, a code auditing server audits a plurality of source codes respectively archived by a plurality of version management tools in real time;
step S102, after receiving a current code submission application, the version management tool inquires the auditing condition of the source code corresponding to the current code from the code auditing server and judges whether the auditing condition passes;
step S103, if yes, the version management tool receives and stores the current code.
Specifically, in step S101, the version management tool is at least one of an SVN, a GIT, or other remote data server. Each version management tool can allocate a corresponding storage warehouse to store respective source codes, the auditing condition of the code auditing server for auditing the source codes comprises a completion condition and a completion quality, the completion condition refers to whether the source codes need to be audited, the completion quality refers to whether problems are found in the auditing process, and if the problems are found in the auditing process, whether the problems are repaired is judged.
Specifically, in this embodiment, the process of the code auditing and identifying performed by the code auditing server is performed by a special auditing engineer, and after the code auditing is completed, the auditing result is uploaded and identified. If the verification is passed, marking an 'OK' mark on the source code; and if the audit is not passed, marking the source code with an NG identifier.
It should be noted that, in step S102, the application for submitting the current code is submitted by an engineer, and the engineer downloads the source code corresponding to the user requirement from the version management tool according to the user requirement to modify the source code to meet the user requirement, so as to form the current code. The version management tools can receive respective submission applications of the current codes at the same time, and are not influenced mutually.
Specifically, in step S102, each version management tool queries the source code from the code auditing server through its own HOOK (HOOK), and if the source code is marked with an "OK" identifier, it indicates that the source code passes the auditing process, and if the source code is marked with an "NG" identifier, it indicates that the source code does not pass the auditing process.
Referring to fig. 2, a code management and control method according to a second embodiment of the present invention is provided, where the code management and control method includes:
step S201, a code auditing server audits a plurality of source codes respectively archived by a plurality of version management tools in real time;
step S202, after receiving a current code submission application, the version management tool queries the auditing condition of the source code corresponding to the current code from the code auditing server and judges whether the auditing condition passes;
step S203, if not, the version management tool refuses to receive the current code and sends a code checking acceleration request to the code checking server;
and step S204, the code auditing server quickens the completion of auditing the source code.
Specifically, in step S203 and step S204, after receiving the request for accelerating code review sent by the version management tool, the code review server may send a prompt to prompt the corresponding review engineer to accelerate to complete code review or solve an unprocessed problem occurring in the review process.
Referring to fig. 3, a code management and control method according to a third embodiment of the present invention is provided, where the code management and control method includes:
step S301, a code auditing server audits a plurality of source codes respectively archived by a plurality of version management tools in real time;
step S302, after receiving a current code submission application, the version management tool queries the auditing condition of the source code corresponding to the current code from the code auditing server and judges whether the auditing condition passes;
step S303, if yes, the version management tool receives and stores the current code;
step S304, the version management tool stores the current code in the storage position of the source code and covers the source code to form a new source code;
step S305, the code auditing server audits the new source code.
Specifically, in step S304, each of the version management tools includes a plurality of code warehouses, and the code warehouse corresponding to the current code may store the source code before receiving the current code, or may not store the source code. When the source code is not stored, the current code is directly stored, and when the source code is stored, the current code covers the previous source code to form a new source code.
Referring to fig. 4, a code management and control method according to a fourth embodiment of the present invention is provided, where the code management and control method includes:
step S401, the code auditing server detects whether each version management tool has data modification information in real time;
step S402, if yes, the code auditing server acquires the data modification information and archives the data modification information.
Specifically, in step S401 and step S402, the data modification information is modification item information generated when the new source code overwrites the previous source code, for example: scheme name, code name, uploading date, uploading name and corresponding version number, etc. And the modified item information is recorded by the version management tool, then acquired by the code auditing server and archived.
In this embodiment, step S401 specifically includes:
the code auditing server at least allocates one thread to each version management tool, and detects data modification information in each version management tool through the thread.
It should be noted that, in this embodiment, the GIT remote data server is correspondingly allocated with 2 threads, and the SVN remote data server is correspondingly allocated with 3 threads. The more the threads are correspondingly distributed, the faster the corresponding detection speed of the code auditing server is.
Specifically, in step S402, the code auditing server provides a common interface for an auditing engineer to check the data modification information in each version management tool, and perform code auditing and checking operations.
In summary, in the code management and control method of the present invention, the code auditing server automatically collects the data modification information in each version management tool, and provides a common interface for an auditing engineer to browse the corresponding data modification information. Before receiving the current code, the version management tool automatically queries the auditing condition of the source code corresponding to the current code from the code auditing server through a hook of the version management tool, so that a user-defined code auditing rule (for example, how many hours after the code is uploaded and how many hours after the code is audited, how many hours after the code is audited and found, the problem needs to be solved and the like) is realized, and the actual requirement of complex service code auditing is met (for example, a TV service client supports the service, software is required to be modified correspondingly quickly, cross cooperation is frequent, and if the code can be submitted into the version management tool after the code is audited first, the current service condition cannot be met).
Referring to fig. 5, a code management and control system 100 includes a code auditing server 11 and a plurality of version management tools 12, where the code auditing server 11 includes an auditing module 111, the version management tools 12 include a query module 121 and a receiving and storing module 122, where,
the auditing module 111 is configured to audit, in real time, a plurality of source codes archived by the plurality of version management tools 12;
the query module 121 is configured to, after receiving a current code submission application, query, from the code auditing server 11, an auditing condition of a source code corresponding to the current code, and determine whether the auditing condition passes;
the receiving and storing module 122 is configured to receive and store the current code when the querying module 121 determines that the audit condition passes.
In the code management and control system, the version management tool 12 further includes a sending module 123, and the auditing module 111 includes a first auditing sub-module 1111, wherein,
the sending module 123 is configured to send a request for code verification acceleration to the code verification server 11 when the query module 121 determines that the verification condition is not passed and the version management tool 12 refuses to receive the current code;
the first audit sub-module 1111 is configured to speed up completion of the audit on the source code.
In the code management and control system, the receiving storage module 122 includes a storage sub-module 1221, and the auditing module 111 further includes a second auditing sub-module 1112, wherein,
the storage submodule 1221 is configured to store the current code in a storage location of the source code, and form a new source code by overwriting the source code;
the second audit module 1112 is configured to perform an audit on the new source code.
In the code management and control system, the code auditing server 11 further includes a detecting module 112 and an obtaining module 113, wherein,
the detection module 112 is configured to detect whether there is data modification information in each of the version management tools 12 in real time, where the data modification information is the current code received by the version management tool 12 and is stored;
the obtaining module 113 is configured to obtain and archive the data modification information when the detecting module 112 detects that there is data modification information in each of the version management tools 12.
In the code management and control system, the code auditing server 11 further includes an allocation module 114, wherein,
the allocating module 114 is configured to allocate at least one thread to each of the version management tools 12, and the detecting module 112 detects the data modification information in each of the version management tools 12 through the thread.
Compared with the prior art, in the code management and control method and system, the code auditing server 11 simultaneously supports code management and control of a plurality of version management tools 12, and response requirements of cooperative order processing business are met. In addition, after the version management tool 12 receives and stores the current code, the code auditing server 11 audits the current code, that is, the requirements of first entering a warehouse and then auditing are met.
The above-mentioned embodiments only express several embodiments of the present invention, and the description thereof is more specific and detailed, but not construed as limiting the scope of the present invention. It should be noted that, for a person skilled in the art, several variations and modifications can be made without departing from the inventive concept, which falls within the scope of the present invention. Therefore, the protection scope of the present patent shall be subject to the appended claims.

Claims (6)

1. A code management and control method is characterized by comprising the following steps:
the code auditing server audits a plurality of source codes respectively filed by a plurality of version management tools in real time;
after receiving a current code submission application, the version management tool inquires the auditing condition of the source code corresponding to the current code from the code auditing server and judges whether the auditing condition passes;
if so, the version management tool receives and stores the current code;
after the step of receiving and storing the current code by the version management tool, the code management and control method further includes:
the version management tool stores the current code in a storage position of the source code and covers the source code to form new source code;
the code auditing server audits the new source code;
the method further comprises the following steps:
the code auditing server detects whether data modification information exists in each version management tool in real time;
and if so, the code auditing server acquires the data modification information and archives the data modification information, wherein the code auditing server provides a common interface for an auditing engineer to check the data modification information in each version management tool and perform code auditing and checking work.
2. The code management and control method according to claim 1, wherein after the step of, after receiving a current code submission application, the version management tool querying a code audit condition of a source code corresponding to the current code from the code audit server and determining whether the audit condition passes, the code management and control method further includes:
if not, the version management tool refuses to receive the current code and sends a code checking acceleration request to the code checking server;
and the code auditing server accelerates the completion of auditing the source code.
3. The code management and control method according to claim 1, wherein the step of detecting, by the code audit server, the data modification information in each of the version management tools in real time specifically includes:
the code auditing server at least allocates one thread to each version management tool, and detects data modification information in each version management tool through the thread.
4. A code management and control system is characterized by comprising a code auditing server and a plurality of version management tools, wherein the code auditing server comprises an auditing module, the version management tools comprise a query module and a receiving storage module, and the version management tools comprise a code auditing module,
the auditing module is used for auditing a plurality of source codes respectively filed by a plurality of version management tools in real time;
the query module is used for querying the auditing condition of the source code corresponding to the current code from the code auditing server after receiving the current code submission application and judging whether the auditing condition passes;
the receiving and storing module is used for receiving and storing the current code when the checking condition is judged to pass by the inquiring module;
the receiving storage module comprises a storage sub-module, the auditing module further comprises a second auditing sub-module, wherein,
the storage submodule is used for storing the current code in the storage position of the source code and covering the source code to form new source code;
the second examination and check sub-module is used for examining and checking the new source code;
the code auditing server also comprises a detection module and an acquisition module;
the detection module is used for detecting whether data modification information exists in each version management tool in real time;
the acquisition module is used for acquiring and archiving the data modification information when the detection module detects that the version management tools have the data modification information, wherein the code auditing server provides a common interface for an auditing engineer to check the data modification information in the version management tools and to audit and check the codes.
5. The code management and control system of claim 4, wherein the version management tool further comprises a sending module, the review module comprising a first review sub-module, wherein,
the sending module is used for sending a code auditing acceleration request to the code auditing server when the query module judges that the auditing condition is not passed and the version management tool refuses to receive the current code;
the first auditing submodule is used for accelerating the completion of auditing the source code.
6. The code management and control system of claim 4, wherein the code review server further comprises an assignment module, wherein,
the distribution module is used for distributing at least one thread to each version management tool, and the detection module detects the data modification information in each version management tool through the thread.
CN201710528477.0A 2017-07-01 2017-07-01 Code management and control method and system Active CN107463371B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201710528477.0A CN107463371B (en) 2017-07-01 2017-07-01 Code management and control method and system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201710528477.0A CN107463371B (en) 2017-07-01 2017-07-01 Code management and control method and system

Publications (2)

Publication Number Publication Date
CN107463371A CN107463371A (en) 2017-12-12
CN107463371B true CN107463371B (en) 2020-05-12

Family

ID=60546541

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201710528477.0A Active CN107463371B (en) 2017-07-01 2017-07-01 Code management and control method and system

Country Status (1)

Country Link
CN (1) CN107463371B (en)

Families Citing this family (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111061457A (en) * 2019-12-20 2020-04-24 上海米哈游天命科技有限公司 File uploading control method and device, server and storage medium
CN112486565A (en) * 2020-12-10 2021-03-12 上海芯翌智能科技有限公司 Containerization-based continuous integration method and equipment
CN112748950B (en) * 2021-01-15 2024-05-31 国能日新科技股份有限公司 Software code examination method and device

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106095681A (en) * 2016-06-14 2016-11-09 深圳市彬讯科技有限公司 A kind of SVN integrated JSHint code detection method and system thereof
CN106095446A (en) * 2016-06-14 2016-11-09 深圳市彬讯科技有限公司 Software source code on-line detecting system and detection method thereof
CN106897223A (en) * 2017-02-24 2017-06-27 郑州云海信息技术有限公司 A kind of software kit delivery method and device based on continuous integrating

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20160063162A1 (en) * 2014-08-26 2016-03-03 Synopsys, Inc. System and method using pass/fail test results to prioritize electronic design verification review

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106095681A (en) * 2016-06-14 2016-11-09 深圳市彬讯科技有限公司 A kind of SVN integrated JSHint code detection method and system thereof
CN106095446A (en) * 2016-06-14 2016-11-09 深圳市彬讯科技有限公司 Software source code on-line detecting system and detection method thereof
CN106897223A (en) * 2017-02-24 2017-06-27 郑州云海信息技术有限公司 A kind of software kit delivery method and device based on continuous integrating

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
版本管理与代码走查系统设计与实现;李嵩泉 等;《计算机与网络》;20140331;53-56 *

Also Published As

Publication number Publication date
CN107463371A (en) 2017-12-12

Similar Documents

Publication Publication Date Title
CN107463371B (en) Code management and control method and system
WO2019075842A1 (en) Task allocation method and apparatus, storage medium and computer device
CN109657216B (en) Contract generation method, device, equipment and storage medium
CN108416519A (en) A kind of guest room method for allocating tasks, server and computer readable storage medium
CN110956269A (en) Data model generation method, device, equipment and computer storage medium
CN105548749B (en) A kind of communication terminal test method, apparatus Internet-based and system
CN103281410A (en) Broadcast television network intelligent obstacle pretreatment method and system
CN103617381A (en) Permission configuration method and permission configuration system of equipment
CN110083536B (en) Test resource allocation method and device, electronic equipment and storage medium
CN107066522B (en) Database access method and device
CN115242752A (en) Address allocation method, device, equipment and medium for battery management system
CN116049512B (en) Credit body information processing method and device and electronic equipment
CN111045725A (en) Control method, device and storage medium of code management system
CN107861778B (en) Dynamic configuration method and system for menu page
CN109784052B (en) Management method for software behavior detection, server, terminal and system
CN106855804A (en) Code change management and control method and device
CN112446011A (en) Watermark identification and error code copyright judgment method
CN111061543A (en) Multi-tenant workflow engine service method, device and server
JP2016110169A (en) Work application processing device, work application processing method, and program
US8874539B2 (en) Object identity and addressability
CN109919808B (en) Trademark intelligent declaration method, medium, computer equipment and system
CN114281849B (en) Data query method and device
CN107862480B (en) Service management method, release management device, medium, and electronic device
CN108921374B (en) Policy distribution method, device and apparatus and computer readable storage medium
JP6535377B2 (en) Gas supply destination management system and method

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
GR01 Patent grant
GR01 Patent grant