Intel XENIX 286 Programmers Guide (86) - Tenox.tc

Intel XENIX 286 Programmers Guide (86) - Tenox.tc Intel XENIX 286 Programmers Guide (86) - Tenox.tc

09.06.2013 Views

XENIX Programming sees: Source Code Control System Retrieving the Most Recent Version You can always retrieve the most recent version of a file by using the -t option with the get command. For example, the command get -t s.demo.c retrieves the most recent version from the file s.demo.c. You may combine the -r and -t options to retrieve the most recent version of a given release number. For example, if the most recent version with release number 3 is 3.5, then the command get -r3 -t s.demo.c retrieves version 3.5. If a branch version exists that is more recent than version 3.5 (e.g., 3.2.1.5}, then the above command retrieves the branch version and ignores version 3.5. Displaying a Version You can display the contents of a version at the standard output by using the -p option of the get command. For example, the command get -p s.demo.c displays the most recent version in the s-file s.demo.c at the standard output. Similarly, the com mand get -p -r2. 1 s.demo.c displays version 2.1 at the standard output. The -p option is useful for creating g-files with user-supplied names. Since this option also directs all output normally sent to the standard output, such as the SID of the retrieved file, to the standard error output, the resulting file contains only the contents of the given version. For example, the command get -p s.demo.c >version.c copies the most recent version in the s-file s.demo.c to the file version.c. The SID of the file and its size are copied to the standard error output. 5-11

SCCS: Source Code Control System XENIX Programming Saving a Copy of a New Version The delta command normally removes the edited file after saving it in the s-file. You can save a copy of this file by using the -n option of the delta command. For example, the command delta -n s.demo.c first saves a new version in the s-file s.demo.c and then saves a copy of the source version in the file demo.c. You may then display the source file as desired, but you cannot edit it. Displaying Helpful Information An SCCS command displays an error message whenever it encounters an error in a file. An error message has the form ERROR [filename ]: message ( code ) where filename is the name of the file being processed, message is a short description of the error, and code is the alphanumeric error code. You may use the error code as an argument to the help command to display additional information about the error. The command has the form help code where code is the error code given in an error message. The command displays one or more lines of text that explain the error and suggest a possible remedy. For example, the command helpco1 displays the message co1: "not an sees file" A file that you think is an sees file does not begin with the characters "s.". Use the help command whenever you have doubt about the meariing of an error message. 5-12

SCCS: Source Code Control System <strong>XENIX</strong> Programming<br />

Saving a Copy of a New Version<br />

The delta command normally removes the edited file after saving it in the s-file. You<br />

can save a copy of this file by using the -n option of the delta command. For example,<br />

the command<br />

delta -n s.demo.c<br />

first saves a new version in the s-file s.demo.c and then saves a copy of the source<br />

version in the file demo.c. You may then display the source file as desired, but you<br />

cannot edit it.<br />

Displaying Helpful Information<br />

An SCCS command displays an error message whenever it encounters an error in a file.<br />

An error message has the form<br />

ERROR [filename ]: message ( code )<br />

where filename is the name of the file being processed, message is a short description of<br />

the error, and code is the alphanumeric error code.<br />

You may use the error code as an argument to the help command to display additional<br />

information about the error. The command has the form<br />

help code<br />

where code is the error code given in an error message. The command displays one or<br />

more lines of text that explain the error and suggest a possible remedy. For example,<br />

the command<br />

helpco1<br />

displays the message<br />

co1:<br />

"not an sees file"<br />

A file that you think is an sees file<br />

does not begin with the characters "s.".<br />

Use the help command whenever you have doubt about the meariing of an error message.<br />

5-12

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!