Commits

ben...@localhost.metavers.net  committed 9c1a184

unified diff working

  • Participants
  • Parent commits 3b73a10

Comments (0)

Files changed (1)

File friendpaste/paste/views.py

     diff_to = ""
     diff_from = ""
     old_rev=rev
+    after=False
     if snippet['revid']==rev:
         diff_to=snippet['snippet']
+        after = True
 
     revisions = res[1:]
     if revisions and len(revisions)>0:
         revisions.reverse()          
         try:
             for r in revisions:
-                if not diff_to and r.value['revid']==rev:
-                    diff_to = r.value['snippet']
-                else:
+                if not after and r.value['revid']==rev:
+                    if not diff_to:
+                        diff_to = r.value['snippet']
+                    after=True
+                elif after:
                     diff_from = r.value['snippet']
                     old_rev=r.value['revid']
                     raise FoundRev