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
af2dea60
Commit
af2dea60
authored
Sep 24, 2008
by
Wayne Davison
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fixed skipping of unneeded updates in a batch file when
incremental recursion is active. Added test.
parent
7fdb3bda
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
10 additions
and
3 deletions
+10
-3
generator.c
generator.c
+3
-0
receiver.c
receiver.c
+5
-3
batch-mode.test
testsuite/batch-mode.test
+2
-0
No files found.
generator.c
View file @
af2dea60
...
@@ -2285,6 +2285,9 @@ void generate_files(int f_out, const char *local_name)
...
@@ -2285,6 +2285,9 @@ void generate_files(int f_out, const char *local_name)
}
}
}
while
((
cur_flist
=
cur_flist
->
next
)
!=
NULL
);
}
while
((
cur_flist
=
cur_flist
->
next
)
!=
NULL
);
if
(
read_batch
)
write_ndx
(
f_out
,
NDX_DONE
);
if
(
delete_during
)
if
(
delete_during
)
delete_in_dir
(
NULL
,
NULL
,
&
dev_zero
);
delete_in_dir
(
NULL
,
NULL
,
&
dev_zero
);
phase
++
;
phase
++
;
...
...
receiver.c
View file @
af2dea60
...
@@ -351,6 +351,8 @@ static void handle_delayed_updates(char *local_name)
...
@@ -351,6 +351,8 @@ static void handle_delayed_updates(char *local_name)
static
int
get_next_gen_ndx
(
int
fd
,
int
next_gen_ndx
,
int
desired_ndx
)
static
int
get_next_gen_ndx
(
int
fd
,
int
next_gen_ndx
,
int
desired_ndx
)
{
{
static
int
batch_eof
=
0
;
while
(
next_gen_ndx
<
desired_ndx
)
{
while
(
next_gen_ndx
<
desired_ndx
)
{
if
(
next_gen_ndx
>=
0
)
{
if
(
next_gen_ndx
>=
0
)
{
struct
file_struct
*
file
=
cur_flist
->
files
[
next_gen_ndx
];
struct
file_struct
*
file
=
cur_flist
->
files
[
next_gen_ndx
];
...
@@ -359,14 +361,16 @@ static int get_next_gen_ndx(int fd, int next_gen_ndx, int desired_ndx)
...
@@ -359,14 +361,16 @@ static int get_next_gen_ndx(int fd, int next_gen_ndx, int desired_ndx)
file
->
flags
&
FLAG_FILE_SENT
?
" resend of"
:
""
,
file
->
flags
&
FLAG_FILE_SENT
?
" resend of"
:
""
,
f_name
(
file
,
NULL
));
f_name
(
file
,
NULL
));
}
}
next_gen_ndx
=
read_int
(
fd
);
next_gen_ndx
=
batch_eof
?
-
1
:
read_int
(
fd
);
if
(
next_gen_ndx
==
-
1
)
{
if
(
next_gen_ndx
==
-
1
)
{
if
(
inc_recurse
)
if
(
inc_recurse
)
next_gen_ndx
=
first_flist
->
prev
->
used
+
first_flist
->
prev
->
ndx_start
;
next_gen_ndx
=
first_flist
->
prev
->
used
+
first_flist
->
prev
->
ndx_start
;
else
else
next_gen_ndx
=
cur_flist
->
used
;
next_gen_ndx
=
cur_flist
->
used
;
batch_eof
=
1
;
}
}
}
}
return
next_gen_ndx
;
return
next_gen_ndx
;
}
}
...
@@ -520,8 +524,6 @@ int recv_files(int f_in, char *local_name)
...
@@ -520,8 +524,6 @@ int recv_files(int f_in, char *local_name)
"(Skipping batched update for
\"
%s
\"
)
\n
"
,
"(Skipping batched update for
\"
%s
\"
)
\n
"
,
fname
);
fname
);
discard_receive_data
(
f_in
,
F_LENGTH
(
file
));
discard_receive_data
(
f_in
,
F_LENGTH
(
file
));
if
(
inc_recurse
)
send_msg_int
(
MSG_NO_SEND
,
ndx
);
continue
;
continue
;
}
}
next_gen_ndx
=
-
1
;
next_gen_ndx
=
-
1
;
...
...
testsuite/batch-mode.test
View file @
af2dea60
...
@@ -41,6 +41,8 @@ runtest "--read-batch from daemon" 'checkit "$RSYNC -av --read-batch=BATCH \"$to
...
@@ -41,6 +41,8 @@ runtest "--read-batch from daemon" 'checkit "$RSYNC -av --read-batch=BATCH \"$to
rm
-
rf
"
$todir
"
rm
-
rf
"
$todir
"
runtest
"BATCH.sh use of --read-batch"
'checkit "./BATCH.sh" "$chkdir" "$todir"'
runtest
"BATCH.sh use of --read-batch"
'checkit "./BATCH.sh" "$chkdir" "$todir"'
runtest
"do-nothing re-run of batch"
'checkit "./BATCH.sh" "$chkdir" "$todir"'
rm
-
rf
"
$todir
"
rm
-
rf
"
$todir
"
mkdir
"
$todir
"
||
test_fail
"failed to restore empty destination directory"
mkdir
"
$todir
"
||
test_fail
"failed to restore empty destination directory"
runtest
"daemon recv --write-batch"
'checkit "\"$ignore23\" $RSYNC -av --write-batch=BATCH \"$fromdir/\" rsync://localhost/test-to" "$chkdir" "$todir"'
runtest
"daemon recv --write-batch"
'checkit "\"$ignore23\" $RSYNC -av --write-batch=BATCH \"$fromdir/\" rsync://localhost/test-to" "$chkdir" "$todir"'
...
...
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