[PATCH] cvs --continue bug
Chia-liang Kao <[email protected]> Wed, 22 Sep 2004 23:51:23 +0100
| Newsgroups | gmane.comp.version-control.revml |
|---|---|
| Message-ID | <[email protected]> |
--eAbsdosE1cNLO4uF
Content-Type: multipart/mixed; boundary="J/dobhs11T7y2rNN"
Content-Disposition: inline
--J/dobhs11T7y2rNN
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
This patch has conflicts against the current trunk. I didn't merge
down from the vendor branch because it's causing some regression as I
reported earlier.
Cheers,
CLK
--J/dobhs11T7y2rNN
Content-Type: text/plain; charset=us-ascii
Content-Disposition: attachment; filename="vcp-add-merge.diff"
Content-Transfer-Encoding: quoted-printable
----------------------------------------------------------------------
r1113: clkao | 2004-09-22T22:17:21.739422Z
When queuing placeholder revs, use the proper rev_data to
calculate rev_mode.
This fixes a bug that a file is added on trunk, vcp copied.
Merged to a branch, and then vcp --continue will break.
----------------------------------------------------------------------
--- local/lib/VCP/Source/cvs.pm (revision 1112)
+++ local/lib/VCP/Source/cvs.pm (revision 1113)
@@ -771,6 +771,7 @@ sub queue_parsed_revs {
=20
$file_data->{revs}->{$rev_id} =3D $r; ## TODO: try deleting this.
for my $branch_rev_id ( @{$rev->{branches}} ) {
+ $branch_rev_id =3D~ s{\.\d+\z}{.0};
## Create branch revs (placeholders) with appropriate
## branch_ids from RTAGS.
my $placeholder_rev =3D {
@@ -782,14 +783,12 @@ sub queue_parsed_revs {
comment =3D> undef,
previous_rev_id =3D> $rev_id,
};
- $placeholder_rev->{rev_id} =3D~ s{\.\d+\z}{.0};
=20
$self->compute_branch_metadata( $file_data, $placeholder_rev );
=20
- my $mode =3D $self->rev_mode( $rev->{filebranch_id}, $rev_id );
+ my $mode =3D $self->rev_mode( $placeholder_rev->{filebranch_id}, =
$branch_rev_id );
next unless $mode;
- $rev->{mode} =3D $mode;
-
+ $placeholder_rev->{mode} =3D $mode;
$placeholder_rev->{comment} =3D
"[vcp] create branch '$placeholder_rev->{branch_id}'";
$self->_create_rev( $file_data, $placeholder_rev );
--J/dobhs11T7y2rNN--
--eAbsdosE1cNLO4uF
Content-Type: application/pgp-signature
Content-Disposition: inline
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.6 (FreeBSD)
iD8DBQFBUgHqk1XldlEkA5YRAso0AJ9qdNCt6QpFSXtzD2Un4UnTNa72WACeN1x0
K/VSRYKf78i4D0b6pJJJiec=
=vSl2
-----END PGP SIGNATURE-----
--eAbsdosE1cNLO4uF--