Example #1
0
ECvsDiff::ECvsDiff (int createFlags,EModel **ARoot,char *ADir,char *ACommand,char *AOnFiles):ECvsBase (createFlags,ARoot,"CVS diff") {
    CvsDiffView=this;
    CurrFile=0;
    CurrLine=0;
    ToLine=0;
    InToFile=0;
    RunPipe (ADir,ACommand,AOnFiles);
}
Example #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;
    }
}
Example #3
0
int ProcessList (struct data * d)
{
	int status = COMMAND_OK;
	struct lexem * l;
	l = PopCom (d->list);
	if (l == NULL)
		return RUN_ERROR;
	switch (l->grp)
	{
		case CONDITIONS_AND:
			status = RunAnd (d);
			break;
		case CONDITIONS_OR:
			status = RunOr (d);
			break;
		case SEPARATOR:
			status = RunSerial (d);
			break;
		case AMPERSAND:
			status = RunBackground (d);
			break;
		case SEMICOLON:
			status = ProcessList (d);
			break;
		case PIPE:
			status = RunPipe (d);
			break;
		case COMMAND:
			d->l = l;
			status = RunCommand (d);
			break;
		default:
			status = RUN_ERROR;
	}
	DelLexem (l);
	return status;
}
Example #4
0
ESvn::ESvn(int createFlags, EModel **ARoot, char *ADir, char *ACommand, char *AOnFiles): ESvnBase(createFlags, ARoot, "SVN") {
    SvnView = this;
    LogFile = 0;
    Commiting = 0;
    RunPipe(ADir, ACommand, AOnFiles);
}
Example #5
0
ECvs::ECvs (int createFlags,EModel **ARoot,char *ADir,char *ACommand,char *AOnFiles):ECvsBase (createFlags,ARoot,"CVS") {
    CvsView=this;
    LogFile=0;
    Commiting=0;
    RunPipe (ADir,ACommand,AOnFiles);
}