Bugfixes in pygit.

portnov [2008-06-10 04:34:09]
Bugfixes in pygit.
Filename
pygit/pygit.py
diff --git a/pygit/pygit.py b/pygit/pygit.py
index 8d2cca9..fb11d98 100644
--- a/pygit/pygit.py
+++ b/pygit/pygit.py
@@ -10,8 +10,8 @@ curr_path = None
 def open_repo(rid):
   global curr_path,rp
   path = REPOS[int(rid)]
-  if rp and curr_path==path:
-    return rp
+#   if rp and curr_path==path:
+#     return rp
   curr_path = path
   rp = Repo(path)
   return rp
@@ -68,7 +68,7 @@ def diff_all(rid,cid1,cid2=None):
     c2 = r.commits(cid2)[0]
   else:
     c2 = c1.parents[0]
-  ds = Commit.diff(r,c1,c2)
+  ds = Commit.diff(r,c2,c1)
   return [(d.a_path,d.diff) for d in ds]

 def diff_path(rid,path,cid1,cid2=None):
@@ -78,6 +78,6 @@ def diff_path(rid,path,cid1,cid2=None):
     c2 = r.commits(cid2)[0]
   else:
     c2 = c1.parents[0]
-  ds = Commit.diff(r,c1,c2)
+  ds = Commit.diff(r,c2,c1)
   return [(d.a_path,d.diff) for d in ds if d.a_path==path]
ViewGit