This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
## Usage: | |
## ./migrate.sh $clone_url $project_name $owner_uid | |
## Migrate a repository to gogs into the user namespace of the token-user | |
## ./migrate.sh [email protected]:group/repo.git repo 1 | |
## uid can be a group uid | |
## NB: for local migration, if your gogs instance is inside docker or vm, you must provide path local relative to container's fs | |
echo $1; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from collections import defaultdict | |
class BadMatch(NameError): | |
"""Exception when your args don't match a pattern""" | |
pass | |
class Any(object): | |
""" | |
>>> 'wutup' == Any() | |
True |