CN106844730B - Method and device for displaying file content - Google Patents

Method and device for displaying file content Download PDF

Info

Publication number
CN106844730B
CN106844730B CN201710074084.7A CN201710074084A CN106844730B CN 106844730 B CN106844730 B CN 106844730B CN 201710074084 A CN201710074084 A CN 201710074084A CN 106844730 B CN106844730 B CN 106844730B
Authority
CN
China
Prior art keywords
file
content
version
update
login 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.)
Active
Application number
CN201710074084.7A
Other languages
Chinese (zh)
Other versions
CN106844730A (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.)
Netease Hangzhou Network Co Ltd
Original Assignee
Netease Hangzhou Network 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 Netease Hangzhou Network Co Ltd filed Critical Netease Hangzhou Network Co Ltd
Priority to CN201710074084.7A priority Critical patent/CN106844730B/en
Publication of CN106844730A publication Critical patent/CN106844730A/en
Application granted granted Critical
Publication of CN106844730B publication Critical patent/CN106844730B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F21/00Security arrangements for protecting computers, components thereof, programs or data against unauthorised activity
    • G06F21/60Protecting data
    • G06F21/62Protecting access to data via a platform, e.g. using keys or access control rules
    • G06F21/6218Protecting access to data via a platform, e.g. using keys or access control rules to a system of files or objects, e.g. local or distributed file system or database
    • G06F21/6227Protecting access to data via a platform, e.g. using keys or access control rules to a system of files or objects, e.g. local or distributed file system or database where protection concerns the structure of data, e.g. records, types, queries
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/10File systems; File servers
    • G06F16/13File access structures, e.g. distributed indices
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/10File systems; File servers
    • G06F16/14Details of searching files based on file metadata
    • G06F16/148File search processing
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/10File systems; File servers
    • G06F16/14Details of searching files based on file metadata
    • G06F16/156Query results presentation
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F21/00Security arrangements for protecting computers, components thereof, programs or data against unauthorised activity
    • G06F21/30Authentication, i.e. establishing the identity or authorisation of security principals
    • G06F21/31User authentication
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F2221/00Indexing scheme relating to security arrangements for protecting computers, components thereof, programs or data against unauthorised activity
    • G06F2221/21Indexing scheme relating to G06F21/00 and subgroups addressing additional information or applications relating to security arrangements for protecting computers, components thereof, programs or data against unauthorised activity
    • G06F2221/2141Access rights, e.g. capability lists, access control lists, access tables, access matrices

Abstract

The invention discloses a method and a device for displaying file contents. Wherein, the method comprises the following steps: carrying out authority verification on a login user; after the login user passes the authority verification, acquiring a record identifier corresponding to the user identifier of the login user, wherein the record identifier is used for indexing the updated file content consulted by the login user in the version management server; and displaying the content of the historical updating file associated with the record identification to the login user. The invention solves the technical problem that the tester in the related technology can not accurately obtain the assigned codes in charge of the tester when the tester tests the codes or the program developer when the program developer reviews the codes.

Description

