Добавил:
Опубликованный материал нарушает ваши авторские права? Сообщите нам.
Вуз: Предмет: Файл:
Collins-Sussman B.Version control with Subversion 1.1.pdf
Скачиваний:
9
Добавлен:
23.08.2013
Размер:
1.53 Mб
Скачать

Repository Administration

Windows shell—using the cd command. At all times, the command prompt will show you what revision (prefixed by rev:) or transaction (prefixed by txn:) you are currently examining, and at what path location in that revision or transaction. You can change your current revision or transaction with the setrev and settxn commands, respectively. As in a Unix shell, you can use the ls command to display the contents of the current directory, and you can use the cat command to display the contents of a file.

Example 5.1. Using svnshell to Navigate the Repository

<rev: 2 />$ ls

 

 

REV

AUTHOR NODE-REV-ID

SIZE

DATE NAME

----------------------------------------------------------------------------

 

1

sally <

2.0.1>

 

Nov

15

11:50

A/

 

2

harry <

1.0.2>

56

Nov

19

08:19

iota

<rev:

2 />$ cd A

 

 

 

 

 

 

<rev:

2 /A>$ ls

 

 

 

 

 

 

REV

AUTHOR

NODE-REV-ID

SIZE

 

 

DATE

NAME

----------------------------------------------------------------------------

1

sally

<

4.0.1>

 

Nov

15 11:50

B/

1

sally

<

a.0.1>

 

Nov

15

11:50

C/

1

sally

<

b.0.1>

 

Nov

15

11:50

D/

1

sally

<

3.0.1>

23

Nov

15

11:50

mu

<rev: 2 /A>$ cd

D/G

 

 

 

 

 

 

<rev: 2 /A/D/G>$ ls

 

 

 

 

 

 

REV

AUTHOR

NODE-REV-ID

SIZE

 

 

DATE

NAME

----------------------------------------------------------------------------

1

sally

<

e.0.1>

23

Nov 15

11:50 pi

1

sally

<

f.0.1>

24

Nov 15

11:50 rho

1

sally

<

g.0.1>

24

Nov 15

11:50 tau

<rev: 2 /A>$ cd

../..

 

 

 

 

<rev: 2 />$ cat

iota

 

 

 

 

This is the file 'iota'.

 

 

 

Added this text

in revision 2.

 

 

 

<rev: 2 />$ setrev 1; cat iota This is the file 'iota'.

<rev: 1 />$ exit

$

As you can see in the previous example, multiple commands may be specified at a single command prompt, separated by a semicolon. Also, the shell understands the notions of relative and absolute paths, and will properly handle the . and .. special path components.

The youngest command displays the youngest revision. This is useful for determining the range of valid revisions you can use as arguments to the setrev command—you are allowed to browse all the revisions (recalling that they are named with integers) between 0 and the youngest, inclusively. Determining the valid browsable transactions isn't quite as pretty. Use the lstxns command to list the transactions that you are able to browse. The list of browsable transactions is the same list that svnadmin lstxns returns, and the same list that is valid for use with svnlook's - -transaction option.

Once you've finished using the shell, you can exit cleanly by using the exit command. Alternatively, you can supply an end-of-file character—Control-D (though some Win32 Python distributions use the Windows Control-Z convention instead).

Berkeley DB Utilities

If you're using a Berkeley DB repository, then all of your versioned filesystem's structure and data live in a set of

80

Соседние файлы в предмете Электротехника