Добавил:
Upload Опубликованный материал нарушает ваши авторские права? Сообщите нам.
Вуз: Предмет: Файл:
Linux Timesaving Techniques For Dummies.pdf
Скачиваний:
59
Добавлен:
15.03.2015
Размер:
15.98 Mб
Скачать

Simplifying CVS with cervisia 399

1. Highlight the top level directory (your sandbox pathname) and choose Advanced Tag/Branch.

2. Enter a tag name and click the OK button.

That was fast, eh?

Here are a few points to keep in mind when choosing tag names:

A common naming convention is the project name followed by a version number.

Tag names can’t include blanks or punctuation marks.

Tags are most helpful when you’ve chosen meaningful names.

Names like WorkingConfiguration or JustPriorToMessingUpMyConfigurationFiles aren’t a bad idea. They can make it easy for you to find a place to revert to.

To revert to a tagged revision of your project, choose Advanced Update to Tag/Date. You have the option to change your sandbox copy to a branch, a tag, or a previous date.

Didn’t tag, but need to revert? No problem; just select the Update to Date option button, enter your date, and click OK. You’ll have a new old sandbox in no time.

Branching off with cervisia

When your project branches, it usually means that one part of your project maintains the current development path, while another part heads in a new direction. Software developers create branches all the time. While one release is maintained and stable, another branch is growing with radical changes. If the changes don’t work out along the way, the original, stable branch is still there and available for users, or you can revert to it if needed. By branching off, your project can remain on one development line while evolving into another.

Use a branch or a tag at any point in development where your project will take a radical turn. That way, you have a safe place to go back to!

Branching with cervisia is similar to tagging:

1. Highlight the top level directory in your sandbox and choose Advanced Tag/Branch.

The Tag/Branch dialog appears.

2. Enter the branch name, check the Create

Branch with This Tag box, and click OK.

You’ve branched out!

Create your branches in your sandbox, and commit them just like any other change.

Part X

Programming Tricks

53 Using Open-Source

APIs to Save Time

Technique

Save Time By

Using the libcurl library to Web-enable your programs

Creating Flash movies with Ming

If you’re a programmer, you know that the best way to save development time is to build programs using components developed by others. In fact, every time you build a program that runs on a Linux computer,

you’re using open-source components. The C runtime library, the Linux runtime library, and even the kernel functions are open-source APIs (API stands for application program interface). Imagine how difficult your job would be if every time you wrote a new program, you had to write a disk driver, a windowing system, or even a complete operating system.

Using open-source APIs saves development time and debugging time. If you start with trusted, well-written components, you can concentrate your debugging efforts on the code that you’re writing (and, because you’re using prebuilt components, that’s a lot less code).

Open-source libraries can also make your programs compatible with standards and protocols used by other applications. In fact, in this technique, we show you how to write simple Web-enabled programs by using two open-source APIs.

In this technique, we also show you the power behind curl, which is a command line program that can upload and download files from FTP and HTTP servers. By adding the curl library (libcurl) to your programs, you can easily interact with FTP, secure FTP, HTTP, secure HTTP, GOPHER, telnet, dict, and LDAP servers. Your programs can handle cookies, use network proxies, and even resume interrupted transfers with just a few lines of code. Imagine how long it would take to write all that code by hand.

We also show you a fun library named Ming. Ming creates Flash movies (Ming, Flash Gordon, get it?). Flash movies are typically played in a Web browser, but you can also download a stand-alone player. If you’re not familiar with Flash, surf to the Macromedia Web site (www.macromedia.com) and watch a few of its Flash showcases. You can use Ming to produce static (unchanging) movies that show bar graphs and pie charts (or just about any other type of graph). You can also create interactive movies that you can control with a mouse and your keyboard.

Соседние файлы в предмете Операционные системы