CN112947907B - Method for creating code branches - Google Patents

Method for creating code branches Download PDF

Info

Publication number
CN112947907B
CN112947907B CN202010206885.6A CN202010206885A CN112947907B CN 112947907 B CN112947907 B CN 112947907B CN 202010206885 A CN202010206885 A CN 202010206885A CN 112947907 B CN112947907 B CN 112947907B
Authority
CN
China
Prior art keywords
code
branches
identifier
merging
codes
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
CN202010206885.6A
Other languages
Chinese (zh)
Other versions
CN112947907A (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.)
Shenzhen Mingyuan Cloud Technology Co Ltd
Original Assignee
Shenzhen Mingyuan Cloud 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 Mingyuan Cloud Technology Co Ltd filed Critical Shenzhen Mingyuan Cloud Technology Co Ltd
Priority to CN202010206885.6A priority Critical patent/CN112947907B/en
Publication of CN112947907A publication Critical patent/CN112947907A/en
Application granted granted Critical
Publication of CN112947907B publication Critical patent/CN112947907B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/30Creation or generation of source code
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02DCLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
    • Y02D10/00Energy efficient computing, e.g. low power processors, power management or thermal management

Landscapes

  • Engineering & Computer Science (AREA)
  • Software Systems (AREA)
  • General Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Stored Programmes (AREA)
  • Management, Administration, Business Operations System, And Electronic Commerce (AREA)

Abstract

The application is applicable to the field of computer technology, and provides a method and first equipment for creating code branches, which are used for solving the problem that a great deal of time is required to be spent by developers when creating code branches for a plurality of code warehouses in the prior art, wherein the method comprises the following steps: determining at least two code warehouses specified by a user in response to a first user operation; creating a blank of at least one corresponding code branch for each of the at least two code warehouses; and merging the codes of the main branches of each code warehouse into the empty shells of the code branches corresponding to each code warehouse to obtain at least two code branches.

Description

