Client Software

While you're waiting to hear back about your plugin submission, you need to install a Subversion client.

Macs: If you use a Mac running OS 10.5 or higher, the command line interface for Subversion is already installed, and you can use it via the Terminal. If you prefer a graphic interface, Versions by Sofa Software is an excellent client. You can also use Subversion through several code editors and IDEs. Textmate is one of the most popular.

Windows and Linux: You can download Subversion from subversion.apache.org. If you're on Windows and you prefer a graphic interface, try TortoiseSVN (tortoisesvn.tigris.org), which integrates with Windows Explorer. This is by far the most popular choice among Windows users.

From this point on, things look very different depending on which client you're using. I'll demonstrate using Versions and Tortoise. If you prefer the command line, visit markjaquith.wordpress.com/2005/11/02/my-wordpress-toolbox/ for a quick overview of the most common Subversion commands.

Mac: Versions

When you open Versions, you'll be presented with two big choices. You need to create a new repository bookmark. You'll be asked to fill in the address of the repository (Figure 9-12). This should be the URL you received in your e-mail. You should also enter your wordpress.org username and password. You can connect anonymously, but you won't be able to upload any changes.

Figure 9-12. Creating a repository bookmark in Versions

When you press Create, the bookmark will appear in a list on the left side of the Versions window. Highlight it and press Checkout in the upper left corner. Since this is the first checkout, you'll be asked to choose a folder on your computer where the local copies of the files will be stored. Do so, and you'll have three new, empty subdirectories: branches, tags, and trunk, as shown in Figure 9-13.

Figure 9-13. The files from the initial checkout

From this interface, you can open up the files in your editor of choice and make whatever changes you need. When you're finished making changes in trunk, you can highlight the files and press the Commit button in the upper left corner. Versions will upload the files to the repository, and within fifteen minutes or so, they'll be available to the world.

When you add a new file to a source-controlled directory (like a new branch or tag), you'll have to explicitly add it to the repository. Highlight the new file or directory and press the green Add button in the upper right corner. Likewise, when you need to remove a file, you'll have to highlight it and press the red Delete button.

If you've made a lot of changes throughout your project, just highlight the top-level directory and hit Commit. Versions will go through the subdirectories recursively and find all the changed files.

Windows: TortoiseSVN

TortoiseSVN is unusual in that it doesn't open in its own application window. Instead, it provides a set of contextual menu items in Windows Explorer. To perform your initial checkout, create the local folder where you'd like to store your plugin versions. Right-click this folder and choose SVN Checkout. A window will pop up where you'll be asked for the repository URL. Enter the one you received by e-mail, as shown in Figure 9-14.

Figure 9-14. The initial checkout with Tortoise

If you have your plugin files ready, create a new folder under Tags and give it a number—let's say it's 1.0. Copy your files into the 1.0 folder. Make sure the version number in the plugin header and the readme file match this number. Then right-click the 1.0 folder and choose Add from the TortoiseSVN submenu. Once the plus icon appears on your folder, right-click it again and choose SVN Commit from the contextual menu, as shown in Figure 9-15.

Figure 9-15. Committing a tagged folder with Tortoise

You'll get a warning message about using tags instead of branches or trunk. Click OK. Next, you'll be prompted for your username and password. Enter your credentials for wordpress.org. The next prompt asks you for a commit message. This can be whatever you want for the initial checkin; for later updates, it's a good idea to summarize what changed since the previous version.

Enter your commit message and press OK. You'll see filenames scroll past you as the files are uploaded, and when it's done, the plus sign on your folder will change to a big green check, and you'll see the success message shown in Figure 9-16.

Figure 9-16. Successful commit with Tortoise
0 0

Post a comment