0
Fork 0
mirror of https://codeberg.org/librewolf/source.git synced 2024-12-22 13:43:04 -05:00

fix bootstrap patch (again :) )

This commit is contained in:
Malte Jürgens 2022-04-10 16:08:21 +02:00
parent d26b9ea775
commit 6c19cf7d19
No known key found for this signature in database
GPG key ID: D29FBD5F93C0CFC3

View file

@ -64,3 +64,42 @@
else:
raise MissingVCSInfo("unknown VCS_CHECKOUT_TYPE value: %s" % flavor)
--- a/third_party/python/taskcluster_taskgraph/taskgraph/util/vcs.py
+++ b/third_party/python/taskcluster_taskgraph/taskgraph/util/vcs.py
@@ -168,6 +168,27 @@ class GitRepository(Repository):
self.run("checkout", ref)
+class LocalRepository(Repository):
+
+ def __init__(self, path):
+ super(LocalRepository, self).__init__(path, tool="true")
+
+ @property
+ def head_ref(self):
+ return ""
+
+ def get_outgoing_files(self):
+ return []
+
+ def get_changed_files(self):
+ return []
+
+ def get_tracked_files_finder(self):
+ files = [os.path.relpath(os.path.join(dp, f), self.path).replace("\\","/") for dp, dn, fn in os.walk(self.path) for f in fn]
+ files.sort()
+ return FileListFinder(files)
+
+
def get_repository(path):
"""Get a repository object for the repository at `path`.
If `path` is not a known VCS repository, raise an exception.
@@ -178,7 +199,7 @@ def get_repository(path):
elif os.path.exists(os.path.join(path, ".git")):
return GitRepository(path)
- raise RuntimeError("Current directory is neither a git or hg repository")
+ return LocalRepository(path)
def find_hg_revision_push_info(repository, revision):