Method for creating code branches
Technical Field
The application belongs to the technical field of computers, and particularly relates to a method for creating code branches and first equipment.
Background
When developing the current program, developing a requirement, if the requirement relates to a plurality of gitlab code warehouses, then a developer is required to firstly create empty shells of at least one corresponding code branch for each code warehouse related to the requirement, then pull down codes of a master (master) branch of each code warehouse one by one to be combined into the empty shells of the corresponding code branch, and finally complete the creation of the code branch.
The creation process described above needs to be performed once every time a code repository is involved. Thus, if the demand involves more code warehouses, creating code branches takes a significant amount of time for the developer.
Disclosure of Invention
In view of this, the embodiments of the present application provide a method and a first device for creating code branches, so as to solve the problem that in the prior art, it takes a lot of time for a developer to create code branches for multiple code warehouses.
A first aspect of an embodiment of the present application provides a method for creating a code branch, which may include:
determining at least two code warehouses specified by a user in response to a first user operation;
creating a blank of at least one corresponding code branch for each of the at least two code warehouses;
and merging the codes of the main branches of each code warehouse into the empty shells of the corresponding code branches of each code warehouse to obtain at least two code branches.
In one possible implementation, the method may further include:
responding to a second user operation, and determining a first identification set by a user;
a first correspondence of the first identification and the at least two code branches is maintained.
In one possible implementation manner, the merging the codes of the main branches of each code repository into the empty shells of the code branches corresponding to each code repository, so as to obtain at least two code branches, and the method may further include:
generating a first identifier;
a first correspondence of the first identification and the at least two code branches is maintained.
In one possible implementation, the method may further include:
acquiring a code merging instruction, wherein the code merging instruction can comprise the first identifier;
determining the at least two code branches corresponding to the first identifier according to the first corresponding relation;
and merging codes which can be included in the at least two code branches to obtain merged codes.
In one possible implementation, the method may further include:
running the merging code in response to a running instruction for the merging code;
and after the successful operation of the combined code is determined, setting codes in the at least two code branches as read-only permission.
In one possible implementation, the method may further include:
acquiring an authority control instruction, wherein the authority control instruction can comprise the first identifier;
determining the at least two code branches corresponding to the first identifier according to the first corresponding relation;
and modifying the authority of the codes in the at least two code branches according to the authority control instruction.
In one possible implementation, the method may further include:
acquiring a deleting instruction, wherein the deleting instruction can comprise the first identifier;
determining the at least two code branches corresponding to the first identifier according to the first corresponding relation;
and deleting the at least two code branches according to the deleting instruction.
A second aspect of embodiments of the present application provides a first device, which may include:
the response module is used for responding to the first user operation and determining at least two code warehouses designated by the user;
an execution module for creating, for each of the at least two code warehouses, a blank of at least one corresponding code branch; and merging the codes of the main branches of each code warehouse into the empty shells of the corresponding code branches of each code warehouse to obtain at least two code branches.
In one possible implementation, the first device may further include:
the response module is used for responding to the second user operation and determining a first identifier set by the user;
and the storage module is used for storing the first correspondence between the first identifier and the at least two code branches.
In one possible implementation, the first device may further include:
the generation module is used for generating a first identifier;
and the storage module is used for storing the first correspondence between the first identifier and the at least two code branches.
In one possible implementation of the present invention,
the response module is further configured to obtain a code merging instruction, where the code merging instruction may include the first identifier;
the execution module is further used for determining the at least two code branches corresponding to the first identifier according to the first corresponding relation; and merging codes which can be included in the at least two code branches to obtain merged codes.
In one possible implementation of the present invention,
the execution module is also used for responding to the operation instruction of the merging code and operating the merging code; and after the successful operation of the combined code is determined, setting codes in the at least two code branches as read-only permission.
In one possible implementation, the method may further include:
the response module is further configured to obtain an entitlement control command, where the entitlement control command may include the first identifier;
the execution module is further used for determining the at least two code branches corresponding to the first identifier according to the first corresponding relation; and modifying the authority of the codes in the at least two code branches according to the authority control instruction.
In one possible implementation, the method may further include:
the response module is further configured to obtain a deletion instruction, where the deletion instruction may include the first identifier;
the execution module is further used for determining the at least two code branches corresponding to the first identifier according to the first corresponding relation; and deleting the at least two code branches according to the deleting instruction.
A third aspect of embodiments of the present application provides a first apparatus, including:
a memory, a processor and a computer program stored in the memory and executable on the processor, the processor implementing the steps of the method as described in the first aspect and any alternative implementation when the computer program is executed.
A third aspect of embodiments of the present application provides a computer readable storage medium storing a computer program which, when executed by a processor, implements the steps of the method as described in the first aspect and in any optional implementation manner.
In the embodiment of the application, after responding to the first user operation, determining at least two code warehouses designated by a user in the first user operation, then creating a blank of a corresponding code branch for each code warehouse, and automatically merging the codes of the main branches of each code warehouse into the blank of the corresponding code branch to complete the creation of at least two code branches corresponding to the at least two code warehouses. That is, in the technical solution of the present application, when corresponding code branches need to be created for multiple code warehouses, empty cases of the code branches corresponding to each code warehouse can be automatically created according to the first user operation, and codes of main branches of each code warehouse are automatically combined, so that the user does not need to manually execute the above processes one by one according to the code warehouses, and the user time is saved.
Drawings
In order to more clearly illustrate the technical solutions of the embodiments of the present application, the drawings that are required for the embodiments or the description of the prior art will be briefly described below, it being obvious that the drawings in the following description are only some embodiments of the present application, and that other drawings may be obtained according to these drawings without inventive effort for a person skilled in the art.
FIG. 1 is a schematic diagram of one embodiment of a method of creating code branches provided by embodiments of the present application;
FIG. 2 is a schematic diagram of another embodiment of a method of creating code branches provided by embodiments of the present application;
FIG. 3 is a schematic diagram of another embodiment of a method of creating code branches provided by embodiments of the present application;
FIG. 4A is a schematic diagram of one embodiment of a first device provided by embodiments of the present application;
FIG. 4B is a schematic illustration of another embodiment of a first device provided by embodiments of the present application;
FIG. 4C is a schematic illustration of another embodiment of a first device provided by embodiments of the present application;
fig. 5 is a schematic view of another embodiment of a first device provided in an embodiment of the present application.
Detailed Description
In the following description, for purposes of explanation and not limitation, specific details are set forth, such as particular system configurations, techniques, etc. in order to provide a thorough understanding of the embodiments of the present application. It will be apparent, however, to one skilled in the art that the present application may be practiced in other embodiments that depart from these specific details. In other instances, detailed descriptions of well-known systems, devices, circuits, and methods are omitted so as not to obscure the description of the present application with unnecessary detail.
In order to illustrate the technical solutions described in the present application, the following description is made by specific examples.
Referring specifically to fig. 1, fig. 1 is a schematic diagram of one embodiment of a method for creating a code branch according to an embodiment of the present application, which may include:
s110, the first device responds to the first user operation to determine at least two code warehouses designated by the user.
In this embodiment, the first device may be a computing device such as a desktop computer, a notebook computer, a palm computer, and a cloud server.
When a code branch needs to be created, the first device may respond to a first user operation of the user and determine at least two code stores specified by the user in the first user operation. Specifically, the first user operation may include: and after the first equipment monitors the selection of the at least two code warehouses by the user, clicking the control for creating the code branches, so as to determine the at least two code warehouses corresponding to the code branches to be created.
S120, the first device creates a blank of at least one corresponding code branch for each of the at least two code warehouses.
In this embodiment, the first device, after determining the at least two code warehouses specified by the user, creates a blank case of at least one corresponding code branch for each code warehouse. The branch names of the code branches can be randomly generated or set in advance by a user, and the code branches can adopt the same or different branch names. After creating the empty shell of the code branch, the first device stores the corresponding relation between the branch names of different code branches and the addresses of the code warehouse. The subsequent first device may determine all code branches under a certain code warehouse according to the address of the code warehouse, or may determine the corresponding code warehouse through the branch name of the certain code branch.
And S130, the first equipment merges the codes of the main branches of each code warehouse into the empty shells of the corresponding code branches of each code warehouse to obtain at least two code branches.
In this embodiment, after creating the empty cases of at least two code branches, the first device obtains the code in the main branch of each code repository, and merges the code into the empty case of the code branch corresponding to each code repository created in the foregoing step, thereby obtaining at least two code branches corresponding to the at least two code repositories.
In the embodiment of the application, after the first device responds to the first user operation, determining at least two code warehouses designated by the user in the first user operation, then creating a blank shell of a corresponding code branch for each code warehouse, and automatically merging the codes of the main branches of each code warehouse into the corresponding blank shell to complete the creation of at least two code branches corresponding to the at least two code warehouses. That is, in the technical solution of the present application, when the first device responds to the user and needs to create corresponding code branches for at least two code warehouses, it may automatically create a blank case of the code branch corresponding to each code warehouse according to the first user operation, and automatically combine the codes of the main branch of each code warehouse, without the need of the user to manually execute the above process one by one, so as to save the user time.
Referring specifically to fig. 2, fig. 2 is a schematic diagram of another embodiment of a method for creating a code branch according to an embodiment of the present application, which may include:
s210, the first device responds to the first user operation to determine at least two code warehouses designated by the user.
S220, the first device creates a blank of at least one corresponding code branch for each of the at least two code warehouses.
And S230, the first equipment merges codes of the main branches of each code warehouse into empty shells of the corresponding code branches of each code warehouse to obtain at least two code branches.
It should be noted that, the steps S210 to S230 are similar to the steps S110 to S130 in the embodiment shown in fig. 1, and are not repeated here.
S240, the first device responds to the second user operation to determine a first identification set by the user.
In this embodiment, after creating at least two code branches, the first device may determine, in response to the second user operation, the first identifier set by the user. Specifically, the first identifier is an identifier set by the user, and the second user operation may be an input operation, for example, after creating at least two code branches, the first device pops up a naming box to prompt the user to input the first identifier.
In another specific embodiment, the second user operation may also be a first user operation, i.e. the first device determines the first identity set by the user at the same time as determining at least two code warehouses of the code branches to be created in response to the first user operation.
S250, the first device stores a first corresponding relation between the first identification and at least two code branches.
In this embodiment, after determining the first identifier set by the user, the first device stores a first correspondence between the first identifier and at least two code branches and stores the first correspondence locally, that is, sets the first identifier as index identifiers of the at least two code branches, where the first correspondence may include a correspondence between the first identifier and branch names of the at least two code branches.
In some possible implementation scenarios, after the first device saves the first correspondence, the first device may further perform the following steps:
s260, the first device acquires a code merging instruction, wherein the code merging instruction comprises a first identifier.
In this embodiment, when testing or issuing a requirement, the first device may respond to a user operation, and obtain a code merging instruction issued by a user or received by other devices for at least two code branches created in the foregoing, where the code merging instruction includes a first identifier.
And S270, the first equipment determines at least two code branches corresponding to the first identification according to the first corresponding relation.
In this embodiment, after the first device obtains the first identifier, the first device determines at least two code branches corresponding to the first identifier from the first correspondence by using the first identifier.
S280, the first device merges the codes included in the at least two code branches to obtain merged codes.
In this embodiment, after determining at least two code branches, the first device may perform a merging operation on codes in the at least two code branches to obtain a merged code. In the merging process, the merging sequence of codes of different branches can be set in the merging instruction, so that codes in the code branches are merged according to the merging sequence.
S290, the first device runs the merging code in response to the running instruction of the merging code.
In this embodiment, after the first device obtains the merging code, the first device operates the merging code in response to an operation instruction for the merging code, for example, in response to an operation button clicked by a user.
And S291, after the first device determines that the merged code is successfully operated, setting codes in at least two code branches as read-only permission.
In this embodiment, after determining that the operation of the merging code is successful, the first device may set the codes in the at least two code branches to be read-only rights, so as to avoid modification of the codes in the code branches. Wherein determining whether the merge code has run successfully may include: and inputting the user, and obtaining preset output when the combined code is operated, so that the successful operation of the combined code can be determined.
In one possible implementation manner, the first device may further acquire a permission control instruction, where the permission control instruction includes the first identifier; determining the at least two code branches corresponding to the first identifier according to the first corresponding relation; and modifying the authority of the codes in the at least two code branches according to the authority control instruction.
In this embodiment, the first device may obtain an entitlement control command issued by the user or sent by another device, where the entitlement control command may include a first identifier, and after the first device obtains the first identifier, the first device may change, according to the entitlement control command, the entitlements of the codes in at least two code branches corresponding to the first identifier in batches, without requiring the user to modify one by one. Wherein altering the rights may include altering the code in at least two code branches to read-only rights, releasing read-write rights, or setting to non-deletable rights, etc.
In another possible implementation manner, the first device may further obtain a deletion instruction, where the deletion instruction includes the first identifier; determining the at least two code branches corresponding to the first identifier according to the first corresponding relation; and deleting the at least two code branches according to the deleting instruction.
In this embodiment, the first device may obtain a deletion instruction issued by the user or sent by another device, where the deletion instruction may include a first identifier, and after the first device obtains the first identifier, the first device may delete, according to the deletion instruction, codes in at least two code branches corresponding to the first identifier in batches, without requiring the user to delete one by one. The deleting instruction can also comprise equipment or user identification, and after the first equipment acquires the deleting instruction, the first equipment can also determine whether the current operation is legal or not according to the equipment or user identification, and if the current operation is legal, the first equipment carries out subsequent operation.
In this embodiment of the present application, after the first device creates at least two code branches corresponding to at least two code warehouses, a first correspondence between the at least two code branches and a first identifier specified by a user may be generated. Thereafter, individual developers can develop and submit their own written code in each code branch. When the test or the release is required, the first device may acquire a merging instruction, determine at least two code branches corresponding to the first identifier from the first correspondence stored before according to the first identifier included in the merging instruction, and perform a code merging operation on codes in the at least two code branches. The codes in each code branch can be acquired according to the first identification without the need of a tester to acquire the codes one by one, thereby saving the time of a user.
In an alternative embodiment, and with particular reference to fig. 3, fig. 3 is a schematic diagram of another embodiment of a method for creating a code branch provided in an embodiment of the present application, wherein:
in step S240, the first device determines, in response to the second user operation, the first identifier set by the user, and may instead be:
s241, the first device generates a first identification.
In this embodiment, after generating at least two code branches, the first device may randomly generate a first identifier, where the first identifier may be a string of characters or numerals, and the specific form is not limited herein.
In this embodiment of the present application, after the first device creates at least two code branches corresponding to at least two code warehouses, a first correspondence between the at least two code branches and a first identifier generated by the first device may be generated. Thereafter, individual developers can develop and submit their own written code in each code branch. When the test or the release is required, the first device may acquire a merging instruction, determine at least two code branches from the first correspondence saved before according to the first identifier included in the merging instruction, and perform a code merging operation on codes in the at least two code branches. The codes in each code branch can be acquired according to the first identification without the need of the testers to acquire the codes one by one, so that the time of the testers is saved.
It should be understood that the sequence number of each step in the foregoing embodiment does not mean that the execution sequence of each process should be determined by the function and the internal logic of each process, and should not limit the implementation process of the embodiment of the present application in any way.
The foregoing embodiment describes a flow of the technical solution of the present application, and referring specifically to fig. 4A, fig. 4A is a schematic diagram of one embodiment of a first device provided in the embodiment of the present application, where the first device includes:
a response module 410 for determining at least two code warehouses specified by a user in response to a first user operation;
an execution module 420 for creating, for each of the at least two code warehouses, a blank of at least one corresponding code branch; and merging the codes of the main branches of each code warehouse into the empty shells of the corresponding code branches of each code warehouse to obtain at least two code branches.
In one possible implementation, referring specifically to fig. 4B, fig. 4B is a schematic diagram of another embodiment of a first device provided in an embodiment of the present application, where the first device may further include:
a response module 410, configured to determine a first identifier set by a user in response to a second user operation;
the storage module 430 is configured to store a first correspondence between the first identifier and the at least two code branches.
In one possible implementation, referring specifically to fig. 4C, fig. 4C is a schematic diagram illustrating another embodiment of a first device provided in an embodiment of the present application, where the first device may further include:
a generating module 440, configured to generate a first identifier;
a storage module 450, configured to store a first correspondence between the first identifier and the at least two code branches.
In one possible implementation of the present invention,
the response module 410 is further configured to obtain a code merging instruction, where the code merging instruction may include the first identifier;
the execution module 420 is further configured to determine the at least two code branches corresponding to the first identifier according to the first correspondence; and merging codes which can be included in the at least two code branches to obtain merged codes.
In one possible implementation of the present invention,
an execution module 420, further configured to execute the merged code in response to an execution instruction for the merged code; and after the successful operation of the combined code is determined, setting codes in the at least two code branches as read-only permission.
In one possible implementation, the method may further include:
the response module 410 is further configured to obtain an entitlement control command, where the entitlement control command may include the first identifier;
the execution module 420 is further configured to determine the at least two code branches corresponding to the first identifier according to the first correspondence; and modifying the authority of the codes in the at least two code branches according to the authority control instruction.
In one possible implementation, the method may further include:
the response module 410 is further configured to obtain a deletion instruction, where the deletion instruction may include the first identifier;
the execution module 420 is further configured to determine the at least two code branches corresponding to the first identifier according to the first correspondence; and deleting the at least two code branches according to the deleting instruction.
Referring specifically to fig. 5, fig. 5 is a schematic diagram of another embodiment of a first device provided in an embodiment of the present application, which may include:
memory 510, processor 520, and computer program 530 stored in memory 510 and executable on processor 520, which when executed by processor 520, performs the steps of the method as described in the embodiments and any of the alternative implementations shown in fig. 1, 2, or 3.
Embodiments of the present application also provide a computer readable storage medium storing a computer program which, when executed by a processor, implements the steps of the method as in the embodiments shown in fig. 1, 2 or 3 and in any alternative implementation.
It will be apparent to those skilled in the art that, for convenience and brevity of description, only the above-described division of the functional units and modules is illustrated, and in practical application, the above-described functional distribution may be performed by different functional units and modules according to needs, i.e. the internal structure of the apparatus is divided into different functional units or modules to perform all or part of the above-described functions. The functional units and modules in the embodiment may be integrated in one processing unit, or each unit may exist alone physically, or two or more units may be integrated in one unit, where the integrated units may be implemented in a form of hardware or a form of a software functional unit. In addition, specific names of the functional units and modules are only for convenience of distinguishing from each other, and are not used for limiting the protection scope of the present application. The specific working process of the units and modules in the above system may refer to the corresponding process in the foregoing method embodiment, which is not described herein again.
In the foregoing embodiments, the descriptions of the embodiments are emphasized, and in part, not described or illustrated in any particular embodiment, reference is made to the related descriptions of other embodiments.
Those of ordinary skill in the art will appreciate that the various illustrative elements and algorithm steps described in connection with the embodiments disclosed herein may be implemented as electronic hardware, or combinations of computer software and electronic hardware. Whether such functionality is implemented as hardware or software depends upon the particular application and design constraints imposed on the solution. Skilled artisans may implement the described functionality in varying ways for each particular application, but such implementation decisions should not be interpreted as causing a departure from the scope of the present application.
In the embodiments provided in the present application, it should be understood that the disclosed apparatus/terminal device and method may be implemented in other manners. For example, the apparatus/terminal device embodiments described above are merely illustrative, e.g., the division of the modules or units is merely a logical function division, and there may be additional divisions in actual implementation, e.g., multiple units or components may be combined or integrated into another system, or some features may be omitted or not performed. Alternatively, the coupling or direct coupling or communication connection shown or discussed may be an indirect coupling or communication connection via interfaces, devices or units, which may be in electrical, mechanical or other forms.
The units described as separate units may or may not be physically separate, and units shown as units may or may not be physical units, may be located in one place, or may be distributed on a plurality of network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.
In addition, each functional unit in each embodiment of the present application may be integrated in one processing unit, or each unit may exist alone physically, or two or more units may be integrated in one unit. The integrated units may be implemented in hardware or in software functional units.
The integrated modules/units, if implemented in the form of software functional units and sold or used as stand-alone products, may be stored in a computer readable storage medium. Based on such understanding, the present application may implement all or part of the flow of the method of the above embodiment, or may be implemented by a computer program to instruct related hardware, where the computer program may be stored in a computer readable storage medium, and when the computer program is executed by a processor, the computer program may implement the steps of each method embodiment described above. The application. Wherein the computer program comprises computer program code which may be in source code form, object code form, executable file or some intermediate form etc. The computer readable medium may include: any entity or device capable of carrying the computer program code, a recording medium, a U disk, a removable hard disk, a magnetic disk, an optical disk, a computer Memory, a Read-Only Memory (ROM), a random access Memory (Random Access Memory, RAM), an electrical carrier signal, a telecommunications signal, a software distribution medium, and so forth. It should be noted that the computer readable medium contains content that can be appropriately scaled according to the requirements of jurisdictions in which such content is subject to legislation and patent practice, such as in certain jurisdictions in which such content is subject to legislation and patent practice, the computer readable medium does not include electrical carrier signals and telecommunication signals.
The above embodiments are only for illustrating the technical solution of the present application, and are not limiting; although the present application has been described in detail with reference to the foregoing embodiments, it should be understood by those of ordinary skill in the art that: the technical scheme described in the foregoing embodiments can be modified or some technical features thereof can be replaced by equivalents; such modifications and substitutions do not depart from the spirit and scope of the technical solutions of the embodiments of the present application, and are intended to be included in the scope of the present application.

