CN105893502A - Code synchronization method and device - Google Patents

Code synchronization method and device Download PDF

Info

Publication number
CN105893502A
CN105893502A CN201610192197.2A CN201610192197A CN105893502A CN 105893502 A CN105893502 A CN 105893502A CN 201610192197 A CN201610192197 A CN 201610192197A CN 105893502 A CN105893502 A CN 105893502A
Authority
CN
China
Prior art keywords
code
file
warehouse
remote
corresponding relation
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN201610192197.2A
Other languages
Chinese (zh)
Inventor
曾府琨
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Guangzhou Kugou Computer Technology Co Ltd
Original Assignee
Guangzhou Kugou Computer 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 Guangzhou Kugou Computer Technology Co Ltd filed Critical Guangzhou Kugou Computer Technology Co Ltd
Priority to CN201610192197.2A priority Critical patent/CN105893502A/en
Publication of CN105893502A publication Critical patent/CN105893502A/en
Pending legal-status Critical Current

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/27Replication, distribution or synchronisation of data between databases or within a distributed database system; Distributed database system architectures therefor

Landscapes

  • Engineering & Computer Science (AREA)
  • Databases & Information Systems (AREA)
  • Theoretical Computer Science (AREA)
  • Computing Systems (AREA)
  • Data Mining & Analysis (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Information Transfer Between Computers (AREA)

Abstract

The invention discloses a code synchronization method and device, and belongs to the field of the computer technology. The method includes the steps that a code synchronization instruction is received; a remote code library corresponding to a terminal is determined according to corresponding relations, wherein the corresponding relations include the corresponding relation between the terminal and the remote code library; code information is acquired; the code information is synchronized to the remote code library, wherein the remote code library is used for updating stored code information according to the received code information. The problems that as manual operation of developers is needed in the code synchronization process, the efficiency of code synchronization is low, and the probability of misoperation is high are solved, and the effects of reducing misoperation caused by manual operation and improving the efficiency of code synchronization are achieved.

Description

Code synchronisation method and device
Technical field
The present invention relates to field of computer technology, particularly to a kind of code synchronisation method and device.
Background technology
In some scenes, developer needs in the code synchronisation in terminal to remote code warehouse, and then Other developers in team are facilitated to check this code.
The terminal that mainly comprises the processes of of the code synchronisation in terminal and remote code warehouse receives what developer applied Code synchronisation instructs, and the instruction of this code synchronisation is the instruction that developer's code file to selecting applies;Eventually Holding and instruct pop-up dialogue box according to code synchronisation, developer is manually entered far in the dialog box that terminal ejects The username and password in range code warehouse;After terminal logs in remote code warehouse, receive what developer applied Submit instruction to;Last terminal is according to submitting to instruction the code information in code file to be submitted to and being synchronized to remotely In code storage.
During realizing the present invention, inventor finds that prior art at least there is problems in that
During code synchronisation, need developer's manual operation, cause the inefficient of code synchronisation to be asked Topic.
Summary of the invention
In order to solve during code synchronisation, need developer's manual operation, cause the effect of code synchronisation Rate is low, the problem that the probability of maloperation is bigger occurs, embodiments provides a kind of code synchronisation side Method and device.Described technical scheme is as follows:
First aspect, it is provided that a kind of code synchronisation method, the method includes:
Reception code synchronisation instructs;
According to corresponding relation, determining the remote code warehouse corresponding to terminal, corresponding relation includes that terminal is with remote Corresponding relation between range code warehouse;
Obtain code information;
Synchronizing code information is to remote code warehouse, and remote code warehouse is for according to the code information received Update the code information of storage.
In a kind of possible implementation, before synchronizing code information to remote code warehouse, method is also wrapped Include:
Obtain the log-on message in remote code warehouse;
According to log-on message automated log on to remote code warehouse.
In a kind of possible implementation, according to corresponding relation, determine the remote code storehouse corresponding to terminal Storehouse, including:
Resolve mapped file by default script, from mapped file, extract corresponding relation;
Remote code warehouse is determined according to corresponding relation.
In a kind of possible implementation, the method also includes:
Receive file and instruction is set;
Instruction is set according to file mapped file is set, mapped file comprises corresponding relation.
In a kind of possible implementation, receive code synchronisation instruction, including:
Receive the code synchronisation instruction of the code information synchronized in pre-set code file;
Obtain code information, including:
Obtain the code information in pre-set code file.
In a kind of possible implementation, obtain the code information in pre-set code file, including:
Whether detection pre-set code file comprises sensitive code;
If comprising sensitive code, then carry out the code information in pre-set code file presetting process, preset place During reason includes deleting sensitive code, use pre-set code replacing sensitive code and being encrypted sensitive code At least one;
The code information in pre-set code file after acquisition process.
Second aspect, it is provided that a kind of code synchronisation device, this device includes:
Command reception module, is used for receiving code synchronisation instruction;
Warehouse determines module, for according to corresponding relation, determines the remote code warehouse corresponding to terminal, right The corresponding relation included between terminal and remote code warehouse should be related to;
Code obtaining module, is used for obtaining code information;
Code synchronisation module, for synchronizing code information to remote code warehouse, remote code warehouse is used for root The code information of storage is updated according to the code information received.
In a kind of possible implementation, this device also includes:
Data obtaining module, for obtaining the log-on message in remote code warehouse;
Automated log on module, is used for according to log-on message automated log on to remote code warehouse.
In a kind of possible implementation, warehouse determines module, including:
Document analysis unit, for resolving mapped file by default script, extracts correspondence from mapped file Relation;
First determines unit, for determining remote code warehouse according to corresponding relation.
In a kind of possible implementation, this device also includes:
Receiver module is set, is used for receiving file and instruction is set;
File arranges module, arranges mapped file for arranging instruction according to file, and it is right to comprise in mapped file Should be related to.
In a kind of possible implementation, command reception module, it is used for receiving in synchronization pre-set code file Code information code synchronisation instruction;
Code obtaining module, for obtaining the code information in pre-set code file.
In a kind of possible implementation, Code obtaining module, including:
Code detection unit, is used for detecting in pre-set code file whether comprise sensitive code;
Code process unit, if for comprising sensitive code, then entering the code information in pre-set code file Row is preset and is processed, and default process includes deleting sensitive code, using pre-set code replacing sensitive code and to quick Feel at least one during code is encrypted;
First acquiring unit, the code information in pre-set code file after obtaining process.
The technical scheme that the embodiment of the present invention provides has the benefit that
Instruct by receiving code synchronisation;According to corresponding relation, determine the remote code warehouse corresponding to terminal, Corresponding relation includes the corresponding relation between terminal and remote code warehouse;Obtain code information;Synchronizing code Information is to remote code warehouse, and remote code warehouse for updating the generation of storage according to the code information received Code information;By, after receiving code synchronisation instruction, directly determining corresponding to terminal according to corresponding relation Remote code warehouse, is synchronized to code information in the remote code warehouse that terminal is corresponding automatically;Solve During code synchronisation, needing developer's manual operation, the efficiency causing code synchronisation is low, occurs by mistake The bigger problem of probability of operation;Reach to reduce the maloperation that manual operation causes, improved code synchronisation The effect of efficiency.
Accompanying drawing explanation
For the technical scheme being illustrated more clearly that in the embodiment of the present invention, institute in embodiment being described below The accompanying drawing used is needed to be briefly described, it should be apparent that, the accompanying drawing in describing below is only the present invention Some embodiments, for those of ordinary skill in the art, on the premise of not paying creative work, Other accompanying drawing can also be obtained according to these accompanying drawings.
Fig. 1 is the method flow diagram of the code synchronisation method that one embodiment of the invention provides;
Fig. 2 is the method flow diagram of the code synchronisation method that another embodiment of the present invention provides;
Fig. 3 A is the schematic diagram of the reception code synchronisation instruction that one embodiment of the invention provides;
Fig. 3 B is the method flow diagram of the sub-step obtaining code information that one embodiment of the invention provides;
Fig. 4 is the block diagram of the code synchronisation device that one embodiment of the invention provides;
Fig. 5 is the block diagram of the code synchronisation device that another embodiment of the present invention provides.
Detailed description of the invention
For making the object, technical solutions and advantages of the present invention clearer, below in conjunction with accompanying drawing to the present invention Embodiment is described in further detail.
Fig. 1 is the method flow diagram of the code synchronisation method that one embodiment of the invention provides.The method includes:
Step 101, receives code synchronisation instruction.
Step 102, according to corresponding relation, determines the remote code warehouse corresponding to terminal, and corresponding relation includes Corresponding relation between terminal and remote code warehouse.
Step 103, obtains code information.
Step 104, synchronizing code information to remote code warehouse, remote code warehouse receives for basis Code information updates the code information of storage.
In sum, the code synchronisation method that the present embodiment provides, instruct by receiving code synchronisation;According to Corresponding relation, determines the remote code warehouse corresponding to terminal, and corresponding relation includes terminal and remote code storehouse Corresponding relation between storehouse;Obtain code information;Synchronizing code information is to remote code warehouse, remote code Warehouse for updating the code information of storage according to the code information received;By receiving code synchronisation After instruction, directly determine the remote code warehouse corresponding to terminal according to corresponding relation, automatically code is believed Breath is synchronized in the remote code warehouse that terminal is corresponding;Solve during code synchronisation, need exploit person Member's manual operation, the efficiency causing code synchronisation is low, the problem that the probability of maloperation is bigger occurs;Reach Reduce the maloperation that manual operation causes, improve the effect of the efficiency of code synchronisation.
Fig. 2 is the method flow diagram of the code synchronisation method that another embodiment of the present invention provides.The method bag Include:
Step 201, receives file and arranges instruction.
Developer applies file to terminal and arranges instruction, and accordingly, terminal can receive this document and arrange Instruction.Wherein, this document arrange instruction for for arrange in the terminal comprise terminal and remote code warehouse it Between the instruction of mapped file of corresponding relation.Remote code warehouse refers to the warehouse for storing code information.
Optionally, the corresponding relation between terminal and remote code warehouse includes: the identification information of terminal is with remote Corresponding relation between the identification information in range code warehouse.
Such as: the corresponding pass between the username and password of terminal with the username and password in remote code warehouse System.The most such as: IP (Internet Protocol, the Internet protocol) address of terminal and remote code warehouse Corresponding relation between IP address.
It should be noted that the terminal in the embodiment of the present invention can be panel computer, notebook computer, platform Formula computer etc..
Step 202, arranges instruction according to file and arranges mapped file.
Terminal, after the file receiving developer's applying arranges instruction, arranges instruction according to file and arranges bag Containing the mapped file of corresponding relation between terminal and remote code warehouse.
Optionally, mapped file is xml mapped file, and wherein, in xml mapped file, storage has the use of terminal Corresponding relation between the username and password in name in an account book and password and remote code warehouse, or, the IP of terminal Corresponding relation between the IP address in address and remote code warehouse, or include that above two correspondence is closed simultaneously System.
Exemplarily, mapped file comprises the username and password of terminal and the use in remote code warehouse simultaneously Corresponding relation between name in an account book and password and between the IP address of terminal and the IP address in remote code warehouse For:
<map_files>
<SVN_Server>192.168.0.1</SVN_Server>
<SVN_Server_user>xxx_userName</SVN_Server_user>
<SVN_Server_password>xxx_passwd</SVN_Server_password>
<dev_file>dev.js</dev_file>
<pub_file>pub.js</pub_file>
</map_files>
<SVN_Terminal>192.168.1.16</SVN_Terminal>
<SVN_Terminal_user>xxx_userName</SVN_Terminal_user>
<SVN_Terminal_password>xxx_passwd</SVN_Terminal_password>
So far, step 201 and step 202 are that developer arranges the step of mapped file in terminal.Optional , step 201 and step 202 can be that developer pre-sets storage in the terminal.
Step 203, receives the code synchronisation instruction of the code information synchronized in pre-set code file.
Developer first according to self need select in the terminal to need to be synchronized to the pre-of remote code warehouse If code file, after selecting pre-set code file, developer applies code synchronisation to pre-set code file Instruction, the instruction of this code synchronisation is for indicating in the code synchronisation in pre-set code to remote code warehouse. Accordingly, terminal receives the code synchronisation instruction that developer applies.
Such as: as shown in Figure 3A, developer's right click in pre-set code file, select " the generation in dialog box Code synchronizes " option, then terminal can receive code synchronisation instruction accordingly.
Optionally, in the embodiment of the present invention, code synchronisation instruction refers to that pre-set code file is executed by developer The script added performs instruction, and this script performs the mapping literary composition that instruction pre-sets for triggering default script to resolve Part.
Step 204, resolves mapped file by default script, extracts corresponding relation from mapped file.
Mapped file, after receiving code synchronisation instruction, is resolved by terminal by default script, obtains The corresponding relation comprised in mapped file.
Such as: as a example by default script is for Python script, receive, when terminal, the code that developer applies After synchronic command, perform Python script, carried out by this Python script mapped file to pre-setting Resolve, extract the corresponding relation between terminal and the remote code warehouse comprised in mapped file.
Optionally, terminal is arranging after instruction arranges mapped file according to file, receives script and builds instruction, Building instruction according to script and build default script, the default script of structure is for resolving the mapping literary composition pre-set Part.Wherein, default script may include that Python, Perl, PHP, SQL, C++, JavaScript etc. Machine word call the turn any one.
Step 205, determines remote code warehouse according to corresponding relation.
Terminal is resolved by default script after extracting corresponding relation, determines in corresponding relation corresponding with terminal Remote code warehouse.
After terminal determines remote code warehouse corresponding in corresponding relation, obtain the login letter in remote code warehouse Breath, according to log-on message automated log on to remote code warehouse.Wherein, log-on message includes user name and close Code, or, log-on message includes IP address.
Optionally, can be real by following two mode according to log-on message automated log on to remote code warehouse Existing:
As a kind of possible implementation, if the username and password that corresponding relation is terminal and remote code The username and password in warehouse, then terminal is according to the corresponding relation being resolved to, and extracts remote code warehouse Username and password, according to the username and password automated log on extracted to remote code warehouse.
As alternatively possible implementation, if the IP address that corresponding relation is terminal and remote code warehouse IP address, then terminal is according to the corresponding relation being resolved to, and extracts the IP address in remote code warehouse, root According to the IP address automated log on extracted to remote code warehouse.
Step 206, obtains the code information in pre-set code file.
Terminal is after determining remote code warehouse according to corresponding relation, and automated log on is to the long-range generation determined Code warehouse, obtains the code information in pre-set code file.
Optionally, terminal is preserved multiple pre-set code file, only with in terminal in the embodiment of the present invention Code information in any one pre-set code file is illustrated.
Optionally, the step 206 in the embodiment of the present invention can include following sub-step, as shown in Figure 3 B:
Whether step 206a, comprise sensitive code in detection pre-set code file.
Optionally, developer's code information in the pre-set code file that terminal selects may include Part sensitive code, and developer is not intended to be synchronized to this part sensitive code remote code warehouse, Whether therefore terminal is after getting pre-set code file, wrap in the code information in detection pre-set code file Containing sensitive code.Optionally, sensitive code can include the core code of key technology and/or internal security Core code etc..
There will be two kinds of testing results, when pre-set code file does not wraps during detection in step 206a During containing sensitive code, perform step 206d;When pre-set code file comprises sensitive code, perform step 206b。
Step 206b, if comprising sensitive code, then carries out the code in pre-set code file presetting process.
Default process includes deleting sensitive code, using pre-set code replacing sensitive code and enter sensitive code At least one in row encryption.
If terminal detects in the code information in pre-set code file comprises sensitive code, pre-set code is described Partial code information in file is that developer is not intended to be synchronized to remote code warehouse, this partial code File is probably the core code of key technology, then terminal is according to the remote code warehouse logged in, to default generation Code information in code file carries out presetting process.Code information in pre-set code file is processed as with far The code information that range code warehouse is corresponding.
Such as: after terminal sensitive code in detecting pre-set code file, the sensitive code comprised is entered Row is deleted.The most such as: after terminal sensitive code in detecting pre-set code file, pre-set code is used The sensitive code comprised is replaced.
Pre-set code literary composition after code information in pre-set code file is carried out presetting process by terminal, after process Code information in part no longer comprises sensitive code.
Step 206c, the code information in pre-set code file after acquisition process.
Terminal, after carrying out the code information in pre-set code file presetting process, obtains after presetting process Code information in pre-set code file.Now, the code information in pre-set code file does not the most comprise quick Sense code, only comprises the code information corresponding with remote code warehouse.
Step 206d, if not comprising sensitive code, it is determined that the code information in pre-set code file is for needing The code information synchronized.
If terminal detects does not comprises sensitive code in the code information in pre-set code file, illustrate to preset generation Whole code informations in code file all need to be synchronized to remote code warehouse, then terminal determines and gets Pre-set code file in code information be need synchronize code information.
Step 207, synchronizing code information to remote code warehouse, remote code warehouse receives for basis Code information updates the code information of storage.
After terminal code information in getting pre-set code file, automatically by the code information that gets with Step is to remote code warehouse.Remote code warehouse, after receiving the code information that terminal is submitted to automatically, will connect The code information that the code information received prestores with self compares, and obtains variance codes information, far Range code warehouse will compare the variance codes information updating that draws in the code information prestored so that this Variance codes information in the secondary code information received stores to remote code warehouse.
In a specific example, developer arranges the most in the terminal and includes terminal and remote code The mapped file of the corresponding relation between warehouse, and build the default foot for resolving mapped file in the terminal This.When developer needs when in terminal, storage has the file synchronization of code information to remote code warehouse, Directly applying a code synchronisation instruction on the file of terminal storage, terminal is receiving code synchronisation instruction After, trigger and preset the mapped file that script parsing pre-sets, determine and there is the long-range of corresponding relation with terminal Code storage, obtains the code information in file, and finally, the code information got is synchronized by terminal automatically To remote code warehouse, remote code warehouse after receiving code information, by the code information that receives with The code information prestored compares, and obtains variance codes information, variance codes information is stored far In range code warehouse.
In sum, the code synchronisation method that the present embodiment provides, synchronize in pre-set code file by receiving Code corresponding code synchronisation instruction;Resolve mapped file by default script, extract from mapped file Corresponding relation;Remote code warehouse is determined according to corresponding relation;Obtain the code information in pre-set code file, Synchronizing code information is to remote code warehouse;By receiving the code correspondence synchronized in pre-set code file Code synchronisation instruction after, directly determine the remote code warehouse corresponding to terminal according to corresponding relation, automatically Code information is synchronized in the remote code warehouse that terminal is corresponding;Solve during code synchronisation, Needing developer's manual operation, the efficiency causing code synchronisation is low, occurs that the probability of maloperation is bigger Problem;Reach to reduce the maloperation that manual operation causes, improved the effect of the efficiency of code synchronisation.
It addition, terminal and remote code warehouse are arranged in mapped file, when code synchronisation, directly solve Analysis mapped file obtains the remote code warehouse corresponding with terminal, it is to avoid ought there is multiple pre-set code file When needing to synchronize, make pre-set code literary composition because manual the most repeatedly input remote code warehouse information can produce maloperation The problem that the leakage that part is not synchronized to remote code warehouse and produces is submitted to.
It addition, terminal according to the log-on message automated log in remote code warehouse to remote code warehouse, it is to avoid Because being manually entered the maloperation problem that the log-on message in remote code warehouse produces, also make to log on to remotely Code storage becomes more convenient.
It should be noted that when developer needs to download code information in code storage from afar, it is possible to To use the corresponding relation preset in script parsing mapped file, get the remote code storehouse corresponding with terminal Storehouse, downloads the code information of needs from corresponding remote code warehouse.
Fig. 4 is the block diagram of the code synchronisation device that one embodiment of the invention provides.This code synchronisation Device includes:
Command reception module 420, is used for receiving code synchronisation instruction.
Warehouse determines module 440, for according to corresponding relation, determines the remote code warehouse corresponding to terminal, Corresponding relation includes the corresponding relation between terminal and remote code warehouse.
Code obtaining module 460, is used for obtaining code information.
Code synchronisation module 480, for synchronizing code information to remote code warehouse, remote code warehouse is used for The code information of storage is updated according to the code information received.
In sum, the code synchronisation device that the present embodiment provides, instruct by receiving code synchronisation;According to Corresponding relation, determines the remote code warehouse corresponding to terminal, and corresponding relation includes terminal and remote code storehouse Corresponding relation between storehouse;Obtain code information;Synchronizing code information is to remote code warehouse, remote code Warehouse for updating the code information of storage according to the code information received;By receiving code synchronisation After instruction, directly determine the remote code warehouse corresponding to terminal according to corresponding relation, automatically code is believed Breath is synchronized in the remote code warehouse that terminal is corresponding;Solve during code synchronisation, need exploit person Member's manual operation, the efficiency causing code synchronisation is low, the problem that the probability of maloperation is bigger occurs;Reach Reduce the maloperation that manual operation causes, improve the effect of the efficiency of code synchronisation.
Fig. 5 is the block diagram of the code synchronisation device that another embodiment of the present invention provides.This code is same Step device includes:
Receiver module 510 is set, is used for receiving file and instruction is set.
File arranges module 520, arranges mapped file for arranging instruction according to file, comprises in mapped file Corresponding relation.
Command reception module 530, is used for receiving code synchronisation instruction.
Optionally, command reception module 530, for receiving the generation of the code information synchronized in pre-set code file Code synchronic command.
Warehouse determines module 540, for according to corresponding relation, determines the remote code warehouse corresponding to terminal, Corresponding relation includes the corresponding relation between terminal and remote code warehouse.
Optionally, warehouse determines module 540, may include that document analysis unit 541 and first determines unit 542。
Document analysis unit 541, for resolving mapped file by default script, it is right to extract from mapped file Should be related to.
First determines unit 542, for determining remote code warehouse according to corresponding relation.
Data obtaining module 550, for obtaining the log-on message in remote code warehouse.
Automated log on module 560, is used for according to log-on message automated log on to remote code warehouse.
Code obtaining module 570, is used for obtaining code information.
Optionally, Code obtaining module 570, for obtaining the code information in pre-set code file.
Optionally, Code obtaining module 570, may include that code detection unit 571, code process unit 572 and first acquiring unit 573.
Code detection unit 571, is used for detecting in pre-set code file whether comprise sensitive code.
Code process unit 572, if for comprising sensitive code, then to the code information in pre-set code file Carrying out presetting process, default process includes deleting sensitive code, using pre-set code replacing sensitive code and right Sensitive code be encrypted at least one.
First acquiring unit 573, the code information in pre-set code file after obtaining process.
Code synchronisation module 580, for synchronizing code information to remote code warehouse, remote code warehouse is used for The code information of storage is updated according to the code information received.
In sum, the code synchronisation device that the present embodiment provides, synchronize in pre-set code file by receiving Code corresponding code synchronisation instruction;Resolve mapped file by default script, extract from mapped file Corresponding relation;Remote code warehouse is determined according to corresponding relation;Obtain the code information in pre-set code file, Synchronizing code information is to remote code warehouse;By receiving the code correspondence synchronized in pre-set code file Code synchronisation instruction after, directly determine the remote code warehouse corresponding to terminal according to corresponding relation, automatically Code information is synchronized in the remote code warehouse that terminal is corresponding;Solve during code synchronisation, Needing developer's manual operation, the efficiency causing code synchronisation is low, occurs that the probability of maloperation is bigger Problem;Reach to reduce the maloperation that manual operation causes, improved the effect of the efficiency of code synchronisation.
It addition, terminal and remote code warehouse are arranged in mapped file, when code synchronisation, directly solve Analysis mapped file obtains the remote code warehouse corresponding with terminal, it is to avoid ought there is multiple pre-set code file When needing to synchronize, make pre-set code literary composition because manual the most repeatedly input remote code warehouse information can produce maloperation The problem that the leakage that part is not synchronized to remote code warehouse and produces is submitted to.
It addition, terminal according to the log-on message automated log in remote code warehouse to remote code warehouse, it is to avoid Because being manually entered the maloperation problem that the log-on message in remote code warehouse produces, also make to log on to remotely Code storage becomes more convenient.
It should be understood that the device of code synchronisation that above-described embodiment provides is when code synchronisation, only more than The division stating each functional module is illustrated, in actual application, and can be as desired by above-mentioned functions Distribution is completed by different functional modules, the internal structure of equipment will be divided into different functional modules, with Complete all or part of function described above.It addition, the device of the code synchronisation of above-described embodiment offer Belonging to same design with the embodiment of the method for code synchronisation, it implements process and refers to embodiment of the method, this In repeat no more.
The invention described above embodiment sequence number, just to describing, does not represent the quality of embodiment.
One of ordinary skill in the art will appreciate that all or part of step realizing above-described embodiment can be passed through Hardware completes, it is also possible to instructing relevant hardware by program and complete, described program can be stored in In a kind of computer-readable recording medium, storage medium mentioned above can be read only memory, disk or CD etc..
The foregoing is only presently preferred embodiments of the present invention, not in order to limit the present invention, all the present invention's Within spirit and principle, any modification, equivalent substitution and improvement etc. made, should be included in the present invention's Within protection domain.

Claims (12)

1. a code synchronisation method, it is characterised in that described method includes:
Reception code synchronisation instructs;
According to corresponding relation, determining the remote code warehouse corresponding to terminal, described corresponding relation includes described Corresponding relation between terminal and described remote code warehouse;
Obtain code information;
Synchronizing described code information extremely described remote code warehouse, described remote code warehouse is for according to reception The described code information arrived updates the code information of storage.
Method the most according to claim 1, it is characterised in that the described code information of described synchronization is to institute Before stating remote code warehouse, described method also includes:
Obtain the log-on message in described remote code warehouse;
According to described log-on message automated log on to described remote code warehouse.
Method the most according to claim 1, it is characterised in that described according to corresponding relation, determines end Remote code warehouse corresponding to end, including:
Resolve mapped file by default script, from described mapped file, extract described corresponding relation;
Described remote code warehouse is determined according to described corresponding relation.
Method the most according to claim 3, it is characterised in that described method also includes:
Receive file and instruction is set;
Instruction is set according to described file described mapped file is set, described mapped file comprises described correspondence Relation.
Method the most according to claim 1, it is characterised in that described reception code synchronisation instructs, bag Include:
Receive the described code synchronisation instruction of the code information synchronized in pre-set code file;
Described acquisition code information, including:
Obtain the described code information in described pre-set code file.
Method the most according to claim 5, it is characterised in that described acquisition described pre-set code file In described code information, including:
Detect in described pre-set code file and whether comprise sensitive code;
If comprising described sensitive code, then carry out the code information in described pre-set code file presetting process, Described default process includes deleting described sensitive code, using pre-set code to replace described sensitive code and to institute State at least one during sensitive code is encrypted;
The code information in described pre-set code file after acquisition process.
7. a code synchronisation device, it is characterised in that described device includes:
Command reception module, is used for receiving code synchronisation instruction;
Warehouse determines module, for according to corresponding relation, determines the remote code warehouse corresponding to terminal, institute State corresponding relation and include the corresponding relation between described terminal and described remote code warehouse;
Code obtaining module, is used for obtaining code information;
Code synchronisation module, is used for synchronizing described code information extremely described remote code warehouse, described long-range generation Code warehouse for updating the code information of storage according to the described code information received.
Device the most according to claim 7, it is characterised in that described device also includes:
Data obtaining module, for obtaining the log-on message in described remote code warehouse;
Automated log on module, for according to described log-on message automated log on to described remote code warehouse.
Device the most according to claim 7, it is characterised in that described warehouse determines module, including:
Document analysis unit, for resolving mapped file by default script, extracts from described mapped file Described corresponding relation;
First determines unit, for determining described remote code warehouse according to described corresponding relation.
Device the most according to claim 9, it is characterised in that described device also includes:
Receiver module is set, is used for receiving file and instruction is set;
File arranges module, arranges described mapped file, described mapping for arranging instruction according to described file File comprises described corresponding relation.
11. devices according to claim 7, it is characterised in that described command reception module, are used for Receive the described code synchronisation instruction of the code information synchronized in pre-set code file;
Described Code obtaining module, for obtaining the described code information in described pre-set code file.
12. devices according to claim 11, it is characterised in that described Code obtaining module, including:
Code detection unit, is used for detecting in described pre-set code file whether comprise sensitive code;
Code process unit, if for comprising described sensitive code, then to the generation in described pre-set code file Code information carries out presetting process, and described default process includes deleting described sensitive code, using pre-set code to replace At least one in changing described sensitive code and described sensitive code being encrypted;
First acquiring unit, the code information in described pre-set code file after obtaining process.
CN201610192197.2A 2016-03-29 2016-03-29 Code synchronization method and device Pending CN105893502A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201610192197.2A CN105893502A (en) 2016-03-29 2016-03-29 Code synchronization method and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201610192197.2A CN105893502A (en) 2016-03-29 2016-03-29 Code synchronization method and device

Publications (1)

Publication Number Publication Date
CN105893502A true CN105893502A (en) 2016-08-24

Family

ID=57014412

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201610192197.2A Pending CN105893502A (en) 2016-03-29 2016-03-29 Code synchronization method and device

Country Status (1)

Country Link
CN (1) CN105893502A (en)

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106302667A (en) * 2016-08-04 2017-01-04 上海携程商务有限公司 Code management system and method
CN109343892A (en) * 2018-08-27 2019-02-15 北京奇虎科技有限公司 It is a kind of for detecting the method, apparatus and computer equipment of file
CN111309369A (en) * 2018-12-12 2020-06-19 北京奇虎科技有限公司 Code management method and device based on Git code warehouse

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102486785A (en) * 2010-12-06 2012-06-06 金蝶软件(中国)有限公司 Data synchronization method, device and system
CN104572984A (en) * 2015-01-04 2015-04-29 浪潮通用软件有限公司 J2EE (Java 2 Enterprise Edition) project file remote synchronous change method and device

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102486785A (en) * 2010-12-06 2012-06-06 金蝶软件(中国)有限公司 Data synchronization method, device and system
CN104572984A (en) * 2015-01-04 2015-04-29 浪潮通用软件有限公司 J2EE (Java 2 Enterprise Edition) project file remote synchronous change method and device

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106302667A (en) * 2016-08-04 2017-01-04 上海携程商务有限公司 Code management system and method
CN109343892A (en) * 2018-08-27 2019-02-15 北京奇虎科技有限公司 It is a kind of for detecting the method, apparatus and computer equipment of file
CN111309369A (en) * 2018-12-12 2020-06-19 北京奇虎科技有限公司 Code management method and device based on Git code warehouse
CN111309369B (en) * 2018-12-12 2024-03-29 北京奇虎科技有限公司 Code management method and device based on Git code warehouse

Similar Documents

Publication Publication Date Title
CN106874389B (en) Data migration method and device
WO2015101357A1 (en) Method and system for pushing web application message
CN110908909B (en) Automatic test method, device, storage medium and equipment
CN111460356B (en) Automatic login method, device, medium and equipment
CN108347356B (en) Multi-protocol unit testing method and device, electronic equipment and storage medium
CN104468790B (en) The processing method and client of cookie data
CN108196878A (en) Generation method, device, electronic equipment and the storage medium of application program installation kit
US8863087B2 (en) Comprehensively testing functionality of a computer program based on program code changes
CN106888086B (en) System and method for managing account password
CN103973506B (en) A kind of domain name method of calibration, Apparatus and system
KR20190095099A (en) Transaction system error detection method, apparatus, storage medium and computer device
CN105245392A (en) Method and device for base line checking and repairing
CN105893502A (en) Code synchronization method and device
CN106572081A (en) Login authority verifying method
CN105049631B (en) Enter the method and mobile terminal of row information transmission in address list program
CN104899070B (en) Implementation method, system and the device of device command row
CN103646081A (en) Method and device for logging in web page
CN103647775A (en) Method and apparatus for registration in webpage
CN110674023B (en) Interface testing method and device
US20210117174A1 (en) Providing context-based application suggestions
US10108477B2 (en) Mobile device diagnostics
CN111177632A (en) Data acquisition method and related equipment, system and storage device thereof
CN112131092A (en) Page debugging method and device
CN112995143B (en) Safety reporting method, device, equipment and medium based on mail system
CN110134558A (en) A kind of detection method and device of server

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
CB02 Change of applicant information
CB02 Change of applicant information

Address after: 510660 Guangzhou City, Guangzhou, Guangdong, Whampoa Avenue, No. 315, self - made 1-17

Applicant after: Guangzhou KuGou Networks Co., Ltd.

Address before: 510000 B1, building, No. 16, rhyme Road, Guangzhou, Guangdong, China 13F

Applicant before: Guangzhou KuGou Networks Co., Ltd.

RJ01 Rejection of invention patent application after publication
RJ01 Rejection of invention patent application after publication

Application publication date: 20160824