-
Notifications
You must be signed in to change notification settings - Fork 4
/
metagitrc-example
76 lines (66 loc) · 3.41 KB
/
metagitrc-example
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
#!/usr/bin/env python
# Import everything from the work module
from gmp.main import *
###########################################
# Customize it and move it to ~/.metagitrc
###########################################
# This is the metagit configuration file. It is used as following:
#
# You define several sets of repositories, which are all named by
# convention "<foooo>_repos" (as in 'peer_repos'). Every set
# is a list of repositories.
#
# My remote site, where i define a seperate repository for my config
# files and use an SSHDir repo lister to get all repositories in a
# given directory (here peer:git)
peer_repos = []
peer_repos.append( Repository("peer.zerties.org:config", "~/"))
peer_repos.extend( SSHDir("[email protected]", # SSH Login
"git", # Remote Directory
# Cache file for listed directories (on local machine)
cache = "~/.metagit-sshdir-peer",
# Name for this repo lister (important for
# uploading directories)
name = "peer",
# Place for all your clones
into = "~/git") \
.add_policy("peer.zerties.org", "deny"))
# This repository won't be listed on remote server
# To import a SVN Repository with git svn just use SVNRepository,
# instead of Repository. git svn will be used for this Repository
# peer_repos.append(SVNRepository("file:///tmp/svn/fooo", "/tmp/testerl"))
# A SSHDir Repository grabber. SSHDir executes a find command in the
# "u" directory at the given ssh handle, and returns a list of
# repositories where all the remote handles are put into the "~/uni/" directory
uni_repos = []
uni_repos.extend( SSHDir("qy03fugy@cip", "u", cache="~/.metagit-sshdir", name = "cip",
into = "~/uni/") \
.add_policy("informatik.uni-erlangen.de", "deny"))
# Gitorious & Github repos
hub_repos = []
hub_repos.extend( Github("stettberger",
cache="~/.metagit-github",
into = "~/github") )
hub_repos.extend( Gitorious("stettberger",
cache="~/.metagit-gitorious",
into = "~/github"))
# Here a SVNLister is used to list a remote SVN site and create a set
# of repositories (git svn!) from it.
# the postfix argument is appended to every svn clone url within this
# repo listing
wohnheim_repos = []
wohnheim_repos.extend( SVNList("svn+ssh://[email protected]/admin/svn",
postfix = "trunk", cache = "~/.metagit-wohnheim-svn",
default_policy = "deny",
into = "~/svn")\
.add_policy("hofmann", "allow"))
# I4 - Informatik Lehrstuhl 4
# Here we use a function in order to abreviate some svn repositories
def i4(repo, path):
return Repository("https://www4.informatik.uni-erlangen.de:8088/i4svn/%s" % repo,
path, default_policy="deny",
scm = gitsvn_externals) \
.add_policy("faui4", "allow")
i4_repos = [i4("papers/trunk/11/eurosys-life", "~/eurosys-life")]
# Oh and we can of cource also use mercurial as a backend
hg_repos = [Repository("http://selenic.com/repo/hello", "/tmp/hg-hello", scm = hg)]