equal
deleted
inserted
replaced
1249 |
1249 |
1250 if not text.strip(): |
1250 if not text.strip(): |
1251 raise util.Abort(_("empty commit message")) |
1251 raise util.Abort(_("empty commit message")) |
1252 |
1252 |
1253 return text |
1253 return text |
|
1254 |
|
1255 def command(table): |
|
1256 '''returns a function object bound to table which can be used as |
|
1257 a decorator for populating table as a command table''' |
|
1258 |
|
1259 def cmd(name, options, synopsis=None): |
|
1260 def decorator(func): |
|
1261 if synopsis: |
|
1262 table[name] = func, options, synopsis |
|
1263 else: |
|
1264 table[name] = func, options |
|
1265 return func |
|
1266 return decorator |
|
1267 |
|
1268 return cmd |