Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
openanolis
dragonwell8
提交
b89b486b
D
dragonwell8
项目概览
openanolis
/
dragonwell8
通知
5
Star
3
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
D
dragonwell8
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
提交
b89b486b
编写于
5月 16, 2012
作者:
K
katleman
浏览文件
操作
浏览文件
下载
差异文件
Merge
上级
c8908472
249ac2a7
变更
2
隐藏空白更改
内联
并排
Showing
2 changed file
with
53 addition
and
17 deletion
+53
-17
get_source.sh
get_source.sh
+2
-2
make/scripts/hgforest.sh
make/scripts/hgforest.sh
+51
-15
未找到文件。
get_source.sh
浏览文件 @
b89b486b
#!/bin/sh
#
# Copyright (c) 2010, Oracle and/or its affiliates. All rights reserved.
# Copyright (c) 2010,
2012,
Oracle and/or its affiliates. All rights reserved.
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
#
# This code is free software; you can redistribute it and/or modify it
...
...
@@ -26,7 +26,7 @@
#
# Get clones of all nested repositories
sh ./make/scripts/hgforest.sh clone
sh ./make/scripts/hgforest.sh clone
$*
# Update all existing repositories to the latest sources
sh ./make/scripts/hgforest.sh pull
-u
...
...
make/scripts/hgforest.sh
浏览文件 @
b89b486b
#!/bin/sh
#
# Copyright (c) 2009, 201
0
, Oracle and/or its affiliates. All rights reserved.
# Copyright (c) 2009, 201
2
, Oracle and/or its affiliates. All rights reserved.
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
#
# This code is free software; you can redistribute it and/or modify it
...
...
@@ -24,6 +24,8 @@
#
# Shell script for a fast parallel forest command
command
=
"
$1
"
pull_extra_base
=
"
$2
"
tmp
=
/tmp/forest.
$$
rm
-f
-r
${
tmp
}
...
...
@@ -35,40 +37,58 @@ trap 'rm -f -r ${tmp}' EXIT
# Only look in specific locations for possible forests (avoids long searches)
pull_default
=
""
if
[
"
$1
"
=
"clone"
-o
"
$1
"
=
"fclone"
]
;
then
repos
=
""
repos_extra
=
""
if
[
"
${
command
}
"
=
"clone"
-o
"
${
command
}
"
=
"fclone"
]
;
then
subrepos
=
"corba jaxp jaxws langtools jdk hotspot"
if
[
-f
.hg/hgrc
]
;
then
pull_default
=
`
hg paths default
`
if
[
"
${
pull_default
}
"
=
""
]
;
then
echo
"ERROR: Need initial clone with 'hg paths default' defined"
exit
1
fi
fi
if
[
"
${
pull_default
}
"
=
""
]
;
then
echo
"ERROR: Need initial
clone with 'hg paths default' defined
"
echo
"ERROR: Need initial
repository to use this script
"
exit
1
fi
repos
=
""
for
i
in
${
subrepos
}
;
do
if
[
!
-f
${
i
}
/.hg/hgrc
]
;
then
repos
=
"
${
repos
}
${
i
}
"
fi
done
if
[
"
${
pull_extra_base
}
"
!=
""
]
;
then
subrepos_extra
=
"jdk/src/closed jdk/make/closed jdk/test/closed hotspot/src/closed hotspot/test/closed deploy install sponsors pubs"
pull_default_tail
=
`
echo
${
pull_default
}
|
sed
-e
's@^.*://[^/]*/\(.*\)@\1@'
`
pull_extra
=
"
${
pull_extra_base
}
/
${
pull_default_tail
}
"
for
i
in
${
subrepos_extra
}
;
do
if
[
!
-f
${
i
}
/.hg/hgrc
]
;
then
repos_extra
=
"
${
repos_extra
}
${
i
}
"
fi
done
fi
at_a_time
=
2
# Any repos to deal with?
if
[
"
${
repos
}
"
=
""
-a
"
${
repos_extra
}
"
=
""
]
;
then
echo
"No repositories to clone."
exit
fi
else
hgdirs
=
`
ls
-d
./.hg ./
*
/.hg ./
*
/
*
/.hg ./
*
/
*
/
*
/.hg ./
*
/
*
/
*
/
*
/.hg 2>/dev/null
`
# Derive repository names from the .hg directory locations
repos
=
""
for
i
in
${
hgdirs
}
;
do
repos
=
"
${
repos
}
`
echo
${
i
}
|
sed
-e
's@/.hg$@@'
`
"
done
at_a_time
=
8
# Any repos to deal with?
if
[
"
${
repos
}
"
=
""
]
;
then
echo
"No repositories to process."
exit
fi
fi
# Any repos to deal with?
if
[
"
${
repos
}
"
=
""
]
;
then
echo
"No repositories to process."
exit
fi
# Echo out what repositories we will process
echo
"# Repos:
${
repos
}
"
# Echo out what repositories we will clone
echo
"# Repos:
${
repos
}
${
repos_extra
}
"
# Run the supplied command on all repos in parallel, save output until end
n
=
0
...
...
@@ -77,8 +97,8 @@ for i in ${repos} ; do
n
=
`
expr
${
n
}
'+'
1
`
(
(
if
[
"
$
1
"
=
"clone"
-o
"
$1
"
=
"fclone"
]
;
then
cline
=
"hg
$*
${
pull_default
}
/
${
i
}
${
i
}
"
if
[
"
$
{
command
}
"
=
"clone"
-o
"
${
command
}
"
=
"fclone"
]
;
then
cline
=
"hg
clone
${
pull_default
}
/
${
i
}
${
i
}
"
echo
"#
${
cline
}
"
(
eval
"
${
cline
}
"
)
else
...
...
@@ -92,6 +112,22 @@ for i in ${repos} ; do
sleep
5
fi
done
if
[
"
${
repos_extra
}
"
!=
""
]
;
then
for
i
in
${
repos_extra
}
;
do
echo
"Starting on
${
i
}
"
n
=
`
expr
${
n
}
'+'
1
`
(
(
cline
=
"hg clone
${
pull_extra
}
/
${
i
}
${
i
}
"
echo
"#
${
cline
}
"
(
eval
"
${
cline
}
"
)
echo
"# exit code
$?
"
)
>
${
tmp
}
/repo.
${
n
}
2>&1
;
cat
${
tmp
}
/repo.
${
n
}
)
&
if
[
`
expr
${
n
}
'%'
${
at_a_time
}
`
-eq
0
]
;
then
sleep
5
fi
done
fi
# Wait for all hg commands to complete
wait
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录