Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Maybe fix #326 #327

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

Maybe fix #326 #327

wants to merge 1 commit into from

Conversation

jonashaag
Copy link
Owner

@jonashaag jonashaag commented May 13, 2024

@rbeerster
Copy link

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
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
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