Rev 2793: Add short options to status to assist migrating svn users (Daniel Watkins) in file:///home/pqm/archives/thelove/bzr/%2Btrunk/

Canonical.com Patch Queue Manager pqm at pqm.ubuntu.com
Tue Sep 4 03:41:13 BST 2007


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

------------------------------------------------------------
revno: 2793
revision-id: pqm at pqm.ubuntu.com-20070904024108-wogizoajm6k1ba6w
parent: pqm at pqm.ubuntu.com-20070904004617-gu4xyzuw6mgesvt7
parent: ian.clatworthy at internode.on.net-20070904012026-6c3ypprp3ax54mql
committer: Canonical.com Patch Queue Manager <pqm at pqm.ubuntu.com>
branch nick: +trunk
timestamp: Tue 2007-09-04 03:41:08 +0100
message:
  Add short options to status to assist migrating svn users (Daniel Watkins)
modified:
  NEWS                           NEWS-20050323055033-4e00b5db738777ff
  bzrlib/builtins.py             builtins.py-20050830033751-fc01482b9ca23183
  bzrlib/tests/blackbox/test_status.py teststatus.py-20050712014354-508855eb9f29f7dc
    ------------------------------------------------------------
    revno: 2792.1.1
    merged: ian.clatworthy at internode.on.net-20070904012026-6c3ypprp3ax54mql
    parent: pqm at pqm.ubuntu.com-20070904004617-gu4xyzuw6mgesvt7
    parent: d.m.watkins at warwick.ac.uk-20070826142757-qeoy7xadl3uy116d
    committer: Ian Clatworthy <ian.clatworthy at internode.on.net>
    branch nick: ianc-integration
    timestamp: Tue 2007-09-04 11:20:26 +1000
    message:
      Add short options to status to assist migrating svn users (Daniel Watkins)
    ------------------------------------------------------------
    revno: 2663.1.7
    merged: d.m.watkins at warwick.ac.uk-20070826142757-qeoy7xadl3uy116d
    parent: d.m.watkins at warwick.ac.uk-20070825151813-o1tbwylz5nktwvbp
    committer: Daniel Watkins <D.M.Watkins at warwick.ac.uk>
    branch nick: 115990
    timestamp: Sun 2007-08-26 16:27:57 +0200
    message:
      Capitalised short names.
    ------------------------------------------------------------
    revno: 2663.1.6
    merged: d.m.watkins at warwick.ac.uk-20070825151813-o1tbwylz5nktwvbp
    parent: d.m.watkins at warwick.ac.uk-20070825150658-c2n5zr2zlmbhit42
    parent: pqm at pqm.ubuntu.com-20070824133750-r25v5g25g1flggy6
    committer: Daniel Watkins <D.M.Watkins at warwick.ac.uk>
    branch nick: 115990
    timestamp: Sat 2007-08-25 17:18:13 +0200
    message:
      Merged bzr.dev.
    ------------------------------------------------------------
    revno: 2663.1.5
    merged: d.m.watkins at warwick.ac.uk-20070825150658-c2n5zr2zlmbhit42
    parent: d.m.watkins at warwick.ac.uk-20070731132402-fqcbwtmj53avgk2z
    committer: Daniel Watkins <D.M.Watkins at warwick.ac.uk>
    branch nick: 115990
    timestamp: Sat 2007-08-25 17:06:58 +0200
    message:
      Changed 'bzr stat --quiet' to 'bzr stat -(vs|sv)', as per list suggestions.
    ------------------------------------------------------------
    revno: 2663.1.4
    merged: d.m.watkins at warwick.ac.uk-20070731132402-fqcbwtmj53avgk2z
    parent: d.m.watkins at warwick.ac.uk-20070731132324-7pywj496gxfdasku
    committer: Daniel Watkins <D.M.Watkins at warwick.ac.uk>
    branch nick: 115990
    timestamp: Tue 2007-07-31 14:24:02 +0100
    message:
      'bzr status' now accepts the quiet option, with SVN-like behaviour, as per bug #115990.
    ------------------------------------------------------------
    revno: 2663.1.3
    merged: d.m.watkins at warwick.ac.uk-20070731132324-7pywj496gxfdasku
    parent: d.m.watkins at warwick.ac.uk-20070731114841-ft8vp63aznyy2t7s
    committer: Daniel Watkins <D.M.Watkins at warwick.ac.uk>
    branch nick: 115990
    timestamp: Tue 2007-07-31 14:23:24 +0100
    message:
      Added test for 'status --quiet'.
    ------------------------------------------------------------
    revno: 2663.1.2
    merged: d.m.watkins at warwick.ac.uk-20070731114841-ft8vp63aznyy2t7s
    parent: d.m.watkins at warwick.ac.uk-20070731114712-e5rlonhowfa1usk8
    committer: Daniel Watkins <D.M.Watkins at warwick.ac.uk>
    branch nick: 115990
    timestamp: Tue 2007-07-31 12:48:41 +0100
    message:
      Added note to help for 'status'.
    ------------------------------------------------------------
    revno: 2663.1.1
    merged: d.m.watkins at warwick.ac.uk-20070731114712-e5rlonhowfa1usk8
    parent: pqm at pqm.ubuntu.com-20070731051059-q0z19zdpq7t76iex
    committer: Daniel Watkins <D.M.Watkins at warwick.ac.uk>
    branch nick: 115990
    timestamp: Tue 2007-07-31 12:47:12 +0100
    message:
      'bzr status -q' now has the same effect as 'bzr status --versioned --short'.