Method and device for displaying file content
Technical Field
The invention relates to the field of computers, in particular to a method and a device for displaying file contents.
Background
At present, in the software development process, whether a program developer or a tester can intuitively and accurately position a code which needs to be concerned by the program developer or the tester directly influences the development and test efficiency and quality of a software product. However, the access rights issue cannot be circumvented during software development and testing. Particularly for large key projects, each program development or test person is responsible for only one component of the whole project, and only the part responsible for the program development or test person needs to have the authority of consulting the codes. Therefore, there is a need to balance the need for test code/review and rights management to improve the efficiency and quality of development and testing of software products.
In the existing testing method, a program developer actively informs a tester of newly added content submitted this time, and the tester with the consulting authority can directly search the content submitted by the program developer through a version management tool instruction and check diff (which means comparing the difference of two files and displaying the difference). However, if the program developer does not have the right to refer to the corresponding file, the program developer can only generate submitted diff information and then send the diff information to a tester for regression viewing or adopt a code review tool (i.e. in the software development process, through the process of systematically checking the source code, the general purpose of the method is to find system defects so as to ensure the overall quality of the software and improve the self-level of the developer), so that the difference information between the content of different versions submitted from the previously submitted version can be checked. The program developer may notify the tester which submission is related to the change so that the tester may look up the diff information submitted by the program developer through the code review tool.
Through the method, the test method provided by the related technology cannot realize flexible authority management, for example, in some software development projects with strict authority management, only code diff content related to a test or program developer can be referred, but the whole file content cannot be referred. If the consulting operation is directly executed by the version management tool instruction, the code authority is difficult to control, namely the openness degree of the authority of the version management tool is relative to one file or directory, and the authority setting of different version diff information of a specific file is lacked. Even if the reference authority is configured for a specific file, if a program developer submits a newly added file, the reference authority needs to be configured for the newly added file, thereby increasing the operation complexity. However, if only some code review tools are used, it is difficult to locate that the version management tool related to the test content submits diff information, and the program developer needs to notify the tester of the newly submitted file content, and then the tester searches for the diff information submitted correspondingly. The problems that arise from this are: the code review tools record corresponding information only when the version management tools are found to have submitted contents by frequently monitoring a data storage warehouse of the version management server, and do not actively trigger to acquire the submitted information when the version management tools are submitted.
In summary, the testers in the related art cannot accurately obtain the assigned codes in their own responsibility when performing code testing or when performing code review by the program developers.
In view of the above problems, no effective solution has been proposed.
Disclosure of Invention
The embodiment of the invention provides a method and a device for displaying file contents, which are used for at least solving the technical problem that testers in the related art cannot accurately acquire assigned codes in charge of the testers during code testing or program developers during code review.
According to an aspect of an embodiment of the present invention, there is provided a method for displaying file content, including:
carrying out authority verification on a login user; after the login user passes the authority verification, acquiring a record identifier corresponding to the user identifier of the login user, wherein the record identifier is used for indexing the updated file content consulted by the login user in the version management server; and displaying the content of the historical updating file associated with the record identification to the login user.
Optionally, before performing the authority verification on the login user, the method further includes: acquiring a file updating notification message, wherein the file updating notification message is triggered in the process of updating the content of a local file and submitting the content of the updated file to a version management server, and the content of the local file is a copy of a corresponding file stored in the version management server; and acquiring a record identifier from the file updating notification message, and establishing a corresponding relation between the record identifier and the content of the updated file.
Optionally, the obtaining of the record identifier from the file update notification message includes: analyzing the file updating notification message, and acquiring log information from the file updating notification message; and analyzing the log information, and acquiring a record identifier from the log information.
Optionally, after displaying the content of the history update file associated with the record identifier to the login user, the method further includes: determining the content of a first version of an update file and the content of a second version of the update file selected by a login user, wherein the first version is later than the second version; and acquiring difference information between the content of the first version of the update file and the content of the second version of the update file, and displaying the difference information.
Optionally, the obtaining of the difference information between the content of the first version of the update file and the content of the second version of the update file includes: an acquisition step, namely acquiring a file path list consisting of the updated file content of the first version according to the record identifier; selecting any file path which is not traversed from a file path list; comparing, namely comparing the updated file acquired through the selected file path with a corresponding file in the content of the updated file of the second version to obtain difference content corresponding to the selected file path; judging, namely judging whether the file path list is completely traversed or not, and returning to the selecting step if the file path list is not completely traversed; and if all the traversals are finished, forming difference information by the difference content corresponding to the file path selected each time.
According to another aspect of the embodiments of the present invention, there is also provided a display apparatus of file contents, including:
the verification module is used for verifying the authority of the login user; the first acquisition module is used for acquiring a record identifier corresponding to the user identifier of the login user after the login user passes the authority verification, wherein the record identifier is used for indexing the updated file content consulted by the login user in the version management server; and the display module is used for displaying the content of the historical update file associated with the record identifier to the login user.
Optionally, the apparatus further comprises: the second acquisition module is used for acquiring a file updating notification message, wherein the file updating notification message is triggered in the process of updating the content of a local file and submitting the content of the updated file to the version management server, and the content of the local file is a copy of a corresponding file stored in the version management server; and the processing module is used for acquiring the record identifier from the file updating notification message and establishing a corresponding relation between the record identifier and the content of the updated file.
Optionally, the processing module comprises: the first analysis unit is used for analyzing the file updating notification message and acquiring log information from the file updating notification message; and the second analysis unit is used for analyzing the log information and acquiring the record identifier from the log information.
Optionally, the apparatus further comprises: the determining module is used for determining the content of the first version of the updated file and the content of the second version of the updated file selected by the login user, wherein the first version is later than the second version; and the third acquisition module is used for acquiring the difference information between the content of the first version of the update file and the content of the second version of the update file and displaying the difference information.
Optionally, the third obtaining module includes: the acquisition unit is used for acquiring a file path list consisting of the updated file content of the first version according to the record identifier; the selecting unit is used for selecting any file path which is not traversed from the file path list; the comparison unit is used for comparing the updated file acquired through the selected file path with the corresponding file in the content of the updated file of the second version to obtain the difference content corresponding to the selected file path; the judging unit is used for judging whether the file path list is completely traversed or not, and if not, returning to the selecting unit; and if all the traversals are finished, forming difference information by the difference content corresponding to the file path selected each time.
In the embodiment of the invention, the record identifier corresponding to the user identifier of the login user is acquired after the login user passes the authority verification, and the content of the update file of the history associated with the record identifier is displayed to the login user, and the content of the update file consulted in the version management server by the login user is indexed through the record identifier, so that the aim that the login user can only consult the content of the update file associated with the record identifier corresponding to the user identifier of the login user is fulfilled, the technical effect of conveniently and quickly managing the code authority is realized, and the technical problem that testers in the related technology cannot accurately acquire the assigned codes in charge of the testers or program developers in code evaluation is solved.
Drawings
The accompanying drawings, which are included to provide a further understanding of the invention and are incorporated in and constitute a part of this application, illustrate embodiment(s) of the invention and together with the description serve to explain the invention without limiting the invention. In the drawings:
fig. 1 is a flowchart of a display method of file contents according to an embodiment of the present invention;
FIG. 2 is a schematic diagram of an update file content storage process in accordance with a preferred embodiment of the present invention;
FIG. 3 is a diagram illustrating a process for comparing file contents between two different versions to obtain difference information according to a preferred embodiment of the present invention;
fig. 4 is a block diagram of a configuration of a display apparatus of file contents according to an embodiment of the present invention;
fig. 5 is a block diagram of a display apparatus of file contents according to a preferred embodiment of the present invention.
Detailed Description
In order to make the technical solutions of the present invention better understood, the technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are only a part of the embodiments of the present invention, and not all of the embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
It should be noted that the terms "first," "second," and the like in the description and claims of the present invention and in the drawings described above are used for distinguishing between similar elements and not necessarily for describing a particular sequential or chronological order. It is to be understood that the data so used is interchangeable under appropriate circumstances such that the embodiments of the invention described herein are capable of operation in sequences other than those illustrated or described herein. Furthermore, the terms "comprises," "comprising," and "having," and any variations thereof, are intended to cover a non-exclusive inclusion, such that a process, method, system, article, or apparatus that comprises a list of steps or elements is not necessarily limited to those steps or elements expressly listed, but may include other steps or elements not expressly listed or inherent to such process, method, article, or apparatus.
In accordance with an embodiment of the present invention, there is provided an embodiment of a method for displaying file content, it should be noted that the steps illustrated in the flowchart of the accompanying drawings may be executed in a computer system such as a set of computer executable instructions, and that while a logical order is illustrated in the flowchart, in some cases, the steps illustrated or described may be executed in an order different than that herein.
Fig. 1 is a flowchart of a display method of file contents according to an embodiment of the present invention, as shown in fig. 1, the method including the steps of:
step S12, authority verification is carried out on the login user;
step S14, after the login user passes the authority verification, acquiring a record identifier corresponding to the user identifier of the login user, wherein the record identifier is used for indexing the updated file content consulted by the login user in the version management server;
in step S16, the content of the history update file associated with the record identifier is displayed to the login user.
Through the steps, the method that the record identification corresponding to the user identification of the login user is obtained after the login user passes the authority verification, the content of the update file of the history associated with the record identification is displayed to the login user is adopted, the content of the update file searched by the login user in the version management server is indexed through the record identification, the aim that the login user can only search the content of the update file associated with the record identification corresponding to the user identification of the login user is achieved, the technical effect of conveniently and quickly managing the code authority is achieved, and the technical problem that testers in the related technology cannot accurately obtain the assigned codes in charge of the testers when code testing is carried out or program developers when code evaluation is carried out is solved.
In a preferred implementation process, the authority verification of the login user may adopt an Openid authority verification mode, where Openid is a unique identity that authenticates a website through a Uniform Resource Identifier (URI), and a corresponding authority may be allocated according to the identity. The version management server may be a Subversion (abbreviated as svn) server, and is used for achieving the purpose that multiple persons jointly develop the same project and share resources. The update file content may include, but is not limited to: adding new content on the basis of the content of the original file, deleting part of the existing content on the basis of the content of the original file, and modifying part of the existing content on the basis of the content of the original file. The record identifier may be a single number of Redmine. Redmine refers to a web-based Project management software, which organizes members, tasks (questions), documents, discussions and various forms of resources together in the form of "Project", and many people participate in updating the tasks, documents and other contents to promote the progress of the Project, and meanwhile, the system automatically reports the progress of the Project for the members by using a time clue and various dynamic report forms. When the file contents stored on the svn server are updated, the file contents correspond to a Redmine single number, so that the user is limited to be only capable of looking up the updated file contents associated with the Redmine single in charge of the user.
Optionally, before the authority verification of the login user in step S12, the following steps may be further included:
step S10, obtaining a file update notification message, wherein the file update notification message is triggered in the process of updating the content of the local file and submitting the content of the updated file to the version management server, and the content of the local file is a copy of the corresponding file stored in the version management server;
step S11, obtaining the record identifier from the file update notification message, and establishing a corresponding relationship between the record identifier and the content of the updated file.
In a preferred embodiment, the file update notification message may be a svnhook post _ commit message. svnhook refers to the addition of a hook within the svn tool that is triggered each time an svn commit operation is performed, which acts to send the information each time it is committed through the svn tool to the specified server. By adding hook into the svn, the corresponding submission records can be timely acquired each time file content update occurs, and a svn server does not need to be monitored in real time.
Fig. 2 is a schematic diagram of an update file content storage process according to a preferred embodiment of the present invention, which may include the following operation steps as shown in fig. 2:
step S202, receiving an svnhook notification message triggered by the program developer each time the program developer submits, where the svnhook message carries svn information submitted this time, and the svn information may include, but is not limited to: file path, submitter, log.
Step S204, analyzing the svnhook notification message, and extracting the svn information submitted this time from the svnhook notification message.
Step S206-step S208, extracting the single number of Redmine from the log (namely, the program developer needs to add a "# single number" in the log when performing the commit operation, otherwise, svn will return a commit failure or an abnormal alarm). If the extraction fails, the process is ended; if the extraction is successful, the process proceeds to step S210.
Step S210-step S212, querying the association information of the single number from Redmine according to the extracted single number, which may include but is not limited to: follow up with the tester, title, description. If the query is successful, continue to step S218; if the query fails, execution continues with step S214.
And S214, storing the Redmine list, wherein each field information in the Redmine list is set to be null, and filling is performed after the next inquiry is successful.
Step S216, distributing default follow-up testing personnel (such as a system administrator) for the Redmine bill; go to step S222.
Step S218-step S220, Redmine ticket information is stored and distributed to corresponding follow-up testers.
Step S222, establishing a record of Redmine unit index, and associating the submitted content with the Redmine unit. The whole process is finished.
Alternatively, in step S11, the obtaining of the record identifier from the file update notification message may include the following steps:
step S110, analyzing the file updating notification message, and acquiring log information from the file updating notification message;
step S111, analyzing the log information, and acquiring the record identifier from the log information.
Program developers need to add a "# single" to log information (log) when performing a commit operation, otherwise, svn will return a commit failure or an exception alarm. The associated project management platform provided by the invention can receive the svnhook notification message triggered by the program developer each time the program developer submits, wherein the svnhook notification message carries the svn information submitted this time, and the svn information can include but is not limited to: the file path, the submitter and the log are further used for extracting the Redmine single number from the log, and acquiring the associated information of the single number from the Redmine according to the extracted single number, wherein the information can include but is not limited to: follow up with the tester, title, description.
Optionally, in step S16, after the content of the history update file associated with the record identifier is displayed to the login user, the following steps may be further included:
step S17, determining the updated file content of the first version and the updated file content of the second version selected by the login user, wherein the first version is later than the second version;
in step S18, difference information between the content of the first version of the update file and the content of the second version of the update file is acquired and displayed.
In a preferred embodiment, the Redmine single number is used as an index, so that not only can the difference information between the content of the file of the current submission version associated with the Redmine single number and the content of the file of the last submission version be quickly referred to, but also the difference information between the content of the file of the current submission version associated with the Redmine single number and the content of the file of the earliest submission version (namely, the whole content of a program developer for realizing a specific function through multiple submissions) can be quickly referred to. Therefore, the communication cost between the tester and the program developer can be reduced. In addition, the operation complexity can be reduced by directly using the Redmine single number as an index to look up all difference information associated with the Redmine single number.
Alternatively, in step S18, the obtaining of the difference information between the content of the first version of the update file and the content of the second version of the update file may include performing steps of:
step S180, acquiring a file path list formed by the updated file content of the first version according to the record identifier;
step S181, selecting any file path which has not been traversed from the file path list;
step S182, comparing the update file acquired through the selected file path with the corresponding file in the content of the second version of the update file to obtain the difference content corresponding to the selected file path;
step S183, judging whether the file path list is completely traversed or not, and returning to the selecting step if the file path list is not completely traversed; and if all the traversals are finished, forming difference information by the difference content corresponding to the file path selected each time.
Taking the test of a tester as an example, the tester submits a bug (bug) list to a program developer in Redmine, and the program developer submits all self-modified files to an svn warehouse after completing the code development of the bug list and adds a # bug list number in a log (log). After finding the corresponding single number, the script of the svn hook will actively go to Redmine to follow up the single number, and look up all information related to the single number by using the single number as an index, which may include but is not limited to: follow up with the tester, bug description information. Then, the information is displayed in a correlated manner.
Therefore, the tester can check the code diff information of all the sheets followed by the tester and search the corresponding sheet number to find the diff file submitted by the program developer, and the white box test is convenient to execute.
The following describes in detail the process of comparing the file contents between two different versions to obtain difference information, with reference to the preferred embodiment shown in fig. 3.
Fig. 3 is a schematic diagram of a process for comparing file contents between two different versions to obtain difference information according to a preferred embodiment of the present invention. As shown in fig. 3, the process may include the following operational steps:
step S302-step S306, the Openid authority of the login user is verified, and the login is allowed only to the user belonging to the white list range through the credit intermediary.
In step S308, if the login user fails to pass the Openid authority verification, the process ends.
Step S310 to step S312, after the login user successfully passes the Openid authority verification, all redmine tickets and related svn submission records allocated to the user may be queried from the database and displayed on the front-end interface.
Step S314-step S316, when the user clicks to view diff information submitted by a specific svn, the relevant information submitted by the svn is read from the database, which may include but is not limited to: file path, submitter, log.
Step S318, a file path list submitted by the svn is obtained.
In step S320, any file path that has not been traversed is selected from the file path list.
Step S322 may obtain diff information between the currently submitted version and the previously submitted version from the svn repository in real time. The process continues to step S326.
In step S324, if the user clicks and selects the comparison result between the currently submitted version and the earliest submitted version associated with the redmine single number, diff information between the currently submitted version and the earliest submitted version can be obtained from the svn repository in real time. The process continues to step S326.
Step S326, judging whether the file path list is completely traversed, if not, returning to the step S320; if all traversal is complete, execution continues with step S328.
Step S328, displaying diff information between the current submitted version and the previous submitted version or diff information between the current submitted version and the earliest submitted version on the front-end interface. Thus, the entire diff information can be consulted directly in connection with the difference between the last submitted version and the first submitted version, without the need to look at the diff information generated by each submission one by one.
According to an embodiment of the present invention, there is further provided an embodiment of a display apparatus of file content, and fig. 4 is a block diagram of a structure of the display apparatus of file content according to the embodiment of the present invention, and as shown in fig. 4, the display apparatus of file content may include: the authentication module 10 is used for performing authority authentication on a login user; the first obtaining module 20 is configured to obtain a record identifier corresponding to a user identifier of the login user after the login user passes the authority authentication, where the record identifier is used to index an update file content that the login user refers to in the version management server; and the display module 30 is used for displaying the content of the historical update file associated with the record identifier to the login user.
Optionally, fig. 5 is a block diagram of a display device for displaying file contents according to a preferred embodiment of the present invention, and as shown in fig. 5, the device may further include: a second obtaining module 40, configured to obtain a file update notification message, where the file update notification message is triggered in a process of updating a local file content and submitting an updated file content to the version management server, and the local file content is a copy of a corresponding file stored in the version management server; and the processing module 50 is configured to obtain the record identifier from the file update notification message, and establish a corresponding relationship between the record identifier and the content of the updated file.
Alternatively, the processing module 50 may include: a first parsing unit (not shown in the figure) for parsing the file update notification message and obtaining log information from the file update notification message; and a second parsing unit (not shown in the figure) for parsing the log information and obtaining the record identifier from the log information.
Optionally, as shown in fig. 5, the apparatus may further include: a determining module 60, configured to determine content of a first version of an update file and content of a second version of the update file selected by a login user, where the first version is later than the second version; the third obtaining module 70 is configured to obtain difference information between the content of the update file of the first version and the content of the update file of the second version, and display the difference information.
Optionally, the third obtaining module 70 may include: an acquisition unit (not shown in the figure) that acquires a file path list made up of the updated file contents of the first version based on the record identification; a selecting unit (not shown in the figure) for selecting any file path which is not traversed from the file path list; a comparing unit (not shown in the figure) for comparing the update file obtained through the selected file path with a corresponding file in the content of the update file of the second version to obtain a difference content corresponding to the selected file path; a judging unit (not shown in the figure) for judging whether the file path list is completely traversed or not, and returning to the selecting unit if the file path list is not completely traversed; and if all the traversals are finished, forming difference information by the difference content corresponding to the file path selected each time.
The above-mentioned serial numbers of the embodiments of the present invention are merely for description and do not represent the merits of the embodiments.
In the above embodiments of the present invention, the descriptions of the respective embodiments have respective emphasis, and for parts that are not described in detail in a certain embodiment, reference may be made to related descriptions of other embodiments.
In the embodiments provided in the present application, it should be understood that the disclosed technology can be implemented in other ways. The above-described embodiments of the apparatus are merely illustrative, and for example, the division of the units may be a logical division, and in actual implementation, there may be another division, for example, multiple 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, units or modules, and may be in an electrical 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 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 invention 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 unit, if implemented in the form of a software functional unit and sold or used as a stand-alone product, may be stored in a computer readable storage medium. Based on such understanding, the technical solution of the present invention may be embodied in the form of a software product, which is stored in a storage medium and includes instructions for causing a computer device (which may be a personal computer, a server, or a network device) to execute all or part of the steps of the method according to the embodiments of the present invention. And the aforementioned storage medium includes: a U-disk, a Read-Only Memory (ROM), a Random Access Memory (RAM), a removable hard disk, a magnetic or optical disk, and other various media capable of storing program codes.
The foregoing is only a preferred embodiment of the present invention, and it should be noted that, for those skilled in the art, various modifications and decorations can be made without departing from the principle of the present invention, and these modifications and decorations should also be regarded as the protection scope of the present invention.

