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
350242c5
Commit
350242c5
authored
May 23, 2009
by
Wayne Davison
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Determine the master's commit hash and note it in each patch
that is based on the master in the new "based-on:" line.
parent
181c9faf
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
18 additions
and
5 deletions
+18
-5
patch-update
packaging/patch-update
+18
-5
No files found.
packaging/patch-update
View file @
350242c5
...
...
@@ -36,6 +36,17 @@ if (!$skip_branch_check && !$is_clean) {
die
"The checkout is not clean:\n"
,
$status
;
}
my
$master_commit
;
open
PIPE
,
'-|'
,
"git log -1 --no-color $master_branch"
or
die
$!
;
while
(
<
PIPE
>
)
{
if
(
/^commit (\S+)/
)
{
$master_commit
=
$1
;
last
;
}
}
close
PIPE
;
die
"Unable to determine commit hash for master branch: $master_branch\n"
unless
defined
$master_commit
;
my
@extra_files
;
open
(
IN
,
'<'
,
'Makefile.in'
)
or
die
"Couldn't open Makefile.in: $!\n"
;
while
(
<
IN
>
)
{
...
...
@@ -125,13 +136,15 @@ sub update_patch
my($patch) = @_;
my $parent = $parent{$patch};
my $based_on;
if (defined $parent) {
unless ($completed{$parent}++) {
update_patch($parent);
}
$parent = "
patch
/
$parent
";
$
based_on = $
parent = "
patch
/
$parent
";
} else {
$parent = $master_branch;
$based_on = $master_commit;
}
print "
========
$patch
========\
n
";
...
...
@@ -139,9 +152,9 @@ sub update_patch
sleep 1 while $incl_generated_files && $last_touch >= time;
system "
git
checkout
patch
/
$patch
" and return 0;
my $ok = system("
git
merge $
paren
t
") == 0;
my $ok = system("
git
merge $
based
_on
") == 0;
if (!$ok || $launch_shell) {
print qq|"
git
merge $
parent
" incomplete -- please
fix
.\
n
|
if
!
$ok
;
print qq|"
git
merge $
based_on
" incomplete -- please
fix
.\
n
|
if
!
$ok
;
$ENV
{
PS1
}
=
"[$parent] patch/$patch: "
;
while
(
1
)
{
if
(
system
(
$ENV
{
SHELL
})
!=
0
)
{
...
...
@@ -157,14 +170,14 @@ sub update_patch
}
open
(
OUT
,
'>'
,
"$patches_dir/$patch.diff"
)
or
die
$!
;
print
OUT
$description
{
$patch
},
"\n"
;
print
OUT
$description
{
$patch
},
"\n
based-on: $based_on\n
"
;
if
(
$incl_generated_files
)
{
system
"$make_gen_cmd && rsync -a @extra_files $tmp_dir/$patch/"
and
exit
1
;
}
$last_touch
=
time
;
open
(
PIPE
,
'-|'
,
'git'
,
'diff'
,
$
parent
)
or
die
$!
;
open
(
PIPE
,
'-|'
,
'git'
,
'diff'
,
$
based_on
)
or
die
$!
;
DIFF:
while
(
<
PIPE
>
)
{
while
(
m{^diff --git a/PATCH}
)
{
while
(
<
PIPE
>
)
{
...
...
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