CN110489347A - Method for edition management, device, equipment and readable storage medium storing program for executing based on GIT - Google Patents

Method for edition management, device, equipment and readable storage medium storing program for executing based on GIT Download PDF

Info

Publication number
CN110489347A
CN110489347A CN201910772190.1A CN201910772190A CN110489347A CN 110489347 A CN110489347 A CN 110489347A CN 201910772190 A CN201910772190 A CN 201910772190A CN 110489347 A CN110489347 A CN 110489347A
Authority
CN
China
Prior art keywords
branch
item
version
online
git
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
CN201910772190.1A
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.)
Shenzhen Qian Hai Network Technology Co Ltd
Original Assignee
Shenzhen Qian Hai Network Technology 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 Shenzhen Qian Hai Network Technology Co Ltd filed Critical Shenzhen Qian Hai Network Technology Co Ltd
Priority to CN201910772190.1A priority Critical patent/CN110489347A/en
Publication of CN110489347A publication Critical patent/CN110489347A/en
Pending legal-status Critical Current

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/36Preventing errors by testing or debugging software
    • G06F11/3668Software testing
    • G06F11/3672Test management
    • G06F11/368Test management for test version control, e.g. updating test cases to a new software version
    • 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)
  • Theoretical Computer Science (AREA)
  • General Engineering & Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Software Systems (AREA)
  • Computer Hardware Design (AREA)
  • Quality & Reliability (AREA)
  • Computer Security & Cryptography (AREA)
  • Stored Programmes (AREA)

Abstract

The invention discloses a kind of method for edition management based on GIT, this method comprises: obtaining the corresponding Item version of Item version test request and the corresponding item file of Item version when receiving Item version test request;In Item version at least two, the corresponding item file of projects version is sent to test branch, and tests the corresponding item file of projects version in test branch;In the online request of the project that receives, the corresponding destination item version of the online request of project is obtained, the corresponding destination item file of destination item version is sent to exploitation branch, to pass through the exploitation online destination item version of branch.The invention also discloses a kind of edition management device based on GIT, equipment and readable storage medium storing program for executing.The present invention keeps Item version management more convenient by testing the corresponding item file of multiple Item versions simultaneously in test branch.

Description