Claims (10)

1. A method for displaying file content, comprising:
carrying out authority verification on a login user;
after the login user passes the authority verification, acquiring a record identifier corresponding to the user identifier of the login user, wherein the record identifier is used for indexing the updated file content searched by the login user in the version management server, and corresponds to one record identifier when the file content stored in the version management server is updated each time;
and displaying the content of the historical update file associated with the record identifier to the login user.
2. The method of claim 1, further comprising, prior to said right verification for said logged-on user:
acquiring a file update notification message, wherein the file update notification message is triggered in the process of updating the content of a local file and submitting the content of an updated file to the version management server, and the content of the local file is a copy of a corresponding file stored in the version management server;
and acquiring the record identifier from the file updating notification message, and establishing a corresponding relation between the record identifier and the content of the updated file.
3. The method of claim 2, wherein obtaining the record identification from the file update notification message comprises:
analyzing the file updating notification message, and acquiring log information from the file updating notification message;
and analyzing the log information, and acquiring the record identifier from the log information.
4. The method of claim 1, further comprising, after displaying the calendar update file content associated with the record identifier to the logged user:
determining the content of a first version of an update file and the content of a second version of the update file selected by the login user, wherein the first version is later than the second version;
and acquiring difference information between the content of the first version of the update file and the content of the second version of the update file, and displaying the difference information.
5. The method of claim 4, wherein obtaining the difference information between the first version of the update file content and the second version of the update file content comprises:
an obtaining step, obtaining a file path list formed by the updated file content of the first version according to the record identification;
selecting any file path which is not traversed from the file path list;
comparing, namely comparing the updated file acquired through the selected file path with the corresponding file in the content of the updated file of the second version to obtain the difference content corresponding to the selected file path;
judging, namely judging whether the file path list is completely traversed or not, and returning to the selecting step if the file path list is not completely traversed; and if all the traversals are finished, forming the difference information by the difference content corresponding to the file path selected each time.
6. A display device for displaying contents of a document, comprising:
the verification module is used for verifying the authority of the login user;
the first acquisition module is used for acquiring a record identifier corresponding to the user identifier of the login user after the login user passes the authority verification, wherein the record identifier is used for indexing the updated file content searched by the login user in the version management server, and corresponds to one record identifier when the file content stored in the version management server is updated each time;
and the display module is used for displaying the content of the historical update file associated with the record identifier to the login user.
7. The apparatus of claim 6, further comprising:
a second obtaining module, configured to obtain a file update notification message, where the file update notification message is triggered in a process of updating a local file content and submitting an updated file content to the version management server, and the local file content is a copy of a corresponding file stored in the version management server;
and the processing module is used for acquiring the record identifier from the file updating notification message and establishing a corresponding relation between the record identifier and the content of the updated file.
8. The apparatus of claim 7, wherein the processing module comprises:
the first analysis unit is used for analyzing the file updating notification message and acquiring log information from the file updating notification message;
and the second analysis unit is used for analyzing the log information and acquiring the record identifier from the log information.
9. The apparatus of claim 8, further comprising:
the determining module is used for determining the content of a first version of the updated file and the content of a second version of the updated file selected by the login user, wherein the first version is later than the second version;
and the third acquisition module is used for acquiring the difference information between the content of the first version of the update file and the content of the second version of the update file and displaying the difference information.
10. The apparatus of claim 9, wherein the third obtaining module comprises:
the acquisition unit is used for acquiring a file path list formed by the updated file content of the first version according to the record identifier;
the selecting unit is used for selecting any file path which is not traversed from the file path list;
the comparison unit is used for comparing the update file acquired through the selected file path with the corresponding file in the content of the second version of the update file to obtain the difference content corresponding to the selected file path;
the judging unit is used for judging whether the file path list is completely traversed or not, and if not, returning to the selecting unit; and if all the traversals are finished, forming the difference information by the difference content corresponding to the file path selected each time.
CN201710074084.7A 2017-02-10 2017-02-10 Method and device for displaying file content Active CN106844730B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201710074084.7A CN106844730B (en) 2017-02-10 2017-02-10 Method and device for displaying file content

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201710074084.7A CN106844730B (en) 2017-02-10 2017-02-10 Method and device for displaying file content

