repo.or.cz
/
linux-2.6.9-moxart.git
/
blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
log
|
graphiclog1
|
graphiclog2
|
commit
|
commitdiff
|
tree
|
refs
|
edit
|
fork
blame
|
history
|
raw
|
HEAD
MOXA linux-2.6.x / linux-2.6.9-uc0 from sdlinux-moxaart.tgz
[linux-2.6.9-moxart.git]
/
Documentation
/
BK-usage
/
csets-to-patches
blob
e2b81c35883f225a61b69fe3c9621d88de64f0ec
1
#!/usr/bin/perl -w
2
3
use
strict
;
4
5
my
(
$lhs
,
$rev
,
$tmp
,
$rhs
,
$s
);
6
my
@cset_text
= ();
7
my
@pipe_text
= ();
8
my
$have_cset
=
0
;
9
10
while
(<>) {
11
next if
/^---/
;
12
13
if
((
$lhs
,
$tmp
,
$rhs
) = (
/^(ChangeSet\@)([^,]+)(, .*)$/
)) {
14
&
cset_rev
if
(
$have_cset
);
15
16
$rev
=
$tmp
;
17
$have_cset
=
1
;
18
19
push
(
@cset_text
,
$_
);
20
}
21
22
elsif
(
$have_cset
) {
23
push
(
@cset_text
,
$_
);
24
}
25
}
26
&
cset_rev
if
(
$have_cset
);
27
exit
(
0
);
28
29
30
sub
cset_rev
{
31
my
$empty_cset
=
0
;
32
33
system
(
"bk export -tpatch -du -r
$rev
> /tmp/rev-
$rev
.patch"
);
34
35
if
(!
$empty_cset
) {
36
print
@cset_text
;
37
print
@pipe_text
;
38
print
"
\n\n
"
;
39
}
40
41
@pipe_text
= ();
42
@cset_text
= ();
43
}
44