[Moin-devel] CVS: MoinMoin PageEditor.py,1.8,1.9 wikiaction.py,1.72,1.73 wikiutil.py,1.96,1.97

J?rgen Hermann jhermann at users.sourceforge.net
Thu May 2 12:14:39 EDT 2002


Update of /cvsroot/moin/MoinMoin
In directory usw-pr-cvs1:/tmp/cvs-serv29927

Modified Files:
	PageEditor.py wikiaction.py wikiutil.py 
Log Message:
Report an error code returned by "diff"


Index: PageEditor.py
===================================================================
RCS file: /cvsroot/moin/MoinMoin/PageEditor.py,v
retrieving revision 1.8
retrieving revision 1.9
diff -C2 -r1.8 -r1.9
*** PageEditor.py	25 Apr 2002 19:32:30 -0000	1.8
--- PageEditor.py	2 May 2002 19:13:07 -0000	1.9
***************
*** 270,274 ****
                      "No older revisions of the page stored, diff not available."
              else:
!                 page_file, backup_file, lines = wikiutil.pagediff(self.page_name, oldversions[0])
                  if lines and len(lines) > 2:
                      mailBody = "%s%s\n%s" % (
--- 270,274 ----
                      "No older revisions of the page stored, diff not available."
              else:
!                 rc, page_file, backup_file, lines = wikiutil.pagediff(self.page_name, oldversions[0])
                  if lines and len(lines) > 2:
                      mailBody = "%s%s\n%s" % (
***************
*** 276,279 ****
--- 276,282 ----
                  else:
                      mailBody = mailBody + "No differences found!\n"
+                     if rc:
+                         mailBody = mailBody + '\n\n' + \
+                             _('The external diff utility returned with error code %(rc)s!') % locals()
  
              msg = _('\n'

Index: wikiaction.py
===================================================================
RCS file: /cvsroot/moin/MoinMoin/wikiaction.py,v
retrieving revision 1.72
retrieving revision 1.73
diff -C2 -r1.72 -r1.73
*** wikiaction.py	24 Apr 2002 20:11:21 -0000	1.72
--- wikiaction.py	2 May 2002 19:13:07 -0000	1.73
***************
*** 193,197 ****
          oldpage = oldversions[0]
  
!     page_file, backup_file, lines = wikiutil.pagediff(pagename, oldpage, ignorews=ignorews)
  
      # check for valid diff
--- 193,197 ----
          oldpage = oldversions[0]
  
!     rc, page_file, backup_file, lines = wikiutil.pagediff(pagename, oldpage, ignorews=ignorews)
  
      # check for valid diff
***************
*** 202,205 ****
--- 202,207 ----
                  'count': edit_count,
                  'times': (_(' time'), _(' times'))[edit_count != 1]}
+         if rc:
+             msg = msg + '<p>' + _('The external diff utility returned with error code %(rc)s!') % locals()
          Page(pagename).send_page(request, msg=msg)
          return

Index: wikiutil.py
===================================================================
RCS file: /cvsroot/moin/MoinMoin/wikiutil.py,v
retrieving revision 1.96
retrieving revision 1.97
diff -C2 -r1.96 -r1.97
*** wikiutil.py	24 Apr 2002 20:11:21 -0000	1.96
--- wikiutil.py	2 May 2002 19:13:07 -0000	1.97
***************
*** 454,458 ****
      ##print "rc =", rc, "<br>"
  
!     return page_file, backup_file, lines
  
  
--- 454,458 ----
      ##print "rc =", rc, "<br>"
  
!     return rc, page_file, backup_file, lines
  
  





More information about the Moin-devel mailing list