Rev 3712: Explain revision/range identifiers (Daniel Clemente) in file:///home/pqm/archives/thelove/bzr/%2Btrunk/

Canonical.com Patch Queue Manager pqm at pqm.ubuntu.com
Fri Sep 19 02:09:44 BST 2008


At file:///home/pqm/archives/thelove/bzr/%2Btrunk/

------------------------------------------------------------
revno: 3712
revision-id: pqm at pqm.ubuntu.com-20080919010941-eu2yokwzyw7ezvh9
parent: pqm at pqm.ubuntu.com-20080917230446-p0wippqwikt511sp
parent: ian.clatworthy at canonical.com-20080919003845-1tghuryxnx5mtaro
committer: Canonical.com Patch Queue Manager <pqm at pqm.ubuntu.com>
branch nick: +trunk
timestamp: Fri 2008-09-19 02:09:41 +0100
message:
  Explain revision/range identifiers (Daniel Clemente)
modified:
  NEWS                           NEWS-20050323055033-4e00b5db738777ff
  bzrlib/help_topics/__init__.py help_topics.py-20060920210027-rnim90q9e0bwxvy4-1
  bzrlib/revisionspec.py         revisionspec.py-20050907152633-17567659fd5c0ddb
    ------------------------------------------------------------
    revno: 3711.1.1
    revision-id: ian.clatworthy at canonical.com-20080919003845-1tghuryxnx5mtaro
    parent: pqm at pqm.ubuntu.com-20080917230446-p0wippqwikt511sp
    parent: dcl441-bugs at yahoo.com-20080904190758-711mlwsiss43csmu
    committer: Ian Clatworthy <ian.clatworthy at canonical.com>
    branch nick: ianc-integration
    timestamp: Fri 2008-09-19 10:38:45 +1000
    message:
      Explain revision/range identifiers (Daniel Clemente)
    modified:
      NEWS                           NEWS-20050323055033-4e00b5db738777ff
      bzrlib/help_topics/__init__.py help_topics.py-20060920210027-rnim90q9e0bwxvy4-1
      bzrlib/revisionspec.py         revisionspec.py-20050907152633-17567659fd5c0ddb
    ------------------------------------------------------------
    revno: 3651.2.5
    revision-id: dcl441-bugs at yahoo.com-20080904190758-711mlwsiss43csmu
    parent: dcl441-bugs at yahoo.com-20080904185304-emtumbgna7m9lpvw
    committer: Daniel Clemente <dcl441-bugs at yahoo.com>
    branch nick: docu
    timestamp: Thu 2008-09-04 21:07:58 +0200
    message:
      Wrote specifical and simpler example for 'before:', and referred to 'bzr diff -c'
    modified:
      bzrlib/revisionspec.py         revisionspec.py-20050907152633-17567659fd5c0ddb
    ------------------------------------------------------------
    revno: 3651.2.4
    revision-id: dcl441-bugs at yahoo.com-20080904185304-emtumbgna7m9lpvw
    parent: dcl441-bugs at yahoo.com-20080904183759-7t40gau1nvpg7ki3
    committer: Daniel Clemente <dcl441-bugs at yahoo.com>
    branch nick: docu
    timestamp: Thu 2008-09-04 20:53:04 +0200
    message:
      Reordered to put explanation first and exceptions after
    modified:
      bzrlib/revisionspec.py         revisionspec.py-20050907152633-17567659fd5c0ddb
    ------------------------------------------------------------
    revno: 3651.2.3
    revision-id: dcl441-bugs at yahoo.com-20080904183759-7t40gau1nvpg7ki3
    parent: dcl441-bugs at yahoo.com-20080828170323-mtdbdqg5tvzn4a5s
    committer: Daniel Clemente <dcl441-bugs at yahoo.com>
    branch nick: docu
    timestamp: Thu 2008-09-04 20:37:59 +0200
    message:
      Explained more about range interpretations. Removed sentence about REV1..REV2..REV3 because it's unimplemented
    modified:
      bzrlib/help_topics/__init__.py help_topics.py-20060920210027-rnim90q9e0bwxvy4-1
    ------------------------------------------------------------
    revno: 3651.2.2
    revision-id: dcl441-bugs at yahoo.com-20080828170323-mtdbdqg5tvzn4a5s
    parent: dcl441-bugs at yahoo.com-20080828151138-2b06hh7tvcgvofz5
    committer: Daniel Clemente <dcl441-bugs at yahoo.com>
    branch nick: docu
    timestamp: Thu 2008-08-28 19:03:23 +0200
    message:
      Explained the syntax for revision and range identifiers
    modified:
      bzrlib/help_topics/__init__.py help_topics.py-20060920210027-rnim90q9e0bwxvy4-1
    ------------------------------------------------------------
    revno: 3651.2.1
    revision-id: dcl441-bugs at yahoo.com-20080828151138-2b06hh7tvcgvofz5
    parent: pqm at pqm.ubuntu.com-20080827044137-4ox67ehr4bxtj7b0
    committer: Daniel Clemente <dcl441-bugs at yahoo.com>
    branch nick: docu
    timestamp: Thu 2008-08-28 17:11:38 +0200
    message:
      Clarify that you don't have to write a path if you mean the current branch
    modified:
      bzrlib/revisionspec.py         revisionspec.py-20050907152633-17567659fd5c0ddb
