Bugs item #1107410, was opened at 2005-01-22 11:10
Message generated for change (Comment added) made by jsmorris
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=402868&aid=1107410&group_id=31650

Category: None
Group: 0.85
Status: Open
Resolution: None
Priority: 5
Submitted By: Jason S Morris (jsmorris)
Assigned to: Clayton Harbour (drakmar)
Summary: <cvs-tag> not working as I would expect

Initial Comment:
I am trying to emulate how I do commits, updates and 
tags using TortoiseCVS 1.8.11 (CVSNT 2.0.58d 
(client/server)) in my Nant build scripts using NAnt 0.85 
(Build 0.85.1845.0; nightly; 1/19/2005).

The <cvs>commit</cvs> and <cvs-update> are 
working, thanks to Clayton for adding the .cvsignore's.  
But, the <cvs-tag> is giving me some trouble. 

The command that TortoiseCVS 1.8.11 (Concurrent 
Versions System (CVSNT) 2.0.58d (client/server)) runs 
is:

In C:\projects\test: "C:\Program 
Files\TortoiseCVS\cvs.exe" "-q" "-x" "tag" "-
c" "v_jason2" "."
CVSROOT=:sspi:ocsccsdcvs03:\capability

So, I tried to set up my <cvs-tag> as similarly

        <cvs-tag cvsroot="${cvs.root}"
                 usesharpcvslib="false"
                 verbose="false"
                 failonerror="true"
                 tag="v_test"
                 commandline="-c">
            <arg line="-q -x" />
        </cvs-tag>

And I get this build failure message:

BUILD FAILED

C:\projects\test\test.build(40,10):
NAnt.SourceControl.Tasks.TagTask: C:\Program 
Files\TortoiseCVS\cvs.exe had error s. Please see 
log4net log.
    Length can not be less than zero.
    Parameter name: length

After poking around for awhile, I found that the error is 
that I didn't specify the "module" attribute.  This is most 
likely a bug in that the error message should be 
corrected to specify the correct parameter name and 
the docs changed to say that the module name is 
required.  However, I don't think that it should be 
required since I got the <cvs-update> task to work 
without specifying a module.

Now my modified task is

        <cvs-tag cvsroot="${cvs.root}"
                 usesharpcvslib="false"
                 verbose="false"
                 failonerror="true"
                 tag="v_test"
                 commandline="-c"
                 module=".">
            <arg line="-q -x" />
        </cvs-tag>

And I get this build failure message:

  [cvs-tag] cvs server: nothing known about .cvsignore
  [cvs-tag] cvs server: nothing known about File1.txt
  [cvs-tag] cvs server: nothing known about File2.txt
  [cvs-tag] cvs server: nothing known about File3.txt
  [cvs-tag] cvs server: nothing known about File4.txt
  [cvs-tag] cvs server: nothing known about File5.txt
  [cvs-tag] cvs server: nothing known about test.build
  [cvs-tag] cvs server: nothing known about .cvsignore
  [cvs-tag] cvs server: nothing known about File1.txt
  [cvs-tag] cvs server: nothing known about File2.txt
  [cvs-tag] cvs server: nothing known about File3.txt
  [cvs-tag] cvs server: nothing known about File4.txt
  [cvs-tag] cvs server: nothing known about File5.txt
  [cvs-tag] cvs server: nothing known about File1.txt
  [cvs-tag] cvs server: nothing known about File2.txt
  [cvs-tag] cvs server: nothing known about File3.txt
  [cvs-tag] cvs server: nothing known about File4.txt
  [cvs-tag] cvs server: nothing known about File5.txt
  [cvs-tag] cvs server: nothing known about File1.txt
  [cvs-tag] cvs server: nothing known about File2.txt
  [cvs-tag] cvs server: nothing known about File3.txt
  [cvs-tag] cvs server: nothing known about File4.txt
  [cvs-tag] cvs server: nothing known about File5.txt
  [cvs-tag] cvs [server aborted]: correct the above 
errors first!

BUILD FAILED - 0 non-fatal error(s), 24 warning(s)

C:\projects\test\test.build(40,10):
External Program Failed: C:\Program 
Files\TortoiseCVS\cvs.exe (return code was 1)

