Rev 3065: Avoid duplicating revno in commit messages (Nordhoff) in file:///home/pqm/archives/thelove/bzr/%2Btrunk/

Canonical.com Patch Queue Manager pqm at pqm.ubuntu.com
Sun Dec 2 15:11:24 GMT 2007


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

------------------------------------------------------------
revno: 3065
revision-id:pqm at pqm.ubuntu.com-20071202151118-zcl7ezt2c7k5rkos
parent: pqm at pqm.ubuntu.com-20071202134939-jvspioo8sh18aok3
parent: aaron.bentley at utoronto.ca-20071202143501-79eo4gr2d579xgfr
committer: Canonical.com Patch Queue Manager <pqm at pqm.ubuntu.com>
branch nick: +trunk
timestamp: Sun 2007-12-02 15:11:18 +0000
message:
  Avoid duplicating revno in commit messages (Nordhoff)
modified:
  NEWS                           NEWS-20050323055033-4e00b5db738777ff
  bzrlib/commit.py               commit.py-20050511101309-79ec1a0168e0e825
  bzrlib/tests/blackbox/test_commit.py test_commit.py-20060212094538-ae88fc861d969db0
    ------------------------------------------------------------
    revno: 3052.4.7
    revision-id:aaron.bentley at utoronto.ca-20071202143501-79eo4gr2d579xgfr
    parent: mnordhoff at mattnordhoff.com-20071201002036-zc4cvszvgj31099n
    parent: pqm at pqm.ubuntu.com-20071202134939-jvspioo8sh18aok3
    committer: Aaron Bentley <aaron.bentley at utoronto.ca>
    branch nick: bzr.ab.integration
    timestamp: Sun 2007-12-02 09:35:01 -0500
    message:
      Merge bzr.dev
    modified:
      NEWS                           NEWS-20050323055033-4e00b5db738777ff
      bzrlib/repofmt/pack_repo.py    pack_repo.py-20070813041115-gjv5ma7ktfqwsjgn-1
      bzrlib/repository.py           rev_storage.py-20051111201905-119e9401e46257e3
      bzrlib/tests/__init__.py       selftest.py-20050531073622-8d0e3c8845c97a64
      bzrlib/tests/interrepository_implementations/__init__.py __init__.py-20060220054744-baf49a1f88f17b1a
      bzrlib/tests/interrepository_implementations/test_interrepository.py test_interrepository.py-20060220061411-1ec13fa99e5e3eee
      bzrlib/tests/repository_implementations/test_reconcile.py test_reconcile.py-20060223022332-572ef70a3288e369
      bzrlib/tests/test_transform.py test_transaction.py-20060105172520-b3ffb3946550e6c4
      bzrlib/transform.py            transform.py-20060105172343-dd99e54394d91687
    ------------------------------------------------------------
    revno: 3052.4.6
    revision-id:mnordhoff at mattnordhoff.com-20071201002036-zc4cvszvgj31099n
    parent: mnordhoff at mattnordhoff.com-20071201001524-4800uyoji9fzf38a
    committer: Matt Nordhoff <mnordhoff at mattnordhoff.com>
    branch nick: quieter-commit
    timestamp: Fri 2007-11-30 19:20:36 -0500
    message:
      Update the warning message to use 1.0 instead of 0.93.
    modified:
      bzrlib/commit.py               commit.py-20050511101309-79ec1a0168e0e825
    ------------------------------------------------------------
    revno: 3052.4.5
    revision-id:mnordhoff at mattnordhoff.com-20071201001524-4800uyoji9fzf38a
    parent: mnordhoff at mattnordhoff.com-20071201000959-f21gva74owkn8j5w
    committer: Matt Nordhoff <mnordhoff at mattnordhoff.com>
    branch nick: quieter-commit
    timestamp: Fri 2007-11-30 19:15:24 -0500
    message:
      Moving NEWS entries from 1.0rc1 to IN DEVELOPMENT.
    modified:
      NEWS                           NEWS-20050323055033-4e00b5db738777ff
    ------------------------------------------------------------
    revno: 3052.4.4
    revision-id:mnordhoff at mattnordhoff.com-20071201000959-f21gva74owkn8j5w
    parent: mnordhoff at mattnordhoff.com-20071130025349-3vesldlewlanxzu4
    parent: pqm at pqm.ubuntu.com-20071130233349-86c0lwztw5vt2r17
    committer: Matt Nordhoff <mnordhoff at mattnordhoff.com>
    branch nick: quieter-commit
    timestamp: Fri 2007-11-30 19:09:59 -0500
    message:
      Merge bzr.dev.
    added:
      doc/en/tutorials/              docentutorials-20071127235845-bm2lu60bvau1ptmh-1
      doc/en/user-guide/annotating_changes.txt annotating_changes.t-20071122141511-0knao2lklsdsvb1q-1
      doc/en/user-guide/bazaar_workflows.txt bazaar_workflows.txt-20071114035000-q36a9h57ps06uvnl-1
      doc/en/user-guide/best_practice_intro.txt best_practice_intro.-20071123154453-dk2mjhrg1vpjm5w2-1
      doc/en/user-guide/branching_a_project.txt branching_a_project.-20071122141511-0knao2lklsdsvb1q-2
      doc/en/user-guide/browsing_history.txt browsing_history.txt-20071121073725-0corxykv5irjal00-2
      doc/en/user-guide/central_intro.txt central_intro.txt-20071123055134-k5x4ekduci2lbn36-1
      doc/en/user-guide/configuring_bazaar.txt configuring_bazaar.t-20071128000722-ncxiua259xwbdbg7-1
      doc/en/user-guide/controlling_registration.txt controlling_registra-20071121073725-0corxykv5irjal00-3
      doc/en/user-guide/core_concepts.txt core_concepts.txt-20071114035000-q36a9h57ps06uvnl-2
      doc/en/user-guide/distributed_intro.txt distributed_intro.tx-20071123154453-dk2mjhrg1vpjm5w2-2
      doc/en/user-guide/entering_commands.txt using_bazaar.txt-20071114035000-q36a9h57ps06uvnl-6
      doc/en/user-guide/getting_help.txt getting_help.txt-20071128000722-ncxiua259xwbdbg7-2
      doc/en/user-guide/images/      images-20071114035000-q36a9h57ps06uvnl-3
      doc/en/user-guide/images/workflows_centralized.png workflows_centralize-20071114035000-q36a9h57ps06uvnl-8
      doc/en/user-guide/images/workflows_centralized.svg workflows_centralize-20071130043324-bhms0cgyphhq1b2x-1
      doc/en/user-guide/images/workflows_gatekeeper.png workflows_gatekeeper-20071114035000-q36a9h57ps06uvnl-9
      doc/en/user-guide/images/workflows_gatekeeper.svg workflows_gatekeeper-20071130043324-bhms0cgyphhq1b2x-2
      doc/en/user-guide/images/workflows_localcommit.png workflows_localcommi-20071114035000-q36a9h57ps06uvnl-10
      doc/en/user-guide/images/workflows_localcommit.svg workflows_localcommi-20071130043324-bhms0cgyphhq1b2x-3
      doc/en/user-guide/images/workflows_peer.png workflows_peer.png-20071114035000-q36a9h57ps06uvnl-11
      doc/en/user-guide/images/workflows_peer.svg workflows_peer.svg-20071130043324-bhms0cgyphhq1b2x-4
      doc/en/user-guide/images/workflows_pqm.png workflows_pqm.png-20071114035000-q36a9h57ps06uvnl-12
      doc/en/user-guide/images/workflows_pqm.svg workflows_pqm.svg-20071130043324-bhms0cgyphhq1b2x-5
      doc/en/user-guide/images/workflows_shared.png workflows_shared.png-20071114035000-q36a9h57ps06uvnl-13
      doc/en/user-guide/images/workflows_shared.svg workflows_shared.svg-20071130043324-bhms0cgyphhq1b2x-6
      doc/en/user-guide/images/workflows_single.png workflows_single.png-20071114035000-q36a9h57ps06uvnl-14
      doc/en/user-guide/images/workflows_single.svg workflows_single.svg-20071130043324-bhms0cgyphhq1b2x-7
      doc/en/user-guide/installing_bazaar.txt installing_bazaar.tx-20071114035000-q36a9h57ps06uvnl-4
      doc/en/user-guide/introducing_bazaar.txt introducing_bazaar.t-20071114035000-q36a9h57ps06uvnl-5
      doc/en/user-guide/merging_changes.txt merging_changes.txt-20071122141511-0knao2lklsdsvb1q-3
      doc/en/user-guide/organizing_branches.txt organizing_branches.-20071123154453-dk2mjhrg1vpjm5w2-3
      doc/en/user-guide/partner_intro.txt partner_workflow.txt-20071122141511-0knao2lklsdsvb1q-4
      doc/en/user-guide/publishing_a_branch.txt publishing_a_branch.-20071123055134-k5x4ekduci2lbn36-2
      doc/en/user-guide/recording_changes.txt recording_changes.tx-20071121073725-0corxykv5irjal00-4
      doc/en/user-guide/releasing_a_project.txt releasing_a_project.-20071121073725-0corxykv5irjal00-5
      doc/en/user-guide/resolving_conflicts.txt resolving_conflicts.-20071122141511-0knao2lklsdsvb1q-5
      doc/en/user-guide/reusing_a_checkout.txt reusing_a_checkout.t-20071123055134-k5x4ekduci2lbn36-3
      doc/en/user-guide/reviewing_changes.txt reviewing_changes.tx-20071121073725-0corxykv5irjal00-6
      doc/en/user-guide/sending_changes.txt sending_changes.txt-20071123154453-dk2mjhrg1vpjm5w2-4
      doc/en/user-guide/solo_intro.txt solo_workflow.txt-20071121073725-0corxykv5irjal00-7
      doc/en/user-guide/starting_a_project.txt starting_a_project.t-20071121073725-0corxykv5irjal00-8
      doc/en/user-guide/undoing_mistakes.txt undoing_mistakes.txt-20071121092300-8fyacngt1w98e5mp-1
      doc/en/user-guide/using_checkouts.txt using_checkouts.txt-20071123055134-k5x4ekduci2lbn36-4
      doc/en/user-guide/using_gatekeepers.txt using_gatekeepers.tx-20071123154453-dk2mjhrg1vpjm5w2-5
      doc/en/user-guide/working_offline_central.txt working_offline_cent-20071123055134-k5x4ekduci2lbn36-5
      doc/en/user-guide/writing_a_plugin.txt writing_a_plugin.txt-20071114035000-q36a9h57ps06uvnl-7
      index.txt                      index.txt-20071121073725-0corxykv5irjal00-1
    renamed:
      doc/en/user-guide/centralized_workflow.txt => doc/en/tutorials/centralized_workflow.txt centralized_workflow-20060830194948-kspf52565xvgrlil-1
      doc/en/user-guide/tutorial.txt => doc/en/tutorials/tutorial.txt tutorial.txt-20050804190939-9dcbba2ef053bc84
    modified:
      Makefile                       Makefile-20050805140406-d96e3498bb61c5bb
      NEWS                           NEWS-20050323055033-4e00b5db738777ff
      bzrlib/bzrdir.py               bzrdir.py-20060131065624-156dfea39c4387cb
      bzrlib/debug.py                debug.py-20061102062349-vdhrw9qdpck8cl35-1
      bzrlib/errors.py               errors.py-20050309040759-20512168c4e14fbd
      bzrlib/graph.py                graph_walker.py-20070525030359-y852guab65d4wtn0-1
      bzrlib/help_topics.py          help_topics.py-20060920210027-rnim90q9e0bwxvy4-1
      bzrlib/knit.py                 knit.py-20051212171256-f056ac8f0fbe1bd9
      bzrlib/merge.py                merge.py-20050513021216-953b65a438527106
      bzrlib/plugin.py               plugin.py-20050622060424-829b654519533d69
      bzrlib/remote.py               remote.py-20060720103555-yeeg2x51vn0rbtdp-1
      bzrlib/repofmt/pack_repo.py    pack_repo.py-20070813041115-gjv5ma7ktfqwsjgn-1
      bzrlib/repository.py           rev_storage.py-20051111201905-119e9401e46257e3
      bzrlib/revision.py             revision.py-20050309040759-e77802c08f3999d5
      bzrlib/tests/HTTPTestUtil.py   HTTPTestUtil.py-20050914180604-247d3aafb7a43343
      bzrlib/tests/HttpServer.py     httpserver.py-20061012142527-m1yxdj1xazsf8d7s-1
      bzrlib/tests/repository_implementations/test_repository.py test_repository.py-20060131092128-ad07f494f5c9d26c
      bzrlib/tests/test_ancestry.py  test_ancestry.py-20050913023709-69768e94848312c6
      bzrlib/tests/test_errors.py    test_errors.py-20060210110251-41aba2deddf936a8
      bzrlib/tests/test_http.py      testhttp.py-20051018020158-b2eef6e867c514d9
      bzrlib/tests/test_knit.py      test_knit.py-20051212171302-95d4c00dd5f11f2b
      bzrlib/tests/test_repository.py test_repository.py-20060131075918-65c555b881612f4d
      bzrlib/tests/test_revision.py  testrevision.py-20050804210559-46f5e1eb67b01289
      bzrlib/tests/test_switch.py    test_switch.py-20071116011000-v5lnw7d2wkng9eux-2
      bzrlib/transport/http/__init__.py http_transport.py-20050711212304-506c5fd1059ace96
      bzrlib/transport/http/_pycurl.py pycurlhttp.py-20060110060940-4e2a705911af77a6
      bzrlib/transport/http/_urllib.py _urlgrabber.py-20060113083826-0bbf7d992fbf090c
      bzrlib/transport/http/_urllib2_wrappers.py _urllib2_wrappers.py-20060913231729-ha9ugi48ktx481ao-1
      bzrlib/transport/http/response.py _response.py-20060613154423-a2ci7hd4iw5c7fnt-1
      doc/en/user-guide/authentication_conf.txt authentication_conf.-20071104135035-glfv0ri355tyg1nf-1
      doc/en/user-guide/bug_trackers.txt bug_trackers.txt-20070713223459-khxdlcudraii95uv-1
      doc/en/user-guide/configuration.txt configuration.txt-20060314161707-868350809502af01
      doc/en/user-guide/conflicts.txt conflicts.txt-20070723221841-ns3jvwxdb4okn6fk-1
      doc/en/user-guide/hooks.txt    hooks.txt-20070829200551-7nr6e5a1io6x78uf-1
      doc/en/user-guide/http_smart_server.txt fastcgi.txt-20061005091552-rz8pva0olkxv0sd8-3
      doc/en/user-guide/index.txt    index.txt-20060622101119-tgwtdci8z769bjb9-2
      doc/en/user-guide/plugins.txt  plugins.txt-20060314145616-525099a747f3ffdd
      doc/en/user-guide/server.txt   server.txt-20060913044801-h939fvbwzz39gf7g-1
      doc/en/user-guide/setting_up_email.txt setting_up_email.txt-20060314161707-fd242c8944346173
      doc/en/user-guide/shared_repository_layouts.txt shared_repository_la-20070502152030-bagewuqs18ns24o7-1
      doc/en/user-guide/specifying_revisions.txt specifying_revisions.txt-20060314161707-19deb139101bea33
      doc/en/user-guide/using_aliases.txt using_aliases.txt-20060314161707-c21d27fa2939e039
      doc/en/user-guide/version_info.txt version_info.txt-20060921215543-gju6o5xdic8w25np-1
      doc/index.txt                  index.txt-20070813101924-07gd9i9d2jt124bf-1
      tools/win32/bzr.iss.cog        bzr.iss.cog-20060622100836-b3yup582rt3y0nvm-5
      doc/en/tutorials/tutorial.txt  tutorial.txt-20050804190939-9dcbba2ef053bc84
    ------------------------------------------------------------
    revno: 3052.4.3
    revision-id:mnordhoff at mattnordhoff.com-20071130025349-3vesldlewlanxzu4
    parent: mnordhoff at mattnordhoff.com-20071130024340-a6y1fh1bbibv17r6
    committer: Matt Nordhoff <mnordhoff at mattnordhoff.com>
    branch nick: quieter-commit
    timestamp: Thu 2007-11-29 21:53:49 -0500
    message:
      Update NEWS about the deprecation.
    modified:
      NEWS                           NEWS-20050323055033-4e00b5db738777ff
    ------------------------------------------------------------
    revno: 3052.4.2
    revision-id:mnordhoff at mattnordhoff.com-20071130024340-a6y1fh1bbibv17r6
    parent: mnordhoff at mattnordhoff.com-20071130020635-a53ezbww49og1sch
    committer: Matt Nordhoff <mnordhoff at mattnordhoff.com>
    branch nick: quieter-commit
    timestamp: Thu 2007-11-29 21:43:40 -0500
    message:
      Deprecate not passing a location to commit reporters' started() methods.
    modified:
      bzrlib/commit.py               commit.py-20050511101309-79ec1a0168e0e825
    ------------------------------------------------------------
    revno: 3052.4.1
    revision-id:mnordhoff at mattnordhoff.com-20071130020635-a53ezbww49og1sch
    parent: pqm at pqm.ubuntu.com-20071129184101-u9506rihe4zbzyyz
    committer: Matt Nordhoff <mnordhoff at mattnordhoff.com>
    branch nick: quieter-commit
    timestamp: Thu 2007-11-29 21:06:35 -0500
    message:
      bzr commit: don't print the revision number twice. (Bug #172612)
    modified:
      NEWS                           NEWS-20050323055033-4e00b5db738777ff
      bzrlib/commit.py               commit.py-20050511101309-79ec1a0168e0e825
      bzrlib/tests/blackbox/test_commit.py test_commit.py-20060212094538-ae88fc861d969db0
