comparison hgext/mq.py @ 5878:d39af2eabb8c

transform a bunch of print statements to appropriate ui calls
author Matt Mackall <mpm@selenic.com>
date Fri, 18 Jan 2008 10:48:25 -0600
parents 4107e823dc2c
children 30d2fecaab76
comparison
equal deleted inserted replaced
5877:5692bed8230b 5878:d39af2eabb8c
222 222
223 def save_dirty(self): 223 def save_dirty(self):
224 def write_list(items, path): 224 def write_list(items, path):
225 fp = self.opener(path, 'w') 225 fp = self.opener(path, 'w')
226 for i in items: 226 for i in items:
227 print >> fp, i 227 fp.write("%s\n" % i)
228 fp.close() 228 fp.close()
229 if self.applied_dirty: write_list(map(str, self.applied), self.status_path) 229 if self.applied_dirty: write_list(map(str, self.applied), self.status_path)
230 if self.series_dirty: write_list(self.full_series, self.series_path) 230 if self.series_dirty: write_list(self.full_series, self.series_path)
231 if self.guards_dirty: write_list(self.active_guards, self.guards_path) 231 if self.guards_dirty: write_list(self.active_guards, self.guards_path)
232 232
1265 self.strip(repo, rev, update=update, backup='strip') 1265 self.strip(repo, rev, update=update, backup='strip')
1266 if qpp: 1266 if qpp:
1267 self.ui.warn("saved queue repository parents: %s %s\n" % 1267 self.ui.warn("saved queue repository parents: %s %s\n" %
1268 (hg.short(qpp[0]), hg.short(qpp[1]))) 1268 (hg.short(qpp[0]), hg.short(qpp[1])))
1269 if qupdate: 1269 if qupdate:
1270 print "queue directory updating" 1270 self.ui.status(_("queue directory updating\n"))
1271 r = self.qrepo() 1271 r = self.qrepo()
1272 if not r: 1272 if not r:
1273 self.ui.warn("Unable to load queue repository\n") 1273 self.ui.warn("Unable to load queue repository\n")
1274 return 1 1274 return 1
1275 hg.clean(r, qpp[0]) 1275 hg.clean(r, qpp[0])