CN116866327A - Method and device for viewing svn log based on web - Google Patents

Method and device for viewing svn log based on web Download PDF

Info

Publication number
CN116866327A
CN116866327A CN202310848209.2A CN202310848209A CN116866327A CN 116866327 A CN116866327 A CN 116866327A CN 202310848209 A CN202310848209 A CN 202310848209A CN 116866327 A CN116866327 A CN 116866327A
Authority
CN
China
Prior art keywords
svn
log
item
web
linux system
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
CN202310848209.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.)
Chuangze Intelligent Robot Group Co ltd
Original Assignee
Chuangze Intelligent Robot Group 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 Chuangze Intelligent Robot Group Co ltd filed Critical Chuangze Intelligent Robot Group Co ltd
Priority to CN202310848209.2A priority Critical patent/CN116866327A/en
Publication of CN116866327A publication Critical patent/CN116866327A/en
Pending legal-status Critical Current

Links

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
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L63/00Network architectures or network communication protocols for network security
    • H04L63/10Network architectures or network communication protocols for network security for controlling access to devices or network resources
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/01Protocols
    • H04L67/02Protocols based on web technology, e.g. hypertext transfer protocol [HTTP]
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/01Protocols
    • H04L67/06Protocols specially adapted for file transfer, e.g. file transfer protocol [FTP]
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02DCLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
    • Y02D10/00Energy efficient computing, e.g. low power processors, power management or thermal management

