Possible bug when cvs checking out changelogs using a tag

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

Possible bug when cvs checking out changelogs using a tag

paul oswald
I spoke too soon... Even after restarting JBoss/Hudson to turn off the -t tracing command line I still get the same error (except without the dying gasps message of course). I tried running the same command in /tmp

cvs -z9 -d :pserver:[hidden email]:/cvs/aoma co -r STAGE -d workspace -D "Thursday, February 1, 2007 2:26:12 AM UTC" projectName

...and it exhibits the same behavior: the entire thing looks like it is checked out into workspace (if i ctrl-c the thing halfway through the files are left on disc) but as soon as it is finished, they are all gone.

When I look at the above command I'm not sure what it is supposed to do. It is specifying the tag (-r) as well as the date (-D) which seems to make sense if you are working on a branch. The thing is that the cvs tag command also has a mode where it makes a symbolic snapshot tag and not a branch. The way we use cvs, the -r specifies a tag and we want to check out every file that has it regardless of date. This is more like a frozen snapshot in time. We use the eclipse "Tag as Version" feature to specify all of the files/packages/whatever that we would like in the next stage build. Then the cvs checkout pulls it down for the next build.

The cvs man page says the following about cvs checkout:
The options permitted with `cvs checkout'  include  the
standard command options -P, -f, -k kflag , -l, -n, -p,
-r tag, and -D date.

Now, from reading it, I dont know if it's legal to specify both the tag and date at the same time if you are using the cvs checkout command. I do know that it deletes everything once it is done when I try it. The way we work, each file in the repository either has a tag or it doesn't so the date doesn't matter. I tested and taking the -D date part out and leaving -r STAGE in makes it do what I expect.

I suppose the "fix" if you can call it that would be to either detect that this is a snapshot tag and not a branch and leave off the -D option (I'm assuming that option is necessary for correct behavior when checking out a branch) or add another input box to the cvs configuration options that allows you to specify a tag instead of a branch. The checkout command would then not use the -D option.

Of course all of this assumes that my understanding of the above command line makes sense. I looked around a bit and I can't find anyone using both the -r and the -D tag at the same time on a checkout.
Reply | Threaded
Open this post in threaded view
|

Re: Possible bug when cvs checking out changelogs using a tag

Jesse Glick
Paul Oswald wrote:
> When I look at the above command I'm not sure what it is supposed to do.

Check out files on a given branch as of the given time.

> It is specifying the tag (-r) as well as the date (-D) which seems to
> make sense if you are working on a branch.

It does.

> The way we use cvs, the -r specifies a tag

That certainly cannot work with Hudson as it is written. I don't really
follow why you would want this, actually; a tag is a static snapshot.
Surely you don't go changing the Hudson project configuration every time
you want to do a build, to point it to a new tag?

> I suppose the "fix" if you can call it that would be to either detect
> that this is a snapshot tag and not a branch and leave off the -D option

I don't think that is possible. CVS provides no easy way to
differentiate them.

> (I'm assuming that option is necessary for correct behavior when
> checking out a branch)

It is, especially on large projects. Otherwise you can get problems with
changes not being reported correctly, or with inconsistent sources.

https://hudson.dev.java.net/issues/show_bug.cgi?id=229

is related, in that it also requests not to use -D (for an entirely
different reason).

-J.

--
[hidden email]  x22801  netbeans.org  ant.apache.org
       http://google.com/search?q=e%5E%28pi*i%29%2B1

---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]