~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to doc/specifying_revisions.txt

  • Committer: Wouter van Heyst
  • Date: 2006-06-07 16:05:27 UTC
  • mto: This revision was merged to the branch mainline in revision 1752.
  • Revision ID: larstiq@larstiq.dyndns.org-20060607160527-2b3649154d0e2e84
more code cleanup

Show diffs side-by-side

added added

removed removed

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