comparison hgext/mq.py @ 14468:755aabb3eada

mq: no need to make a copy of seriesopts the command decorator takes care of copying the options (introduced in 5b48ad1e7f1a)
author Idan Kamara <idankk86@gmail.com>
date Mon, 30 May 2011 21:44:03 +0300
parents 00256f689f9c
children 4f695345979c
comparison
equal deleted inserted replaced
14467:f3b50431eb7e 14468:755aabb3eada
2124 2124
2125 Returns 0 on success.""" 2125 Returns 0 on success."""
2126 repo.mq.qseries(repo, missing=opts.get('missing'), summary=opts.get('summary')) 2126 repo.mq.qseries(repo, missing=opts.get('missing'), summary=opts.get('summary'))
2127 return 0 2127 return 0
2128 2128
2129 @command("qtop", [] + seriesopts, _('hg qtop [-s]')) 2129 @command("qtop", seriesopts, _('hg qtop [-s]'))
2130 def top(ui, repo, **opts): 2130 def top(ui, repo, **opts):
2131 """print the name of the current patch 2131 """print the name of the current patch
2132 2132
2133 Returns 0 on success.""" 2133 Returns 0 on success."""
2134 q = repo.mq 2134 q = repo.mq
2138 summary=opts.get('summary')) 2138 summary=opts.get('summary'))
2139 else: 2139 else:
2140 ui.write(_("no patches applied\n")) 2140 ui.write(_("no patches applied\n"))
2141 return 1 2141 return 1
2142 2142
2143 @command("qnext", [] + seriesopts, _('hg qnext [-s]')) 2143 @command("qnext", seriesopts, _('hg qnext [-s]'))
2144 def next(ui, repo, **opts): 2144 def next(ui, repo, **opts):
2145 """print the name of the next patch 2145 """print the name of the next patch
2146 2146
2147 Returns 0 on success.""" 2147 Returns 0 on success."""
2148 q = repo.mq 2148 q = repo.mq
2150 if end == len(q.series): 2150 if end == len(q.series):
2151 ui.write(_("all patches applied\n")) 2151 ui.write(_("all patches applied\n"))
2152 return 1 2152 return 1
2153 q.qseries(repo, start=end, length=1, summary=opts.get('summary')) 2153 q.qseries(repo, start=end, length=1, summary=opts.get('summary'))
2154 2154
2155 @command("qprev", [] + seriesopts, _('hg qprev [-s]')) 2155 @command("qprev", seriesopts, _('hg qprev [-s]'))
2156 def prev(ui, repo, **opts): 2156 def prev(ui, repo, **opts):
2157 """print the name of the previous patch 2157 """print the name of the previous patch
2158 2158
2159 Returns 0 on success.""" 2159 Returns 0 on success."""
2160 q = repo.mq 2160 q = repo.mq