File tree Expand file tree Collapse file tree 2 files changed +2
-19
lines changed Expand file tree Collapse file tree 2 files changed +2
-19
lines changed Original file line number Diff line number Diff line change @@ -11,28 +11,12 @@ def pull(from, &block)
11
11
run "mkdir -p '#{ self . url } '"
12
12
run "rm -rf '#{ self . url } '"
13
13
run "bzr branch '#{ from . url } ' '#{ self . url } '"
14
- clean_up_disk
15
14
else
16
15
run "cd '#{ self . url } ' && bzr revert && bzr pull --overwrite '#{ from . url } '"
17
16
end
18
17
19
18
yield ( 1 , 1 ) if block_given? # Progress bar callback
20
19
end
21
20
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
-
37
21
end
38
22
end
Original file line number Diff line number Diff line change 1
1
from bzrlib .branch import Branch
2
2
from bzrlib .revisionspec import RevisionSpec
3
- from cStringIO import StringIO
3
+ import os
4
4
import sys
5
5
import time
6
6
import traceback
@@ -90,8 +90,7 @@ def command_loop():
90
90
91
91
if __name__ == "__main__" :
92
92
try :
93
- stream = StringIO ()
94
- handler = logging .StreamHandler (stream )
93
+ handler = logging .FileHandler (os .devnull )
95
94
logging .getLogger ('bzr' ).addHandler (handler )
96
95
command_loop ()
97
96
except :
You can’t perform that action at this time.
0 commit comments