Claims (9)

1. A method of creating a code branch, comprising:
determining at least two code warehouses specified by a user in response to a first user operation;
creating a blank of at least one corresponding code branch for each of the at least two code warehouses;
merging codes of the main branches of each code warehouse into empty shells of the corresponding code branches of each code warehouse to obtain at least two code branches;
acquiring a code merging instruction, wherein the code merging instruction comprises a first identifier, the first identifier is a user-set identifier, and codes in all code branches are acquired according to the first identifier;
determining the at least two code branches corresponding to the first identifier according to a first corresponding relation;
and merging codes included in the at least two code branches to obtain a merged code.
2. The method according to claim 1, wherein the method further comprises:
responding to a second user operation, and determining a first identification set by a user;
and saving a first corresponding relation between the first identifier and the at least two code branches.
3. The method of claim 1, wherein the merging the codes of the main branches of each code repository into the empty cases of the corresponding code branches of each code repository, after obtaining at least two code branches, further comprises:
generating a first identifier;
and saving a first corresponding relation between the first identifier and the at least two code branches.
4. The method according to claim 1, wherein the method further comprises:
running the merging code in response to a running instruction of the merging code;
and after the successful operation of the combined codes is determined, setting codes in the at least two code branches as read-only permission.
5. A method according to any one of claims 2 to 3, further comprising:
acquiring an authority control instruction, wherein the authority control instruction comprises the first identifier;
determining the at least two code branches corresponding to the first identifier according to the first corresponding relation;
and modifying the authority of the codes in the at least two code branches according to the authority control instruction.
6. A method according to any one of claims 2 to 3, wherein the method further comprises:
acquiring a deleting instruction, wherein the deleting instruction comprises the first identifier;
determining the at least two code branches corresponding to the first identifier according to the first corresponding relation;
and deleting the at least two code branches according to the deleting instruction.
7. An electronic device, comprising:
the response module is used for responding to the first user operation and determining at least two code warehouses designated by the user;
an execution module for creating a blank of at least one corresponding code branch for each of the at least two code warehouses; merging codes of the main branches of each code warehouse into empty shells of the corresponding code branches of each code warehouse to obtain at least two code branches;
the merging module is used for acquiring a code merging instruction, wherein the code merging instruction comprises a first identifier, the first identifier is a user-set identifier, and codes in all code branches are acquired according to the first identifier; determining the at least two code branches corresponding to the first identifier according to a first corresponding relation; and merging codes included in the at least two code branches to obtain a merged code.
8. A computer device comprising a memory, a processor and a computer program stored in the memory and executable on the processor, characterized in that the processor implements the steps of the method according to any of claims 1 to 6 when the computer program is executed.
9. A computer readable storage medium storing a computer program, characterized in that the computer program when executed by a processor implements the steps of the method according to any one of claims 1 to 6.
CN202010206885.6A 2020-03-23 2020-03-23 Method for creating code branches Active CN112947907B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202010206885.6A CN112947907B (en) 2020-03-23 2020-03-23 Method for creating code branches

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202010206885.6A CN112947907B (en) 2020-03-23 2020-03-23 Method for creating code branches

