-
Notifications
You must be signed in to change notification settings - Fork 7
Expand file tree
/
Copy pathcreate_clones.sh
More file actions
executable file
·55 lines (38 loc) · 1.21 KB
/
create_clones.sh
File metadata and controls
executable file
·55 lines (38 loc) · 1.21 KB
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
#!/bin/sh -ex
CLONES_DIR="${1:-clones}"
export HOME=/tmp
REPO=test-repo
HG_REPO_URL="https://hg.mozilla.org/conduit-testing/${REPO}/"
HG_REPO_CLONE="${CLONES_DIR}/${REPO}-hg"
GIT_REPO_CLONE="${CLONES_DIR}/${REPO}-git"
BRANCHES="esr115 esr128"
TAGS="FIREFOX_BETA_136"
test -d "${HG_REPO_CLONE}" && exit
mkdir -p "${CLONES_DIR}"
GIT_SSH="ssh -oStrictHostKeyChecking=accept-new"
hg clone --ssh "$GIT_SSH" "${HG_REPO_URL}" "${HG_REPO_CLONE}"
hg --cwd "${HG_REPO_CLONE}" branch tags
hg --cwd "${HG_REPO_CLONE}" commit -m "Created tags branch"
git clone "hg::${HG_REPO_CLONE}" "${GIT_REPO_CLONE}"
cd "${GIT_REPO_CLONE}" || exit 1
# for git-cinnabar to be happier:
git config fetch.prune true
# make git status and friends faster:
# mv .git/hooks/fsmonitor-watchman.sample .git/hooks/query-watchman
# git config core.fsmonitor .git/hooks/query-watchman
# conf
git config remote.origin.skipDefaultUpdate true
git config remote.origin.push +HEAD:refs/heads/branches/default/tip
# check
git cinnabar fsck
for b in ${BRANCHES}; do
git branch "${b}"
done
for t in ${TAGS}; do
git tag "${t}_END"
git tag "${t}_START" HEAD~10
done
cd -
for b in ${BRANCHES} beta; do
cp -r "${HG_REPO_CLONE}" "${CLONES_DIR}/mozilla-${b}"
done