From: Chris Shoemaker <c.shoemaker@cox.net>
To: cvsps@dm.cobite.com, David Mansfield <david@cobite.com>
Cc: git@vger.kernel.org
Subject: [OT] ancestor branch in cvsps is wrong for branch-of-branch
Date: Mon, 31 Oct 2005 22:51:48 -0500 [thread overview]
Message-ID: <20051101035148.GA11807@pe.Belkin> (raw)
[ Maybe the git list is interested in a problem with cvsps? ]
Summary: When creating a patchset for the first modification in a
branch-off-a-branch, cvsps (version 2.1) declares that the ancestor
branch is HEAD. Presumably this is because the file in the patchset
hadn't been modified since it was on HEAD. But this means that files
that are *added* to the first branch are never counted as added to the
branch-off-a-branch.
Figure:
-HEAD-(add file 'a')--+-------------------------
\
\-stable-(add file 'b')-+
\
\-dev-(change 'a')-->
In CVS, branch "dev" clearly contains both 'a' and 'b'. But cvsps
makes it look like this:
/-dev-(change 'a') ---->
/
-HEAD-(add file 'a')--+-------------------------
\
\-stable-(add file 'b')---->
So that in the imported git repository, the "dev" branch contains ONLY
'a'.
Below are: a script to reproduce this example, the cvs log output, and
cvsps output. It's clear from the cvs log that 'b' has the 'dev'
symbolic tag, so it seems like we should be able to recreate 'dev'.
Before I look into fixing this, I wanted to see if there were any
comments from the list. David?
-chris
#!/bin/sh
dirname=`date +"%Y%m%d%H%M%S"`
mkdir $dirname && cd $dirname
# create the repository
mkdir cvsroot && cd cvsroot
export CVSROOT=`pwd`
cd ..
cvs init
# import an empty project
mkdir project && cd project
cvs import -m "Create initial repo" project yoyo start
cd ..
rmdir project
# checkout the project
cvs co project && cd project
# create a new file on HEAD
echo 1 >a
cvs add a
cvs ci -m "added file a to HEAD" a
# create and switch to "stable" branch
cvs tag -b stable
cvs update -r stable
# add a new file to stable branch
echo 2 > b
cvs add b
cvs ci -m "added file b to 'stable' branch" b
# create and switch to "dev" branch from "stable"
cvs tag -b dev
cvs update -r dev
# modify file 'a' on "dev" branch
echo "change" >> a
cvs ci -m "changed file a on dev branch" a
# see what CVS thinks the "dev" branch looks like
cd ..
rm -rf project
cvs checkout -r dev project
ls project && echo "Note how b is PRESENT"
# check output of cvsps
cd project
cvs log > ../cvslog
cd ..
cvsps -A --test-log cvslog project > cvsps.out
# check behavior of git-cvsimport
git-cvsimport -i -d $CVSROOT -C project.git project
cd project.git
git-checkout -f dev
ls && echo "Note how b is ABSENT!"
#***********EOF*********************
cvsps output
---------------------
PatchSet 1
Date: 2005/10/31 22:30:46
Author: chris
Branch: HEAD
Tag: (none)
Log:
added file a to HEAD
Members:
a:INITIAL->1.1
---------------------
PatchSet 2
Date: 2005/10/31 22:30:47
Author: chris
Branch: stable
Ancestor branch: HEAD
Tag: (none)
Log:
added file b to 'stable' branch
Members:
b:1.1->1.1.2.1
---------------------
PatchSet 3
Date: 2005/10/31 22:30:48
Author: chris
Branch: dev
Ancestor branch: HEAD
Tag: (none)
Log:
changed file a on dev branch
Members:
a:1.1->1.1.4.1
******************EOF*********
cvs log output
RCS file: /home/chris/import/20051031223046/cvsroot/project/a,v
Working file: a
head: 1.1
branch:
locks: strict
access list:
symbolic names:
dev: 1.1.0.4
stable: 1.1.0.2
keyword substitution: kv
total revisions: 2; selected revisions: 2
description:
----------------------------
revision 1.1
date: 2005/11/01 03:30:46; author: chris; state: Exp;
branches: 1.1.4;
added file a to HEAD
----------------------------
revision 1.1.4.1
date: 2005/11/01 03:30:48; author: chris; state: Exp; lines: +1 -0
changed file a on dev branch
=============================================================================
RCS file: /home/chris/import/20051031223046/cvsroot/project/Attic/b,v
Working file: b
head: 1.1
branch:
locks: strict
access list:
symbolic names:
dev: 1.1.2.1.0.2
stable: 1.1.0.2
keyword substitution: kv
total revisions: 2; selected revisions: 2
description:
----------------------------
revision 1.1
date: 2005/11/01 03:30:47; author: chris; state: dead;
branches: 1.1.2;
file b was initially added on branch stable.
----------------------------
revision 1.1.2.1
date: 2005/11/01 03:30:47; author: chris; state: Exp; lines: +1 -0
added file b to 'stable' branch
=============================================================================
next reply other threads:[~2005-11-01 3:52 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-11-01 3:51 Chris Shoemaker [this message]
2005-11-09 22:26 ` [PATCH] CVSps fixed, git-cvsimport still buggy (WAS: [OT] ancestor branch in cvsps is wrong for branch-of-branch) Chris Shoemaker
2005-11-10 1:41 ` CVSps fixed; git-cvsimport works, too Chris Shoemaker
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20051101035148.GA11807@pe.Belkin \
--to=c.shoemaker@cox.net \
--cc=cvsps@dm.cobite.com \
--cc=david@cobite.com \
--cc=git@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).