=== modified file 'NEWS'
--- a/NEWS	2007-12-01 21:59:46 +0000
+++ b/NEWS	2007-12-02 14:35:01 +0000
@@ -7,6 +7,11 @@
 IN DEVELOPMENT
 ==============
 
+  IMPROVEMENTS:
+
+   * ``bzr commit`` now doesn't print the revision number twice. (Matt
+     Nordhoff, #172612)
+
   INTERNALS:
 
     * New -Dhttp debug option reports http connections, requests and responses.
@@ -26,6 +31,11 @@
    * Check for missing basis texts when fetching from packs to packs.
      (John Arbash Meinel, #165290)
 
+  API BREAKS:
+
+   * Deprecate not passing a ``location`` argument to commit reporters'
+     ``started`` methods. (Matt Nordhoff)
+
 
 bzr 1.0rc1 2007-11-30
 =====================

=== modified file 'bzrlib/commit.py'
--- a/bzrlib/commit.py	2007-11-27 20:35:02 +0000
+++ b/bzrlib/commit.py	2007-12-01 00:20:36 +0000
@@ -91,6 +91,10 @@
     """I report on progress of a commit."""
 
     def started(self, revno, revid, location=None):
+        if location is None:
+            symbol_versioning.warn("As of bzr 1.0 you must pass a location "
+                                   "to started.", DeprecationWarning,
+                                   stacklevel=2)
         pass
 
     def snapshot_change(self, change, path):
@@ -133,10 +137,15 @@
 
     def started(self, revno, rev_id, location=None):
         if location is not None:
-            location = ' to "' + unescape_for_display(location, 'utf-8') + '"'
+            location = ' to: ' + unescape_for_display(location, 'utf-8')
         else:
+            # When started was added, location was only made optional by
+            # accident.  Matt Nordhoff 20071129
+            symbol_versioning.warn("As of bzr 1.0 you must pass a location "
+                                   "to started.", DeprecationWarning,
+                                   stacklevel=2)
             location = ''
-        self._note('Committing revision %d%s.', revno, location)
+        self._note('Committing%s', location)
 
     def completed(self, revno, rev_id):
         self._note('Committed revision %d.', revno)

=== modified file 'bzrlib/tests/blackbox/test_commit.py'
--- a/bzrlib/tests/blackbox/test_commit.py	2007-10-10 00:21:57 +0000
+++ b/bzrlib/tests/blackbox/test_commit.py	2007-11-30 02:06:35 +0000
@@ -83,7 +83,7 @@
         tree.add("hello.txt")
         out,err = self.run_bzr('commit -m added')
         self.assertEqual('', out)
-        self.assertContainsRe(err, '^Committing revision 1 to ".*"\.\n'
+        self.assertContainsRe(err, '^Committing to: .*\n'
                               'added hello.txt\n'
                               'Committed revision 1.\n$',)
 
@@ -102,7 +102,7 @@
         self.build_tree_contents([('hello.txt', 'new contents')])
         out, err = self.run_bzr('commit -m modified')
         self.assertEqual('', out)
-        self.assertContainsRe(err, '^Committing revision 2 to ".*"\.\n'
+        self.assertContainsRe(err, '^Committing to: .*\n'
                               'modified hello\.txt\n'
                               'Committed revision 2\.\n$')
 
@@ -112,7 +112,7 @@
         wt.rename_one('hello.txt', 'gutentag.txt')
         out, err = self.run_bzr('commit -m renamed')
         self.assertEqual('', out)
-        self.assertContainsRe(err, '^Committing revision 2 to ".*"\.\n'
+        self.assertContainsRe(err, '^Committing to: .*\n'
                               'renamed hello\.txt => gutentag\.txt\n'
                               'Committed revision 2\.$\n')
 
@@ -124,7 +124,7 @@
         wt.rename_one('hello.txt', 'subdir/hello.txt')
         out, err = self.run_bzr('commit -m renamed')
         self.assertEqual('', out)
-        self.assertContainsRe(err, '^Committing revision 2 to ".*"\.\n'
+        self.assertContainsRe(err, '^Committing to: .*\n'
                               'added subdir\n'
                               'renamed hello\.txt => subdir/hello\.txt\n'
                               'Committed revision 2\.\n$')
@@ -137,7 +137,7 @@
         wt.add(['hello.txt'])
         out,err = self.run_bzr('commit -m added')
         self.assertEqual('', out)
-        self.assertContainsRe(err, '^Committing revision 1 to ".*"\.\n'
+        self.assertContainsRe(err, '^Committing to: .*\n'
                               'added hello\.txt\n'
                               'Committed revision 1\.\n$')
 
@@ -150,7 +150,7 @@
         tree.add("hello.txt")
         out,err = self.run_bzr('commit -m added')
         self.assertEqual('', out)
-        self.assertContainsRe(err, '^Committing revision 2 to ".*"\.\n'
+        self.assertContainsRe(err, '^Committing to: .*\n'
                               'added hello\.txt\n'
                               'Committed revision 2\.$\n')
 
@@ -164,7 +164,7 @@
         b_tree = a_tree.branch.create_checkout('b')
         expected = "%s/" % (osutils.abspath('a'), )
         out, err = self.run_bzr('commit -m blah --unchanged', working_dir='b')
-        self.assertEqual(err, 'Committing revision 2 to "%s".\n'
+        self.assertEqual(err, 'Committing to: %s\n'
                          'Committed revision 2.\n' % expected)
 
     def test_commit_merge_reports_all_modified_files(self):
@@ -222,7 +222,7 @@
         self.assertEqual('', out)
         expected = '%s/' % (osutils.getcwd(), )
         self.assertEqualDiff(
-            'Committing revision 2 to "%s".\n'
+            'Committing to: %s\n'
             'modified filetomodify\n'
             'added newdir\n'
             'added newfile\n'
@@ -397,7 +397,7 @@
         output, err = self.run_bzr(
             'commit -m hello --fixes=lp:23452 tree/hello.txt')
         self.assertEqual('', output)
-        self.assertContainsRe(err, 'Committing revision 1 to ".*"\.\n'
+        self.assertContainsRe(err, 'Committing to: .*\n'
                               'added hello\.txt\n'
                               'Committed revision 1\.\n')
 




More information about the bazaar-commits mailing list