~bzr-pqm/bzr/bzr.dev

3638.6.31 by Dmitry Vasiliev
Added Russian translation for part 1.2 of the user guide
1
Определение ревизий
2
===================
3
4
Revision identifiers and ranges
5
-------------------------------
6
7
Bazaar has a very expressive way to specify a revision or a range of revisions.
8
To specify a range of revisions, the upper and lower bounds are separated by the
9
``..`` symbol. For example::
10
11
    $ bzr log -r 1..4
12
13
You can omit one bound like::
14
15
    $ bzr log -r 1..
16
    $ bzr log -r ..4
17
18
Some commands take only one revision, not a range. For example::
19
20
    $ bzr cat -r 42 foo.c
21
22
In other cases, a range is required but you want the length of the range to
23
be one. For commands where this is relevant, the ``-c`` option is used like this::
24
25
    $ bzr diff -c 42
26
27
28
Available revision identifiers
29
------------------------------
30
31
The revision, or the bounds of the range, can be given using
32
different format specifications as shown below.
33
34
 +----------------------+------------------------------------+
35
 |  argument type       | description                        |
36
 +----------------------+------------------------------------+
37
 | *number*             | revision number                    |
38
 +----------------------+------------------------------------+
39
 | **revno**:*number*   | positive revision number           |
40
 +----------------------+------------------------------------+
41
 | **last**:*number*    | negative revision number           |
42
 +----------------------+------------------------------------+
43
 | **revid**:*guid*     | globally unique revision id        |
44
 +----------------------+------------------------------------+
45
 | **before**:*rev*     | leftmost parent of ''rev''         |
46
 +----------------------+------------------------------------+
47
 | **date**:*value*     | first entry after a given date     |
48
 +----------------------+------------------------------------+
49
 | **tag**:*value*      | revision matching a given tag      |
50
 +----------------------+------------------------------------+
51
 | **ancestor**:*path*  | last merged revision from a branch |
52
 +----------------------+------------------------------------+
53
 | **branch**:*path*    | latest revision on another branch  |
54
 +----------------------+------------------------------------+
55
 | **submit**:*path*    | common ancestor with submit branch |
56
 +----------------------+------------------------------------+
57
58
A brief introduction to some of these formats is given below.
59
For complete details, see `Revision Identifiers`_ in the
60
Bazaar User Reference.
61
62
.. _Revision Identifiers: ../user-reference/bzr_man.html#revision-identifiers
63
64
Numbers
65
~~~~~~~
66
67
Positive numbers denote revision numbers in the current branch. Revision
68
numbers are labelled as "revno" in the output of ``bzr log``.  To display
69
the log for the first ten revisions::
70
71
    $ bzr log -r ..10
72
73
Negative numbers count from the latest revision, -1 is the last committed
74
revision.
75
76
To display the log for the last ten revisions::
77
78
    $ bzr log -r -10..
79
80
revid
81
~~~~~
82
83
**revid** allows specifying a an internal revision ID, as shown by ``bzr
84
log`` and some other commands.
85
86
For example::
87
88
    $ bzr log -r revid:Matthieu.Moy@imag.fr-20051026185030-93c7cad63ee570df
89
90
before
91
~~~~~~
92
93
**before**
94
    ''rev'' specifies the leftmost parent of ''rev'', that is the revision
95
    that appears before ''rev'' in the revision history, or the revision that
96
    was current when ''rev'' was committed.
97
98
''rev'' can be any revision specifier and may be chained.
99
100
For example::
101
102
    $ bzr log -r before:before:4
103
    ...
104
    revno: 2
105
    ...
106
107
date
108
~~~~
109
110
**date**
111
    ''value'' matches the first history entry after a given date, either at
112
    midnight or at a specified time.
113
114
Legal values are:
115
116
 * **yesterday**
117
 * **today**
118
 * **tomorrow**
119
 * A **YYYY-MM-DD** format date.
120
 * A **YYYY-MM-DD,HH:MM:SS** format date/time, seconds are optional (note the
121
   comma)
122
123
The proper way of saying "give me all the log entries for today" is::
124
125
    $ bzr log -r date:yesterday..date:today
126
127
Ancestor
128
~~~~~~~~
129
130
**ancestor**:*path*
4853.1.1 by Patrick Regan
Removed trailing whitespace from files in doc directory
131
    specifies the common ancestor between the current branch and a
3638.6.31 by Dmitry Vasiliev
Added Russian translation for part 1.2 of the user guide
132
    different branch. This is the same ancestor that would be used for
133
    merging purposes.
134
135
*path* may be the URL of a remote branch, or the file path to a local branch.
136
137
For example, to see what changes were made on a branch since it was forked
138
off ``../parent``::
139
140
    $ bzr diff -r ancestor:../parent
141
142
Branch
143
~~~~~~
144
145
branch
146
   ``path`` specifies the latest revision in another branch.
147
148
``path`` may be the URL of a remote branch, or the file path to a local branch.
149
150
For example, to get the differences between this and another branch::
151
152
    $ bzr diff -r branch:http://example.com/bzr/foo.dev
153