Method for edition management, device, equipment and readable storage medium storing program for executing based on GIT
Technical field
The present invention relates to the version management field based on GIT, more particularly to the method for edition management based on GIT, device, set Standby and readable storage medium storing program for executing.
Background technique
Online from project testing to project in project development field, project development personnel or project consigner can be directed to Project proposes different demands, because of different demands, project often will appear multiple versions, carries out to multiple Item versions When management, project development personnel will use GIT, and (distributed version control system is the distributed version control system of an open source System, can be handled effectively, at high speed from very little to very big Item version management).
And in the existing method using GIT management project version, when Item version needs to test, Item version It is sent to exploitation branch (long-term existing branch in git work process flow), if there is multiple Item versions are tested simultaneously, and again When needing online one of Item version, it is necessary to the correlative code of sundry item version be retracted, this allows for operating numerous It is trivial.
Summary of the invention
The main purpose of the present invention is to provide a kind of method for edition management based on GIT, device, equipment and readable storages Medium, it is intended to when solving current multiple Item versions and test simultaneously, and needing online one of Item version again, it is necessary to The correlative code of sundry item version retracts, so that cumbersome technical problem.
To achieve the above object, the present invention provides a kind of method for edition management based on GIT, the version based on GIT Management method the following steps are included:
When receiving Item version test request, the corresponding Item version of the Item version test request is obtained, and The corresponding item file of the Item version;
In the Item version at least two, the corresponding item file of each Item version is sent to test point Branch, and the corresponding item file of each Item version is tested in the test branch;
In the online request of the project that receives, the corresponding destination item version of the online request of the project is obtained, it will be described The corresponding destination item file of destination item version is sent to exploitation branch, to pass through the online target item of exploitation branch Mesh version.
Optionally, described in the Item version at least two, by the corresponding item file of each Item version It is sent to test branch, and the step of testing the corresponding item file of each Item version in the test branch, comprising:
In the Item version at least two, test branch is judged whether there is;
Test branch if it does not exist is then called default GIT tool to create test branch, and is executed described by each project The corresponding item file of version is sent to test branch, and the corresponding item of each Item version is tested in the test branch The step of mesh file.
Optionally, described when receiving Item version test request, it is corresponding to obtain the Item version test request After the step of Item version and the Item version corresponding item file, comprising:
When receiving project demands test request, the corresponding demand file of the Item version is obtained, passes through exploitation point Branch creates demand branch, and tests the demand file in the demand branch;
It is described to obtain the corresponding destination item version of the online request of the project in the online request of the project that receives, it will The corresponding destination item file of the destination item version is sent to exploitation branch, to pass through the online mesh of exploitation branch The step of marking Item version, comprising:
In the online request of the project that receives, the project corresponding destination item version of online request and described is obtained The corresponding destination item file of destination item version and target requirement file;
The destination item file and the target requirement file are sent to exploitation branch, to pass through the exploitation branch The online destination item version.
Optionally, described in the Item version at least two, by the corresponding item file of each Item version It is sent to test branch, and after the step of testing the corresponding item file of each Item version in the test branch, Include:
When receiving the exception information of the test branch output, when the abnormal letter for receiving the test branch output When breath, the corresponding item file of the exception information is obtained, the corresponding item file of the exception information is sent to the need Branch is asked, and repairs the corresponding item file of the exception information in the demand branch;
When detecting that the corresponding item file reparation of the exception information is completed, the item file after reparation is sent to The test branch, and second test is carried out in the test branch.
Optionally, described that the destination item file and the target requirement file are sent to exploitation branch, to pass through After the step of exploitation branch online destination item version, comprising:
Create publication branch by the exploitation branch, using the destination item file and the target requirement file as Online packet is sent to the publication branch;
Online environment, and the online packet described in the online environmental testing are simulated in the publication branch;
If the online packet passes through in the online environmental testing, the online packet is sent to trunk branch and completes item Mesh is online.
Optionally, if the online packet passes through in the online environmental testing, the online packet is sent to master After the online step of dry branch's finished item, comprising:
When receiving the warning message based on the online packet output after online, passes through trunk branch creation and repair point Branch, and the online packet is sent to the reparation branch, to repair the online packet in the reparation branch;
When receiving reparation completion prompt information, trunk branch is sent by the online packet after reparation, and by described The trunk branch online packet after online reparation again.
It is optionally, described to send trunk branch for the online packet after reparation when receiving reparation completion prompt information, And by after the step of online packet after the trunk branch again online reparation, comprising:
When receiving online completion prompt information, judgement is currently with the presence or absence of publication branch;
If there is currently the publication branches, the publication branch is sent by the online packet after reparation, in the hair Online environment is simulated in cloth branch, and the online packet in the upper thread environment after test reparation;
If, will be upper after reparation by creation publication branch, the exploitation branch there is currently no the publication branch Line packet is sent to the publication branch, online environment is simulated in the publication branch, and test and repair in the upper thread environment Online packet after multiple.
In addition, to achieve the above object, it is described to be based on GIT the present invention also provides a kind of edition management device based on GIT Edition management device include:
It receives and obtains module, for when receiving Item version test request, obtaining the Item version test request Corresponding Item version and the corresponding item file of the Item version;
Test module, in the Item version at least two, will the corresponding project of each Item version it is literary Part is sent to test branch, and the corresponding item file of each Item version is tested in the test branch;
Upper wire module, in the online request of the project that receives, obtaining the corresponding target item of the online request of the project The corresponding destination item file of the destination item version is sent to exploitation branch, to pass through the exploitation branch by mesh version The online destination item version.
In addition, to achieve the above object, it is described to be based on GIT the present invention also provides a kind of version management device based on GIT Version management device include: memory, processor and be stored on the memory and can run on the processor Version management program based on GIT, it is described to realize as above-mentioned when being executed based on the version management program of GIT by the processor The step of method for edition management based on GIT.
In addition, to achieve the above object, it is described computer-readable the present invention also provides a kind of computer readable storage medium The version management program based on GIT is stored on storage medium, when the version management program based on GIT is executed by processor It realizes such as the step of the above-mentioned method for edition management based on GIT.
A kind of method for edition management based on GIT, device, equipment and the readable storage medium storing program for executing that the embodiment of the present invention proposes. In the embodiment of the present invention when receiving Item version test request, the corresponding project version of the Item version test request is obtained Sheet and the corresponding item file of the Item version;In the Item version at least two, by each Item version pair The item file answered is sent to test branch, and the corresponding project text of each Item version is tested in the test branch Part;In the online request of the project that receives, the corresponding destination item version of the online request of the project is obtained, by the target item The corresponding destination item file of mesh version is sent to exploitation branch, to pass through the online destination item version of the exploitation branch This.By the corresponding item file of test branch test item version in the embodiment of the present invention, the test branch when project is online Online item file will be needed to be sent to the progress of exploitation branch online, rather than is directly tested in exploitation branch, from And reduce the operations such as Item version rollback, so that Item version management becomes simple and convenient.
Detailed description of the invention
Fig. 1 is that a kind of hardware configuration of embodiment of the version management device provided in an embodiment of the present invention based on GIT shows It is intended to;
Fig. 2 is that the present invention is based on the flow diagrams of the method for edition management first embodiment of GIT;
Fig. 3 is that the present invention is based on the flow diagrams of the method for edition management second embodiment of GIT;
Fig. 4 is that the present invention is based on the flow diagrams of the method for edition management 3rd embodiment of GIT;
Fig. 5 is that the present invention is based on the flow diagrams of the method for edition management fourth embodiment of GIT;
Fig. 6 is that the present invention is based on the flow diagrams of the 5th embodiment of method for edition management of GIT;
Fig. 7 is that the present invention is based on the flow diagrams of the method for edition management sixth embodiment of GIT;
Fig. 8 is that the present invention is based on the flow diagrams of the 7th embodiment of method for edition management of GIT;
Fig. 9 is that the present invention is based on the functional block diagrams of one embodiment of edition management device of GIT.
The embodiments will be further described with reference to the accompanying drawings for the realization, the function and the advantages of the object of the present invention.
Specific embodiment
It should be appreciated that the specific embodiments described herein are merely illustrative of the present invention, it is not intended to limit the present invention.
In subsequent description, it is only using the suffix for indicating such as " module ", " component " or " unit " of element Be conducive to explanation of the invention, itself there is no a specific meaning.Therefore, " module ", " component " or " unit " can mix Ground uses.
The embodiment of the present invention can be desktop computer based on the version management terminal of GIT, is also possible to laptop, puts down The terminal device having a display function such as plate computer.
As shown in Figure 1, the terminal may include: processor 1001, such as CPU, network interface 1004, user interface 1003, memory 1005, communication bus 1002.Wherein, communication bus 1002 is for realizing the connection communication between these components. User interface 1003 may include display screen (Display), input unit such as keyboard (Keyboard), optional user interface 1003 can also include standard wireline interface and wireless interface.Network interface 1004 optionally may include that the wired of standard connects Mouth, wireless interface (such as WI-FI interface).Memory 1005 can be high speed RAM memory, be also possible to stable memory (non-volatile memory), such as magnetic disk storage.Memory 1005 optionally can also be independently of aforementioned processor 1001 storage device.
Optionally, terminal can also include camera, RF (Radio Frequency, radio frequency) circuit, sensor, audio Circuit, WiFi module etc..Wherein, sensor such as optical sensor, motion sensor and other sensors.Specifically, light Sensor may include ambient light sensor and proximity sensor, wherein ambient light sensor can according to the light and shade of ambient light come The brightness of display screen is adjusted, proximity sensor can close display screen and/or backlight when mobile terminal is moved in one's ear.As One kind of motion sensor, gravity accelerometer can detect the size of (generally three axis) acceleration in all directions, quiet Size and the direction that can detect that gravity when only, the application that can be used to identify mobile terminal posture are (such as horizontal/vertical screen switching, related Game, magnetometer pose calibrating), Vibration identification correlation function (such as pedometer, tap) etc.;Certainly, mobile terminal can also match The other sensors such as gyroscope, barometer, hygrometer, thermometer, infrared sensor are set, details are not described herein.
It will be understood by those skilled in the art that the restriction of the not structure paired terminal of terminal structure shown in Fig. 1, can wrap It includes than illustrating more or fewer components, perhaps combines certain components or different component layouts.
As shown in Figure 1, as may include that operating system, network are logical in a kind of memory 1005 of computer storage medium Believe module, Subscriber Interface Module SIM and the version management program based on GIT.
In terminal shown in Fig. 1, network interface 1004 is mainly used for connecting background server, carries out with background server Data communication;User interface 1003 is mainly used for connecting client (user terminal), carries out data communication with client;And processor 1001 can be used for calling the version management program based on GIT stored in memory 1005, the version management based on GIT Operation in the method for edition management based on GIT of following embodiments offers is provided when program is executed by processor.
Based on the above-mentioned version management device hardware configuration based on GIT, propose that the present invention is based on the version management sides of GIT The embodiment of method.
Referring to Fig. 2, the present invention is based in the first embodiment of the method for edition management of GIT, the version based on GIT Management method includes:
Step S10, when receiving Item version test request, obtain the Item version test request correspond to it is to be tested Item version.
Method for edition management in the present embodiment based on GIT is applied to the version management device (being called terminal) based on GIT, Version management device based on GIT includes the equipment such as smart phone, tablet computer and portable computer.
Project is made of various files (being called item file), due to various reasons, for example increases new function in the project, For the compatibility modification etc. that not homologous ray or equipment make project, need that each file in project is numbered, To distinguish different files, each change of file can all generate an Item version in project, and Item version is numbered.
A kind of concrete application scene is provided in the present embodiment, for example, project is by code file, configuration file and illustrates document Three kinds of file compositions after to illustrating that document is modified, just produce new if the version number of table 1, initial project version is X1 Version number X1.2, a project may include multiple Item versions.
Table 1: Item version and item file
When doing Item version test using the method for edition management based on GIT, user is corresponding by each Item version File inputs in the version management program based on GIT, when the corresponding all items file input of each Item version is based on GIT's After version management program, Item version test request is triggered, Item version test is being received based on the version management program of GIT When request, the corresponding Item version of file is obtained.
Step S20 sends the corresponding item file of each Item version in the Item version at least two To test branch, and the corresponding item file of each Item version is tested in the test branch.
Test branch is one of the branch of the version management program creation based on GIT in the present embodiment, can be used for test item Mesh file, that is, test item version.
After the corresponding all items file of each Item version inputs the version management program based on GIT, project is obtained The corresponding Item version of file, and the quantity for version of identifying project are based on GIT if the quantity at least two of Item version Version management program send test branch for the corresponding item file of Item version, and projects are tested in test branch How file, item file are tested in test branch, and the present embodiment no longer does specific narration.
Step S30 obtains the corresponding destination item version of the online request of the project in the online request of the project that receives This, is sent to exploitation branch for the corresponding destination item file of the destination item version, with online by the exploitation branch The destination item version.
The online version of target, which refers to, in the present embodiment needs online Item version, and exploitation branches into the version based on GIT One long-standing branch of management program creation can carry out destination item version by exploitation branch online.
The triggering of the online request of project can be manually, for example, user, which chooses, needs online Item version, and click " online " icon, clicking operation trigger the online request of project, it is known that and ground, the triggering of the online request of project can also be automatically, For example, presetting a screening conditions, the version management program identification based on GIT meets the Item version of screening conditions on needs The Item version of line.Exploitation branch is sent by destination item version based on the version management program of GIT, to pass through exploitation branch Destination item version is carried out online.
In the present embodiment, the version management program based on GIT receives Item version test request, and obtains Item version, In Item version at least two, survey is sent for the corresponding item file of Item version based on the version management program of GIT Examination branch is tested, and the version management program based on GIT can will also need online destination item version to be sent to exploitation point Branch, it is online to be carried out by exploitation branch to destination item version.The present embodiment is multiple by testing simultaneously in test branch Item version, and the destination item version in multiple Item versions is sent to exploitation branch, by developing branch to target Item version progress is online, does not need the correlative code of other not online Item versions to retract, becomes Item version management It obtains simple and convenient.
Further, the version management of GIT of the present invention is proposed on the basis of the above embodiment of the present invention referring to Fig. 3 The second embodiment of method.
The step of the present embodiment is step S20 refinement in first embodiment, the present embodiment and the above embodiment of the present invention Difference is:
Step S21 judges whether there is test branch in the Item version at least two.
Test branch is one of the branch of the version management program creation based on GIT in the present embodiment, when the version based on GIT This management program receives Item version test request, and then obtains the corresponding Item version of Item version test request, obtains When the Item version at least two arrived, judge in the version management program based on GIT with the presence or absence of test branch.
Test branch be based on GIT version management program creation branch, when the version management program based on GIT for the first time When starting, (when the version management device based on GIT is then turned on after closing, the version management program based on GIT may be removed Remember file, the version management program based on GIT made to be determined as opening for the first time) in the version management program based on GIT not Test branch, test branch can be user's manual creation or the version management program based on GIT automatically creates, so, In When the Item version at least two, need to judge that this is with the presence or absence of test branch in the version management program based on GIT The main purpose of judgement.
Step S22, if it does not exist test branch then call default GIT tool to create test branch, and execute it is described will be each The corresponding item file of the Item version is sent to test branch, and each Item version is tested in the test branch The step of corresponding item file.
GIT tool is preset in the present embodiment to be carried in the version management program based on GIT, for creating test point Branch, when the version management program based on GIT is opened, default GIT tool can be in the version management program based on GIT one The icon that can be clicked is also possible to one section of code of input, describes with no restrictions and specifically in the present embodiment.
If the result judged as in the version management program based on GIT be not present test branch, the version management based on GIT Program will call default GIT tool to create test branch and execute step S20 after the completion of branch's creation to be tested.
In the present embodiment in Item version at least two, judge to whether there is in the version management program based on GIT Test branch, test branch, then call default GIT tool to create test branch if it does not exist, by creating test branch, so that Projects version can be tested in test branch, thus online to needing online destination item version to carry out.
Further, the version management of GIT of the present invention is proposed on the basis of the above embodiment of the present invention referring to Fig. 4 The 3rd embodiment of method.
The present embodiment be in first embodiment after step S10 the step of, the present embodiment and the above embodiment of the present invention Difference is:
Step S40 obtains the corresponding demand file of the Item version when receiving project demands test request, leads to Creation demand branch, exploitation branch is crossed, and tests the demand file in the demand branch.
Project demands refer to that developer makes in project development process for different Item versions in the present embodiment Modification, including optimize daily with function difference etc..There are corresponding relationships with Item version for project demands, and an Item version can Corresponding one or more project demands, project demands are made of demand file.
The triggering of project demands test request can be automatically in the present embodiment, be also possible to manually, the present embodiment No longer do specific narration.It, can be by developing branch based on the version management program of GIT when receiving project demands test request To create demand branch, wherein project demands and demand branch have one-to-one relationship.In test item demand, by institute There are project demands (that is, all demand files) to be input to the version management program based on GIT, and in the corresponding demand of project demands Testing requirement file in branch, such as table 2, Item version X1 corresponds to project demands 1 and project demands 2, forms the need of project demands 1 File A1 is sought, B1, C1 are tested in the corresponding demand branch 1 of project demands 1.
Table 2: Item version and project demands
Demand branch is created by exploitation branch in the present embodiment, and the demand file for forming project demands is needed in project Ask and tested in corresponding demand branch so that Item version it is online process it is more perfect.
Further, the version management of GIT of the present invention is proposed on the basis of third embodiment of the invention referring to Fig. 5 The fourth embodiment of method.
The step of the present embodiment is step S30 refinement in first embodiment, the present embodiment and the above embodiment of the present invention Difference is:
Step S31 obtains the corresponding destination item version of the online request of the project in the online request of the project that receives Sheet and the corresponding destination item file of the destination item version and target requirement file.
Target requirement file is the file for forming target requirement in the present embodiment, and target requirement, which refers to, needs online project Demand there will necessarily be target requirement in the corresponding project demands of destination item version in the present embodiment.
By step S40 it is found that project demands and Item version are there are corresponding relationship, the version management program based on GIT exists After receiving the online request of project, destination item version is obtained, and then obtain destination item file and target requirement file.
The destination item file and the target requirement file are sent to exploitation branch, by described by step S32 Develop the online destination item version of branch.
Version management program based on GIT will acquire destination item file and target requirement file is sent to exploitation point Branch, to pass through the exploitation online destination item version of branch.
Version management program in the present embodiment based on GIT receives the online request of project, and obtain destination item version and Target requirement file, and then destination item file and target requirement file are sent to exploitation branch, by exploitation branch Line target Item version.
Further, the version management of GIT of the present invention is proposed on the basis of the above embodiment of the present invention referring to Fig. 6 5th embodiment of method.
The present embodiment be in first embodiment after step S20 the step of, the present embodiment and the above embodiment of the present invention Difference is:
Step S50 is exported when receiving the exception information of the test branch output when receiving the test branch Exception information when, obtain the corresponding item file of the exception information, the corresponding item file of the exception information sent The extremely demand branch, and the corresponding item file of the exception information is repaired in the demand branch.
The item file of projects version is formed when test branch is tested, if occurring because of the content in item file It is abnormal, and when the exception information of generation, obtain the corresponding Item version of item file for generating exception information, the version based on GIT The item file for generating exception information is sent to demand branch by this management program, and is repaired in demand branch and generated abnormal letter The item file of breath.Wherein, the abnormal corresponding Item version of item file will be generated as anomaly item version, anomaly item The corresponding one or more project demands of version, each project demands correspond to a demand branch, specifically, the version based on GIT again The item file for generating exception information is sent in the corresponding demand branch of anomaly item version by this management equipment at random.
Step S60, when detecting that the corresponding item file reparation of the exception information is completed, by the project text after reparation Part is sent to the test branch, and second test is carried out in the test branch.
The item file for generating exception information is repaired in demand branch, the version management program detection based on GIT To when repairing completion, the item file after reparation is again sent to test branch and carries out second test, it is known that ground, if secondary survey Still there is exception information in examination, then executes step S50 again, until no longer there is exception information.Version management program based on GIT Detection is repaired the specific method completed and be can be, and after the completion of file is repaired, the version management program output based on GIT has been repaired At prompt information, wherein include determining the operating method repaired and completed in prompt information, user grasps according to prompt information After work, the version management program based on GIT just detects that item file reparation is completed.
In the present embodiment, the item file for forming projects version is tested in test branch, when item file goes out When now abnormal, the item file for exception occur is sent to by demand branch based on the version management program of GIT and is repaired, and will Item file after reparation is sent to test branch and carries out second test, until no longer there is exception, so that projects version Accuracy is guaranteed.
Further, the version management of GIT of the present invention is proposed on the basis of the above embodiment of the present invention referring to Fig. 7 The sixth embodiment of method.
The present embodiment be in first embodiment after step S30 the step of, the present embodiment and the above embodiment of the present invention Difference is:
Step S70 creates publication branch by the exploitation branch, by the destination item file and the target requirement File is sent to the publication branch as online packet.
Publication branches into a short-lived branch of exploitation branch creation in the present embodiment, is used for destination item version The online test of simulation, it is online packet refer to destination item file and target requirement file composition an entirety.
After destination item file and target requirement file are sent to exploitation branch, the version management program based on GIT is just By creation publication branch, exploitation branch, specifically how by creation publication branch, exploitation branch, the present embodiment, which is not done, specifically to be chatted It states, after the completion of the creation of publication branch, online packet is sent to by publication branch based on the version management program of GIT.
Step S80 simulates online environment, and the online packet described in the online environmental testing in the publication branch.
It is online that a kind of simulation project that upper thread environment refers to that tester builds in publication branch is simulated in the present embodiment Environment, simulating the operating condition in online environment for test item.
Online packet is sent to publication branch based on the version management program of GIT, and built in advance in publication branch Online packet is tested in simulation in thread environment, the purpose that online packet is tested in publication branch is detection destination item version and target Project demands are simulating the operating condition in online environment.
The online packet is sent to trunk point if the online packet passes through in the online environmental testing by step S90 Branch finished item is online.
Trunk branches into a long-standing branch of the creation of the version management program based on GIT in the present embodiment, uses In final online of destination item version and destination item demand, it is to be understood that trunk branch is online final of project Path.
Online packet is sent to publication branch based on the version management program of GIT, and built in advance in publication branch Online packet is tested in simulation in thread environment, if test passes through, online packet is sent to by trunk point based on the version management program of GIT Branch, to complete the final online of destination item version and destination item demand by trunk branch, it is known that ground, if test is obstructed It crosses, that is, error message occurs in test of the online packet in the upper thread environment of simulation, and tester can be in publication branch to online packet It is repaired, after the completion of reparation, online packet will carry out second test in publication branch, until test passes through, when online packet After final test passes through, publication branch can be deleted.
In the present embodiment, the online packet being made of destination item file and target requirement file carries out mould in publication branch Intend online environmental testing, it is obstructed out-of-date to test, and online packet is repaired in publication branch, and after the completion of reparation, online packet will be Second test is carried out in publication branch, until test passes through.So that project has obtained preliminary guarantee in online preceding safety.
Further, the version management of GIT of the present invention is proposed on the basis of the above embodiment of the present invention referring to Fig. 8 7th embodiment of method.
The present embodiment be in 3rd embodiment after step S90 the step of, the present embodiment and the above embodiment of the present invention Difference is:
Step S100 passes through the trunk branch when receiving the warning message based on the online packet output after online Branch is repaired in creation, and the online packet is sent to the reparation branch, described online to repair in the reparation branch Packet.
A short-lived branch for branching into the creation of trunk branch is repaired in the present embodiment, it is online for working as online packet Online packet when the error occurs, is sent to reparation branch and repaired by upper operation.
Online packet is online in the progress of trunk branch, that is, completes the online work of project, when online packet is run out on line When existing mistake, the version management device based on GIT can export the warning message comprising wrong content, the version management based on GIT Program will create a reparation branch by trunk branch, do to the online packet for mistake occur after receiving warning message Offline processing, and the online packet for mistake occur is sent to reparation branch and is repaired.
Step S110 sends the trunk point for the online packet after reparation when receiving reparation completion prompt information Branch, and pass through the online packet after the trunk branch again online reparation.
When there is wrong online packet after the completion of repairing branch's reparation, it is secondary that the progress of trunk branch can be again sent to Online, after secondary online success, repairing branch will be deleted.
Specifically, step S110 includes:
Step a1, when receiving online completion prompt information, judgement is currently with the presence or absence of publication branch.
By step S90 it is found that after online packet final test passes through, publication branch may be deleted, and judge whether to deposit It is that the version management program based on GIT can execute different operations according to different judging results in the purpose of publication branch.
Step a2 sends the publication branch, In for the online packet after reparation if there is currently the publication branches Online environment is simulated in the publication branch, and the online packet in the upper thread environment after test reparation.
If the result judged is there is currently publication branch, based on the version management program of GIT by the online packet after reparation It is sent to publication branch, it is known that ground is issued and built the upper thread environment of simulation in branch, sends publication for the online packet after reparation The purpose of branch is, will be online after reparation in the case that whether the online packet after uncertain repair mistake can occurs again Packet, which is sent to publication branch, to carry out simulating online environmental testing and is necessary.
Step a3, if, by creation publication branch, the exploitation branch, will be repaired there is currently no the publication branch Online packet afterwards is sent to the publication branch, online environment is simulated in the publication branch, and in the upper thread environment Online packet after test reparation.
If the result judged as there is currently no publication branch, will be online after reparation based on the version management program of GIT Packet is sent to exploitation branch, by step S70 it is found that when (online packet after reparation is for destination item file and target requirement file An entirety being made of destination item file and target requirement file) be sent to exploitation branch after, the version management based on GIT Program will pass through creation publication branch, exploitation branch, and after the completion of the creation of publication branch, the version management program based on GIT will be repaired Online packet afterwards is sent to publication branch, and executes step a2.
When online packet is run when the error occurs on line in the present embodiment, the version management program based on GIT will pass through Trunk branch creates a reparation branch, and the online packet for mistake occur is sent to reparation branch and is repaired, and repairs and completes Afterwards, the online packet after reparation is sent to publication branch based on the version management program of GIT to carry out simulating online environmental testing, is surveyed After pinging, then by the online packet after reparation be sent to trunk branch carry out it is secondary online.So that destination item (including target item Mesh version and destination item demand) normal online be guaranteed.
In addition, the embodiment of the present invention also proposes a kind of edition management device based on GIT, described to be based on GIT referring to Fig. 9 Edition management device include:
It receives and obtains module 10, asked for when receiving Item version test request, obtaining the Item version test Ask corresponding Item version and the corresponding item file of the Item version;
Test module 20, in the Item version at least two, by the corresponding project of each Item version File is sent to test branch, and the corresponding item file of each Item version is tested in the test branch;
Test module 30, in the online request of the project that receives, obtaining the corresponding target of the online request of the project The corresponding destination item file of the destination item version is sent to exploitation branch by Item version, to pass through the exploitation point The online destination item version of branch.
Method performed by above-mentioned each program module can refer to that the present invention is based on each implementations of the method for edition management of GIT Example, details are not described herein again.
It should be noted that, in this document, the terms "include", "comprise" or its any other variant are intended to non-row His property includes, so that the process, method, article or the system that include a series of elements not only include those elements, and And further include other elements that are not explicitly listed, or further include for this process, method, article or system institute it is intrinsic Element.In the absence of more restrictions, the element limited by sentence "including a ...", it is not excluded that including being somebody's turn to do There is also other identical elements in the process, method of element, article or system.
The serial number of the above embodiments of the invention is only for description, does not represent the advantages or disadvantages of the embodiments.
Through the above description of the embodiments, those skilled in the art can be understood that above-described embodiment side Method can be realized by means of software and necessary general hardware platform, naturally it is also possible to by hardware, but in many cases The former is more preferably embodiment.Based on this understanding, technical solution of the present invention substantially in other words does the prior art The part contributed out can be embodied in the form of Software Commodities, which is stored in one as described above In storage medium (such as ROM/RAM, magnetic disk, CD), including some instructions are used so that terminal device (it can be mobile phone, Computer and tablet computer etc.) execute method described in each embodiment of the present invention.
The above is only a preferred embodiment of the present invention, is not intended to limit the scope of the invention, all to utilize this hair Equivalent structure or equivalent flow shift made by bright specification and accompanying drawing content is applied directly or indirectly in other relevant skills Art field, is included within the scope of the present invention.

