class_docstr: Creates a basic test git-annex repository
class_docstr_tok: ["Creates","a","basic","test","git-annex","repository"]
code: def populate(self):
      global remote_file_url
      if not remote_file_url:
          # we need a local file, that is server via a URL
          from datalad.conftest import test_http_server
  
          remote_file_name = "testrepo-annex.dat"
          with open(
              opj(test_http_server.path, remote_file_name), "w"
          ) as f:
              f.write("content to be annex-addurl'd")
          remote_file_url = "{}/{}".format(
              test_http_server.url, remote_file_name
          )
      self.create_info_file()
      self.create_file("test.dat", "123\n", annex=False)
      self.repo.commit(
          "Adding a basic INFO file and rudimentary load file for annex testing"
      )
      self.repo.add_url_to_file("test-annex.dat", remote_file_url)
      self.repo.commit("Adding a rudimentary git-annex load file")
      self.repo.drop("test-annex.dat")
  
imports: import os
  import tempfile
  from abc import ABCMeta, abstractmethod
  from os.path import exists
  from os.path import join
  from datalad import cfg
  from datalad.customremotes.base import init_datalad_remote
  from ..None import __version__
  from ..support.annexrepo import AnnexRepo
  from ..support.external_versions import external_versions
  from ..support.gitrepo import GitRepo
  from ..support.network import get_local_file_url
  from ..utils import swallow_logs, swallow_outputs
  from .None import _TEMP_PATHS_GENERATED
  from .utils_pytest import get_tempfile_kwargs
label_desc: Use image node_id 1 for calling the BasicAnnexTestRepo obj's underlying member method code with example usage: obj.populate() without return types