import java.io.*; import java.util.*; import com.perforce.api.*; public class AddAFile { public static void main(String[] argv) { /* Please see the Common.java file to see how the environment is being * set up. This is important, but it is common to all the examples. */ Env env = Common.setup(); /* Create a new change with the environment. The change will not exist on * the server, until the commit() method is called. */ Change chng = new Change(env); try { chng.setDescription("Some Test"); chng.commit(); FileEntry fent = FileEntry.openForAdd(env, "d:\\pubdepot\\guest\\david_markley\\p4package\\build2.xml", chng); chng.resolve(true); } catch (Exception ex) { ex.printStackTrace(); } Utils.cleanUp(); } }
# | Change | User | Description | Committed | |
---|---|---|---|---|---|
#1 | 5093 | Hari Krishna Dara |
Populating perforce branch. I will be adding p4admin files to it. |
||
//public/perforce/api/java/p4package/examples/AddAFile.java | |||||
#1 | 1149 | David Markley | Added more documentation, a few examples, a cleanUp method, and a server timeout threshold. | ||
//guest/david_markley/p4package/examples/AddAFile.java | |||||
#1 | 1148 | David Markley | Added a few examples and a server connection timeout threshold. |