Landscapes

  • Engineering & Computer Science (AREA)
  • Signal Processing (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • General Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Computer Hardware Design (AREA)
  • Computer Security & Cryptography (AREA)
  • General Health & Medical Sciences (AREA)
  • Physics & Mathematics (AREA)
  • Software Systems (AREA)
  • General Physics & Mathematics (AREA)
  • Bioethics (AREA)
  • Health & Medical Sciences (AREA)
  • Databases & Information Systems (AREA)
  • Computing Systems (AREA)
  • Information Transfer Between Computers (AREA)

Abstract

The embodiment of the specification discloses a method for viewing a svn log based on web, which comprises the following steps: the web application server acquires login information uploaded by the web browser according to the corresponding user login interface; determining the authorization authority corresponding to the login information according to a preset web service authority directory, so as to store svn project data configured by a web browser end according to the authorization authority into a relational database of a linux system server; calling an export instruction of the linux system server based on a preset period to acquire an latest copy of the svn item and store the latest copy of the svn item into an svn item copy folder; and responding to different query requests uploaded by the web browser, calling a corresponding script of a linux system server to query the svn item copy folder, and obtaining query information of the svn log.

Description

Method and device for viewing svn log based on web
Technical Field
The specification relates to the technical field of web application development, in particular to a method and equipment for viewing a svn log based on a web.
Background
SVN is short for Subversion, is a version control system of open source code, and compared with RCS and CVS, it adopts branch management system, its design goal is to replace CVS. Many version control services on the internet have migrated from CVS to Subversion. Simply stated, svn is the purpose of commonly developing the same project and sharing resources by a plurality of people. In practical application, a project manager can know the project submitting condition of project research personnel by looking up the svn log, so that looking up the svn log is an important link in project development.
The existing method for checking the svn log needs to install svn client software at a computer end, for example: totoise svn, smartsvn, subcommander, rapidsvn, qsvn, and the client software distinguishes Windows systems, MAC systems, linux systems. And after the client software is installed, downloading and storing the information to the local according to the svn address of the project, and checking the log information of the project by using a log function in the client software. However, when the mode is used for checking, the svn client software is required to be installed, computers of different operating systems are limited by the operating systems, the corresponding client software is required to be downloaded, otherwise, the svn client software cannot be installed, the svn project log is checked after the computer is replaced, the svn client software is required to be reinstalled, the project is downloaded again, the log can be checked, and the operation is complicated and network resources are consumed. Meanwhile, because the client software is developed based on a desktop program, when the client needs to download the client software and then check the svn log, the client needs to check by using a computer, and the mobile phone is difficult to check the svn project log, so that the cross-platform support is poor, and the manager is inconvenient.
Disclosure of Invention
To address the above issues, one or more embodiments of the present specification provide a method and apparatus for viewing svn logs based on web.
One or more embodiments of the present disclosure adopt the following technical solutions:
one or more embodiments of the present disclosure provide a method for viewing a svn log based on a web, which is applied to a web application server, and the method includes:
the web application server side obtains login information uploaded by the web browser side; the web application server comprises a svn log system deployed on a linux system server through a java web technology;
determining the authorization authority corresponding to the login information according to a preset web service authority directory, acquiring svn project data configured by the web browser end according to the authorization authority, and storing the svn project data in a relational database of a linux system server;
calling an export instruction of the linux system server based on a preset period to acquire an latest copy of the svn item and store the latest copy of the svn item into an svn item copy folder;
and responding to different inquiry requests uploaded by the web browser, calling a corresponding script of the linux system server to inquire the svn item copy folder, and obtaining inquiry information of the svn log.
Optionally, in one or more embodiments of the present disclosure, before the web application server obtains the login information uploaded by the web browser, the method further includes:
Acquiring an operating environment provided by the linux system server and used for installing the svn log system so as to perform configuration of environment variables based on the operating environment and complete JDK assembly construction of a Java operating environment; the svn log system is compatible with a computer operating system and a mobile terminal operating system;
based on the JDK component, running MySQL service on the linux system server to create the relational database and a preset web service data table based on the MySQL service;
and installing and running an Nginx service based on the JDK component so that after a front-end compiled file is uploaded to the linux system server, the application service of the svn log system is carried out based on the Nginx service.
Optionally, in one or more embodiments of the present specification, before determining, according to a preset web service permission directory, an item permission corresponding to the login information, the method further includes:
responding to login information uploaded by the web browser end, and calling a web service data table to acquire an account information table in the web service data table;
comparing the account information table with the login information to determine user information of the web browser; wherein the user information includes: user ID, user attribute;
Determining a svn item associated with the web browser end according to the key value relation between the user information and an item user association table in the web service data table; and the key value relation between the user information and the associated svn item is stored in the item user association table.
Optionally, in one or more embodiments of the present disclosure, determining, according to a preset web service permission directory, an item permission corresponding to the login information, and obtaining sn item data configured by the web browser according to the item permission, where the method specifically includes:
acquiring a preset web service rights item catalog corresponding to the associated svn item to acquire a user role configuration file under the preset web service rights catalog; the role configuration file is obtained based on the configuration of the web browser end corresponding to the manager;
acquiring authority configuration corresponding to the associated svn item based on the role configuration file; wherein the authority configuration includes: the user manages group rights, designates group rights and manages passwords;
determining the authorization right corresponding to the web browser according to the login information, displaying an operation page corresponding to the authorization right into a front-end interface of the web browser, and receiving svn project data configured by the web browser according to the project right.
Optionally, in one or more embodiments of the present disclosure, the calling, based on a preset period, an export instruction of the linux system server to obtain a latest copy of an svn item and save the latest copy of the svn item to an svn item copy folder specifically includes:
setting a timing task of the linux system server based on a preset period to execute the export instruction at fixed time, and acquiring the latest copy of the svn item; wherein, the export instruction is: an svn checkout instruction;
storing the latest copy of the svn item into a copy folder of the svn item based on the basic information of the latest copy of the item; wherein, the basic information of the latest copy of the item comprises: the method comprises the steps of project addresses, project copy directory names, user accounts corresponding to the svn projects and user passwords corresponding to the svn projects.
Optionally, in one or more embodiments of the present disclosure, in response to different query requests uploaded by the web browser, invoking a corresponding script of the linux system server to query the svn item copy folder, to obtain query information of the svn log, including:
receiving a request for uploading the same directory structure by the web browser end; wherein the directory structure request is within a range of the item list at the web browser end;
Acquiring a svn directory structure query instruction corresponding to the directory structure request, so as to execute the corresponding svn directory structure query instruction to obtain an item directory structure; the svn directory structure query instruction is formed based on a corresponding script of the linux system server;
receiving different log query requests uploaded by the web browser end; wherein, the different log query requests are generated based on the designated files and query contents selected by the web browser end;
and determining a corresponding script of the linux system server based on the log query request, and querying in a designated file based on the corresponding script of the linux system server to obtain query information of the svn log.
Optionally, in one or more embodiments of the present disclosure, determining, based on the log query request, a corresponding script of the linux system server, and querying, based on the corresponding script of the linux system server, in a specified file to obtain query information of the svn log, including:
if the log query request is a log view request, acquiring a query log script of the linux system server corresponding to the log view request, so as to return log basic information of the svn log to the web browser for display; wherein the log basic information includes: version number, presenter, time of presentation, file;
If the log query request is a log version comparison request, acquiring a log version comparison script of the linux system server corresponding to the log comparison request;
acquiring historical version contents of the specified file based on the log version comparison script, determining version change contents based on the historical version contents and current version contents of the specified file, and returning the version change contents to the web browser for display;
if the log query request is a log detail request, acquiring a log detail instruction of the linux system server corresponding to the log detail request, acquiring content details of the current version of content based on the log detail instruction, and returning the content details to the web browser for display.
One or more embodiments of the present specification provide a method for viewing a svn log based on a web, which is applied to a web browser, and the method includes:
transmitting login information to a web application server to acquire the authority of the svn item based on the login information; the web application server is an svn log system deployed on a linux system server through a java web technology;
Configuring svn item data based on the authority of the svn item; the svn project data are stored in a relational database of a linux system server;
based on different query requests uploaded by project requirements, the web application server side is enabled to call a corresponding script of the linux system server, a svn project copy folder of the web application server side is queried, and query information of the svn log is obtained; and the svn project copy folder is formed by acquiring the latest copy of the svn project after regularly calling the export instruction of the linux system server based on the web application server.
One or more embodiments of the present specification provide a device for viewing svn logs based on web, applied to a web application server, the device including:
at least one processor; the method comprises the steps of,
a memory communicatively coupled to the at least one processor; wherein,
the memory stores instructions executable by the at least one processor to enable the at least one processor to:
acquiring login information uploaded by a web browser end according to a corresponding user login interface; the web application server is an svn log system deployed on a linux system server through a java web technology;
Determining the authorization authority corresponding to the login information according to a preset web service authority directory, acquiring svn project data configured by the web browser end according to the authorization authority, and storing the svn project data in a relational database of a linux system server;
calling an export instruction of the linux system server based on a preset period to acquire an latest copy of the svn item and store the latest copy of the svn item into an svn item copy folder;
and responding to different inquiry requests uploaded by the web browser, calling a corresponding script of the linux system server to inquire the svn item copy folder, and obtaining inquiry information of the svn log.
One or more embodiments of the present specification provide a device for viewing svn log based on web, applied to a web browser, the device including:
at least one processor; the method comprises the steps of,
a memory communicatively coupled to the at least one processor; wherein,
the memory stores instructions executable by the at least one processor to enable the at least one processor to:
transmitting login information to a web application server to acquire the authority of the svn item based on the login information; the web application server is an svn log system deployed on a linux system server through a java web technology;
Configuring svn item data based on the authority of the svn item; the svn project data are stored in a relational database of a linux system server;
based on different query requests uploaded by project requirements, the web application server side is enabled to call a corresponding script of the linux system server, a svn project copy folder of the web application server side is queried, and query information of the svn log is obtained; and the svn project copy folder is formed by acquiring the latest copy of the svn project after regularly calling the export instruction of the linux system server based on the web application server.
The above-mentioned at least one technical scheme that this description embodiment adopted can reach following beneficial effect:
the svn log system is deployed on a linux system server through a java web technology to obtain a web application server to realize a B/S framework web technology, so that the svn log system compatible with a computer operating system and a mobile phone operating system can be displayed on a web browser, and the problem that in the prior art, the svn log is difficult to access and change the configuration of svn items based on a mobile phone is solved. And calling an export instruction to the linux system server according to a preset period, thereby acquiring the latest copy of the svn item and saving the latest copy of the svn item into a folder of the copy of the svn item. Based on the process, the project copy is stored in the remote server, the log is obtained remotely through the web service, the svn project is not required to be downloaded and stored locally, network resources and downloading time are saved, and the problem that in the prior art, the software needs to be updated and replaced and the software also needs to be reinstalled because the copy is not required to be downloaded locally is solved.
Drawings
In order to more clearly illustrate the embodiments of the present description or the technical solutions in the prior art, the drawings that are required in the embodiments or the description of the prior art will be briefly described below, it being obvious that the drawings in the following description are only some of the embodiments described in the present description, and that other drawings may be obtained according to these drawings without inventive effort for a person skilled in the art. In the drawings:
FIG. 1 is a schematic flow chart of a method for viewing a svn log based on a web, which is applied to a web application server and provided in an embodiment of the present disclosure;
FIG. 2 is a schematic flow chart of a method for viewing a svn log based on a web, which is applied to a web browser end and provided in an embodiment of the present disclosure;
FIG. 3 is a schematic diagram of an apparatus structure for viewing a svn log based on a web, which is applied to a web application server according to an embodiment of the present disclosure;
fig. 4 is a schematic diagram of an apparatus structure for viewing svn log based on web applied to a web browser according to an embodiment of the present disclosure.
Detailed Description
The embodiment of the specification provides a method and equipment for viewing a svn log based on web.
In order to make the technical solutions in the present specification better understood by those skilled in the art, the technical solutions in the embodiments of the present specification will be clearly and completely described below with reference to the drawings in the embodiments of the present specification, and it is obvious that the described embodiments are only some embodiments of the present specification, not all embodiments. All other embodiments, which can be made by one of ordinary skill in the art based on the embodiments herein without making any inventive effort, shall fall within the scope of the present disclosure.
As shown in fig. 1, the embodiment of the present disclosure provides a method flow diagram for viewing svn logs based on web, which is applied to a web application server. As can be seen from fig. 1, in one or more embodiments of the present disclosure, a method for viewing svn log based on web specifically includes the following steps:
s101: the web application server side obtains login information uploaded by the web browser side; the web application server comprises a svn log system which is deployed on a linux system server through a java web technology.
Due to the update requirements of the application program, the time limit requirements of the creation requirements and the quality requirements, the project manager needs to know the project submitting condition of project research personnel by looking at the svn log. However, in the existing method for checking the svn log, software of the svn client needs to be installed on the computer, for example: totoise svn, smartsvn, subcommander, rapidsvn, qsvn, and the client software distinguishes Windows systems, MAC systems, linux systems. That is, the existing view of the svn project log must install the svn client software, and the computers of different operating systems must download the corresponding client software limited by the operating system, otherwise, the corresponding client software cannot be installed. And the log of the svn project is checked after the computer is replaced, the svn client software is required to be reinstalled, the project is downloaded again, the log can be checked, the operation is complex, the version of the client software tool is updated, the version update prompt is still remained, and the experience is not friendly based on the manually downloaded update and installation upgrading mode. In addition, after the existing client software is installed, the existing client software needs to be downloaded and stored locally according to the svn address of the project, and the log information of the project is checked by using the log function in the client software. That is, viewing the log of svn items for the first time requires downloading the items in svn, and saving the items locally, which is particularly time-consuming and consumes network resources. And because the client needs to download the items in the svn and the client software is based on the program desktop, the existing mode needs to use a computer, cannot use a mobile phone to check the svn item log, has poor cross-platform support and brings inconvenience to a manager.
Therefore, in order to solve the disadvantage of checking logs by using the existing svn client software, the embodiment of the present disclosure is convenient for a project manager to manage projects and understand the checking mode of the svn log of project submission, firstly, in the embodiment of the present disclosure, a svn log system is deployed on a linux system server to obtain a web application server by using a java web technology, and the svn log system is compatible with a computer operating system such as Windows, MAC, linux and a mobile operating system such as IOS, android, harmonyOS (hong-mo system), so as to avoid the problem that the user cannot check by using a mobile phone terminal. And then the web application server acquires login information uploaded by the web browser according to the corresponding user login interface.
Furthermore, in order to realize the svn log system based on Java web technology, a MySQL database is connected, and the svn log system is deployed on a same Linux system server where the svn project is located. In one or more embodiments of the present disclosure, before the web application server obtains login information uploaded by the web browser according to the corresponding user login interface, the method further includes the following steps:
firstly, an operating environment provided by a linux system server and used for installing a svn log system is obtained, so that the JDK assembly construction of a Java operating environment is completed based on the configuration of environment variables of the operating environment. And then operating MySQL service on the linux system server according to the JDK component, thereby creating a relational database and a preset web service data table according to the MySQL service. And then, running the back-end service of the svn log system, and installing and running the Nginx service according to the JDK component so that after the front-end compiled file is uploaded to a linux system server, the application service of the svn log system is released based on the Nginx service.
S102: determining the authorization authority corresponding to the login information according to a preset web service authority directory, acquiring svn project data configured by the web browser end according to the authorization authority, and storing the svn project data in a relational database of a linux system server.
After the svn application system is set based on the step S101, in order to view the svn log based on the authority to avoid the influence caused by the view of the unauthorized user, in the embodiment of the present disclosure, the authority corresponding to the login information is determined according to the preset web service authority directory, and the svn item data configured by the web browser end according to the authority is obtained and stored in the relational database of the linux system server.
Specifically, in one or more embodiments of the present disclosure, before determining the project authority corresponding to the login information according to the preset web service authority directory, the method further includes the following steps:
first, the web application server calls out a web service data table in response to login information uploaded by a web browser end so as to acquire an account information table in the web service data table. Then, determining user information of the web browser end by comparing the account information table with login information uploaded by the web browser end; wherein, it should be noted that the user information includes: user ID, user attributes. And then determining the svn item associated with the web browser end according to the key value relation between the user information and the item user association table in the web service data table.
Further, in one or more embodiments of the present disclosure, determining, according to a preset web service permission directory, a project permission corresponding to login information, so as to configure, by a web browser, svn project data according to the project permission, including the following steps:
firstly, a preset web service right item catalog corresponding to the associated svn item is obtained, and therefore a user role configuration file under the preset web service right item catalog is obtained. The role configuration file is obtained based on the configuration of the web browser corresponding to the manager. Namely, under a certain application scene of the specification: the manager adds a svn account number and a password in the svn project configuration, creates a group management admin in a user role authority configuration file under the project conf directory, sets a user admin group authority admin=admin, and designates a group authority: admin=rw, and the admin password admin=123456 is set in the passwd file under the item conf directory. The conf directory is used for storing configuration of svn project authority, such as user group information, user account passwords, read-write authority for authorizing a user to access the project, and the like. The authz file is a configuration of group rights, read-write rights, etc. that grants the user access to the item.
Then acquiring authority configuration corresponding to the associated svn item based on the role configuration file; wherein, it should be noted that the authority configuration includes: the user manages group rights, designates group rights, and manages passwords. Determining the authorization right corresponding to the web browser end according to the login information uploaded by the web browser, displaying the operation page corresponding to the obtained corresponding authorization right on the front-end interface of the web browser, and receiving the svn project data configured by the web browser end according to the project right.
S103: and calling an export instruction of the linux system server based on a preset period to acquire the latest copy of the svn item and store the latest copy of the svn item into an svn item copy folder.
In order to avoid the problems that the prior client software needs to download and store the prior client software to the local according to the svn address of the item, the log function in the client software is used for checking the log information of the item, or the log of the svn item is checked for the first time, the item in the svn needs to be downloaded, and the item is stored to the local, which is time-consuming and network resource consuming. In the embodiment of the specification, after the svn log system is deployed on the linux system server based on the java web technology, the web application server can perform query operation based on the corresponding script and command of the linux system, so that the export instruction to the linux system server can be called according to the preset period in the embodiment of the specification, so that the latest copy of the svn item is obtained and saved in the folder of the copy of the svn item. Based on the process, the copy of the svn item only needs to be stored at the web application server side and does not need to be downloaded at the client side, so that network resources and downloading time are saved. Based on the process, the item copy is stored in a remote server, the log is obtained remotely through the web service, and the svn item is not required to be downloaded and stored locally. And because the web browser end, namely the client end, does not need to install software, the operation of upgrading is not needed, and the computer does not need to be replaced and the software is not required to be reinstalled. It should be further noted that, the copy of the svn item at the web server is the existing svn service of the Linux system server, and after the svn item is in the folder, for example: "/home/svn", determines a number of items under the folder, such as: "/home/svn/doc, doc" is a specific item name. Then create a copy of svn item folder under the "/home/svn" peer directory, for example: "/home/svn/temp", while the temp is granted read-write permission.
Specifically, in one or more embodiments of the present disclosure, a export instruction of a linux system server is invoked based on a preset period to obtain a latest copy of an svn item and save the latest copy of the svn item to an svn item copy folder, which specifically includes the following procedures:
firstly, setting a timing task of a linux system server according to a preset period, so as to execute a corresponding export instruction at fixed time and acquire the latest copy of the svn item. It should be noted that, in one or more embodiments of the present disclosure, the export instruction is: an svn checkout instruction. And then the latest copy of the svn item is saved in the copy folder of the svn item according to the basic information of the latest copy of the item. The following description is needed: the basic information of the latest copy of the item includes: the method comprises the steps of project addresses, project copy directory names, user account numbers corresponding to the svn projects, user passwords corresponding to the svn projects and the like. That is, the web service calls the svn checkout instruction at regular time through a regular task, obtains the latest copy of the item, and stores the latest copy of the item in the svn item copy folder, wherein the instruction format is as follows:
the svn checkout project address project copy directory-usernamesvn account-password svn password. Complete instructions such as:
svn checkout svn:// 127.0.1/doc/home/svn/temp/doc- -username admin- -password 123456, post-save item copy path: /home/svn/temp/doc.
S104: and responding to different inquiry requests uploaded by the web browser, calling a corresponding script of the linux system server to inquire the svn item copy folder, and obtaining inquiry information of the svn log.
In the embodiment of the description, in order to improve the query speed of the svn log and realize the information interaction between the web application server and the web browser, in the embodiment of the description, the web application server responds to different query requests uploaded by the web browser, so as to call a corresponding script of the linux system server to query the svn item copy folder and obtain the query information of the corresponding svn log. By adopting a Java call svn instruction mode, the data communication between the web terminal and the svn is realized. Based on the data communication between the web terminal and the svn, the front-end display of the svn log system is realized, a user can access the web page of the svn log system by using a computer or a mobile phone, log in the system and check the project modification record or the modification content, and the problem that most of the prior art cannot check the log based on the mobile phone terminal is avoided.
Specifically, in one or more embodiments of the present disclosure, in response to different query requests uploaded by a web browser, a corresponding script of a linux system server is called to query a svn item copy folder, so as to obtain query information of an svn log, which specifically includes the following procedures:
firstly, a web application server side receives a request for uploading a directory structure from a web browser side; the method is characterized in that a directory structure request is in the range of the item list of the web browser side. That is, after entering the project list from the web browser, the project manager initiates a directory structure request to the web application server, and after receiving the request, the web application server executes a query svn directory structure instruction, for example, "svn ls/home/svn/temp/doc", in the project copy folder, thereby acquiring the svn project directory structure, and returning the svn project directory structure to the web front end for display. Further, in the process of creating a new item, the item copy folder can be customized, the item copy folder can be obtained from the item information, the directory structure of the item is obtained, and a back-end java code can be used for executing Linux instructions, such as "svns/home/svn/temp/doc".
After the directory structure request is acquired, an svn directory structure query instruction corresponding to the directory structure request is acquired, so that the corresponding svn directory structure query instruction is executed to acquire the item directory structure. The method is characterized in that the svn directory structure query instruction is formed based on a corresponding script of the linux system server. And then receiving different log query requests uploaded by the web browser side, wherein it can be understood that the different log query requests are generated based on the designated files and query contents selected by the web browser side. And determining a corresponding script of the linux system server according to the log query request, so that the corresponding script of the linux system server is queried in a designated file to obtain the needed svn log query information.
Further, in one or more embodiments of the present disclosure, determining a corresponding script of the linux system server based on a log query request, and querying in a specified file based on the corresponding script of the linux system server to obtain query information of the svn log, which specifically includes:
if the log query request is a log viewing request, acquiring a query log script of a linux system server corresponding to the log viewing request, and returning log basic information of the svn log to the web browser for displaying. The log basic information comprises: version number, submitter, time of submission, file submission. For example, in a certain scenario: after acquiring the project directory structure, the project manager selects a directory or a file, initiates a log viewing request to the web server, and the web server receives the request and executes a log query instruction, for example: "svn log/home/svn/temp/doc-v", the obtaining of the log basic information includes: and returning information such as the version number, the submitter, the submission time, the submission file and the like to the web front end for display.
If the log query request is a log version comparison request, a log version comparison script of the linux system server corresponding to the log comparison request is obtained. And then, acquiring the historical version content of the specified file according to the log version comparison script, determining the version change content according to the historical version content and the current version content of the specified file, and returning the version change content to the web browser for display. For example, in a certain scene, after a project manager selects a file at a web browser end, the project manager initiates log version comparison to the web application server end, the web application server end receives a request, executes a svn log version comparison instruction, such as "svn diff-force-r 11/home/svn/temp/doc/test. Txt", acquires the content difference between the content of version number r11 and the content of the current version r12, and returns the content difference to the front end of the web browser and displays the content difference.
If the log query request is a log detail request, acquiring a log detail instruction of a linux system server corresponding to the log detail request, acquiring content details of the current version of content according to the log detail instruction, and returning the content details to the web browser for display. For example, in an application scenario, a project manager selects a file at a web browser end, initiates log details to a web application server end, receives a request from the web application server end, and executes a svn log detail instruction, for example: "svn cat-r 12/home/svn/temp/doc/test. Txt", obtain the content details of version number r12, return to web front end and show.
As shown in fig. 2, in one or more embodiments of the present disclosure, a method for viewing a svn log based on a web is provided, which is applied to a web browser, and as can be seen from fig. 2, the method for viewing the svn log based on the web includes the following steps:
s201, sending login information to a web application server to acquire the authority of the svn item based on the login information; the web application server is an svn log system deployed on a linux system server through a java web technology;
s202, configuring svn project data based on the authority of the svn project; the svn project data are stored in a relational database of a linux system server;
S203, based on different query requests uploaded by project demands, so that the web application server side invokes corresponding scripts of the linux system server to query a svn project copy folder of the web application server side to obtain query information of the svn log; and the svn project copy folder is formed by acquiring the latest copy of the svn project after regularly calling the export instruction of the linux system server based on the web application server.
That is to say, after the svn log system is deployed on the linux system server through the java web technology, a web application server end is obtained, and then the web browser end sends login information to the web application server end, and then the authorization authority of the svn item is obtained according to the login information. The web browser side configures the svn project data according to the authority of the svn project. Wherein, it can be understood that the svn project data is stored in the relational database of the linux system server. The web browser end is based on different query requests uploaded by the project demands, so that the web application server end calls a corresponding script of the Linux system server, queries a svn project copy folder of the web application server end, and obtains query information of the svn log. And the copy folders of the svn items are formed by acquiring the latest copy of the svn items after regularly calling the export instruction of the linux system server based on the web application server. Based on the process, the embodiment of the specification adopts the B/S frame web technology, has strong cross-platform property, and supports wider application range of a computer end and a mobile phone end. The item copy is stored in the server, and the client does not need to download the item to the local by remotely acquiring the log. And the web application server side invokes the corresponding script of the Linux system server, queries the svn item copy folder of the web application server side, obtains the query information of the svn log, and realizes more convenient data communication between the web end and the svn based on a Java invoking svn instruction mode.
As shown in fig. 3, in one or more embodiments of the present disclosure, there is provided an apparatus for viewing svn logs based on web applied to a web application server, the apparatus including:
at least one processor; the method comprises the steps of,
a memory communicatively coupled to the at least one processor; wherein,
the memory stores instructions executable by the at least one processor to enable the at least one processor to:
acquiring login information uploaded by a web browser end; the web application server comprises a svn log system deployed on a linux system server through a java web technology;
determining the authorization authority corresponding to the login information according to a preset web service authority directory, acquiring svn project data configured by the web browser end according to the authorization authority, and storing the svn project data in a relational database of a linux system server;
calling an export instruction of the linux system server based on a preset period to acquire an latest copy of the svn item and store the latest copy of the svn item into an svn item copy folder;
and responding to different inquiry requests uploaded by the web browser, calling a corresponding script of the linux system server to inquire the svn item copy folder, and obtaining inquiry information of the svn log.
As shown in fig. 4, in one or more embodiments of the present specification, there is provided an apparatus for web-based viewing of svn logs applied to a web browser side, the apparatus comprising:
at least one processor; the method comprises the steps of,
a memory communicatively coupled to the at least one processor; wherein,
the memory stores instructions executable by the at least one processor to enable the at least one processor to:
transmitting login information to a web application server to acquire the authority of the svn item based on the login information; the web application server is an svn log system deployed on a linux system server through a java web technology;
configuring svn item data based on the authority of the svn item; the svn project data are stored in a relational database of a linux system server;
based on different query requests uploaded by project requirements, the web application server side is enabled to call a corresponding script of the linux system server, a svn project copy folder of the web application server side is queried, and query information of the svn log is obtained; and the svn project copy folder is formed by acquiring the latest copy of the svn project after regularly calling the export instruction of the linux system server based on the web application server.
In this specification, each embodiment is described in a progressive manner, and identical and similar parts of each embodiment are all referred to each other, and each embodiment mainly describes differences from other embodiments. In particular, for apparatus, devices, non-volatile computer storage medium embodiments, the description is relatively simple, as it is substantially similar to method embodiments, with reference to the section of the method embodiments being relevant.
The foregoing describes specific embodiments of the present disclosure. Other embodiments are within the scope of the following claims. In some cases, the actions or steps recited in the claims can be performed in a different order than in the embodiments and still achieve desirable results. In addition, the processes depicted in the accompanying figures do not necessarily require the particular order shown, or sequential order, to achieve desirable results. In some embodiments, multitasking and parallel processing are also possible or may be advantageous.
The foregoing is merely one or more embodiments of the present description and is not intended to limit the present description. Various modifications and alterations to one or more embodiments of this description will be apparent to those skilled in the art. Any modification, equivalent replacement, improvement, or the like, which is within the spirit and principles of one or more embodiments of the present description, is intended to be included within the scope of the claims of the present description.

Claims (10)

1. A method for viewing a svn log based on web, which is applied to a web application server, the method comprising:
the web application server side obtains login information uploaded by the web browser side; the web application server comprises a svn log system deployed on a linux system server through a java web technology;
determining the authorization authority corresponding to the login information according to a preset web service authority directory, acquiring svn project data configured by the web browser end according to the authorization authority, and storing the svn project data in a relational database of a linux system server;
calling an export instruction of the linux system server based on a preset period to acquire an latest copy of the svn item and store the latest copy of the svn item into an svn item copy folder;
and responding to different inquiry requests uploaded by the web browser, calling a corresponding script of the linux system server to inquire the svn item copy folder, and obtaining inquiry information of the svn log.
2. The method for viewing svn log based on web of claim 1, wherein before the web application server obtains login information uploaded by the web browser, the method further comprises:
Acquiring an operating environment provided by the linux system server and used for installing the svn log system so as to perform configuration of environment variables based on the operating environment and complete JDK assembly construction of a Java operating environment; the svn log system is compatible with a computer operating system and a mobile terminal operating system;
based on the JDK component, running MySQL service on the linux system server to create the relational database and a preset web service data table based on the MySQL service;
and installing and running an Nginx service based on the JDK component so that after a front-end compiled file is uploaded to the linux system server, the application service of the svn log system is carried out based on the Nginx service.
3. The method for viewing svn log based on web of claim 1, wherein before determining the project authority corresponding to the login information according to the preset web service authority directory, the method further comprises:
responding to login information uploaded by the web browser end, and calling a web service data table to acquire an account information table in the web service data table;
comparing the account information table with the login information to determine user information of the web browser; wherein the user information includes: user ID, user attribute;
Determining a svn item associated with the web browser end according to the key value relation between the user information and an item user association table in the web service data table; and the key value relation between the user information and the associated svn item is stored in the item user association table.
4. The method for viewing svn log based on web according to claim 3, wherein determining the item authority corresponding to the login information according to a preset web service authority directory, and obtaining svn item data configured by the web browser according to the item authority, specifically comprises:
acquiring a preset web service rights item catalog corresponding to the associated svn item to acquire a user role configuration file under the preset web service rights catalog; the role configuration file is obtained based on the configuration of the web browser end corresponding to the manager;
acquiring authority configuration corresponding to the associated svn item based on the role configuration file; wherein the authority configuration includes: the user manages group rights, designates group rights and manages passwords;
determining the authorization right corresponding to the web browser according to the login information, displaying an operation page corresponding to the authorization right into a front-end interface of the web browser, and receiving svn project data configured by the web browser according to the project right.
5. The method for viewing svn log based on web according to claim 1, wherein the calling the export instruction of the linux system server based on the preset period to obtain the latest copy of the svn item and save the latest copy of the svn item to the svn item copy folder specifically includes:
setting a timing task of the linux system server based on a preset period to execute the export instruction at fixed time, and acquiring the latest copy of the svn item; wherein, the export instruction is: an svn checkout instruction;
storing the latest copy of the svn item into a copy folder of the svn item based on the basic information of the latest copy of the item; wherein, the basic information of the latest copy of the item comprises: the method comprises the steps of project addresses, project copy directory names, user accounts corresponding to the svn projects and user passwords corresponding to the svn projects.
6. The method for viewing the svn log based on the web according to claim 1, wherein responding to different query requests uploaded by the web browser end, invoking a corresponding script of the linux system server to query the svn item copy folder, and obtaining query information of the svn log, specifically comprising:
Receiving a request for uploading a directory structure from the web browser end; wherein the directory structure request is within a range of the item list at the web browser end;
acquiring a svn directory structure query instruction corresponding to the directory structure request, so as to execute the corresponding svn directory structure query instruction to obtain an item directory structure; the svn directory structure query instruction is formed based on a corresponding script of the linux system server;
receiving different log query requests uploaded by the web browser end; wherein, the different log query requests are generated based on the designated files and query contents selected by the web browser end;
and determining a corresponding script of the linux system server based on the log query request, and querying in a designated file based on the corresponding script of the linux system server to obtain query information of the svn log.
7. The method for viewing svn log based on web of claim 6, wherein determining the corresponding script of the linux system server based on the log query request, and querying in a specified file based on the corresponding script of the linux system server to obtain the query information of the svn log specifically comprises:
If the log query request is a log view request, acquiring a query log script of the linux system server corresponding to the log view request, so as to return log basic information of the svn log to the web browser for display; wherein the log basic information includes: version number, presenter, time of presentation, file;
if the log query request is a log version comparison request, acquiring a log version comparison script of the linux system server corresponding to the log comparison request;
acquiring historical version contents of the specified file based on the log version comparison script, determining version change contents based on the historical version contents and current version contents of the specified file, and returning the version change contents to the web browser for display;
if the log query request is a log detail request, acquiring a log detail instruction of the linux system server corresponding to the log detail request, acquiring content details of the current version of content based on the log detail instruction, and returning the content details to the web browser for display.
8. A method for viewing a svn log based on web, which is applied to a web browser, the method comprising:
transmitting login information to a web application server to acquire the authority of the svn item based on the login information; the web application server is an svn log system deployed on a linux system server through a java web technology;
configuring svn item data based on the authority of the svn item; the svn project data are stored in a relational database of a linux system server;
based on different query requests uploaded by project requirements, the web application server side is enabled to call a corresponding script of the linux system server, a svn project copy folder of the web application server side is queried, and query information of the svn log is obtained; and the svn project copy folder is formed by acquiring the latest copy of the svn project after regularly calling the export instruction of the linux system server based on the web application server.
9. An apparatus for viewing svn logs based on web, applied to a web application server, the apparatus comprising:
at least one processor; the method comprises the steps of,
a memory communicatively coupled to the at least one processor; wherein,
The memory stores instructions executable by the at least one processor to enable the at least one processor to:
acquiring login information uploaded by a web browser end; the web application server comprises a svn log system deployed on a linux system server through a java web technology;
determining the authorization authority corresponding to the login information according to a preset web service authority directory, acquiring svn project data configured by the web browser end according to the authorization authority, and storing the svn project data in a relational database of a linux system server;
calling an export instruction of the linux system server based on a preset period to acquire an latest copy of the svn item and store the latest copy of the svn item into an svn item copy folder;
and responding to different inquiry requests uploaded by the web browser, calling a corresponding script of the linux system server to inquire the svn item copy folder, and obtaining inquiry information of the svn log.
10. A web-based device for viewing svn logs, the device comprising:
at least one processor; the method comprises the steps of,
A memory communicatively coupled to the at least one processor; wherein,
the memory stores instructions executable by the at least one processor to enable the at least one processor to:
transmitting login information to a web application server to acquire the authority of the svn item based on the login information; the web application server is an svn log system deployed on a linux system server through a java web technology;
configuring svn item data based on the authority of the svn item; the svn project data are stored in a relational database of a linux system server;
based on different query requests uploaded by project requirements, the web application server side is enabled to call a corresponding script of the linux system server, a svn project copy folder of the web application server side is queried, and query information of the svn log is obtained; and the svn project copy folder is formed by acquiring the latest copy of the svn project after regularly calling the export instruction of the linux system server based on the web application server.
CN202310848209.2A 2023-07-11 2023-07-11 Method and device for viewing svn log based on web Pending CN116866327A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202310848209.2A CN116866327A (en) 2023-07-11 2023-07-11 Method and device for viewing svn log based on web

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202310848209.2A CN116866327A (en) 2023-07-11 2023-07-11 Method and device for viewing svn log based on web

Publications (1)

Publication Number Publication Date
CN116866327A true CN116866327A (en) 2023-10-10

Family

ID=88224844

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202310848209.2A Pending CN116866327A (en) 2023-07-11 2023-07-11 Method and device for viewing svn log based on web

Country Status (1)

Country Link
CN (1) CN116866327A (en)

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110221841A (en) * 2019-04-26 2019-09-10 福州慧校通教育信息技术有限公司 A kind of interactive application deployment delivery method and system based on web
CN111026407A (en) * 2018-10-10 2020-04-17 北大方正集团有限公司 Installation package packing method, computer device and computer readable storage medium
US20200293407A1 (en) * 2019-03-15 2020-09-17 Huawei Technologies Co., Ltd. System and method for replicating data in distributed database systems
CN112235265A (en) * 2020-09-29 2021-01-15 上海药明康德新药开发有限公司 System and method for external network to access project progress
CN113656777A (en) * 2021-08-14 2021-11-16 深圳市派勤电子技术有限公司 Computer communication method and system based on transmission converter

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111026407A (en) * 2018-10-10 2020-04-17 北大方正集团有限公司 Installation package packing method, computer device and computer readable storage medium
US20200293407A1 (en) * 2019-03-15 2020-09-17 Huawei Technologies Co., Ltd. System and method for replicating data in distributed database systems
CN110221841A (en) * 2019-04-26 2019-09-10 福州慧校通教育信息技术有限公司 A kind of interactive application deployment delivery method and system based on web
CN112235265A (en) * 2020-09-29 2021-01-15 上海药明康德新药开发有限公司 System and method for external network to access project progress
CN113656777A (en) * 2021-08-14 2021-11-16 深圳市派勤电子技术有限公司 Computer communication method and system based on transmission converter

Similar Documents

Publication Publication Date Title
US8924920B2 (en) Providing a software appliance based on a role
US8935687B2 (en) Incrementally updating a software appliance
US8458658B2 (en) Methods and systems for dynamically building a software appliance
US10681050B2 (en) Ephemeral applications
US9928041B2 (en) Managing a software appliance
US8161160B2 (en) XML-based web feed for web access of remote resources
US20140019958A1 (en) Enterprise portal mobile applications installs
US9032367B2 (en) Providing a demo appliance and migrating the demo appliance to a production appliance
US20150347093A1 (en) Provisioning Tools for Application Development
US20090094596A1 (en) Systems and methods for an adaptive installation
CN106406961A (en) Method and device for loading and providing application based on browser
CN110945480A (en) System and method for updating and loading applications
US20220027969A1 (en) Virtualized Services Discovery and Recommendation Engine
US20130110905A1 (en) File type associations for remote applications
AU2016100635A4 (en) Software creation system
CN112968929B (en) Server management method and system
US20160371071A1 (en) Account-based software upgrades in a multi-tenant ecosystem
US20230205503A1 (en) Method for dynamically integrating application programs, and software system and machine using the same
WO2019113120A9 (en) Server and system for versioning for software in the context of multi-tenancy
US8914790B2 (en) Contextual solicitation in a starter application
CN113282303A (en) Application management method and device based on double-core intelligent electric meter and computer equipment
US20130218868A1 (en) Smart linking a file to a product
CN116866327A (en) Method and device for viewing svn log based on web
US11757976B2 (en) Unified application management for heterogeneous application delivery
US20190227815A1 (en) Preemptive loading of code dependencies for improved performance

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