Merge lp:~jeroen-hoekx/bzr-push-and-update/note into lp:bzr-push-and-update

Proposed by Jelmer Vernooij
Status: Merged
Approved by: Jelmer Vernooij
Approved revision: 13
Merged at revision: 13
Proposed branch: lp:~jeroen-hoekx/bzr-push-and-update/note
Merge into: lp:bzr-push-and-update
Diff against target: 28 lines (+6/-6)
1 file modified
__init__.py (+6/-6)
To merge this branch: bzr merge lp:~jeroen-hoekx/bzr-push-and-update/note
Reviewer Review Type Date Requested Status
Martin Pool (community) Approve
Review via email: mp+66168@code.launchpad.net

Description of the change

The "this does not update the working tree" message uses warning() rather than note() now.

To post a comment you must log in.
Revision history for this message
Martin Pool (mbp) wrote :

It would be nice to do this in a cleaner way, but this is fine.

review: Approve
Revision history for this message
John A Meinel (jameinel) wrote :

Fine w me.
Merge: approve

=:->
On Jun 28, 2011 4:28 PM, "Jelmer Vernooij" <email address hidden> wrote:
> Jelmer Vernooij has proposed merging
lp:~jeroen-hoekx/bzr-push-and-update/note into lp:bzr-push-and-update.
>
> Requested reviews:
> Bazaar Developers (bzr)
> Related bugs:
> Bug #360521 in Plugin to Update Remote Trees: "Warning about working trees
not updating not suppressed"
> https://bugs.launchpad.net/bzr-push-and-update/+bug/360521
>
> For more details, see:
>
https://code.launchpad.net/~jeroen-hoekx/bzr-push-and-update/note/+merge/66168
>
> The "this does not update the working tree" message uses warning() rather
than note() now.
> --
>
https://code.launchpad.net/~jeroen-hoekx/bzr-push-and-update/note/+merge/66168
> Your team Bazaar Developers is requested to review the proposed merge of
lp:~jeroen-hoekx/bzr-push-and-update/note into lp:bzr-push-and-update.

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== modified file '__init__.py'
--- __init__.py 2008-05-01 19:59:02 +0000
+++ __init__.py 2011-06-28 15:28:10 +0000
@@ -62,19 +62,19 @@
62 # remote working trees suppressed, since our post-push hook will62 # remote working trees suppressed, since our post-push hook will
63 # actually update them.63 # actually update them.
64 import re64 import re
65 orig_warning = builtins.warning65 orig_note = trace.note
66 def wrapped_warning(msg):66 def wrapped_note(msg):
67 if re.match('^This transport does not update.*(ssh://|sftp://)',67 if re.match('^This transport does not update.*(ssh://|sftp://|bzr+ssh://)',
68 msg):68 msg):
69 # Suppress warnings about not updating bzr+ssh and sftp working69 # Suppress warnings about not updating bzr+ssh and sftp working
70 # trees70 # trees
71 return71 return
72 orig_warning(msg)72 orig_note(msg)
73 builtins.warning = wrapped_warning73 trace.note = wrapped_note
74 try:74 try:
75 return builtins.cmd_push.run(self, *args, **kwargs)75 return builtins.cmd_push.run(self, *args, **kwargs)
76 finally:76 finally:
77 builtins.warning = orig_warning77 trace.note = orig_note
7878
79commands.register_command(cmd_push)79commands.register_command(cmd_push)
8080

Subscribers

People subscribed via source and target branches

to all changes:
to status/vote changes: