Eclipse imports SVN project and SVN option does not appear configured

1. Problem description

When checking out a project from SVN, and using the import option in eclipse to download the project, it is found that there is no SVN option in the import option;

2. Processing

You can install a plug-in in eclipse. The process is as follows:
insert image description here
enter "subclipse" in the search box and press Enter to search, find and click install. After the installation is complete, execute the import, and the SVN option will appear:
insert image description here

insert image description here
Enter the SVN:// address.

3. Download command:

svn checkout svn://ip/code/ //If the command does not exist, execute yum install subversion -y to install

4. Appendix:

1. Checkout the file to the local directory
svn checkout path (path is the directory on the server)
For example: svn checkout svn://192.168.1.1/pro/domain
Abbreviation: svn co

2. Add a new file
svn add file to the repository,
for example: svn add test.php (add test.php)
svn add *.php (add all php files in the current directory)

3. Submit the changed files to the repository
svn commit -m “LogMessage“ [-N] [–no-unlock] PATH (if you choose to keep the lock, use the –no-unlock switch)
For example: svn commit -m “ add test file for my test" test.php Shorthand
: svn ci

4. Lock/unlock
svn lock -m “LockMessage“ [–force] PATH
For example: svn lock -m “lock test file“ test.php
svn unlock PATH

5. Update to a certain version
svn update -rm path
For example:
svn update If there is no directory behind it, all files in the current directory and subdirectories will be updated to the latest version by default.
svn update -r 200 test.php (restore the file test.php in the repository to version 200)
svn update test.php (update, synchronize with the repository. If it is prompted to expire when submitting, it is because of conflict and needs to be First update, modify the file, then clear the svn resolved, and finally submit the commit)
Shorthand: svn up

6. View file or directory status
1) svn status path (the status of files and subdirectories in the directory, the normal status is not displayed)
[?: not under the control of svn; M: content modified; C: conflict; A: scheduled Add to the repository; K: locked]
2) svn status -v path (display file and subdirectory status)
The first column remains the same, the second column shows the working version number, and the third and fourth columns show the last modified version number and modifying person.
Note: The three commands svn status, svn diff and svn revert can also be executed without a network, because svn keeps the original copy of the local version in the local .svn.
Abbreviation: svn st

7. Delete the file
svn delete path -m "delete test fle"
for example: svn delete svn://192.168.1.1/pro/domain/test.php -m "delete test file"
or directly svn delete test.php and then svn ci -m 'delete test file', this shorthand is recommended
: svn (del, remove, rm)

8. View the log
svn log path
For example: svn log test.php Displays all modification records of this file and changes in their version numbers

9. View file details
svn info path
For example: svn info test.php

10. Compare the difference
svn diff path (compare the modified file with the base version)
for example: svn diff test.php
svn diff -rm:n path (compare the difference between version m and version n)
For example: svn diff -r 200:201 test.php
shorthand: svn di

11. Merge the differences between the two versions into the current file
svn merge -rm:n path
For example: svn merge -r 200:205 test.php (merge the differences between versions 200 and 205 into the current file, but generally Conflicts will arise and need to be dealt with)

12、SVN 帮助
svn help
svn help ci
——————————————————————————

The above are commonly used commands, the following are a few less frequently used commands

——————————————————————————

13. List of files and directories under the
repository svn list path
displays all files and directories under the path directory that belong to the repository
Abbreviation: svn ls

14. Create a new directory under version control
svn mkdir: Create a new directory under version control.
Usage: 1. mkdir PATH…
2. mkdir URL…
Create a version-controlled directory.
1. Each directory specified by the working copy PATH will be created on the local side, and a new
schedule will be added for the next submission.
2. Each directory specified by URL will be created in the repository through immediate commit.
In both cases, all intermediate directories must exist beforehand.

15. Restore local modifications
svn revert: Restore the original unchanged working copy file (restore most of the local modifications). revert:
Usage: revert PATH...
Note: This subcommand does not access the network and resolves conflicts. But it will not restore
the deleted directory

16. Repository URL change
svn switch (sw): Update the working copy to a different URL.
Usage: 1. switch URL [PATH]
2. switch –relocate FROM TO [PATH…]

1. Update your working copy to map to a new URL, which behaves much like "svn update" and also
merges the files on the server with the local files. This is how to map a working copy to a branch or tag in the same repository
.
2. Rewrite the URL metadata of the working copy to reflect the pure URL change. Use this command to update the mapping between the working copy and the repository when the root URL of the repository changes
(such as the project name or hostname), but the working copy still maps to the same directory in the same repository . My example: svn switch --relocate

17. Conflict resolution
svn resolved: Removes the "conflict" status of a directory or file from the working copy.
Usage: resolved PATH...
Note: This subcommand does not syntactically resolve conflicts or remove conflict markers; it just removes conflicting
related files, and then makes PATH available for committing again.

18. Output the content of the specified file or URL.
svn cat target[@version]... If a version is specified, the search will start at the specified version.
svn cat -r PREV filename > filename (PREV is the previous version, you can also write the specific version number, so the output can be submitted)

19. Add Email notification to SVN
You can add the mailing list function to SVN through Subversion's Hook script.
After compiling and installing Subversion, there is a Perl script of comm-email.pl under the tools of the source code, and there is a Perl script in your file directory. In the hooks directory, go to the hooks directory and rename post-commit.tmpl to post-commit and give it executable permissions.
Change the post-commit script to add the final path of the comm-email.pl script, otherwise SVN cannot find comm-email.pl

REPOS="$1"
REV=“ 2 " / u s r / l o c a l / s v n / r e s p / c o m m i t − e m a i l . p l " 2" /usr/local/svn /resp/commit-email.pl " 2"/usr/local/svn/resp/commitemail.pl"REPOS” “KaTeX parse error: Expected 'EOF', got '#' at position 45: …@address2.com #̲log-commit.py -…REPOS” --revision “$REV”

The last line is used for logging. This function is not used, so I commented it out.

Literature: 1 ;

Guess you like

Origin blog.csdn.net/ximenjianxue/article/details/122970901