Rev 3246: (James Westby) Make version-info --custom imply --all. (#195560) in file:///home/pqm/archives/thelove/bzr/%2Btrunk/

Canonical.com Patch Queue Manager pqm at pqm.ubuntu.com
Fri Feb 29 01:13:12 GMT 2008


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

------------------------------------------------------------
revno: 3246
revision-id:pqm at pqm.ubuntu.com-20080229011300-p50it0si2y8mbv0d
parent: pqm at pqm.ubuntu.com-20080228234130-5rw39g7z5ky3rdiw
parent: bialix at ukr.net-20080228212744-fsj9dxk0ken018y6
committer: Canonical.com Patch Queue Manager <pqm at pqm.ubuntu.com>
branch nick: +trunk
timestamp: Fri 2008-02-29 01:13:00 +0000
message:
  (James Westby) Make version-info --custom imply --all. (#195560)
modified:
  NEWS                           NEWS-20050323055033-4e00b5db738777ff
  bzrlib/cmd_version_info.py     __init__.py-20051228204928-697d01fdca29c99b
  bzrlib/tests/blackbox/test_version_info.py test_bb_version_info.py-20051228204928-91711c6559d952f7
    ------------------------------------------------------------
    revno: 3231.2.3
    revision-id:bialix at ukr.net-20080228212744-fsj9dxk0ken018y6
    parent: bialix at ukr.net-20080228212530-pcrt1sc4vcezapgr
    committer: Alexander Belchenko <bialix at ukr.net>
    branch nick: bug.195560
    timestamp: Thu 2008-02-28 23:27:44 +0200
    message:
      update NEWS about fix for bug #195560
    modified:
      NEWS                           NEWS-20050323055033-4e00b5db738777ff
    ------------------------------------------------------------
    revno: 3231.2.2
    revision-id:bialix at ukr.net-20080228212530-pcrt1sc4vcezapgr
    parent: jw+debian at jameswestby.net-20080225234106-9b4ql42w13ijewp3
    parent: pqm at pqm.ubuntu.com-20080228195416-virz04ciql01hw4y
    committer: Alexander Belchenko <bialix at ukr.net>
    branch nick: bug.195560
    timestamp: Thu 2008-02-28 23:25:30 +0200
    message:
      merge bzr.dev
    added:
      bzrlib/plugins/launchpad/test_lp_service.py test_lp_service.py-20080213034527-drf0ucr2x1js3onb-1
    modified:
      NEWS                           NEWS-20050323055033-4e00b5db738777ff
      bzrlib/branch.py               branch.py-20050309040759-e4baf4e0d046576e
      bzrlib/builtins.py             builtins.py-20050830033751-fc01482b9ca23183
      bzrlib/bzrdir.py               bzrdir.py-20060131065624-156dfea39c4387cb
      bzrlib/dirstate.py             dirstate.py-20060728012006-d6mvoihjb3je9peu-1
      bzrlib/errors.py               errors.py-20050309040759-20512168c4e14fbd
      bzrlib/osutils.py              osutils.py-20050309040759-eeaff12fbf77ac86
      bzrlib/plugins/launchpad/__init__.py __init__.py-20060315182712-2d5feebd2a1032dc
      bzrlib/plugins/launchpad/test_lp_indirect.py test_lp_indirect.py-20070126002743-oyle362tzv9cd8mi-1
      bzrlib/remote.py               remote.py-20060720103555-yeeg2x51vn0rbtdp-1
      bzrlib/tests/__init__.py       selftest.py-20050531073622-8d0e3c8845c97a64
      bzrlib/tests/blackbox/test_branch.py test_branch.py-20060524161337-noms9gmcwqqrfi8y-1
      bzrlib/tests/blackbox/test_checkout.py test_checkout.py-20060211231752-a5cde67cf70af854
      bzrlib/tests/branch_implementations/test_commit.py test_commit.py-20070206022134-117z1i5b644p63r0-1
      bzrlib/tests/test_branch.py    test_branch.py-20060116013032-97819aa07b8ab3b5
      bzrlib/tests/test_config.py    testconfig.py-20051011041908-742d0c15d8d8c8eb
      bzrlib/tests/test_ssh_transport.py test_ssh_transport.p-20070105153201-f7iq2bosvgjbdgc3-1
      bzrlib/tests/test_transform.py test_transaction.py-20060105172520-b3ffb3946550e6c4
      bzrlib/tests/test_transport_implementations.py test_transport_implementations.py-20051227111451-f97c5c7d5c49fce7
      bzrlib/tests/test_workingtree.py testworkingtree.py-20051004024258-b88d0fe8f101d468
      bzrlib/tests/tree_implementations/test_tree.py test_tree.py-20061215160206-usu7lwcj8aq2n3br-1
      bzrlib/tests/workingtree_implementations/test_inv.py test_inv.py-20070311221604-ighlq8tbn5xq0kuo-1
      bzrlib/tests/workingtree_implementations/test_workingtree.py test_workingtree.py-20060203003124-817757d3e31444fb
      bzrlib/transform.py            transform.py-20060105172343-dd99e54394d91687
      bzrlib/transport/ftp.py        ftp.py-20051116161804-58dc9506548c2a53
      bzrlib/transport/memory.py     memory.py-20051016101338-cd008dbdf69f04fc
      bzrlib/transport/ssh.py        ssh.py-20060824042150-0s9787kng6zv1nwq-1
      bzrlib/tree.py                 tree.py-20050309040759-9d5f2496be663e77
      bzrlib/util/configobj/configobj.py configobj.py-20051018184548-06992a2246425e3e
      bzrlib/util/configobj/docs/BSD-LICENSE.txt BSDLICENSE.txt-20051018184548-29b89ff3102657f5
      bzrlib/util/configobj/docs/configobj.txt configobj.txt-20051018184548-4949b5f17e6a19c7
      bzrlib/util/configobj/docs/validate.txt validate.txt-20051018184548-9e0e5ad913e258f5
      bzrlib/workingtree.py          workingtree.py-20050511021032-29b6ec0a681e02e3
      bzrlib/workingtree_4.py        workingtree_4.py-20070208044105-5fgpc5j3ljlh5q6c-1
      doc/en/user-guide/bazaar_workflows.txt bazaar_workflows.txt-20071114035000-q36a9h57ps06uvnl-1
      doc/en/user-guide/branching_a_project.txt branching_a_project.-20071122141511-0knao2lklsdsvb1q-2
    ------------------------------------------------------------
    revno: 3231.2.1
    revision-id:jw+debian at jameswestby.net-20080225234106-9b4ql42w13ijewp3
    parent: pqm at pqm.ubuntu.com-20080223141021-zgxlzjmg5c0hym5n
    committer: James Westby <jw+debian at jameswestby.net>
    branch nick: bzr.dev
    timestamp: Mon 2008-02-25 23:41:06 +0000
    message:
      Make version-info --custom imply --all.
      
      When using a custom template you can use variables like {clean} which
      are not enabled by default. This causes an ugly traceback.
      
      This fixes the issue by implying --all when --custom (or more exactly
      --template) is used, so that all variables are available in templates.
      
      This was the easier fix than having the template code report that the
      user should pass --check-clean to have {clean} available, but will
      have a performance impact on all users of version-info --custom,
      regardless of whether they use {clean}.
    modified:
      bzrlib/cmd_version_info.py     __init__.py-20051228204928-697d01fdca29c99b
      bzrlib/tests/blackbox/test_version_info.py test_bb_version_info.py-20051228204928-91711c6559d952f7
=== modified file 'NEWS'
--- a/NEWS	2008-02-28 19:54:16 +0000
+++ b/NEWS	2008-02-28 21:27:44 +0000
@@ -46,6 +46,8 @@
     * Include quick-start-summary.svg file to python-based installer(s)
       for Windows. (#192924, Alexander Belchenko)
 
+    * Make version-info --custom imply --all. (#195560, James Westby)
+
     * ``merge --preview`` now works for merges that add or modify
       symlinks (James Henstridge)
 

=== modified file 'bzrlib/cmd_version_info.py'
--- a/bzrlib/cmd_version_info.py	2007-11-10 11:25:36 +0000
+++ b/bzrlib/cmd_version_info.py	2008-02-25 23:41:06 +0000
@@ -104,7 +104,7 @@
         else:
             b = wt.branch
 
-        if all:
+        if all or template:
             include_history = True
             check_clean = True
             include_file_revisions=True

=== modified file 'bzrlib/tests/blackbox/test_version_info.py'
--- a/bzrlib/tests/blackbox/test_version_info.py	2008-01-30 15:54:33 +0000
+++ b/bzrlib/tests/blackbox/test_version_info.py	2008-02-25 23:41:06 +0000
@@ -139,3 +139,15 @@
         wt = self.make_branch_and_tree('branch')
         out, err = self.run_bzr('version-info --custom', retcode=3)
         self.assertContainsRe(err, r'ERROR: No template specified\.')
+
+    def test_custom_implies_all(self):
+        self.create_tree()
+        out, err = self.run_bzr('version-info --custom --template='
+            '"{revno} {branch_nick} {clean}\n" branch')
+        self.assertEqual("2 branch 1\n", out)
+        self.assertEqual("", err)
+        self.build_tree_contents([('branch/c', 'now unclean\n')])
+        out, err = self.run_bzr('version-info --custom --template='
+            '"{revno} {branch_nick} {clean}\n" branch')
+        self.assertEqual("2 branch 0\n", out)
+        self.assertEqual("", err)




More information about the bazaar-commits mailing list