Commits

Nicolas Évrard  committed d0cf061

Added clean option

  • Participants
  • Parent commits 120649d

Comments (0)

Files changed (2)

 * Version 0.3 - 
     Allow use of private rietveld instances
     Follow mercurial version while keeping compatibility
+    Added clean option
 
 * Version 0.2 - 2011-11-27
     Initial release

File hgreview/__init__.py

 
 
 def review(ui, repo, *args, **opts):
+    if opts['clean']:
+        os.unlink(_get_issue_file(repo))
+        return
+
     revs = [opts['rev']] if opts['rev'] else []
     node1, node2 = revpair(repo, revs)
     modified, added, removed, deleted, unknown, ignored, clean = \
 # Add option for description, private
 cmdtable = {
     'review': (review, [
-        ('r', 'reviewers', [], 'Add reviewers'),
+        ('c', 'clean', False, 'Remove review info'),
         ('i', 'issue', '', 'Issue number. Defaults to new issue'),
         ('m', 'message', '', 'Codereview message'),
+        ('r', 'reviewers', [], 'Add reviewers'),
         ('', 'rev', '', 'Revision number to diff against'),
         ('', 'send_email', None, 'Send notification email to reviewers'),
         ('', 'id', None, 'ouput issue id'),