~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to doc/specifying_revisions.txt

  • Committer: Robert Collins
  • Date: 2007-07-04 08:08:13 UTC
  • mfrom: (2572 +trunk)
  • mto: This revision was merged to the branch mainline in revision 2587.
  • Revision ID: robertc@robertcollins.net-20070704080813-wzebx0r88fvwj5rq
Merge bzr.dev.

Show diffs side-by-side

added added

removed removed

Lines of Context:
3
3
=============================
4
4
 
5
5
Description of the subarguments for ``-r`` as used by commands such as
6
 
**bzr log** and **bzr merge**.
 
6
``bzr log`` and ``bzr merge``.
 
7
 
 
8
You can get the online documentation with ``bzr help revisionspec``.
7
9
 
8
10
Revision specs and ranges
9
11
=========================
10
12
 
11
 
**bzr** has a very expressive way to specify a revision, or a range of revisions.
12
 
We'll take the example of the **log** command.
 
13
``bzr`` has a very expressive way to specify a revision, or a range of revisions.
 
14
We'll take the example of the ``log`` command.
13
15
 
14
16
To specify a range of revisions, use for example::
15
17
 
20
22
    $ bzr log -r 1..
21
23
    $ bzr log -r ..4
22
24
 
23
 
Note::
24
 
    Omitting the lower bound doesn't work on currently released versions.
 
25
Note:
 
26
    Omitting the lower bound doesn't work on versions of ``bzr`` prior to 0.14.
25
27
 
26
 
Other commands, like **bzr cat** take only one revision, not a range, like::
 
28
Other commands, like ``bzr cat`` take only one revision, not a range, like::
27
29
 
28
30
    $ bzr cat -r 42 foo.c
29
31
 
56
58
-------
57
59
 
58
60
Positive numbers denote revision numbers in the current branch. Revision
59
 
numbers are labelled as "revno" in the output of **bzr log**.  To display
 
61
numbers are labelled as "revno" in the output of ``bzr log``.  To display
60
62
the log for the first ten revisions::
61
63
 
62
64
    $ bzr log -r ..10
80
82
revid
81
83
-----
82
84
 
83
 
**revid** allows specifying a an internal revision ID, as show by **bzr
84
 
testament** and some other commands.
 
85
**revid** allows specifying a an internal revision ID, as shown by ``bzr
 
86
log`` and some other commands.
85
87
 
86
88
For example::
87
89
 
96
98
    that appears before ''rev'' in the revision history, or the revision that
97
99
    was current when ''rev'' what comitted.
98
100
 
99
 
''rev'' can be any revision specifier.
 
101
''rev'' can be any revision specifier and may be chained.
100
102
 
101
103
For example::
102
104
 
129
131
--------
130
132
 
131
133
**ancestor**:*path*
132
 
    specifies the common ancestor between the current branch,and a 
 
134
    specifies the common ancestor between the current branch and a 
133
135
    different branch. This is the same ancestor that would be used for
134
136
    merging purposes.
135
137
 
136
138
*path* may be the URL of a remote branch, or the file path to a local branch.
137
139
 
138
140
For example, to see what changes were made on a branch since it was forked
139
 
off **../parent**::
 
141
off ``../parent``::
140
142
 
141
143
    $ bzr diff -r ancestor:../parent
142
144
 
144
146
------
145
147
 
146
148
branch
147
 
   ''path'' specifies the latest revision in another branch.
 
149
   ``path`` specifies the latest revision in another branch.
148
150
 
149
 
''path'' may be the URL of a remote branch, or the file path to a local branch.
 
151
``path`` may be the URL of a remote branch, or the file path to a local branch.
150
152
 
151
153
For example, to get the differences between this and another branch::
152
154