Search This Blog

Monday, March 9, 2015

List out elements not added to version control from project

This job is used to list all elements not added to tfs(due to tfs) in project.

static void Krishh_projectElementsNotaddedtoTFS(Args _args)
{

    Treenode parentNode,childnode;

    TreenodeIterator rootiterator;
    VersionControl vs;
    ProjectNode  pln,plnproj;
    ProjectListNode list;

    ;
    vs=new VersionControl();
    vs.init();
   
    parentNode = infolog.projectRootNode();
    list=infolog.projectRootNode().AOTfindChild("Private");
   
    rootiterator=list.AOTiterator();
    pln=list.AOTfindChild("Testproject");
    plnproj=pln.loadForInspection();
    rootiterator=plnproj.AOTiterator();
    childnode=rootiterator.next();
   
    while(childnode)
    {
       
       
        if(vs.allowCreate(childnode))
        {
            info(childnode.AOTname());
        }
        childnode=rootiterator.next();
    }
}