Publications (2)

Publication Number Publication Date
CN112947907A CN112947907A (en) 2021-06-11
CN112947907B true CN112947907B (en) 2024-03-12

Family

ID=76234464

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202010206885.6A Active CN112947907B (en) 2020-03-23 2020-03-23 Method for creating code branches

Country Status (1)

Country Link
CN (1) CN112947907B (en)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113806595B (en) * 2021-08-13 2022-08-12 荣耀终端有限公司 Code search system generation method, code search method and search server
CN117519782A (en) * 2024-01-05 2024-02-06 浙江大华技术股份有限公司 Engineering management method, device, equipment and storage medium based on distribution

Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106529904A (en) * 2016-10-25 2017-03-22 乐视控股(北京)有限公司 Branching view generating method and branching view generating device
CN103729195B (en) * 2014-01-15 2017-04-05 北京奇虎科技有限公司 A kind of control method and system of software version
CN107391968A (en) * 2017-08-18 2017-11-24 武汉斗鱼网络科技有限公司 A kind of method and device for realizing privately owned pod issues control of authority
CN107678773A (en) * 2017-09-28 2018-02-09 郑州云海信息技术有限公司 A kind of code development based on git and testing process management method
CN109002295A (en) * 2018-10-19 2018-12-14 武汉斗鱼网络科技有限公司 A kind of static code scan method, system, server and storage medium
CN110297627A (en) * 2019-07-01 2019-10-01 四川长虹电器股份有限公司 A kind of front-end code automation continuous integrating method based on gitlab-ci
WO2019184159A1 (en) * 2018-03-30 2019-10-03 平安科技(深圳)有限公司 Application program code detection method, device, server and medium
CN110569035A (en) * 2019-08-08 2019-12-13 数字广东网络建设有限公司 Code compiling method, device, equipment and storage medium of software development project

