Skip to content

Maybe fix #326#327

Open
jonashaag wants to merge 1 commit into
masterfrom
jonashaag-patch-6
Open

Maybe fix #326#327
jonashaag wants to merge 1 commit into
masterfrom
jonashaag-patch-6

Conversation

@jonashaag

@jonashaag jonashaag commented May 13, 2024

Copy link
Copy Markdown
Owner

@rbeerster

Copy link
Copy Markdown

Ok, that is a start. However, as I mentioned there are other attributes not defined. Using your change, here I what I came up with. Definitely look this over carefully. Just because it worked does not mean it is correct. Here is a diff:

diff -u /usr/local/lib/python3.9/site-packages/klaus/repo.py{.20240513,}
--- /usr/local/lib/python3.9/site-packages/klaus/repo.py.20240513	2024-05-13 19:35:41.427882686 -0400
+++ /usr/local/lib/python3.9/site-packages/klaus/repo.py	2024-05-13 20:00:06.162565145 -0400
@@ -58,6 +58,26 @@
     @property
     def path(self):
         return self.dulwich_repo.path
+    
+    @property
+    def object_store(self):
+        return self.dulwich_repo.object_store
+    
+    @property
+    def get_peeled(self):
+        return self.dulwich_repo.get_peeled
+    
+    @property
+    def refs(self):
+        return self.dulwich_repo.refs
+    
+    @property
+    def find_missing_objects(self):
+        return self.dulwich_repo.find_missing_objects
+    
+    @synchronized
+    def __getitem__(self, key):
+        return self.dulwich_repo[key]
 
     @property
     def name(self):
@@ -70,10 +90,6 @@
         else:
             return self.name
 
-    @synchronized
-    def __getitem__(self, key):
-        return self.dulwich_repo[key]
-
     # TODO: factor out stuff into dulwich
     @synchronized
     def get_last_updated_at(self):

@jonashaag

Copy link
Copy Markdown
Owner Author

Ok that's terrible, I'll have to proxy all of the attributes with a catch-all solution or maybe we can pass the inner actual repo object around instead of the wrapper.

@jonashaag

Copy link
Copy Markdown
Owner Author

I don't understand why this isn't covered in our tests though...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants