Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Menu
Open sidebar
jberryman
GHC
Commits
d2b30a14
Commit
d2b30a14
authored
Aug 19, 2010
by
Ian Lynagh
Browse files
Give clearer errors for bad input in the packages file; suggested by pejo
parent
22cbec8d
Changes
1
Hide whitespace changes
Inline
Side-by-side
darcs-all
View file @
d2b30a14
...
...
@@ -157,6 +157,7 @@ sub darcsall {
my
$tag
;
my
@repos
;
my
$command
=
$_
[
0
];
my
$line
;
my
(
$repo_base
,
$checked_out_tree
)
=
getrepo
();
...
...
@@ -164,8 +165,10 @@ sub darcsall {
@repos
=
<
IN
>
;
close
IN
;
$line
=
0
;
foreach
(
@repos
)
{
chomp
;
$line
++
;
if
(
/^([^# ]+) +([^ ]+) +([^ ]+) +([^ ]+) +([^ ]+)$/
)
{
$localpath
=
$
1
;
$tag
=
$
2
;
...
...
@@ -198,7 +201,7 @@ sub darcsall {
}
}
elsif
(
!
/^(#.*)?$/
)
{
die
"
Bad
lin
e:
$_
";
die
"
Bad
content on line
$line
of packages fil
e:
$_
";
}
}
}
...
...
@@ -210,6 +213,7 @@ sub darcsget {
my
$path
;
my
$tag
;
my
@repos
;
my
$line
;
my
(
$repo_base
,
$checked_out_tree
)
=
getrepo
();
...
...
@@ -225,8 +229,10 @@ sub darcsget {
@repos
=
<
IN
>
;
close
IN
;
$line
=
0
;
foreach
(
@repos
)
{
chomp
;
$line
++
;
if
(
/^([^ ]+) +([^ ]+) +([^ ]+) +([^ ]+) +([^ ]+)$/
)
{
$localpath
=
$
1
;
$tag
=
$
2
;
...
...
@@ -249,7 +255,7 @@ sub darcsget {
}
}
elsif
(
!
/^(#.*)?$/
)
{
die
"
Bad
lin
e:
$_
";
die
"
Bad
content on line
$line
of packages fil
e:
$_
";
}
}
}
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment