Ticket #26 (reopened defect)
cvs -> hglib: incomplete tag conversion
| Reported by: | djerius@… | Owned by: | lele |
|---|---|---|---|
| Priority: | major | Milestone: | VersionOne |
| Component: | cvs | Version: | 0.9 |
| Keywords: | Cc: |
Description
tailor v. 0.9.20
mercurial v 0.7
The project has the following explicitly specified tags:
% cvs history -T -n enwtsum T 1999-02-08 15:20 +0000 dj enwtsum [D19990208:A] T 1999-02-08 16:30 +0000 dj enwtsum [D19990208:A]
as well as those provided by CVS upon import of the project (in this case dj and initial).
Here's the tailor config file
[DEFAULT] verbose = True [project] target = hglib:target start-revision = INITIAL root-directory = /proj/axaf/simul/src/hg state-file = tailor.state source = cvs:source patch-name-format = [hglib:target] [cvs:source] repository = /proj/axaf/simul/src/cvs subdir = original
after conversion mercurial only sees one of the CVS tags:
% hg tags tip 7:483ba6878c07f8f9d1cf961da29829d4351a0510 initial 3:a338b036cb7c63609979f65d8848c56f97a1b7a3
Attachments
Change History
Changed 7 years ago by djerius@…
-
attachment
project.log
added
comment:1 Changed 7 years ago by lele
Since I never used/tried CVS tags, does anybody have a clue on whether this is a problem with the CVS parser or with the hglib._tag() method?
comment:2 Changed 7 years ago by tailor23494@…
Can you make the CVS repository available? If not, can we see the output of
cvs -f -d /proj/axaf/simul/src/cvs rlog -r:HEAD -b enwtsum
?
comment:4 Changed 7 years ago by tailor23494@…
OK, some comments and some questions.
- I'm not familiar with the cvs history command. Do you know why when I try the history command you quoted above, I get "no records" rather than the output you quoted?
- Unless I've misunderstood you, you interpret the output of cvs history as saying that there are two different tags with the name D19990208. That's not possible in CVS--tag names are unique. If you tag twice with the same name, the second time moves the tag from one place to another. (This is just a side-comment; it has no bearing on the question of why the tag D19990208 wasn't exported.)
- As far as I can imagine, a tag that applies to some files and not others doesn't make sense in a changeset-oriented revision control system, and thus such tags are not exported from CVS. This is the case for the tag D19990208 -- no revision of usage.c is tagged D19990208, even though the file existed at the time that the tag was set. Do you know why usage.c wasn't tagged? Do you claim that this tag could meaningfully be exported?
comment:5 Changed 7 years ago by djerius@…
- The history command by default only shows history for the user running the command; use the -a option to history to get it for all users. Sorry, I didn't think to mention that subtlety.
- I didn't mean to imply that I expected two D19990208 tags; that's just how history outputs the results after a cvs history -F. I don't expect tailor to track such foolishness on my part; I don't believe that cvs records enough state information to do this anyway.
- I believe that usage.c was removed prior to tagging with D19920208. The commitlog shows that it was removed at 1992-02-08 15:19 UTC (10:19 local):
**************************************
date: Monday, February 8, 1999 @ 10:19
author: dj
Update of /proj/axaf/simul/src/enwtsum
In directory pelf:/data/pelf1/dj/axaf/simul/src/enwtsum
Modified Files:
enwtsum.par version.h
Added Files:
INSTALL
Removed Files:
usage.c
Log Message:
The first tagging with D19990208 was done at 1999-02-08 15:20 GMT, one minute later.
Thanks for looking at this. I marvel at your patience and sanity while poking at CVS innards.
comment:7 Changed 7 years ago by tailor23494@…
Uh... "Got it" should read "I have attached to the Trac ticket a patch that fixes this bug." I figured Trac's email notification would mention that, but it doesn't.
comment:8 Changed 7 years ago by Lele Gaifax
- Status changed from new to closed
- Resolution set to fixed
Fixed by [1055].
comment:9 Changed 7 years ago by djerius@…
- Status changed from closed to reopened
- Resolution fixed deleted
I fear that the fix isn't complete. I pulled tailor from the darcs repository (as of 23 January) and tried it on another CVS module. Here are the existent CVS tags:
% cvs history -T -a -n rbtree T 1993-12-03 22:09 +0000 dj rbtree [D931203:A] T 1994-08-20 13:53 +0000 dj rbtree [D940820:A] T 1995-04-12 17:48 +0000 dj rbtree [D950412:A] T 1995-06-28 21:46 +0000 dj rbtree [D950628:A] T 1995-06-28 21:53 +0000 dj rbtree [D950628:A] T 1995-07-19 23:49 +0000 dj rbtree [D950719:A] T 1995-07-19 23:58 +0000 dj rbtree [D950719:A] T 1995-07-20 00:04 +0000 dj rbtree [D950719:A] T 1995-07-20 00:08 +0000 dj rbtree [D950719:A] T 1995-07-20 00:09 +0000 dj rbtree [D950719:A] T 1995-07-20 22:45 +0000 dj rbtree [D950720:A] T 1995-08-02 22:59 +0000 dj rbtree [D950802:A] T 1995-08-02 22:59 +0000 dj rbtree [D950802:A] T 1995-10-10 19:46 +0000 dj rbtree [D951010:A] T 1995-10-10 20:14 +0000 dj rbtree [D951010:A] T 1995-10-10 20:24 +0000 dj rbtree [D951010:A] T 2000-12-12 19:59 +0000 dj rbtree [D20001212:A] T 2003-11-14 03:21 +0000 gaetz rbtree [D20031113:A] T 2004-01-26 19:31 +0000 tibbetts rbtree [rbtree-1_0_0:A] T 2004-07-09 20:42 +0000 tibbetts rbtree [V1_0_0:A] T 2005-07-16 03:43 +0000 dj rbtree [V1_0_1:A] T 2005-07-16 04:55 +0000 dj rbtree [V1_0_1:A] T 2005-07-16 04:55 +0000 dj rbtree [V1_0_1:A] T 2005-07-18 21:07 +0000 dj rbtree [V1_0_2:A] T 2005-09-23 02:36 +0000 dj rbtree [V1_0_3:A]
and here are the tags in the converted hg repo:
% hg tags tip 49:8e728fa5ba243c7daadb0b4b4f32c3946f27f7e1 initial 3:3cccc760c7952833d1a9fdf877cc36a33b92501b D931203 2:81bf1b693275a59453b6dc80af0c5a319f828618
I've placed a copy of the CVS repo here:
comment:10 Changed 7 years ago by tailor23494@…
I think I see why the tag D940820 isn't being exported; I haven't looked at the others, so I don't know if this is the only problem.
It's not just a problem with tags, the change history itself is being exported incorrectly. The true history of the file GNUmakefile is
| 1.1.1.1 | 1993/12/03 |
| 1.1.1.2 | 1994/08/20 |
| 1.2 | 1995/04/12 |
but in the change history exported by tailor, it jumps straight from 1.1.1.1 to 1.2. The tag D940820 is on version 1.1.1.2, so the exported change history never passes through it.
The problem comes from the fact that cvs rlog -r:HEAD doesn't show revisions on branches, including the vendor branch.
The tag handling code will need changing to handle this case, but first I'll let Lele fix the underlying problem.

project.log