Add SVN wings to Dreamweaver

Source: Internet
Author: User

Many people have been using Dreamweaver to write CSS and XHTML. At the same time, if it is applied to a multi-person development project, you will use SVN or cvs for version control. Unfortunately, we didn't hear that Dreamweaver can be used with version control. In the past, tortoisesvn was used in external folders for version updates. It is inconvenient.

When practicing Javascript in Dreamweaver over the past two days, I created a site. By accident, I found that I suddenly saw version control when I right-clicked the document. Shocking.

 

 

Now, I put down my study on JS and spent some time studying the relationship between the two. The following are the results of the study:

Dreamweaver has built the svn operation tool since cs4. Provides Version Control for site management. It can be connected to a server using subversion (SVN). Subversion is a version control system that allows users to collaboratively edit and manage files on remote web servers. Dreamweaver is not a complete SVN client, but allows users to get the latest version, change, and submit files. Next let's test it together.

Create SVN connection

Before using subversion (SVN) as the Dreamweaver version control system, you must establish a connection with the svn server. The connection to the svn server is established in the "version control" category in the "site definition" dialog box. Therefore, you should first create a site.

I use dreamware cs5. The steps are much simpler:
Select "Site"> "New Site", enter "site name", select "local site folder", and click "save" to create a simple site.

 

Before starting this setting, you must create a database and a user on the svn server, and set access permissions for the svn server and SVN repository (visual SVN server is required ). Let's take a look at the figure:

 

 


 


Now the permission has been configured. You can establish a connection between Dreamweaver and SVN.
 
In fact, if you are very careful, you will find that when creating a site, there is a "version control" in the third option in the column on the left ". Yes, that's where the connection is set. However, you can follow the steps below to establish a SVN connection for the website you have created:

Select "Site"> "manage site" and select the site for which you want to set version control. Here I select "JavaScript" and click "edit.

 

 

The "site Settings" dialog box is displayed. Is this form very familiar. In the "site Settings" dialog box, select "version control" on the left.
Select "Subversion" from the "access" pop-up menu ".
To set access options, follow these steps:
Select a protocol from the "protocol" pop-up menu. Optional Protocols include HTTP, https, SVN, and SVN + SSH. Select "HTTPS ".
In the "server address" text box, enter the address of the svn server. The common format is: server name. domain. com, or IP. I use the IP address 192.168.24.155 in the LAN.
In the "repository path" text box, enter the repository path on the svn server. It is usually similar to/SVN/your_root_directory, which means the root path of SVN + Library. Here I use/SVN/JavaScript
(Optional) If you want to use a server port different from the default server port, select "non-default" and enter the port number in the text box. Generally, use the default value.
Enter the username and password of the svn server.

 

 

Click "test" to test the connection. If the connection succeeds, the system prompts "the server and project can be accessed ". Click OK to close the dialog box and click Save to save the current settings. Click "finish" to close the "manage site" dialog box.

 

 

After establishing a connection with the server, you can view the svn repository on the "Files" panel. To view the svn repository, click "repository file" in the expanded "Files" panel.

 

 

Now that Dreamweaver has established a connection with SVN, let's test it.

Submit File

Create or add a webpage on the local site (a "+" sign is displayed before the name), right-click the webpage, and choose "version control"> "Submit ". Enter "prompt message" and click "Submit.

 

Switch to "repository View" to check that the uploaded file already exists in the database:

 

 

 

Delete an object

On the local site, right-click the webpage, select "edit"> "delete", or press the delete key to select whether to delete the webpage from version control or from the local device. The interface also shows the differences between the two deletion methods. To demonstrate other functions, select "Local Delete" (that is, save in the database ).

 

 

Get the latest file version

When obtaining the latest file from the svn repository, Dreamweaver merges the content of the file with the content of the corresponding local copy. (That is, if another user updates the file after you last submitted the file, these updates will be merged into the local version file on your computer .) If this file does not exist on the local hard disk, Dreamweaver will get it directly.

Right-click the site and choose "version control"> "get the latest version.

 

 

 

 

Show Revision

Right-click the file you want to view and choose "version control"> "show revision..." to view the revision history. Select a record for a non-current version and click "upgrade to current version" to convert the version.

 

Lock and unlock files

By locking a file in the svn repository, other users can know that you are processing the file. Other users can still edit the file locally, but the file can be submitted only after you unlock the file. This function is designed to prevent multiple users from modifying the same file at the same time, resulting in a conflict after submission. When a file is locked in the repository, an unlock icon is displayed on the file. Other users will see the fully locked icon.

 

 

Unlocking is a similar operation, and no more demos are made.

 

Parse conflicting files

If your file conflicts with other files on the server, you can edit your file and mark it as resolved. For example, if the file you try to save conflicts with other users' changes, SVN will not allow you to submit the file. In this case, you can obtain the latest version of the file from the repository, manually change the working copy, and mark your file as resolved, so that you can submit it.

Right-click the file to be parsed, and choose "version control"> "mark as resolved ".

 

There are other features, so we will not introduce them one by one. If you are interested, you can explore them yourself.

 

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.