Re: [NAntC-Dev] Bugs in Perforce Nant Tasks
I am NOT a C# developer, or even a developer. In fact, I don't even know C#. I hadn't written a serious lick of code in over a dozen years. However, I looked over the code, and wonder if this stuff had been built. The P4Changes.cs module looks like the module that the p4change task calls. If you say It looks like it goes to line 101 and calls the "protected string getSpecificCommandArguments()". In this member function, it appears to be building the p4 command to execute from the command line. It adds to the arguments the word "change ", then it adds a "-d ", then it runs "Perforce.GetChangelistNumber(User, Client, Changelist)". "Perforce.GetChangelistNumber(User, Client, Changelist)" is in Perfoce.cs. It runs the "p4 changes -s -s command to get a list of changelists for that user. It then parses the output of this command to find the string specified in "changelist", and then returns the corresponding changelist number. This changelist is added to the "change -d " argument string. So, the whole string looks like this: "change -d " which is the correct format of the P4 command. Even more confusing, P4Add, P4Submit, and P4Reopen also seem to use the same routine to find and create the changelist. I have no idea why doesn't work as expected. I am not a C# developer, but the general technique looks like it should be working. I'm going to try recompiling this and see what happens. -Original Message- From: Gert Driesen [mailto:[EMAIL PROTECTED] Sent: Wednesday, September 20, 2006 2:56 AM To: Weintraub, David; nantcontrib-developer@lists.sourceforge.net Subject: Re: [NAntC-Dev] Bugs in Perforce Nant Tasks David, I don't recall who originally contributed the perforce tasks (and I don't have the sources available right now to check). Problem is that I don't have a perforce repository available to test against. Could you review the source code of these tasks, and perhaps provide patches for it ? I'll contact the orignal author and ask him to review your changes. What do you think? Gert - Original Message ----- From: "Weintraub, David" <[EMAIL PROTECTED]> To: Sent: Tuesday, September 19, 2006 11:54 PM Subject: [NAntC-Dev] Bugs in Perforce Nant Tasks >I am having trouble with some of the Nant Perforce tasks. > > First problem is with "p4change". I am doing this: > > >client="${p4Client}" > port="${p4Port}" > user="${p4User}" > verbose="${isDebug}"/> > > This is attempting to bring up a text file for me to edit which it > shouldn't be doing in the middle of a nant build. > > === > Here's the other problem. > > I manually create a changelist, and put in my description > "test_test_test". Perforce numbers this changelist as 1001: > > Now if I do this: > > > view="${assemblyInfoFile}" > changelist="${p4Changelist}" > client="${p4Client}" > port="${p4Port}" > user="${p4User}" > verbose="${isDebug}" > failonerror="false"/> > > The file ${assemblyInfoFile} is checked out against the changelist 1001 > and not the default changelist. > > And, if I do this: > > > changelist="${p4Changelist}" > client="${p4Client}" > port="${p4Port}" > user="${p4User}" > verbose="${isDebug}"/> > > The submit is done against changelist 1001 and not the default > changelist. > > However, if I do this: > > > changelist="${p4Changelist}" > client="${p4Client}" > port="${p4Port}" > user="${p4User}" > verbose="${isDebug}"/> > > I get the following error: > > [p4revert] Usage: revert [ -a -n -k -c changelist# ] files... > [p4revert] Missing/wrong number of arguments. > > Even worse, If I do this: > > > > view="${assemblyInfoFile}" > changelist="${p4Changelist}" > client="${p4Client}" > port="${p4Port}" > user="${p4User}" > verbose="${isDebug}" > failonerror="false"/> > > Nant creates a new changelist with a description of "1001" instead of > using Changelist #1001! At least this: > > > ch
Re: [NAntC-Dev] Bugs in Perforce Nant Tasks
I'm not a developer, and I really don't know much about .NET development (I am a build/release engineer), but I'll see what I can about the source. It appears that the P4 tasks exec the actual Perforce commands instead of using the C++ based Perforce API and the P4COM project which provides a C# (.NET) interface. (More information on the Perforce API can be found on <http://public.perforce.com/guest/robert_cowham/perforce/API/p4com/main/ index.html>). You can download a fully working copy of Perforce from www.perforce.com and use it as long as you have no more than two users and two "clients". That really should be more than sufficient for testing Nant Perforce tasks. Perforce is also rather generous with licenses, and will give free licenses for Open Source work like Nant. I use both Perforce and Subversion at home for what development I do (webpage stuff in JavaScript and PHP, Perl scripts, Joomla modules, etc.). -Original Message- From: Gert Driesen [mailto:[EMAIL PROTECTED] Sent: Wednesday, September 20, 2006 2:56 AM To: Weintraub, David; nantcontrib-developer@lists.sourceforge.net Subject: Re: [NAntC-Dev] Bugs in Perforce Nant Tasks David, I don't recall who originally contributed the perforce tasks (and I don't have the sources available right now to check). Problem is that I don't have a perforce repository available to test against. Could you review the source code of these tasks, and perhaps provide patches for it ? I'll contact the orignal author and ask him to review your changes. What do you think? Gert - Original Message - From: "Weintraub, David" <[EMAIL PROTECTED]> To: Sent: Tuesday, September 19, 2006 11:54 PM Subject: [NAntC-Dev] Bugs in Perforce Nant Tasks >I am having trouble with some of the Nant Perforce tasks. > > First problem is with "p4change". I am doing this: > > >client="${p4Client}" > port="${p4Port}" > user="${p4User}" > verbose="${isDebug}"/> > > This is attempting to bring up a text file for me to edit which it > shouldn't be doing in the middle of a nant build. > > === > Here's the other problem. > > I manually create a changelist, and put in my description > "test_test_test". Perforce numbers this changelist as 1001: > > Now if I do this: > > > view="${assemblyInfoFile}" > changelist="${p4Changelist}" > client="${p4Client}" > port="${p4Port}" > user="${p4User}" > verbose="${isDebug}" > failonerror="false"/> > > The file ${assemblyInfoFile} is checked out against the changelist 1001 > and not the default changelist. > > And, if I do this: > > > changelist="${p4Changelist}" > client="${p4Client}" > port="${p4Port}" > user="${p4User}" > verbose="${isDebug}"/> > > The submit is done against changelist 1001 and not the default > changelist. > > However, if I do this: > > > changelist="${p4Changelist}" > client="${p4Client}" > port="${p4Port}" > user="${p4User}" > verbose="${isDebug}"/> > > I get the following error: > > [p4revert] Usage: revert [ -a -n -k -c changelist# ] files... > [p4revert] Missing/wrong number of arguments. > > Even worse, If I do this: > > > > view="${assemblyInfoFile}" > changelist="${p4Changelist}" > client="${p4Client}" > port="${p4Port}" > user="${p4User}" > verbose="${isDebug}" > failonerror="false"/> > > Nant creates a new changelist with a description of "1001" instead of > using Changelist #1001! At least this: > > > changelist="${p4Changelist}" > client="${p4Client}" > port="${p4Port}" > user="${p4User}" > verbose="${isDebug}"/> > > Is using the same changelist as my original p4edit task (even its not > the one I specified). > > However, this: > > > changelist="${p4Changelist}" > client="${p4Client}" > port="${p4Port}" >
Re: [NAntC-Dev] Bugs in Perforce Nant Tasks
David, I don't recall who originally contributed the perforce tasks (and I don't have the sources available right now to check). Problem is that I don't have a perforce repository available to test against. Could you review the source code of these tasks, and perhaps provide patches for it ? I'll contact the orignal author and ask him to review your changes. What do you think? Gert - Original Message - From: "Weintraub, David" <[EMAIL PROTECTED]> To: Sent: Tuesday, September 19, 2006 11:54 PM Subject: [NAntC-Dev] Bugs in Perforce Nant Tasks >I am having trouble with some of the Nant Perforce tasks. > > First problem is with "p4change". I am doing this: > > >client="${p4Client}" > port="${p4Port}" > user="${p4User}" > verbose="${isDebug}"/> > > This is attempting to bring up a text file for me to edit which it > shouldn't be doing in the middle of a nant build. > > === > Here's the other problem. > > I manually create a changelist, and put in my description > "test_test_test". Perforce numbers this changelist as 1001: > > Now if I do this: > > > view="${assemblyInfoFile}" > changelist="${p4Changelist}" > client="${p4Client}" > port="${p4Port}" > user="${p4User}" > verbose="${isDebug}" > failonerror="false"/> > > The file ${assemblyInfoFile} is checked out against the changelist 1001 > and not the default changelist. > > And, if I do this: > > > changelist="${p4Changelist}" > client="${p4Client}" > port="${p4Port}" > user="${p4User}" > verbose="${isDebug}"/> > > The submit is done against changelist 1001 and not the default > changelist. > > However, if I do this: > > > changelist="${p4Changelist}" > client="${p4Client}" > port="${p4Port}" > user="${p4User}" > verbose="${isDebug}"/> > > I get the following error: > > [p4revert] Usage: revert [ -a -n -k -c changelist# ] files... > [p4revert] Missing/wrong number of arguments. > > Even worse, If I do this: > > > > view="${assemblyInfoFile}" > changelist="${p4Changelist}" > client="${p4Client}" > port="${p4Port}" > user="${p4User}" > verbose="${isDebug}" > failonerror="false"/> > > Nant creates a new changelist with a description of "1001" instead of > using Changelist #1001! At least this: > > > changelist="${p4Changelist}" > client="${p4Client}" > port="${p4Port}" > user="${p4User}" > verbose="${isDebug}"/> > > Is using the same changelist as my original p4edit task (even its not > the one I specified). > > However, this: > > > changelist="${p4Changelist}" > client="${p4Client}" > port="${p4Port}" > user="${p4User}" > verbose="${isDebug}"/> > > Still gives me the following error: > > [p4revert] Usage: revert [ -a -n -k -c changelist# ] files... > [p4revert] Missing/wrong number of arguments. > > I really don't mind if p4submit, p4edit, and other Perforce Nant tasks > use the Changelist description and not the changelist number. It is also > rather convenient that these tasks seem to create the changelist if one > doesn't already exist with that description. However, the p4revert task > is out of sync with the rest of the Perforce tasks, and the p4change > task is pretty useless. Also, the "p4label" task doesn't work as > documented. In the "p4label" task, you must have a "view" parameter > while the documentation says it is optional. > > - > Take Surveys. Earn Cash. Influence the Future of IT > Join SourceForge.net's Techsay panel and you'll get the chance to share > your > opinions on IT & business topics through brief surveys -- and earn cash > http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV > ___ > NAntContrib-Developer mailing list > NAntContrib-Developer@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/nantcontrib-developer > - Take Surveys. Earn Cash. Influence the Future of IT Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT & business topics through brief surveys -- and earn cash http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV ___ NAntContrib-Developer mailing list NAntContrib-Developer@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/nantcontrib-developer
[NAntC-Dev] Bugs in Perforce Nant Tasks
I am having trouble with some of the Nant Perforce tasks. First problem is with "p4change". I am doing this: This is attempting to bring up a text file for me to edit which it shouldn't be doing in the middle of a nant build. === Here's the other problem. I manually create a changelist, and put in my description "test_test_test". Perforce numbers this changelist as 1001: Now if I do this: The file ${assemblyInfoFile} is checked out against the changelist 1001 and not the default changelist. And, if I do this: The submit is done against changelist 1001 and not the default changelist. However, if I do this: I get the following error: [p4revert] Usage: revert [ -a -n -k -c changelist# ] files... [p4revert] Missing/wrong number of arguments. Even worse, If I do this: Nant creates a new changelist with a description of "1001" instead of using Changelist #1001! At least this: Is using the same changelist as my original p4edit task (even its not the one I specified). However, this: Still gives me the following error: [p4revert] Usage: revert [ -a -n -k -c changelist# ] files... [p4revert] Missing/wrong number of arguments. I really don't mind if p4submit, p4edit, and other Perforce Nant tasks use the Changelist description and not the changelist number. It is also rather convenient that these tasks seem to create the changelist if one doesn't already exist with that description. However, the p4revert task is out of sync with the rest of the Perforce tasks, and the p4change task is pretty useless. Also, the "p4label" task doesn't work as documented. In the "p4label" task, you must have a "view" parameter while the documentation says it is optional. - Take Surveys. Earn Cash. Influence the Future of IT Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT & business topics through brief surveys -- and earn cash http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV ___ NAntContrib-Developer mailing list NAntContrib-Developer@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/nantcontrib-developer