Publications (2)

Publication Number Publication Date
CN106844730A CN106844730A (en) 2017-06-13
CN106844730B true CN106844730B (en) 2020-05-05

Family

ID=59127308

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201710074084.7A Active CN106844730B (en) 2017-02-10 2017-02-10 Method and device for displaying file content

Country Status (1)

Country Link
CN (1) CN106844730B (en)

Families Citing this family (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107579865A (en) * 2017-10-18 2018-01-12 北京奇虎科技有限公司 Right management method, the apparatus and system of distributed code server
CN109814849B (en) * 2017-11-20 2022-10-25 迈普通信技术股份有限公司 Information synchronization method and device
CN108089984A (en) * 2017-12-14 2018-05-29 泰康保险集团股份有限公司 Implementation method, device, storage medium and the electronic equipment of code review
CN108959232B (en) * 2018-07-28 2023-05-02 万翼科技有限公司 Method and device for generating plan adjustment report forms and computer readable storage medium
CN109783128A (en) * 2018-12-13 2019-05-21 平安普惠企业管理有限公司 Code change notification method, equipment, storage medium and device
CN109815646A (en) * 2019-01-30 2019-05-28 上海易点时空网络有限公司 Code administration method and device
CN111104151B (en) * 2019-11-26 2023-02-28 深圳市华卓智能科技有限公司 Shell script-based Git code simplification management method
CN113553262B (en) * 2021-07-22 2023-08-11 网易(杭州)网络有限公司 Code auditing method and device, electronic equipment and storage medium

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102469074A (en) * 2010-11-03 2012-05-23 腾讯科技(深圳)有限公司 Method and system for accessing website
CN104090776A (en) * 2014-07-24 2014-10-08 北京全路通信信号研究设计院有限公司 Software development method and system
CN104809019A (en) * 2015-05-19 2015-07-29 郑州悉知信息技术有限公司 Web page code publishing method and system
CN105608011A (en) * 2016-03-01 2016-05-25 网易(杭州)网络有限公司 Determination method and device for code testing coverage rate statistical results

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102469074A (en) * 2010-11-03 2012-05-23 腾讯科技(深圳)有限公司 Method and system for accessing website
CN104090776A (en) * 2014-07-24 2014-10-08 北京全路通信信号研究设计院有限公司 Software development method and system
CN104809019A (en) * 2015-05-19 2015-07-29 郑州悉知信息技术有限公司 Web page code publishing method and system
CN105608011A (en) * 2016-03-01 2016-05-25 网易(杭州)网络有限公司 Determination method and device for code testing coverage rate statistical results

Also Published As

Publication number Publication date
CN106844730A (en) 2017-06-13

Similar Documents

Publication Publication Date Title
CN106844730B (en) Method and device for displaying file content
US10135936B1 (en) Systems and methods for web analytics testing and web development
US9990501B2 (en) Diagnosing and tracking product vulnerabilities for telecommunication devices via a database
US20180060415A1 (en) Language tag management on international data storage
CN111723313A (en) Page jump processing method, device, equipment and storage medium
CN112540924A (en) Interface automation test method, device, equipment and storage medium
CN112925757A (en) Method, equipment and storage medium for tracking operation log of intelligent equipment
CN113448862A (en) Software version testing method and device and computer equipment
US11442995B2 (en) Filtering of log search results based on automated analysis
CN112069073A (en) Test case management method, terminal and storage medium
CN116662197A (en) Automatic interface testing method, system, computer and readable storage medium
CN115981718A (en) Code publishing method and device, computer equipment and storage medium
CN116069667A (en) Test case auxiliary positioning method and device based on code analysis
CN115146581A (en) Project management method, defect analysis method, related device and readable storage medium
CN112187708B (en) Automatic supplementing method and equipment for certificate chain of digital certificate
CN109558153B (en) Method, device and system for determining version consistency
CN113031995A (en) Rule updating method and device, storage medium and electronic equipment
CN113806160A (en) Method, device, equipment and storage medium for monitoring configuration file
CN106570004A (en) Data management method device
CN110609790A (en) Analytic program test method, device, medium and computer equipment
CN114153830B (en) Data verification method and device, computer storage medium and electronic equipment
CN111651429B (en) Big data scheduling parameter management method, device and distributed platform
RU2741869C1 (en) Automated system for searching, loading, storing data and generating legal documents
CN117194421A (en) Method and device for synchronizing database table structures
CN114625629A (en) Interface testing method, terminal and device

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