def METHOD_NAME(offering, g, instr=None, repos=None):
    """
    Update repository for one group.
    Also called from GroupMember.save() to update repos when necessary.
    """
    if not offering.uses_svn():
        return
    from coredata.tasks import update_repository_task
    if instr is None or repos is None:
        # if called from GroupMember.save(), we won't have these for free
        repos = _all_repositories(offering)
        instr = _offering_instructors(offering)
    userids = set()
    reponame = repo_name(offering, g.svn_slug)
    for gm in g.groupmember_set.filter(confirmed=True).select_related('student__person'):
        if gm.student.person.userid is None:
            return
        if gm.student.role == "DROP":
            return
        userids.add(gm.student.person.userid)
    if offering.instr_rw_svn():
        rw = userids | instr
        ro = set()
    else:
        rw = userids
        ro = instr
    if _repo_needs_updating(repos, reponame, rw, ro):
        update_repository_task.delay(reponame, list(rw), list(ro))