CN112947907A - Method for creating code branch - Google Patents

Method for creating code branch Download PDF

Info

Publication number
CN112947907A
CN112947907A CN202010206885.6A CN202010206885A CN112947907A CN 112947907 A CN112947907 A CN 112947907A CN 202010206885 A CN202010206885 A CN 202010206885A CN 112947907 A CN112947907 A CN 112947907A
Authority
CN
China
Prior art keywords
code
branches
identifier
branch
user
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.)
Granted
Application number
CN202010206885.6A
Other languages
Chinese (zh)
Other versions
CN112947907B (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

Images

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 technical field of computers, and provides a method and first equipment for creating a code branch, which are used for solving the problem that a large amount of time is needed for developers when the code branch is created for a plurality of code warehouses in the prior art, and the method comprises the following steps: in response to a first user operation, determining at least two code warehouses specified by a user; creating an empty shell of at least one corresponding code branch for each of the at least two code warehouses; and merging the code of the main branch of each code warehouse into the empty shell of the code branch corresponding to each code warehouse to obtain at least two code branches.

Description

Method for creating code branch
Technical Field
The present application belongs to the field of computer technologies, and in particular, to a method for creating a code branch and a first device.
Background
In the current program development, a requirement is developed, and if the requirement relates to a plurality of gitlab code warehouses, a developer is required to firstly create an empty shell of at least one corresponding code branch for each code warehouse related to the requirement, then pull down the code of a main (master) branch of each code warehouse one by one and merge the code into the empty shell of the corresponding code branch, and finally complete the creation of the code branch.
The creation process described above needs to be performed once for each code repository involved. Thus, if the need involves more code repositories, creating code branches can take a significant amount of time for developers.
Disclosure of Invention
In view of this, embodiments of the present application provide a method and a first device for creating a code branch, so as to solve a problem in the prior art that it takes a lot of time for developers 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:
in response to a first user operation, determining at least two code warehouses specified by a user;
creating an empty shell of at least one corresponding code branch for each of the at least two code warehouses;
and merging the code of the main branch of each code warehouse into the empty shell of the code branch corresponding to each code warehouse to obtain at least two code branches.
In one possible implementation, the method may further include:
responding to the second user operation, and determining a first identifier set by a user;
a first correspondence of the first identification to the at least two code branches is saved.
In one possible implementation, after the merging the code of the main branch of each code repository into the empty shell of the code branch corresponding to each code repository to obtain at least two code branches, the method may further include:
generating a first identifier;
a first correspondence of the first identification to the at least two code branches is saved.
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 the 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:
executing the merged code in response to an execution instruction for the merged code;
and after the merged code is determined to run successfully, setting the codes in the at least two code branches as read-only rights.
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 changing 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;
deleting the at least two code branches according to the delete instruction.
A second aspect of an embodiment 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 specified by a user;
an execution module to create an empty shell of at least one corresponding code branch for each of the at least two code warehouses; and merging the code of the main branch of each code warehouse into the empty shell of the code branch corresponding to 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 a user;
and the storage module is used for storing the first corresponding relation between the first identification and the at least two code branches.
In one possible implementation, the first device may further include:
a generation module for generating a first identifier;
and the storage module is used for storing the first corresponding relation between the first identification and the at least two code branches.
In one possible implementation form of the method,
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 configured to determine the at least two code branches corresponding to the first identifier according to the first corresponding relationship; and merging the codes which can be included in the at least two code branches to obtain merged codes.
In one possible implementation form of the method,
the execution module is also used for responding to the operation instruction of the merged code and operating the merged code; and after the merged code is determined to run successfully, setting the codes in the at least two code branches as read-only rights.
In one possible implementation, the method may further include:
the response module is further configured to obtain an authority control instruction, where the authority control instruction may include the first identifier;
the execution module is further configured to determine the at least two code branches corresponding to the first identifier according to the first corresponding relationship; and changing 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 configured to determine the at least two code branches corresponding to the first identifier according to the first corresponding relationship; deleting the at least two code branches according to the delete instruction.
A third aspect of embodiments of the present application provides a first device, including:
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 optional implementation when executing the computer program.
A third aspect of embodiments of the present application provides a computer-readable storage medium, which stores a computer program that, when executed by a processor, implements the steps of the method as described in the first aspect and any optional implementation manner.
In the embodiment of the application, after responding to the first user operation, at least two code warehouses specified by the user in the first user operation are determined, then an empty shell of a corresponding code branch is created for each code warehouse, codes of a main branch of each code warehouse are automatically merged into the empty shell of the corresponding code branch, and the creation of at least two code branches corresponding to the at least two code warehouses is completed. That is, in the technical solution of the present application, when a corresponding code branch needs to be created for a plurality of code warehouses, an empty shell of the code branch corresponding to each code warehouse can be automatically created according to a first user operation, and codes of main branches of each code warehouse can be automatically merged, so that a user does not need to manually execute the above processes one by one according to the code warehouses, thereby saving user time.
Drawings
In order to more clearly illustrate the technical solutions in the embodiments of the present application, the drawings needed to be used in the embodiments or the prior art descriptions will be briefly described below, and it is obvious that the drawings in the following description are only some embodiments of the present application, and it is obvious for those skilled in the art to obtain other drawings based on these drawings without inventive exercise.
FIG. 1 is a schematic diagram of an embodiment of a method for creating a code branch according to an embodiment of the present application;
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;
FIG. 3 is a schematic diagram of another embodiment of a method for creating a code branch according to an embodiment of the present application;
FIG. 4A is a schematic diagram of an embodiment of a first device provided in an embodiment of the present application;
fig. 4B is a schematic diagram of another embodiment of a first device provided in an embodiment of the present application;
fig. 4C is a schematic diagram of another embodiment of a first device provided in an embodiment of the present application;
fig. 5 is a schematic diagram 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 structures, 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 explain the technical solution described in the present application, the following description will be given by way of specific examples.
Referring to fig. 1 in detail, fig. 1 is a schematic diagram of an embodiment of a method for creating a code branch according to an embodiment of the present application, and the method may include:
s110, the first device responds to the first user operation and determines at least two code warehouses specified by the user.
In this embodiment, the first device may be a desktop computer, a notebook, a palm computer, a cloud server, or other computing devices.
When a code branch needs to be created, the first device may respond to a first user action by the user and determine at least two code repositories specified by the user in the first user action. Specifically, the first user operation may include: and the first device monitors the operation of clicking a control for creating the code branch after the user selects at least two code warehouses, so as to determine at least two code warehouses corresponding to the code branch to be created.
S120, the first device creates an empty shell of at least one corresponding code branch for each of the at least two code warehouses.
In this embodiment, after determining at least two code warehouses specified by the user, the first device creates an empty shell of at least one corresponding code branch for each code warehouse. The branch names of the code branches may be randomly generated or set in advance by a user, and the code branches may 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 address 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, and may also determine the corresponding code warehouse according to the branch name of the certain code branch.
S130, the first device 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 shells of the 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 shell of the code branch corresponding to the each code repository created in the foregoing step, so as to obtain the at least two code branches corresponding to the at least two code repositories.
In this embodiment of the application, after responding to the first user operation, the first device determines at least two code warehouses specified by the user in the first user operation, then creates an empty shell of a corresponding code branch for each code warehouse, automatically merges codes of a main branch of each code warehouse into the corresponding empty shell, and completes 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, an empty shell of the code branch corresponding to each code warehouse may be automatically created according to the first user operation, and codes of the main branches of each code warehouse may be automatically merged without the user manually executing the above-mentioned process one by one, thereby saving the user time.
Referring to fig. 2 in detail, 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, and the method may include:
s210, the first device responds to the first user operation and determines at least two code warehouses specified by the user.
S220, the first device creates an empty shell of at least one corresponding code branch for each of the at least two code warehouses.
And S230, the first device merges the codes of the main branches of each code warehouse into the empty shell of the code branch corresponding to each code warehouse to obtain at least two code branches.
It should be noted that steps S210 to S230 are similar to steps S110 to S130 in the embodiment shown in fig. 1, and are not repeated here.
And S240, the first device responds to the second user operation and determines the first identifier set by the user.
In this embodiment, after creating at least two code branches, the first device may determine the first identifier set by the user in response to the second user operation. Specifically, the first identifier is an identifier set by a user, and the second user operation may be an input operation, for example, after the creation of at least two code branches is completed, the first device pops up a name box to prompt the user to input the first identifier.
In another embodiment, the second user operation may also be the first user operation, that is, the first device determines the first identifier set by the user when determining at least two code repositories of the code branch to be created in response to the first user operation.
S250, the first device stores a first correspondence of the first identifier and the at least two code branches.
In this embodiment, after determining the first identifier set by the user, the first device stores the first corresponding relationship between the first identifier and the at least two code branches and stores the first corresponding relationship locally, that is, the first identifier is set as an index identifier of the at least two code branches, and specifically, the first corresponding relationship may include a corresponding relationship between the first identifier and branch names of the at least two code branches.
In some possible implementation scenarios, after the first device stores the first corresponding relationship, the first device may further perform the following steps:
s260, the first device obtains a code merging instruction, wherein the code merging instruction comprises a first identifier.
In this embodiment, when performing a test or issuing a demand, the first device may respond to a user operation to obtain a code merging instruction issued by the user or received by another device for the created at least two code branches, where the code merging instruction includes the first identifier.
S270, the first device determines at least two code branches corresponding to the first identifier according to the first corresponding relation.
In this embodiment, after obtaining the first identifier, the first device determines, from the first corresponding relationship, at least two code branches corresponding to the first identifier by using the first identifier.
S280, the first device merges codes included in 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. When merging is performed, the merging order of the codes of different branches can be set in the merging instruction, so that the codes in the code branches are merged according to the merging order.
S290, the first device executes the merged code in response to the execution instruction to the merged code.
In this embodiment, after acquiring the merge code, the first device responds to an operation instruction for the merge code, for example, responds to an operation button clicked by a user, and then operates the merge code.
And S291, after the first device determines that the merged code runs successfully, setting the codes in at least two code branches as read-only permission.
In this embodiment, after determining that the merged code runs successfully, the first device may set the codes in the at least two code branches as read-only permissions, so as to avoid modifying the codes in the code branches. Wherein determining whether the merged code runs successfully may include: the input of the user obtains preset output when the merged code is run, so that the merged code can be determined to run successfully.
In a possible implementation manner, the first device may further obtain an authority control instruction, where the authority 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 changing 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 authority control instruction issued by a user or sent by another device, where the authority control instruction may include a first identifier, and after the first identifier is obtained by the first device, the authority of the codes in at least two code branches corresponding to the first identifier may be changed according to the authority control instruction batch, without requiring the user to modify the codes one by one. Wherein, changing the permission can include changing the code in at least two code branches to be read-only permission, releasing the read-write permission or setting the code to be undeletable permission, 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; deleting the at least two code branches according to the delete instruction.
In this embodiment, the first device may obtain a deletion instruction issued by a user or sent by another device, where the deletion instruction may include the first identifier, and after the first device obtains the first identifier, the first device may delete the codes in the at least two code branches corresponding to the first identifier according to the deletion instruction batch, without deleting the codes one by the user. The deleting instruction may further include a device or user identifier, and after the first device obtains the deleting instruction, it may also determine whether the current operation is legal according to the device or user identifier, and if so, perform subsequent operations.
In this embodiment of the application, after the first device creates and completes at least two code branches corresponding to at least two code warehouses, a first corresponding relationship 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 testing or issuing is required, the first device may obtain the merge instruction, determine, according to the first identifier included in the merge instruction, at least two code branches corresponding to the first identifier from the previously stored first correspondence, and perform a code merge operation on codes in the at least two code branches. Because the codes in each code branch can be obtained according to the first identification, testers do not need to obtain the codes one by one, and the time of users is saved.
In an alternative embodiment, with specific 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, where:
in step S240, the first device determines the first identifier set by the user in response to the second user operation, which may be replaced with:
s241, the first device generates a first identifier.
In this embodiment, after the first device generates 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 numbers, and a specific form is not limited herein.
In this embodiment of the application, after the first device creates and completes at least two code branches corresponding to at least two code warehouses, a first corresponding relationship 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 testing or issuing is required, the first device may obtain a merge instruction, determine at least two code branches from the previously stored first correspondence according to a first identifier included in the merge instruction, and perform a code merge operation on codes in the at least two code branches. Because the codes in each code branch can be obtained according to the first identification, testers do not need to obtain the codes one by one, and the time of the testers is saved.
It should be understood that, the sequence numbers of the steps in the foregoing embodiments do not imply an execution sequence, and the execution sequence of each process should be determined by its function and inherent logic, and should not constitute any limitation to the implementation process of the embodiments of the present application.
In the foregoing embodiment, a flow of a technical solution of the present application is described, and specifically referring to fig. 4A, fig. 4A is a schematic diagram of an embodiment of a first device provided in an embodiment of the present application, where the first device includes:
a response module 410 for determining at least two code repositories specified by a user in response to a first user action;
an execution module 420 for creating an empty shell of at least one corresponding code branch for each of the at least two code warehouses; and merging the code of the main branch of each code warehouse into the empty shell of the code branch corresponding to each code warehouse to obtain at least two code branches.
In a possible implementation manner, referring to fig. 4B in detail below, 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, in response to a second user operation, a first identifier set by a user;
the storage module 430 is configured to store a first corresponding relationship between the first identifier and the at least two code branches.
In a possible implementation manner, referring to fig. 4C in detail below, fig. 4C is a schematic diagram of another embodiment of the first device provided in the embodiment of the present application, where the first device may further include:
a generating module 440, configured to generate a first identifier;
the storage module 450 is configured to store a first corresponding relationship between the first identifier and the at least two code branches.
In one possible implementation form of the method,
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 corresponding relationship; and merging the codes which can be included in the at least two code branches to obtain merged codes.
In one possible implementation form of the method,
the execution module 420 is further configured to execute the merged code in response to an execution instruction for the merged code; and after the merged code is determined to run successfully, setting the codes in the at least two code branches as read-only rights.
In one possible implementation, the method may further include:
the response module 410 is further configured to obtain an authority control instruction, where the authority control 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 corresponding relationship; and changing 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 corresponding relationship; deleting the at least two code branches according to the delete instruction.
Referring to fig. 5 in detail, fig. 5 is a schematic diagram of another embodiment of a first device according to an embodiment of the present application, and the schematic diagram may include:
memory 510, processor 520 and a computer program 530 stored in the memory 510 and executable on the processor 520, the steps of the method as described in the embodiments and any alternative implementations of fig. 1, 2 or 3 being implemented by the processor 520 when the computer program 530 is executed.
Embodiments of the present application further provide a computer-readable storage medium, which stores a computer program, and when the computer program is executed by a processor, the computer program implements the steps of the method in the embodiments shown in fig. 1, fig. 2, or fig. 3 and any optional implementation manner.
It will be apparent to those skilled in the art that, for convenience and brevity of description, only the above-mentioned division of the functional units and modules is illustrated, and in practical applications, the above-mentioned function distribution may be performed by different functional units and modules according to needs, that is, the internal structure of the apparatus is divided into different functional units or modules to perform all or part of the above-mentioned functions. Each functional unit and module in the embodiments may be integrated in one processing unit, or each unit may exist alone physically, or two or more units are integrated in one unit, and the integrated unit may be implemented in a form of hardware, or in a form of 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 processes of the units and modules in the system may refer to the corresponding processes in the foregoing method embodiments, and are not described herein again.
In the above embodiments, the descriptions of the respective embodiments have respective emphasis, and reference may be made to the related descriptions of other embodiments for parts that are not described or illustrated in a certain embodiment.
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 implementation. 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 ways. For example, the above-described embodiments of the apparatus/terminal device are merely illustrative, and for example, the division of the modules or units is only one logical division, and there may be other divisions when actually implemented, for example, a plurality of units or components may be combined or integrated into another system, or some features may be omitted, or not executed. In addition, the shown or discussed mutual coupling or direct coupling or communication connection may be an indirect coupling or communication connection through some interfaces, devices or units, and may be in an electrical, mechanical or other form.
The units described as separate parts may or may not be physically separate, and parts displayed 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 can be selected according to actual needs to achieve the purpose of the solution of the embodiment.
In addition, functional units in the embodiments of the present application may be integrated into one processing unit, or each unit may exist alone physically, or two or more units are integrated into one unit. The integrated unit can be realized in a form of hardware, and can also be realized in a form of a software functional unit.
The integrated modules/units, if implemented in the form of software functional units and sold or used as separate products, may be stored in a computer readable storage medium. Based on such understanding, all or part of the flow in the method of the embodiments described above can be realized by a computer program, which can be stored in a computer-readable storage medium and can realize the steps of the embodiments of the methods described above when the computer program is executed by a processor. The present application relates to a method for processing a semiconductor wafer. Wherein the computer program comprises computer program code, which may be in the form of source code, object code, an executable file or some intermediate form, etc. The computer-readable medium may include: any entity or device capable of carrying the computer program code, recording medium, usb disk, removable hard disk, magnetic disk, optical disk, computer Memory, Read-Only Memory (ROM), Random Access Memory (RAM), electrical carrier wave signals, telecommunications signals, software distribution medium, and the like. It should be noted that the computer readable medium may contain content that is subject to appropriate increase or decrease as required by legislation and patent practice in jurisdictions, for example, in some jurisdictions, computer readable media does not include electrical carrier signals and telecommunications signals as is required by legislation and patent practice.
The above-mentioned embodiments are only used for illustrating the technical solutions of the present application, and not for limiting the same; 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 solutions described in the foregoing embodiments may still be modified, or some technical features may be equivalently replaced; such modifications and substitutions do not substantially depart from the spirit and scope of the embodiments of the present application and are intended to be included within the scope of the present application.

Claims (10)

1. A method of creating a code branch, comprising:
in response to a first user operation, determining at least two code warehouses specified by a user;
creating an empty shell of at least one corresponding code branch for each of the at least two code warehouses;
and merging the code of the main branch of each code warehouse into the empty shell of the code branch corresponding to each code warehouse to obtain at least two code branches.
2. The method of claim 1, further comprising:
responding to the second user operation, and determining a first identifier set by a user;
saving a first correspondence of the first identification with the at least two code branches.
3. The method of claim 1, wherein after merging the code of the main branch of each code repository into the empty shell of the code branch corresponding to each code repository, resulting in at least two code branches, the method further comprises:
generating a first identifier;
saving a first correspondence of the first identification with the at least two code branches.
4. A method according to claim 2 or 3, characterized in that the method further comprises:
acquiring a code merging instruction, wherein the code merging instruction comprises the first identifier;
determining the at least two code branches corresponding to the first identifier according to the first corresponding relation;
and merging the codes included in the at least two code branches to obtain merged codes.
5. The method of claim 4, further comprising:
executing the merged code in response to an execution instruction for the merged code;
and after the merged code is determined to run successfully, setting the codes in the at least two code branches as read-only permission.
6. The 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 changing the authority of the codes in the at least two code branches according to the authority control instruction.
7. The method according to any one of claims 2 to 3, further comprising:
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;
deleting the at least two code branches according to the delete instruction.
8. A first device, comprising:
the response module is used for responding to the first user operation and determining at least two code warehouses specified by a user;
an execution module to create an empty shell of at least one corresponding code branch for each of the at least two code warehouses; and merging the code of the main branch of each code warehouse into the empty shell of the code branch corresponding to each code warehouse to obtain at least two code branches.
9. A first 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 7 when executing the computer program.
10. A computer-readable storage medium, in which a computer program is stored which, when being executed by a processor, carries out the steps of the method according to any one of claims 1 to 7.
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 true CN112947907A (en) 2021-06-11
CN112947907B 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)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113806595A (en) * 2021-08-13 2021-12-17 荣耀终端有限公司 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 (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103729195A (en) * 2014-01-15 2014-04-16 北京奇虎科技有限公司 Control method and system for software version
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
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
US20180082056A1 (en) * 2016-09-20 2018-03-22 International Business Machines Corporation Protecting computer code against rop attacks
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

Patent Citations (10)

* 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
CN103729195A (en) * 2014-01-15 2014-04-16 北京奇虎科技有限公司 Control method and system for software version
US20180082056A1 (en) * 2016-09-20 2018-03-22 International Business Machines Corporation Protecting computer code against rop attacks
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 (4)

* Cited by examiner, † Cited by third party
Title
RAMESH NATARAJAN: "5 Steps for Code Changes Only on GitBranch and Merge to Master OnceDone", pages 1 - 11, Retrieved from the Internet <URL:《https://www.thegeekstuff.com/2019/03/git-create-dev-branch-and-merge/》> *
VALERIO COSENTINO 等: "Assessing the bus factor of Git repositories", 《2015 IEEE 22ND INTERNATIONAL CONFERENCE ON SOFTWARE ANALYSIS, EVOLUTION, AND REENGINEERING 》, pages 499 - 503 *
坚持就有希望: "怎么针对自己项目工程建立Repo管理多个git仓库?", pages 1 - 7, Retrieved from the Internet <URL:《https://blog.csdn.net/liangtianmeng/article/details/96161786》> *
秦佳: "软件配置管理中版本控制的研究", 《软件》, vol. 40, no. 3, pages 137 - 139 *

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113806595A (en) * 2021-08-13 2021-12-17 荣耀终端有限公司 Code search system generation method, code search method and search server
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

Also Published As

Publication number Publication date
CN112947907B (en) 2024-03-12

Similar Documents

Publication Publication Date Title
CN107766126B (en) Container mirror image construction method, system and device and storage medium
CN106873949A (en) Code generating method and its device
CN110597730B (en) Automatic test case generation method and system based on scene method
CN111475192B (en) Method, device, storage medium and system for performing thermal augmentation on game server
CN114531477B (en) Method and device for configuring functional components, computer equipment and storage medium
CN111414391A (en) Method and system for accessing multiple data sources
CN112947907B (en) Method for creating code branches
CN111695827A (en) Business process management method and device, electronic equipment and storage medium
CN111290738A (en) Resource processing method, device and equipment of application program and storage medium
CN111125064A (en) Method and device for generating database mode definition statement
CN110888972A (en) Sensitive content identification method and device based on Spark Streaming
CN113407254A (en) Form generation method and device, electronic equipment and storage medium
CN117234582A (en) Project code processing method and device, electronic equipment and storage medium
CN112486492A (en) Page generation method and device, storage medium and electronic equipment
CN115329759B (en) Information processing method, device, equipment and storage medium
CN116483707A (en) Test method, test device, test apparatus, test program, and test program
CN115543428A (en) Simulated data generation method and device based on strategy template
CN114003215A (en) Dynamic data authorization method, medium and equipment based on visualization rule configuration
CN113806327A (en) Database design method and device and related equipment
CN112182115A (en) Relationship display method and device, storage medium and electronic device
CN113934453B (en) Risk detection method, risk detection device and storage medium
CN109561146A (en) Document down loading method, device, terminal device
CN110309038B (en) Performance test method and device, electronic equipment and computer readable storage medium
CN108268649A (en) A kind of expanding unit of system language, method and terminal device
CN116483345A (en) Form generation method and device, electronic equipment and 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
GR01 Patent grant
GR01 Patent grant