5 messages in com.perforce.p4ruby[p4ruby] changelist # retrieval| From | Sent On | Attachments |
|---|---|---|
| Andy Koch | 06 Feb 2007 11:08 | |
| Jeff A. Bowles | 06 Feb 2007 13:54 | |
| Chuck Emary | 07 Feb 2007 10:15 | |
| Andy Koch | 07 Feb 2007 10:17 | |
| Robert Cowham | 07 Feb 2007 14:31 |
| Subject: | [p4ruby] changelist # retrieval![]() |
|---|---|
| From: | Chuck Emary (chuc...@Configuresoft.com) |
| Date: | 02/07/2007 10:15:36 AM |
| List: | com.perforce.p4ruby |
You must first create the changelist. As a note the 2006.2 version of the server now supports a submit option that allows a one liner. Very cool.
-----Original Message----- From: p4ru...@perforce.com [mailto:p4ruby-bounces at perforce.com] On Behalf Of Andy Koch Sent: Tuesday, February 06, 2007 12:08 PM To: p4ruby at perforce.com Subject: [p4ruby] changelist # retrieval
Greetings p4ruby list,
I'm new to using p4ruby but my project is substantial so I'm excited to have this tool available.
Currently working on getting a basic understanding of how to work with p4ruby, so my examples are contrived. My code is also purposely verbose
as I hack about testing different things.
I'm trying to work out adding, editing, etc. files. I've gleaned some information from the documentation but I can't seem get how one retrieves the number of a new changelist. Here is my code...
require 'P4' p4 = P4.new p4.debug=3 p4.tagged p4.parse_forms
p4.connect p4.run_login
change = p4.run_change( "-o" ).shift change[ "Description" ] = "adding new files"
p4.run_add('C:\ruby_chips\test.rb') change.each {|k,v| printf "%-14s = %-40.50s\n", k, v}
p4.input( change ) p4.run_submit( "-i" )
p4.disconnect
This results in creating an empty changelist while the file I'm trying to add ends up in the default changelist.
I'm guessing that I want to change...
p4.run_add('C:\ruby_chips\test.rb')
into...
p4.run_add('C:\ruby_chips\test.rb -c <changelist #>')
but where/how to get the changelist #?
Regards,
-- Andy Koch
_______________________________________________ p4ruby mailing list p4ruby at perforce.com http://maillist.perforce.com/mailman/listinfo/p4ruby




