/brz/remove-bazaar

To get this branch, use:
bzr branch http://gegoxaren.bato24.eu/bzr/brz/remove-bazaar

« back to all changes in this revision

Viewing changes to doc/en/user-guide/specifying_revisions.txt

(John Arbash Meinel) Change Branch.pull() so it doesn't have to
        search all history all the time.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
Specifying revisions
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::
 
1
Revision specifiers
 
2
===================
 
3
 
 
4
Revision specs and ranges
 
5
-------------------------
 
6
 
 
7
``bzr`` has a very expressive way to specify a revision, or a range of revisions.
 
8
We'll take the example of the ``log`` command.
 
9
 
 
10
To specify a range of revisions, use for example::
10
11
 
11
12
    $ bzr log -r 1..4
12
13
 
15
16
    $ bzr log -r 1..
16
17
    $ bzr log -r ..4
17
18
 
18
 
Some commands take only one revision, not a range. For example::
 
19
Note:
 
20
    Omitting the lower bound doesn't work on versions of ``bzr`` prior to 0.14.
 
21
 
 
22
Other commands, like ``bzr cat`` take only one revision, not a range, like::
19
23
 
20
24
    $ bzr cat -r 42 foo.c
21
25
 
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.
 
26
Available revision specs
 
27
------------------------
 
28
 
 
29
The revision, or the bounds of the range, can be one of
33
30
 
34
31
 +----------------------+------------------------------------+
35
32
 |  argument type       | description                        |
36
33
 +----------------------+------------------------------------+
37
34
 | *number*             | revision number                    |
38
35
 +----------------------+------------------------------------+
39
 
 | **revno**:*number*   | revision number                    |
 
36
 | **revno**:*number*   | positive revision number           |
40
37
 +----------------------+------------------------------------+
41
38
 | **last**:*number*    | negative revision number           |
42
39
 +----------------------+------------------------------------+
43
 
 | *guid*               | globally unique revision id        |
44
 
 +----------------------+------------------------------------+
45
40
 | **revid**:*guid*     | globally unique revision id        |
46
41
 +----------------------+------------------------------------+
47
42
 | **before**:*rev*     | leftmost parent of ''rev''         |
48
43
 +----------------------+------------------------------------+
49
 
 | *date-value*         | first entry after a given date     |
50
 
 +----------------------+------------------------------------+
51
 
 | **date**:*date-value*| first entry after a given date     |
52
 
 +----------------------+------------------------------------+
53
 
 | *tag-name*           | revision matching a given tag      |
54
 
 +----------------------+------------------------------------+
55
 
 | **tag**:*tag-name*   | revision matching a given tag      |
 
44
 | **date**:*value*     | first entry after a given date     |
56
45
 +----------------------+------------------------------------+
57
46
 | **ancestor**:*path*  | last merged revision from a branch |
58
47
 +----------------------+------------------------------------+
59
48
 | **branch**:*path*    | latest revision on another branch  |
60
49
 +----------------------+------------------------------------+
61
 
 | **submit**:*path*    | common ancestor with submit branch |
62
 
 +----------------------+------------------------------------+
63
 
 
64
 
A brief introduction to some of these formats is given below.
65
 
For complete details, see `Revision Identifiers`_ in the
66
 
Bazaar User Reference.
67
 
 
68
 
.. _Revision Identifiers: ../user-reference/bzr_man.html#revision-identifiers
69
50
 
70
51
Numbers
71
52
~~~~~~~
83
64
 
84
65
    $ bzr log -r -10..
85
66
 
 
67
revno, last
 
68
~~~~~~~~~~~
 
69
 
 
70
**revno**:*number*
 
71
    The same as *number*, except that negative numbers are not allowed.
 
72
 
 
73
**last**:*number*
 
74
    The same as -''number''. **last:1** means the last commited revision.
 
75
 
86
76
revid
87
77
~~~~~
88
78
 
89
79
**revid** allows specifying a an internal revision ID, as shown by ``bzr
90
 
log --show-ids`` and some other commands.
 
80
log`` and some other commands.
91
81
 
92
82
For example::
93
83
 
94
84
    $ bzr log -r revid:Matthieu.Moy@imag.fr-20051026185030-93c7cad63ee570df
95
85
 
 
86
 
96
87
before
97
88
~~~~~~
98
89
 
99
90
**before**
100
91
    ''rev'' specifies the leftmost parent of ''rev'', that is the revision
101
92
    that appears before ''rev'' in the revision history, or the revision that
102
 
    was current when ''rev'' was committed.
 
93
    was current when ''rev'' what comitted.
103
94
 
104
95
''rev'' can be any revision specifier and may be chained.
105
96
 
134
125
~~~~~~~~
135
126
 
136
127
**ancestor**:*path*
137
 
    specifies the common ancestor between the current branch and a
 
128
    specifies the common ancestor between the current branch and a 
138
129
    different branch. This is the same ancestor that would be used for
139
130
    merging purposes.
140
131