Exemplo n.º 1
0
void cRAI::ClearLogFiles()
{
	for( int t=0; t < 255; t++ )
	{
		RemoveLogFile(GetLogFileSubPath(t));
	}

	RemoveLogFile("log/RAIGlobal_LastGame.log");
	RemoveLogFile("log/TerrainMapDebug.log");
//	RemoveLogFile("log/PathfinderDebug.log");
//	RemoveLogFile("log/PathFinderAPNDebug.log");
//	RemoveLogFile("log/PathFinderNPNDebug.log");
//	RemoveLogFile("log/Prerequisite.log");
//	RemoveLogFile("log/Debug.log");
}
Exemplo n.º 2
0
int ESvn::DoneCommit(int commit) {
    Running = 0;
    // Remove line with link to log
    free(Lines[LineCount-1]->File);
    free(Lines[LineCount-1]->Msg);
    LineCount--;
    UpdateList();

    if (commit) {
        // We need a copy of Command/Directory/OnFiles because RunPipe deletes them!
        char *ACommand = (char *)malloc(strlen(Command) + strlen(LogFile) + 10);
        char *ADirectory = strdup(Directory);
        char *AOnFiles = strdup(OnFiles);
        sprintf(ACommand, "%s -F %s", Command, LogFile);
        int ret = RunPipe(ADirectory, ACommand, AOnFiles);
        free(ACommand);
        free(ADirectory);
        free(AOnFiles);
        // We set Commiting after RunPipe since it sets it to 0
        // This is OK since FTE is not multi-threaded
        Commiting = 1;

        if (ActiveView->Model == SvnLogView) {
            // SvnLogView is currently active, move SvnView just after it
            if (SvnLogView->Next != SvnView) {
                // Need to move, is not at right place yet
                // Here we use the fact that if current model is closed,
                // the one just after it (Next) is focused.
                SvnView->Prev->Next = SvnView->Next;
                SvnView->Next->Prev = SvnView->Prev;
                SvnView->Next = SvnLogView->Next;
                SvnLogView->Next->Prev = SvnView;
                SvnLogView->Next = SvnView;
                SvnView->Prev = SvnLogView;
            }
        }
        // else - SvnLogView is not active, there is need to make SvnView
        // active some other way. However, SwitchToModel() or SelectModel()
        // calls does not work. Currently I don't know how to do this. !!!

        return ret;
    } else {
        RemoveLogFile();
        UpdateList();
        return 0;
    }
}
Exemplo n.º 3
0
int ESvn::RunCommit(char *ADir, char *ACommand, char *AOnFiles) {
    if (!SameDir(Directory, ADir)) FreeLines();

    free(Command);
    free(Directory);
    free(OnFiles);

    Command = strdup(ACommand);
    Directory = strdup(ADir);
    OnFiles = strdup(AOnFiles);

    RemoveLogFile();
    // Disallow any SVN command while commiting
    Running = 1;

    // Create message buffer
    ESvnLog *svnlog = new ESvnLog(0, &ActiveModel, Directory, OnFiles);
    LogFile = strdup(svnlog->FileName);
    View->SwitchToModel(svnlog);

    AddLine(LogFile, -1, "SVN commit start - enter message text", 1);

    return 0;
}
Exemplo n.º 4
0
ESvn::~ESvn() {
    SvnView = 0;
    RemoveLogFile();
}
Exemplo n.º 5
0
ECvs::~ECvs () {
    CvsView=0;
    RemoveLogFile ();
}