comparison hgext/mq.py @ 7597:81f68565281c

mq, i18n: mark strings for translation
author Martin Geisler <mg@daimi.au.dk>
date Sat, 03 Jan 2009 16:15:11 +0100
parents 1d5ecaa47abb
children 26adfaccdf73
comparison
equal deleted inserted replaced
7596:0be97ee2309d 7597:81f68565281c
963 util.unlink(repo.wjoin(f)) 963 util.unlink(repo.wjoin(f))
964 self.ui.warn(_('done\n')) 964 self.ui.warn(_('done\n'))
965 raise 965 raise
966 top = self.applied[-1].name 966 top = self.applied[-1].name
967 if ret[0]: 967 if ret[0]:
968 self.ui.write( 968 self.ui.write(_("Errors during apply, please fix and "
969 "Errors during apply, please fix and refresh %s\n" % top) 969 "refresh %s\n") % top)
970 else: 970 else:
971 self.ui.write("Now at: %s\n" % top) 971 self.ui.write(_("Now at: %s\n") % top)
972 return ret[0] 972 return ret[0]
973 finally: 973 finally:
974 del wlock 974 del wlock
975 975
976 def pop(self, repo, patch=None, force=False, update=True, all=False): 976 def pop(self, repo, patch=None, force=False, update=True, all=False):
1597 checkseries(patchname) 1597 checkseries(patchname)
1598 if patchname not in self.series: 1598 if patchname not in self.series:
1599 index = self.full_series_end() + i 1599 index = self.full_series_end() + i
1600 self.full_series[index:index] = [patchname] 1600 self.full_series[index:index] = [patchname]
1601 self.parse_series() 1601 self.parse_series()
1602 self.ui.warn("adding %s to series file\n" % patchname) 1602 self.ui.warn(_("adding %s to series file\n") % patchname)
1603 i += 1 1603 i += 1
1604 added.append(patchname) 1604 added.append(patchname)
1605 patchname = None 1605 patchname = None
1606 self.series_dirty = 1 1606 self.series_dirty = 1
1607 qrepo = self.qrepo() 1607 qrepo = self.qrepo()
1781 t = q.applied and q.series_end(True) or 0 1781 t = q.applied and q.series_end(True) or 0
1782 if t: 1782 if t:
1783 return q.qseries(repo, start=t-1, length=1, status='A', 1783 return q.qseries(repo, start=t-1, length=1, status='A',
1784 summary=opts.get('summary')) 1784 summary=opts.get('summary'))
1785 else: 1785 else:
1786 ui.write("No patches applied\n") 1786 ui.write(_("No patches applied\n"))
1787 return 1 1787 return 1
1788 1788
1789 def next(ui, repo, **opts): 1789 def next(ui, repo, **opts):
1790 """print the name of the next patch""" 1790 """print the name of the next patch"""
1791 q = repo.mq 1791 q = repo.mq
1792 end = q.series_end() 1792 end = q.series_end()
1793 if end == len(q.series): 1793 if end == len(q.series):
1794 ui.write("All patches applied\n") 1794 ui.write(_("All patches applied\n"))
1795 return 1 1795 return 1
1796 return q.qseries(repo, start=end, length=1, summary=opts.get('summary')) 1796 return q.qseries(repo, start=end, length=1, summary=opts.get('summary'))
1797 1797
1798 def prev(ui, repo, **opts): 1798 def prev(ui, repo, **opts):
1799 """print the name of the previous patch""" 1799 """print the name of the previous patch"""
1800 q = repo.mq 1800 q = repo.mq
1801 l = len(q.applied) 1801 l = len(q.applied)
1802 if l == 1: 1802 if l == 1:
1803 ui.write("Only one patch applied\n") 1803 ui.write(_("Only one patch applied\n"))
1804 return 1 1804 return 1
1805 if not l: 1805 if not l:
1806 ui.write("No patches applied\n") 1806 ui.write(_("No patches applied\n"))
1807 return 1 1807 return 1
1808 return q.qseries(repo, start=l-2, length=1, status='A', 1808 return q.qseries(repo, start=l-2, length=1, status='A',
1809 summary=opts.get('summary')) 1809 summary=opts.get('summary'))
1810 1810
1811 def setupheaderopts(ui, opts): 1811 def setupheaderopts(ui, opts):