svn import | Subversion Import Command

svn import

Purpose

If you need the contents of a local directory tree version controlled you use the import command. You make the folder known to the version controller, visible to repository’s readers, and writeable to its committers.

Pre-Conditions

You want to version manage a directory on the local filesystem. So ask yourself

  • Is the Subversion client installed on your Windows or Linux machine?
  • Do you know the username/password for repository commits.

The Steps

  1. Your local (overarching) folder will [NOT] be created in the repository.
  2. Go to the directory owning the folder you want to import.
  3. Do an ls (Unix) or dir (windows) and your “to be imported” directory must be listed.
  4. Add the [NAME] of the over-arching folder to the end of the repository URL.
  5. If you don't the folder's contents will be MESSILY littered in the VCS folder name (at the end of the URL).
  6. Run the Command
  7. Browse to the repositoryh URL to find the new folder.

svn import -m "purpose (to what end) log" <<local-not-imported-folder-name>> http://<<hostname>>>/assets/to-be-created-repository-folder

After The Event

  • Everything UNDER the local folder name is pushed in.
  • Those who can “read” the repository can see the new folder tree you’ve imported.
  • Those who can “wite” to the repository can checkout alter and commit to the newly imported folder.

Other Command Examples


With Username and Password

svn import -m "purpose (to what end) log" <<path-to-local-folder>> http://<<hostname>>>/assets/to-be-created-repository-folder --username "user" --password "pass"


Leave a Reply

Your email address will not be published. Required fields are marked *