1. mdelagra
  2. mercurial-reviewboard

Commits

mdelagra  committed e1d75c4

making getdiff a top level function

  • Participants
  • Parent commits c7b151b
  • Branches default

Comments (0)

Files changed (1)

File mercurial_reviewboard/__init__.py

View file
     
     check_parent_options(opts)
 
-    def getdiff(ui, repo, r, parent):
-        '''return diff for the specified revision'''
-        output = ""
-        for chunk in patch.diff(repo, parent.node(), r.node()):
-            output += chunk
-        return output
-
     outgoing = opts.get('outgoing')
     outgoingrepo = opts.get('outgoingrepo')
     master = opts.get('master')
     if opts['publish']:
         msg = 'review request published: %s\n'
     ui.status(msg % request_url)
+    
+def getdiff(ui, repo, r, parent):
+    '''return diff for the specified revision'''
+    output = ""
+    for chunk in patch.diff(repo, parent.node(), r.node()):
+        output += chunk
+    return output
 
 def getreviewboard(ui):
     server = ui.config('reviewboard', 'server')