Plugin to Update Remote Trees

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

Proposed by Jelmer Vernooij on 2011-06-28
Status: Merged
Approved by: Jelmer Vernooij on 2011-06-30
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
To merge this branch: bzr merge lp:~jeroen-hoekx/bzr-push-and-update/note
Reviewer Review Type Date Requested Status
Martin Pool (community) 2011-06-28 Approve on 2011-06-28
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.
Martin Pool (mbp) wrote :

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

review: Approve
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

1=== modified file '__init__.py'
2--- __init__.py 2008-05-01 19:59:02 +0000
3+++ __init__.py 2011-06-28 15:28:10 +0000
4@@ -62,19 +62,19 @@
5 # remote working trees suppressed, since our post-push hook will
6 # actually update them.
7 import re
8- orig_warning = builtins.warning
9- def wrapped_warning(msg):
10- if re.match('^This transport does not update.*(ssh://|sftp://)',
11+ orig_note = trace.note
12+ def wrapped_note(msg):
13+ if re.match('^This transport does not update.*(ssh://|sftp://|bzr+ssh://)',
14 msg):
15 # Suppress warnings about not updating bzr+ssh and sftp working
16 # trees
17 return
18- orig_warning(msg)
19- builtins.warning = wrapped_warning
20+ orig_note(msg)
21+ trace.note = wrapped_note
22 try:
23 return builtins.cmd_push.run(self, *args, **kwargs)
24 finally:
25- builtins.warning = orig_warning
26+ trace.note = orig_note
27
28 commands.register_command(cmd_push)
29

Subscribers

People subscribed via source and target branches

to all changes:
to status/vote changes: