##// END OF EJS Templates
MQ: Make more commands return meaningful errors.
Bryan O'Sullivan -
r3006:7017fc9a default
parent child Browse files
Show More
@@ -1238,11 +1238,13 b' class queue:'
1238 1238 self.ui.write(p + '\n')
1239 1239 else:
1240 1240 self.ui.write("No patches applied\n")
1241 return 1
1241 1242
1242 1243 def next(self, repo):
1243 1244 end = self.series_end()
1244 1245 if end == len(self.series):
1245 1246 self.ui.write("All patches applied\n")
1247 return 1
1246 1248 else:
1247 1249 p = self.series[end]
1248 1250 if self.ui.verbose:
@@ -1255,8 +1257,10 b' class queue:'
1255 1257 self.ui.write(p + '\n')
1256 1258 elif len(self.applied) == 1:
1257 1259 self.ui.write("Only one patch applied\n")
1260 return 1
1258 1261 else:
1259 1262 self.ui.write("No patches applied\n")
1263 return 1
1260 1264
1261 1265 def qimport(self, repo, files, patch=None, existing=None, force=None):
1262 1266 if len(files) > 1 and patch:
@@ -1403,18 +1407,15 b' def series(ui, repo, **opts):'
1403 1407
1404 1408 def top(ui, repo, **opts):
1405 1409 """print the name of the current patch"""
1406 repo.mq.top(repo)
1407 return 0
1410 return repo.mq.top(repo)
1408 1411
1409 1412 def next(ui, repo, **opts):
1410 1413 """print the name of the next patch"""
1411 repo.mq.next(repo)
1412 return 0
1414 return repo.mq.next(repo)
1413 1415
1414 1416 def prev(ui, repo, **opts):
1415 1417 """print the name of the previous patch"""
1416 repo.mq.prev(repo)
1417 return 0
1418 return repo.mq.prev(repo)
1418 1419
1419 1420 def new(ui, repo, patch, **opts):
1420 1421 """create a new patch
General Comments 0
You need to be logged in to leave comments. Login now