Family Cites Families (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20140289280A1 (en) * 2013-03-15 2014-09-25 Perforce Software, Inc. System and Method for Bi-directional Conversion of Directed Acyclic Graphs and Inter-File Branching
US10223527B2 (en) * 2016-09-20 2019-03-05 International Business Machines Corporation Protecting computer code against ROP attacks

Patent Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103729195B (en) * 2014-01-15 2017-04-05 北京奇虎科技有限公司 A kind of control method and system of software version
CN106529904A (en) * 2016-10-25 2017-03-22 乐视控股(北京)有限公司 Branching view generating method and branching view generating device
CN107391968A (en) * 2017-08-18 2017-11-24 武汉斗鱼网络科技有限公司 A kind of method and device for realizing privately owned pod issues control of authority
CN107678773A (en) * 2017-09-28 2018-02-09 郑州云海信息技术有限公司 A kind of code development based on git and testing process management method
WO2019184159A1 (en) * 2018-03-30 2019-10-03 平安科技(深圳)有限公司 Application program code detection method, device, server and medium
CN109002295A (en) * 2018-10-19 2018-12-14 武汉斗鱼网络科技有限公司 A kind of static code scan method, system, server and storage medium
CN110297627A (en) * 2019-07-01 2019-10-01 四川长虹电器股份有限公司 A kind of front-end code automation continuous integrating method based on gitlab-ci
CN110569035A (en) * 2019-08-08 2019-12-13 数字广东网络建设有限公司 Code compiling method, device, equipment and storage medium of software development project

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
Assessing the bus factor of Git repositories;Valerio Cosentino 等;《2015 IEEE 22nd International Conference on Software Analysis, Evolution, and Reengineering 》;499-503 *
软件配置管理中版本控制的研究;秦佳;《软件》;第40卷(第3期);137-139 *

Also Published As

Publication number Publication date
CN112947907A (en) 2021-06-11

Similar Documents

Publication Publication Date Title
CN112256558B (en) Test case generation method and device, computer equipment and storage medium
CN110096424B (en) Test processing method and device, electronic equipment and storage medium
CN111414391A (en) Method and system for accessing multiple data sources
CN112947907B (en) Method for creating code branches
CN113157315A (en) Method, device, equipment and medium for identifying difference information of different versions of software
CN111290738A (en) Resource processing method, device and equipment of application program and storage medium
CN110888972A (en) Sensitive content identification method and device based on Spark Streaming
CN112486492A (en) Page generation method and device, storage medium and electronic equipment
CN113971191A (en) Data import method and device and computer readable storage medium
CN116049000A (en) Environment parameter configuration method, device, equipment, storage medium and product
CN114003215A (en) Dynamic data authorization method, medium and equipment based on visualization rule configuration
CN114637969A (en) Target object authentication method and device
CN110221952B (en) Service data processing method and device and service data processing system
CN113312900A (en) Data verification method and device
CN113806327A (en) Database design method and device and related equipment
CN113934453B (en) Risk detection method, risk detection device and storage medium
CN108334394B (en) Multi-language processing method and device for basic data of multi-language software system
CN117472458B (en) System function optimal configuration method and device, electronic equipment and storage medium
CN114785847B (en) Network control software development configuration method, terminal and storage medium
CN108399323B (en) Parameter management system and parameter management method
CN113760475A (en) Online system migration method, device, medium and electronic equipment
CN116483345A (en) Form generation method and device, electronic equipment and storage medium
CN118113588A (en) Detection method, detection device, detection apparatus, detection storage medium, and detection program product
CN116820633A (en) Data verification method and device, electronic equipment and storage medium
CN117591080A (en) Data processing system

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