Claims (10)

1. a kind of method for edition management based on GIT, which is characterized in that the method for edition management based on GIT includes as follows Step:
When receiving Item version test request, the corresponding Item version of the Item version test request and described is obtained The corresponding item file of Item version;
In the Item version at least two, the corresponding item file of each Item version is sent to test branch, And the corresponding item file of each Item version is tested in the test branch;
In the online request of the project that receives, the corresponding destination item version of the online request of the project is obtained, by the target The corresponding destination item file of Item version is sent to exploitation branch, to pass through the online destination item version of the exploitation branch This.
2. as described in claim 1 based on the method for edition management of GIT, which is characterized in that it is described the Item version extremely When being less two, the corresponding item file of each Item version is sent to test branch, and survey in the test branch The step of trying each Item version corresponding item file, comprising:
In the Item version at least two, test branch is judged whether there is;
Test branch if it does not exist is then called default GIT tool to create test branch, and is executed described by each Item version Corresponding item file is sent to test branch, and the corresponding project text of each Item version is tested in the test branch The step of part.
3. as described in claim 1 based on the method for edition management of GIT, which is characterized in that described to receive Item version When test request, the corresponding Item version of the Item version test request and the corresponding project text of the Item version are obtained After the step of part, comprising:
When receiving project demands test request, the corresponding demand file of the Item version is obtained, passes through exploitation branch wound Demand branch is built, and tests the demand file in the demand branch;
It is described to obtain the corresponding destination item version of the online request of the project in the online request of the project that receives, it will be described The corresponding destination item file of destination item version is sent to exploitation branch, to pass through the online target item of exploitation branch The step of mesh version, comprising:
In the online request of the project that receives, the project corresponding destination item version of online request and the target are obtained The corresponding destination item file of Item version and target requirement file;
The destination item file and the target requirement file are sent to exploitation branch, with online by the exploitation branch The destination item version.
4. as claimed in claim 3 based on the method for edition management of GIT, which is characterized in that it is described the Item version extremely When being less two, the corresponding item file of each Item version is sent to test branch, and survey in the test branch After the step of trying each Item version corresponding item file, comprising:
When receiving the exception information of the test branch output, the corresponding item file of the exception information is obtained, by institute It states the corresponding item file of exception information and is sent to the demand branch, and repair the exception information in the demand branch Corresponding item file;
When detecting that the corresponding item file reparation of the exception information is completed, the item file after reparation is sent to described Test branch, and second test is carried out in the test branch.
5. as described in claim 1 based on the method for edition management of GIT, which is characterized in that described to receive project online When request, the corresponding destination item version of the online request of the project is obtained, by the corresponding target item of the destination item version Mesh file is sent to exploitation branch, after the step of the destination item version online by the exploitation branch, comprising:
Publication branch is created by the exploitation branch, using the destination item file and the target requirement file as online Packet is sent to the publication branch;
Online environment, and the online packet described in the online environmental testing are simulated in the publication branch;
If the online packet passes through in the online environmental testing, the online packet is sent on trunk branch finished item Line.
6. as claimed in claim 5 based on the method for edition management of GIT, which is characterized in that if the online packet is in institute It states online environmental testing to pass through, then the online packet is sent to after the online step of trunk branch finished item, comprising:
When receiving the warning message based on the online packet output after online, is created by the trunk branch and repairs branch, And the online packet is sent to the reparation branch, to repair the online packet in the reparation branch;
When receiving reparation completion prompt information, the trunk branch is sent by the online packet after reparation, and by described The trunk branch online packet after online reparation again.
7. as claimed in claim 6 based on the method for edition management of GIT, which is characterized in that described to receive reparation completion When prompt information, the trunk branch is sent by the online packet after reparation, and pass through the trunk branch again online reparation After the step of rear online packet, comprising:
When receiving online completion prompt information, judgement is currently with the presence or absence of publication branch;
If there is currently the publication branches, the publication branch is sent by the online packet after reparation, in the publication point Online environment is simulated in branch, and the online packet in the upper thread environment after test reparation;
If there is currently no the publication branch, by creation publication branch, the exploitation branch, by the online packet after reparation It is sent to the publication branch, online environment is simulated in the publication branch, and in the upper thread environment after test reparation Online packet.
8. a kind of edition management device based on GIT, which is characterized in that the edition management device based on GIT includes:
It receives and obtains module, it is corresponding for when receiving Item version test request, obtaining the Item version test request Item version and the corresponding item file of the Item version;
Test module will the corresponding item file hair of each Item version in the Item version at least two It send to test branch, and tests the corresponding item file of each Item version in the test branch;
Upper wire module, in the online request of the project that receives, obtaining the corresponding destination item version of the online request of the project This, is sent to exploitation branch for the corresponding destination item file of the destination item version, with online by the exploitation branch The destination item version.
9. a kind of version management device based on GIT, which is characterized in that the version management device based on GIT includes: storage Device, processor and it is stored in the version management program based on GIT that can be run on the memory and on the processor, institute State when the version management program based on GIT is executed by the processor realize as described in any one of claims 1 to 7 based on The step of method for edition management of GIT.
10. a kind of computer readable storage medium, which is characterized in that be stored with and be based on the computer readable storage medium The version management program of GIT is realized when the version management program based on GIT is executed by processor as in claim 1 to 7 The step of described in any item method for edition management based on GIT.
CN201910772190.1A 2019-08-20 2019-08-20 Method for edition management, device, equipment and readable storage medium storing program for executing based on GIT Pending CN110489347A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201910772190.1A CN110489347A (en) 2019-08-20 2019-08-20 Method for edition management, device, equipment and readable storage medium storing program for executing based on GIT

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201910772190.1A CN110489347A (en) 2019-08-20 2019-08-20 Method for edition management, device, equipment and readable storage medium storing program for executing based on GIT