I would like to know if I am doing something incorrectly 
or if there is a bug in the task.

As a workaround, I was able to define it like this and get 
it to work

                <cvs usesharpcvslib="false"
                     command="tag"
                     commandline="-c 
&quot;v_${datetime::get-ticks(datetime::now())}
&quot;"
                     verbose="true"
                     failonerror="true"
                     module=".">
                        <arg line="-q -x" />
                </cvs>

Thanks,
Jason

PS  I attached my test build script along with the test 
directory tree I used to work out these issues.  Just add 
all files to a local repository, change the cvs.root 
property to give it a try.

----------------------------------------------------------------------

>Comment By: Jason S Morris (jsmorris)
Date: 2005-02-12 13:03

Message:
Logged In: YES 
user_id=405288

I downloaded nant 0.85 rc2 and tried again, but I still get the 
message "[cvs-tag] cvs server: nothing known about 
File1.txt" for every file that I try to tag using <cvs-tag>.  I 
rememoved the "-c" option and even tried "-R" on a whim.

You are not seeing this behavior?

----------------------------------------------------------------------

Comment By: Clayton Harbour (drakmar)
Date: 2005-01-29 20:54

Message:
Logged In: YES 
user_id=677222

Hi Jason, that does look a little odd.  I ran the test
script a few times here and did not get anything like that.
 The -c specifies that no action should be performed if it
comes across any locally modified files, so this line:

cvs server: test.build is locally modified

Makes sense and will cause the tag to fail (so there would
be a build exception).  The other lines, not so much.  When
you tested did you run this through a few times before it
failed?

----------------------------------------------------------------------

Comment By: Jason S Morris (jsmorris)
Date: 2005-01-29 12:10

Message:
Logged In: YES 
user_id=405288

I ran my test build script against the NAnt 0.85 (Build 
0.85.1855.0; nightly; 1/29/2005) and I am sorry to say that I 
still don't think it is working.  I have attached two output 
files, one normal, the other versbose.

Because you cannot specify the module attribute, I removed 
it.

Please take a look at the output.  All the files that I am 
tagging are committed, so the output appears funny to me.

----------------------------------------------------------------------

Comment By: Clayton Harbour (drakmar)
Date: 2005-01-27 22:31

Message:
Logged In: YES 
user_id=677222

Hi Jason, I have looked through the test cases you provided,
thanks.  I have removed the module attribute from the task,
it does not really make sense in this case.  Let me know
that fixes your issue.

----------------------------------------------------------------------

Comment By: Clayton Harbour (drakmar)
Date: 2005-01-27 09:26

Message:
Logged In: YES 
user_id=677222

Hi Jason, I am really sorry you are correct I did not download 
the test cases in the zip file.  I will take a closer look at it 
tonight.

----------------------------------------------------------------------

Comment By: Jason S Morris (jsmorris)
Date: 2005-01-26 00:28

Message:
Logged In: YES 
user_id=405288

I tried with the 25-Jan nightly, but still don't see what I 
would expect.  The output of the cvs command that is run is 
different when no module is specified, but still not right in my 
opinion

cvs.exe ( -q -x -d:sspi:ocsccsdcvs01:/capability tag -c 
v_632422957031151968 test)

I think the 'test' should be replace with '.'  when no module 
value is specified.  'test' is the base directory I am running 
my script from.

I hope that you noticed the attached zip file.  I have the files 
and a build script that will demonstrate the issue.  Just add 
all the files to a CVS repository and run the script specifying 
the test-cvs-tagging target.

----------------------------------------------------------------------

Comment By: Clayton Harbour (drakmar)
Date: 2005-01-25 01:26

Message:
Logged In: YES 
user_id=677222

Hi Jason, I think I have fixed this can you checkout the latest 
nightly when you are able.  Thanks.


Clayton

----------------------------------------------------------------------

You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=402868&aid=1107410&group_id=31650


-------------------------------------------------------
SF email is sponsored by - The IT Product Guide
Read honest & candid reviews on hundreds of IT Products from real users.
Discover which products truly live up to the hype. Start reading now.
http://ads.osdn.com/?ad_id=6595&alloc_id=14396&op=click
_______________________________________________
nant-developers mailing list
nant-developers@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/nant-developers

Reply via email to