=== modified file 'NEWS'
--- a/NEWS	2008-09-17 22:22:25 +0000
+++ b/NEWS	2008-09-19 00:38:45 +0000
@@ -34,6 +34,8 @@
 
   DOCUMENTATION:
 
+    * Explain revision/range identifiers. (Daniel Clemente)
+
   API CHANGES:
 
   TESTING:

=== modified file 'bzrlib/help_topics/__init__.py'
--- a/bzrlib/help_topics/__init__.py	2008-07-13 07:29:40 +0000
+++ b/bzrlib/help_topics/__init__.py	2008-09-04 18:37:59 +0000
@@ -149,10 +149,33 @@
     import bzrlib.revisionspec
 
     out = []
-    out.append("Revision Identifiers\n")
-    out.append("A revision, or a range bound, can be one of the following.\n")
+    out.append(
+"""Revision Identifiers
+
+A revision identifier refers to a specific state of a branch's history. It can
+be a revision number, or a keyword followed by ':' and often other
+parameters. Some examples of identifiers are '3', 'last:1', 'before:yesterday'
+and 'submit:'.
+
+If 'REV1' and 'REV2' are revision identifiers, then 'REV1..REV2' denotes a
+revision range. Examples: '3647..3649', 'date:yesterday..-1' and
+'branch:/path/to/branch1/..branch:/branch2' (note that there are no quotes or
+spaces around the '..').
+
+Ranges are interpreted differently by different commands. To the "log" command,
+a range is a sequence of log messages, but to the "diff" command, the range
+denotes a change between revisions (and not a sequence of changes).  In
+addition, "log" considers a closed range whereas "diff" and "merge" consider it
+to be open-ended, that is, they include one end but not the other.  For example:
+"bzr log -r 3647..3649" shows the messages of revisions 3647, 3648 and 3649,
+while "bzr diff -r 3647..3649" includes the changes done in revisions 3647 and
+3648, but not 3649.
+
+The keywords used as revision selection methods are the following:
+""")
     details = []
-    details.append("\nFurther details are given below.\n")
+    details.append("\nIn addition, plugins can provide other keywords.")
+    details.append("\nA detailed description of each keyword is given below.\n")
 
     # The help text is indented 4 spaces - this re cleans that up below
     indent_re = re.compile(r'^    ', re.MULTILINE)

=== modified file 'bzrlib/revisionspec.py'
--- a/bzrlib/revisionspec.py	2008-07-19 15:00:27 +0000
+++ b/bzrlib/revisionspec.py	2008-09-04 19:07:58 +0000
@@ -286,7 +286,7 @@
     than the branch's history, the first revision is returned.
     Examples::
 
-      revno:1                   -> return the first revision
+      revno:1                   -> return the first revision of this branch
       revno:3:/path/to/branch   -> return the 3rd revision of
                                    the branch '/path/to/branch'
       revno:-1                  -> The last revision in a branch.
@@ -475,19 +475,21 @@
 
     help_txt = """Selects the parent of the revision specified.
 
-    Supply any revision spec to return the parent of that revision.
+    Supply any revision spec to return the parent of that revision.  This is
+    mostly useful when inspecting revisions that are not in the revision history
+    of a branch.
+
     It is an error to request the parent of the null revision (before:0).
-    This is mostly useful when inspecting revisions that are not in the
-    revision history of a branch.
 
     Examples::
 
       before:1913    -> Return the parent of revno 1913 (revno 1912)
       before:revid:aaaa at bbbb-1234567890  -> return the parent of revision
                                             aaaa at bbbb-1234567890
-      bzr diff -r before:revid:aaaa..revid:aaaa
-            -> Find the changes between revision 'aaaa' and its parent.
-               (what changes did 'aaaa' introduce)
+      bzr diff -r before:1913..1913
+            -> Find the changes between revision 1913 and its parent (1912).
+               (What changes did revision 1913 introduce).
+               This is equivalent to:  bzr diff -c 1913
     """
 
     prefix = 'before:'




More information about the bazaar-commits mailing list