Publications (1)

Publication Number Publication Date
CN110489347A true CN110489347A (en) 2019-11-22

Family

ID=68551637

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201910772190.1A Pending CN110489347A (en) 2019-08-20 2019-08-20 Method for edition management, device, equipment and readable storage medium storing program for executing based on GIT

Country Status (1)

Country Link
CN (1) CN110489347A (en)

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112988584A (en) * 2021-03-22 2021-06-18 深圳云之家网络有限公司 Service testing method, device, computer equipment and storage medium
CN113127027A (en) * 2019-12-31 2021-07-16 深圳云天励飞技术有限公司 Version updating method and device based on distributed version control system
CN113254426A (en) * 2021-07-13 2021-08-13 杰为软件系统(深圳)有限公司 CAD data distributed version control system based on branches and base lines

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107194658A (en) * 2017-04-25 2017-09-22 丹露成都网络技术有限公司 The project iteration branch management method of micro services system
WO2017222567A1 (en) * 2016-06-24 2017-12-28 Intuit Inc. Methods, systems, and articles of manufacture for implementing software application development and releases
CN109165169A (en) * 2018-10-16 2019-01-08 江苏满运软件科技有限公司 A kind of test branch management method and system
CN109960643A (en) * 2017-12-22 2019-07-02 网宿科技股份有限公司 A kind of code test method and device

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2017222567A1 (en) * 2016-06-24 2017-12-28 Intuit Inc. Methods, systems, and articles of manufacture for implementing software application development and releases
CN107194658A (en) * 2017-04-25 2017-09-22 丹露成都网络技术有限公司 The project iteration branch management method of micro services system
CN109960643A (en) * 2017-12-22 2019-07-02 网宿科技股份有限公司 A kind of code test method and device
CN109165169A (en) * 2018-10-16 2019-01-08 江苏满运软件科技有限公司 A kind of test branch management method and system

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113127027A (en) * 2019-12-31 2021-07-16 深圳云天励飞技术有限公司 Version updating method and device based on distributed version control system
CN112988584A (en) * 2021-03-22 2021-06-18 深圳云之家网络有限公司 Service testing method, device, computer equipment and storage medium
CN113254426A (en) * 2021-07-13 2021-08-13 杰为软件系统(深圳)有限公司 CAD data distributed version control system based on branches and base lines

