Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
L
liblongpath-rsync
Project
Project
Details
Activity
Releases
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
liblongpath
liblongpath-rsync
Commits
97f04215
Commit
97f04215
authored
Nov 16, 2007
by
Wayne Davison
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Make sure we process a parent patch before a dependent patch.
parent
ee8a733d
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
51 additions
and
19 deletions
+51
-19
patch-update
support/patch-update
+51
-19
No files found.
support/patch-update
View file @
97f04215
...
...
@@ -45,8 +45,58 @@ while (<PIPE>) {
}
close
PIPE
;
my
(
%
parent
,
%
description
);
foreach
my
$patch
(
@patches
)
{
my
$branch
=
(
$local_patch
{
$patch
}
?
''
:
'origin/'
)
.
"patch/$patch"
;
open
(
PIPE
,
'-|'
,
'git-diff'
,
"master...$branch"
,
'--'
,
"PATCH.$patch"
)
or
die
$!
;
while
(
<
PIPE
>
)
{
last
if
/^@@ /
;
}
my
$desc
=
''
;
while
(
<
PIPE
>
)
{
next
if
/^-/
;
# huh??
s/^.//
;
if
(
m#patch -p1 <patches/(\S+)\.diff#
&&
$1
ne
$patch
)
{
$parent
{
$patch
}
=
$1
;
}
$desc
.=
$_
;
}
$description
{
$patch
}
=
$desc
;
}
my
%
completed
;
foreach
my
$patch
(
@patches
)
{
next
if
$completed
{
$patch
}
++
;
update_patch
(
$patch
);
}
if
(
$incl_generated_files
)
{
system
"rm -rf a b"
;
}
print
"-------- master --------\n"
;
sleep
1
if
$last_touch
==
time
;
system
"git-checkout master && ./prepare-source"
;
exit
;
sub
update_patch
{
my
(
$patch
)
=
@_
;
my
$parent
=
$parent
{
$patch
};
if
(
defined
$parent
)
{
unless
(
$completed
{
$parent
}
++
)
{
update_patch
(
$parent
);
}
$parent
=
"patch/$parent"
;
}
else
{
$parent
=
'master'
;
}
print
"======== $patch ========\n"
;
sleep
1
if
$incl_generated_files
&&
$last_touch
==
time
;
if
(
$local_patch
{
$patch
})
{
system
"git-checkout patch/$patch"
and
exit
1
;
...
...
@@ -54,18 +104,8 @@ foreach my $patch (@patches) {
system
"git-checkout --track -b patch/$patch origin/patch/$patch"
and
exit
1
;
}
my
$parent
=
'master'
;
open
(
IN
,
'<'
,
"PATCH.$patch"
)
or
next
;
open
(
OUT
,
'>'
,
"patches/$patch.diff"
)
or
die
$!
;
while
(
<
IN
>
)
{
if
(
m#patch -p1 <patches/(\S+)\.diff#
&&
$1
ne
$patch
)
{
$parent
=
"patch/$1"
;
}
print
OUT
$_
;
}
close
IN
;
print
OUT
"\n"
;
print
OUT
$description
{
$patch
},
"\n"
;
if
(
system
(
"git-rebase -m $parent"
)
!=
0
)
{
print
qq|"git-rebase -m $parent" incomplete -- please fix.\n|
;
...
...
@@ -101,11 +141,3 @@ foreach my $patch (@patches) {
close
OUT
;
}
if
(
$incl_generated_files
)
{
system
"rm -rf a b"
;
}
print
"-------- master --------\n"
;
sleep
1
if
$last_touch
==
time
;
system
"git-checkout master && ./prepare-source"
;
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