Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
bugzilla
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
etersoft
bugzilla
Commits
09495a11
Commit
09495a11
authored
Jul 14, 2006
by
lpsolit%gmail.com
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Bug 344298: importxml.pl performance problem - Patch by Vance Baarda…
Bug 344298: importxml.pl performance problem - Patch by Vance Baarda <vrb@novell.com> r=ghendricks a=myk
parent
612ed3d7
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
22 additions
and
8 deletions
+22
-8
importxml.pl
importxml.pl
+22
-8
No files found.
importxml.pl
View file @
09495a11
...
@@ -100,11 +100,13 @@ Bugzilla->batch(1);
...
@@ -100,11 +100,13 @@ Bugzilla->batch(1);
my
$debug
=
0
;
my
$debug
=
0
;
my
$mail
=
''
;
my
$mail
=
''
;
my
$attach_path
=
''
;
my
$help
=
0
;
my
$help
=
0
;
my
$result
=
GetOptions
(
my
$result
=
GetOptions
(
"verbose|debug+"
=>
\
$debug
,
"verbose|debug+"
=>
\
$debug
,
"mail|sendmail!"
=>
\
$mail
,
"mail|sendmail!"
=>
\
$mail
,
"attach_path=s"
=>
\
$attach_path
,
"help|?"
=>
\
$help
"help|?"
=>
\
$help
);
);
...
@@ -365,14 +367,24 @@ sub process_attachment() {
...
@@ -365,14 +367,24 @@ sub process_attachment() {
$attachment
{
'isprivate'
}
=
$attach
->
{
'att'
}
->
{
'isprivate'
}
||
0
;
$attachment
{
'isprivate'
}
=
$attach
->
{
'att'
}
->
{
'isprivate'
}
||
0
;
$attachment
{
'filename'
}
=
$attach
->
field
(
'filename'
)
||
"file"
;
$attachment
{
'filename'
}
=
$attach
->
field
(
'filename'
)
||
"file"
;
# Attachment data is not exported in versions 2.20 and older.
# Attachment data is not exported in versions 2.20 and older.
if
(
defined
$attach
->
first_child
(
'data'
)
if
(
defined
$attach
->
first_child
(
'data'
)
&&
&&
defined
$attach
->
first_child
(
'data'
)
->
{
'att'
}
->
{
'encoding'
}
defined
$attach
->
first_child
(
'data'
)
->
{
'att'
}
->
{
'encoding'
})
{
&&
$attach
->
first_child
(
'data'
)
->
{
'att'
}
->
{
'encoding'
}
=~
/base64/
)
my
$encoding
=
$attach
->
first_child
(
'data'
)
->
{
'att'
}
->
{
'encoding'
};
{
if
(
$encoding
=~
/base64/
)
{
# decode the base64
# decode the base64
my
$data
=
$attach
->
field
(
'data'
);
my
$data
=
$attach
->
field
(
'data'
);
my
$output
=
decode_base64
(
$data
);
my
$output
=
decode_base64
(
$data
);
$attachment
{
'data'
}
=
$output
;
$attachment
{
'data'
}
=
$output
;
}
elsif
(
$encoding
=~
/filename/
)
{
# read the attachment file
Error
(
"attach_path is required"
,
undef
)
unless
(
$attach_path
);
my
$attach_filename
=
$attach_path
.
"/"
.
$attach
->
field
(
'data'
);
open
(
ATTACH_FH
,
$attach_filename
)
or
Error
(
"cannot open $attach_filename"
,
undef
);
$attachment
{
'data'
}
=
do
{
local
$/
;
<
ATTACH_FH
>
};
close
ATTACH_FH
;
}
}
}
else
{
else
{
$attachment
{
'data'
}
=
$attach
->
field
(
'data'
);
$attachment
{
'data'
}
=
$attach
->
field
(
'data'
);
...
@@ -1212,6 +1224,8 @@ importxml - Import bugzilla bug data from xml.
...
@@ -1212,6 +1224,8 @@ importxml - Import bugzilla bug data from xml.
-v --verbose print error and debug information.
-v --verbose print error and debug information.
Mulltiple -v increases verbosity
Mulltiple -v increases verbosity
-m --sendmail send mail to recipients with log of bugs imported
-m --sendmail send mail to recipients with log of bugs imported
--attach_path The path to the attachment files.
(Required if encoding="filename" is used for attachments.)
=head1 OPTIONS
=head1 OPTIONS
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a 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