=== modified file 'NEWS'
--- a/NEWS	2007-09-03 23:19:00 +0000
+++ b/NEWS	2007-09-04 01:20:26 +0000
@@ -154,6 +154,11 @@
    * If versioned files match a given ignore pattern, a warning is now
      given. (Daniel Watkins, #48623)
 
+   * ``bzr status`` now has -S as a short name for --short and -V as a
+     short name for --versioned. These have been added to assist users
+     migrating from Subversion: ``bzr status -SV`` is now like
+     ``svn status -q``.  (Daniel Watkins, #115990)
+
   API BREAKS:
 
    * ``Branch.append_revision`` is removed altogether; please use 

=== modified file 'bzrlib/builtins.py'
--- a/bzrlib/builtins.py	2007-09-03 08:23:34 +0000
+++ b/bzrlib/builtins.py	2007-09-04 01:20:26 +0000
@@ -152,8 +152,9 @@
     To see ignored files use 'bzr ignored'.  For details on the
     changes to file texts, use 'bzr diff'.
     
-    --short gives a status flags for each item, similar to the SVN's status
-    command.
+    Note that --short or -S gives status flags for each item, similar
+    to Subversion's status command. To get output similar to svn -q,
+    use bzr -SV.
 
     If no arguments are specified, the status of the entire working
     directory is shown.  Otherwise, only the status of the specified
@@ -168,8 +169,11 @@
     
     takes_args = ['file*']
     takes_options = ['show-ids', 'revision', 'change',
-                     Option('short', help='Give short SVN-style status lines.'),
-                     Option('versioned', help='Only show versioned files.')]
+                     Option('short', help='Use short status indicators.',
+                            short_name='S'),
+                     Option('versioned', help='Only show versioned files.',
+                            short_name='V')
+                     ]
     aliases = ['st', 'stat']
 
     encoding_type = 'replace'

=== modified file 'bzrlib/tests/blackbox/test_status.py'
--- a/bzrlib/tests/blackbox/test_status.py	2007-09-01 16:04:44 +0000
+++ b/bzrlib/tests/blackbox/test_status.py	2007-09-04 01:20:26 +0000
@@ -371,6 +371,28 @@
         result2 = self.run_bzr("status --versioned -r 0..")[0]
         self.assertEquals(result2, result)
 
+    def test_status_SV(self):
+        tree = self.make_branch_and_tree('.')
+
+        self.build_tree(['hello.txt'])
+        result = self.run_bzr("status -SV")[0]
+        self.assertNotContainsRe(result, "hello.txt")
+
+        tree.add("hello.txt")
+        result = self.run_bzr("status -SV")[0]
+        self.assertContainsRe(result, "[+]N  hello.txt\n")
+
+        tree.commit(message="added")
+        result = self.run_bzr("status -SV -r 0..1")[0]
+        self.assertContainsRe(result, "[+]N  hello.txt\n")
+
+        self.build_tree(['world.txt'])
+        result = self.run_bzr("status -SV -r 0")[0]
+        self.assertContainsRe(result, "[+]N  hello.txt\n")
+
+        result2 = self.run_bzr("status -SV -r 0..")[0]
+        self.assertEquals(result2, result)
+
     def assertStatusContains(self, pattern):
         """Run status, and assert it contains the given pattern"""
         result = self.run_bzr("status --short")[0]




More information about the bazaar-commits mailing list