Skip to content

Commit

Permalink
Add back patch to example
Browse files Browse the repository at this point in the history
proposed upstream Lykos153/AnnexRemote#101
  • Loading branch information
yarikoptic committed Apr 1, 2024
1 parent cc4c9e6 commit 4c0f6cc
Show file tree
Hide file tree
Showing 2 changed files with 33 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
From 9a5a4592a0eece424c33de5c9174982a4f38ace2 Mon Sep 17 00:00:00 2001
From: Yaroslav Halchenko <debian@onerussian.com>
Date: Mon, 1 Apr 2024 12:16:35 -0400
Subject: [PATCH 1/3] Add listconfigs to the example git-annex-remote-directory

This is actually a patch by Ilya Shlyakhter <ilya_shl@alum.mit.edu>
which was shipped in conda forge package for a while but seems never got here.

Also related:
- https://git-annex.branchable.com/forum/How_to_register_arguments_for_an_external_special_remote__63__/
---
examples/git-annex-remote-directory | 3 +++
1 file changed, 3 insertions(+)

diff --git a/examples/git-annex-remote-directory b/examples/git-annex-remote-directory
index c423029..c6795fb 100755
--- a/examples/git-annex-remote-directory
+++ b/examples/git-annex-remote-directory
@@ -23,6 +23,9 @@ class DirectoryRemote(ExportRemote):
raise RemoteError("You need to set directory=")
self._mkdir(self.directory)

+ def listconfigs(self):
+ return {"directory": "directory where data is stored"}
+
def prepare(self):
self.directory = self.annex.getconfig("directory")
self.info = {"directory": self.directory}
--
2.43.0

2 changes: 2 additions & 0 deletions recipe/meta.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@ package:
source:
url: https://pypi.io/packages/source/{{ name[0] }}/{{ name }}/{{ name }}-{{ version }}.tar.gz
sha256: {{ sha256 }}
patches:
- 0001-Add-listconfigs-to-the-example-git-annex-remote-dire.patch

build:
skip: true # [not linux]
Expand Down

0 comments on commit 4c0f6cc

Please sign in to comment.