Similar Documents

Publication Publication Date Title
CN105094783B (en) method and device for testing stability of android application
CN107656872B (en) Software testing method, device, equipment and computer storage medium
CN110489347A (en) Method for edition management, device, equipment and readable storage medium storing program for executing based on GIT
CN109840206A (en) Data test method, apparatus, terminal and storage medium
US8959394B2 (en) Electronic device, system, and method for testing exception handling mechanism
CN106126414B (en) Application software testing method and system
JP2008508597A (en) Help utility application program
CN112052169A (en) Test management method, system, device and computer readable storage medium
CN107729019A (en) Method, apparatus, equipment and the computer-readable storage medium of version deployment
TWI476587B (en) Testing method and testing apparatus for testing function of electronic apparatus
CN111782516A (en) Code testing method and device and storage medium
CN109726123A (en) The detection system and detection method of code quality
CN107341074B (en) A kind of abnormal restorative procedure of upgrading upgrades abnormal prosthetic device and intelligent terminal
US7764619B2 (en) Signal routing error reporting
CN112231206A (en) Script editing method for application program test, computer readable storage medium and test platform
CN111767218B (en) Automatic test method, equipment and storage medium for continuous integration
CN116521533A (en) Generation method, device, equipment and storage medium
CN108563578B (en) SDK compatibility detection method, device, equipment and readable storage medium
CN111010308A (en) KVM service test method and device
CN106844186B (en) Offline test method of application and terminal equipment
CN109828910A (en) Method and device, the computer equipment, storage medium of monkey test
KR20100056337A (en) Device for generating a script for menu test, menu test automatic system having the same, and method thereof
CN108595325A (en) Input method software testing method and device and electronic equipment
CN106484625A (en) A kind of method based on universal test Software Development Platform test subsystems
CN111159050A (en) Intelligent lock testing method and device and computer readable storage 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

Application publication date: 20191122

RJ01 Rejection of invention patent application after publication