[p4python] can't seem to pass a changeList # as an argument to p4c.run_add()

John Burk jburk at radical.ca
Mon Aug 15 13:33:47 PDT 2005


Python: ActivePython 2.4.1 Build 247
p4Python: P4Python-0.6.win32-py2.4.exe

I can successfully open files for add to the default changeList, but I'm
unable to open them for add to a specific changeList.


	  cLNum = newChangeList( p4Session,
				 "adding new empty files to game at " +
gameRoot )

        for f in newFiles:
            cmdArgs = '-c' + cLNum + ' ' + f
            print "cmdArgs: " cmdArgs
            try:
                cmdResult = p4Session.run_add( f )
                print cmdResult
            except p4.P4Error:
                for e in p4Session.errors:



All well and good, here's the output from the above:

	cmdArgs: -c 119
c:\p4\uds\art\game\locations\global\ftree\empty_file
	['//uds/art/game/locations/global/ftree/empty_file#1 - opened
for add']


But if I try and run:

      cmdResult = p4Session.run_add( cmdArgs )

I get:

	cmdArgs:-c 124
c:\p4\uds\art\game\locations\global\ftree\empty_file
	Usage: add/edit/delete [-c changelist#] [ -f ] [-t type]
files...
	Missing/wrong number of arguments.

ChangeList #124 does indeed exist:

	C:\P4\uds>p4 describe 124
	Change 124 by jburk at jburk-atgPC on 2005/08/15 13:25:05 *pending*

        adding new empty files to game at c:\p4\uds

	Affected files ...



Any ideas?

John Burk






More information about the p4python mailing list