Skip to content

Commit 8be6be3

Browse files
committed
OTWO-1412 Redirects logger to os.devnull
Also removes previous fix for this ticket that force upgraded repos.
1 parent fa9af52 commit 8be6be3

File tree

2 files changed

+2
-19
lines changed

2 files changed

+2
-19
lines changed

lib/scm/adapters/bzr/pull.rb

Lines changed: 0 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -11,28 +11,12 @@ def pull(from, &block)
1111
run "mkdir -p '#{self.url}'"
1212
run "rm -rf '#{self.url}'"
1313
run "bzr branch '#{from.url}' '#{self.url}'"
14-
clean_up_disk
1514
else
1615
run "cd '#{self.url}' && bzr revert && bzr pull --overwrite '#{from.url}'"
1716
end
1817

1918
yield(1,1) if block_given? # Progress bar callback
2019
end
2120

22-
def clean_up_disk
23-
# Usually a `bzr upgrade` is unnecessary, but it's fatal to miss it when
24-
# required. Because I don't know how to detect in advance whether we
25-
# actually need it, we play it safe and always upgrade.
26-
#
27-
# Unfortunately, not only can we not know whether it is required,
28-
# but the command fails and raises when the upgrade is not required.
29-
30-
begin
31-
run "cd '#{self.url}' && bzr upgrade"
32-
rescue RuntimeError => e
33-
raise unless e.message =~ /already at the most recent format/
34-
end
35-
end
36-
3721
end
3822
end

lib/scm/adapters/bzrlib/bzrlib_pipe_server.py

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
from bzrlib.branch import Branch
22
from bzrlib.revisionspec import RevisionSpec
3-
from cStringIO import StringIO
3+
import os
44
import sys
55
import time
66
import traceback
@@ -90,8 +90,7 @@ def command_loop():
9090

9191
if __name__ == "__main__":
9292
try:
93-
stream = StringIO()
94-
handler = logging.StreamHandler(stream)
93+
handler = logging.FileHandler(os.devnull)
9594
logging.getLogger('bzr').addHandler(handler)
9695
command_loop()
9796
except:

0 commit comments

Comments
 (0)