@@ -90,7 +90,7 @@ def reposync(self):
90
90
# biggest index as this is likely the correct one.
91
91
#
92
92
hg_command .append ("-r" )
93
- hg_command .append (" max(head() and branch(\" . \ " ))" )
93
+ hg_command .append (' max(head() and branch(". "))' )
94
94
95
95
cmd = self .get_command (
96
96
hg_command , work_dir = self .path , env_vars = self .env , logger = self .logger
@@ -139,9 +139,17 @@ def strip_outgoing(self):
139
139
Check for outgoing changes and if found, strip them.
140
140
:return: True if there were any changes stripped, False otherwise.
141
141
"""
142
- status , out = self ._run_command (
143
- [self .command , "out" , "-q" , "-b" , "." , "--template={rev}\\ n" ]
142
+ # Avoid _run_command() as it complains to the log about failed command
143
+ # when 'hg out' returns 1 which is legitimate return value.
144
+ cmd = self .get_command (
145
+ [self .command , "out" , "-q" , "-b" , "." , "--template={rev}\\ n" ],
146
+ work_dir = self .path ,
147
+ env_vars = self .env ,
148
+ logger = self .logger ,
144
149
)
150
+ cmd .execute ()
151
+ status = cmd .getretcode ()
152
+
145
153
#
146
154
# If there are outgoing changes, 'hg out' returns 0, otherwise returns 1.
147
155
# If the 'hg out' command fails for some reason, it will return 255.
@@ -150,7 +158,7 @@ def strip_outgoing(self):
150
158
if status > 0 :
151
159
return False
152
160
153
- revisions = list (filter (None , out .split ("\n " )))
161
+ revisions = list (filter (None , cmd . getoutputstr () .split ("\n " )))
154
162
if len (revisions ) == 0 :
155
163
return False
156
164
0 commit comments