Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
Greenplum
Gpdb
提交
5003f94f
G
Gpdb
项目概览
Greenplum
/
Gpdb
通知
7
Star
1
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
DevOps
流水线
流水线任务
计划
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
G
Gpdb
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
DevOps
DevOps
流水线
流水线任务
计划
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
流水线任务
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
提交
5003f94f
编写于
4月 12, 2013
作者:
B
Bruce Momjian
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
pgindent: improve error messages
per suggestion from Gurjeet Singh
上级
8daa4e96
变更
1
隐藏空白更改
内联
并排
Showing
1 changed file
with
17 addition
and
16 deletion
+17
-16
src/tools/pgindent/pgindent
src/tools/pgindent/pgindent
+17
-16
未找到文件。
src/tools/pgindent/pgindent
浏览文件 @
5003f94f
...
...
@@ -30,7 +30,7 @@ my %options = (
"
excludes=s
"
=>
\
$excludes
,
"
indent=s
"
=>
\
$indent
,
"
build
"
=>
\
$build
,);
GetOptions
(
%options
)
||
die
"
bad command line
";
GetOptions
(
%options
)
||
die
"
bad command line
argument
";
run_build
(
$code_base
)
if
(
$build
);
...
...
@@ -118,10 +118,11 @@ sub load_typedefs
if
(
-
f
"
$tdtry
/src/tools/pgindent/typedefs.list
");
$tdtry
=
"
$tdtry
/..
";
}
die
"
no typedefs file
"
unless
$typedefs_file
&&
-
f
$typedefs_file
;
die
"
cannot locate typedefs file
\"
$typedefs_file
\"
"
unless
$typedefs_file
&&
-
f
$typedefs_file
;
open
(
my
$typedefs_fh
,
'
<
',
$typedefs_file
)
||
die
"
opening
$typedefs_file
: $!
";
||
die
"
cannot open typedefs file
\"
$typedefs_file
\"
: $!
";
my
@typedefs
=
<
$typedefs_fh
>
;
close
(
$typedefs_fh
);
...
...
@@ -143,7 +144,7 @@ sub process_exclude
{
if
(
$excludes
&&
@files
)
{
open
(
my
$eh
,
'
<
',
$excludes
)
||
die
"
opening
$excludes
";
open
(
my
$eh
,
'
<
',
$excludes
)
||
die
"
cannot open exclude file
\"
$excludes
\"
";
while
(
my
$line
=
<
$eh
>
)
{
chomp
$line
;
...
...
@@ -162,7 +163,7 @@ sub read_source
my
$source
;
open
(
my
$src_fd
,
'
<
',
$source_filename
)
||
die
"
opening
$source_filename
: $!
";
||
die
"
cannot open file
\"
$source_filename
\"
: $!
";
local
(
$/
)
=
undef
;
$source
=
<
$src_fd
>
;
close
(
$src_fd
);
...
...
@@ -177,7 +178,7 @@ sub write_source
my
$source_filename
=
shift
;
open
(
my
$src_fh
,
'
>
',
$source_filename
)
||
die
"
opening
$source_filename
: $!
";
||
die
"
cannot open file
\"
$source_filename
\"
: $!
";
print
$src_fh
$source
;
close
(
$src_fh
);
}
...
...
@@ -436,25 +437,25 @@ sub run_build
$code_base
=
"
$code_base
/..
";
}
die
"
no src/tools/pgindent directory in
$code_base
"
die
"
cannot locate src/tools/pgindent directory in
\"
$code_base
\"
"
unless
-
d
"
$code_base
/src/tools/pgindent
";
chdir
"
$code_base
/src/tools/pgindent
";
my
$rv
=
getstore
("
http://buildfarm.postgresql.org/cgi-bin/typedefs.pl
",
"
tmp_typedefs.list
");
my
$typedefs_list_url
=
"
http://buildfarm.postgresql.org/cgi-bin/typedefs.pl
";
die
"
fetching typedefs.list
"
unless
is_success
(
$rv
);
my
$rv
=
getstore
(
$typedefs_list_url
,
"
tmp_typedefs.list
");
die
"
cannot fetch typedefs list from
$typedefs_list_url
"
unless
is_success
(
$rv
);
$ENV
{
PGTYPEDEFS
}
=
abs_path
('
tmp_typedefs.list
');
my
$pg_bsd_indent_name
=
"
pg_bsd_indent-
"
.
$INDENT_VERSION
.
"
.tar.gz
";
my
$pg_bsd_indent_url
=
"
ftp://ftp.postgresql.org/pub/dev/pg_bsd_indent-
"
.
$INDENT_VERSION
.
"
.tar.gz
";
$rv
=
getstore
("
ftp://ftp.postgresql.org/pub/dev/
$pg_bsd_indent_name
",
"
pg_bsd_indent.tgz
");
$rv
=
getstore
(
$pg_bsd_indent_url
,
"
pg_bsd_indent.tgz
");
die
"
fetching
$pg_bsd_indent_name
"
unless
is_success
(
$rv
);
die
"
cannot fetch BSD indent tarfile from
$pg_bsd_indent_url
"
unless
is_success
(
$rv
);
# XXX add error checking here
...
...
@@ -484,7 +485,7 @@ sub build_clean
$code_base
=
"
$code_base
/..
";
}
die
"
no src/tools/pgindent directory in
$code_base
"
die
"
cannot locate src/tools/pgindent directory in
\"
$code_base
\"
"
unless
-
d
"
$code_base
/src/tools/pgindent
";
chdir
"
$code_base
";
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录