+
+
+class StatusCommand(CommandBase):
+
+ def __init__(self):
+ CommandBase.__init__(self, 'status', 'check repo status')
+ self.shortcuts.append('st')
+
+ def _do_command(self):
+ self._die_if_no_init()
+ status = self.metadir.working_dir_status()
+ for file in status:
+ print '%s %s' % (status[file], file)
+
+
+class DiffCommand(CommandBase):
+
+ def __init__(self):
+ CommandBase.__init__(self, 'diff', 'diff wiki to working directory')
+
+ def _do_command(self):
+ self._die_if_no_init()
+ status = self.metadir.working_dir_status()
+ for file in status:
+ if status[file] == 'U':
+ print self.metadir.diff_rv_to_working(
+ mw.api.filename_to_pagename(file[:-5])
+ ),