// Path: src/org/github/irengrig/fossil4idea/FossilException.java
// public class FossilException extends VcsException {
//   public FossilException(final String message) {
//     super(message);
//   }
// 
//   public FossilException(final Throwable throwable, final boolean isWarning) {
//     super(throwable, isWarning);
//   }
// 
//   public FossilException(final Throwable throwable) {
//     super(throwable);
//   }
// 
//   public FossilException(final String message, final Throwable cause) {
//     super(message, cause);
//   }
// 
//   public FossilException(final String message, final boolean isWarning) {
//     super(message, isWarning);
//   }
// 
//   public FossilException(final Collection<String> messages) {
//     super(messages);
//   }
// }
// 
// Path: src/org/github/irengrig/fossil4idea/FossilVcs.java
// public class FossilVcs extends AbstractVcs {
//   public static String NAME = "fossil";
//   public static String DISPLAY_NAME = "Fossil";
//   private FossilChangeProvider myChangeProvider;
//   private static final VcsKey ourKey = createKey(NAME);
//   private FossilVfsListener myVfsListener;
//   private UiManager uiManager;
//   private FossilCheckinEnvironment fossilCheckinEnvironment;
// 
//   public FossilVcs(Project project) {
//     super(project, NAME);
//   }
// 
//   @Override
//   public String getDisplayName() {
//     return DISPLAY_NAME;
//   }
// 
//   @Override
//   public Configurable getConfigurable() {
//     return new FossilConfigurable(myProject);
//   }
// 
//   @Override
//   protected void activate() {
//     myVfsListener = new FossilVfsListener(myProject);
//     uiManager = new UiManager(myProject);
//   }
// 
//   @Override
//   protected void deactivate() {
//     if (myVfsListener != null) {
//       Disposer.dispose(myVfsListener);
//       myVfsListener = null;
//       uiManager.stop();
//     }
//   }
// 
//   public UiManager getUiManager() {
//     return uiManager;
//   }
// 
//   @Nullable
//   @Override
//   public ChangeProvider getChangeProvider() {
//     if (myChangeProvider == null) {
//       myChangeProvider = new FossilChangeProvider(myProject);
//     }
//     return myChangeProvider;
//   }
// 
//   @Nullable
//   @Override
//   protected CheckinEnvironment createCheckinEnvironment() {
//     if (fossilCheckinEnvironment == null) {
//       fossilCheckinEnvironment = new FossilCheckinEnvironment(this);
//     }
//     return fossilCheckinEnvironment;
//   }
// 
//   @Nullable
//   @Override
//   protected RollbackEnvironment createRollbackEnvironment() {
//     return new FossilRollbackEnvironment(this);
//   }
// 
//   @Nullable
//   @Override
//   public VcsHistoryProvider getVcsHistoryProvider() {
//     return new FossilHistoryProvider(this);
//   }
// 
//   @Nullable
//   @Override
//   protected UpdateEnvironment createUpdateEnvironment() {
//     return new FossilUpdateEnvironment(this);
//   }
// 
//   @Override
//   public List<CommitExecutor> getCommitExecutors() {
//     return Collections.<CommitExecutor>singletonList(new FossilCommitAndPushExecutor(myProject));
//   }
// 
//   public void checkVersion() {
//     //todo
//   }
// 
//   @Nullable
//   @Override
//   public DiffProvider getDiffProvider() {
//     return new FossilDiffProvider(this);
//   }
// 
//   public static FossilVcs getInstance(final Project project) {
//     return (FossilVcs) ProjectLevelVcsManager.getInstance(project).findVcsByName(NAME);
//   }
// 
//   public static VcsKey getVcsKey() {
//     return ourKey;
//   }
// 
//   @Nullable
//   @Override
//   public AnnotationProvider getAnnotationProvider() {
//     return new FossilAnnotationProvider(this);
//   }
// }


import com.intellij.execution.process.ProcessOutputTypes;
import com.intellij.openapi.diagnostic.Logger;
import com.intellij.openapi.project.Project;
import com.intellij.openapi.util.Key;
import com.intellij.openapi.vcs.ProcessEventListener;
import com.intellij.openapi.vcs.VcsException;
import org.github.irengrig.fossil4idea.FossilException;
import org.jetbrains.annotations.NotNull;
import org.github.irengrig.fossil4idea.FossilVcs;
import java.io.File;
import java.io.IOException;
import java.io.OutputStream;
import java.util.HashSet;
import java.util.Set;
              msg = "Fossil process exited with error code: " + exitCode;
            }
            LOG.info(myCommandLine.getCommandLineString() + " >>\n" + msg);
            System.out.println(myCommandLine.getCommandLineString() + " >>\n" + msg);
            ex[0] = new VcsException(msg);
          }
        }
        catch (Throwable t) {
          ex[0] = new VcsException(t.toString(), t);
        }
      }

      private boolean skipError(String s) {
        if (s == null || s.isEmpty()) return false;
        for (String error : mySkipErrors) {
          if (s.contains(error) || s.toLowerCase().contains(error.toLowerCase())) return true;
        }
        return false;
      }

      @Override
      public void startFailed(Throwable exception) {
        ex[0] = new VcsException("Process failed to start (" + myCommandLine.getCommandLineString() + "): " + exception.toString(), exception);
      }
    });
    start();
    if (myProcess != null) {
      waitFor();
    }
    if (ex[0] != null) {
// Path: src/org/github/irengrig/fossil4idea/FossilException.java
// public class FossilException extends VcsException {
//   public FossilException(final String message) {
//     super(message);
//   }
// 
//   public FossilException(final Throwable throwable, final boolean isWarning) {
//     super(throwable, isWarning);
//   }
// 
//   public FossilException(final Throwable throwable) {
//     super(throwable);
//   }
// 
//   public FossilException(final String message, final Throwable cause) {
//     super(message, cause);
//   }
// 
//   public FossilException(final String message, final boolean isWarning) {
//     super(message, isWarning);
//   }
// 
//   public FossilException(final Collection<String> messages) {
//     super(messages);
//   }
// }
// 
// Path: src/org/github/irengrig/fossil4idea/FossilVcs.java
// public class FossilVcs extends AbstractVcs {
//   public static String NAME = "fossil";
//   public static String DISPLAY_NAME = "Fossil";
//   private FossilChangeProvider myChangeProvider;
//   private static final VcsKey ourKey = createKey(NAME);
//   private FossilVfsListener myVfsListener;
//   private UiManager uiManager;
//   private FossilCheckinEnvironment fossilCheckinEnvironment;
// 
//   public FossilVcs(Project project) {
//     super(project, NAME);
//   }
// 
//   @Override
//   public String getDisplayName() {
//     return DISPLAY_NAME;
//   }
// 
//   @Override
//   public Configurable getConfigurable() {
//     return new FossilConfigurable(myProject);
//   }
// 
//   @Override
//   protected void activate() {
//     myVfsListener = new FossilVfsListener(myProject);
//     uiManager = new UiManager(myProject);
//   }
// 
//   @Override
//   protected void deactivate() {
//     if (myVfsListener != null) {
//       Disposer.dispose(myVfsListener);
//       myVfsListener = null;
//       uiManager.stop();
//     }
//   }
// 
//   public UiManager getUiManager() {
//     return uiManager;
//   }
// 
//   @Nullable
//   @Override
//   public ChangeProvider getChangeProvider() {
//     if (myChangeProvider == null) {
//       myChangeProvider = new FossilChangeProvider(myProject);
//     }
//     return myChangeProvider;
//   }
// 
//   @Nullable
//   @Override
//   protected CheckinEnvironment createCheckinEnvironment() {
//     if (fossilCheckinEnvironment == null) {
//       fossilCheckinEnvironment = new FossilCheckinEnvironment(this);
//     }
//     return fossilCheckinEnvironment;
//   }
// 
//   @Nullable
//   @Override
//   protected RollbackEnvironment createRollbackEnvironment() {
//     return new FossilRollbackEnvironment(this);
//   }
// 
//   @Nullable
//   @Override
//   public VcsHistoryProvider getVcsHistoryProvider() {
//     return new FossilHistoryProvider(this);
//   }
// 
//   @Nullable
//   @Override
//   protected UpdateEnvironment createUpdateEnvironment() {
//     return new FossilUpdateEnvironment(this);
//   }
// 
//   @Override
//   public List<CommitExecutor> getCommitExecutors() {
//     return Collections.<CommitExecutor>singletonList(new FossilCommitAndPushExecutor(myProject));
//   }
// 
//   public void checkVersion() {
//     //todo
//   }
// 
//   @Nullable
//   @Override
//   public DiffProvider getDiffProvider() {
//     return new FossilDiffProvider(this);
//   }
// 
//   public static FossilVcs getInstance(final Project project) {
//     return (FossilVcs) ProjectLevelVcsManager.getInstance(project).findVcsByName(NAME);
//   }
// 
//   public static VcsKey getVcsKey() {
//     return ourKey;
//   }
// 
//   @Nullable
//   @Override
//   public AnnotationProvider getAnnotationProvider() {
//     return new FossilAnnotationProvider(this);
//   }
// }


// Path: src/org/github/irengrig/fossil4idea/commandLine/FossilSimpleCommand.java
import com.intellij.execution.process.ProcessOutputTypes;
import com.intellij.openapi.diagnostic.Logger;
import com.intellij.openapi.project.Project;
import com.intellij.openapi.util.Key;
import com.intellij.openapi.vcs.ProcessEventListener;
import com.intellij.openapi.vcs.VcsException;
import org.github.irengrig.fossil4idea.FossilException;
import org.jetbrains.annotations.NotNull;
import org.github.irengrig.fossil4idea.FossilVcs;
import java.io.File;
import java.io.IOException;
import java.io.OutputStream;
import java.util.HashSet;
import java.util.Set;

              msg = "Fossil process exited with error code: " + exitCode;
            }
            LOG.info(myCommandLine.getCommandLineString() + " >>\n" + msg);
            System.out.println(myCommandLine.getCommandLineString() + " >>\n" + msg);
            ex[0] = new VcsException(msg);
          }
        }
        catch (Throwable t) {
          ex[0] = new VcsException(t.toString(), t);
        }
      }

      private boolean skipError(String s) {
        if (s == null || s.isEmpty()) return false;
        for (String error : mySkipErrors) {
          if (s.contains(error) || s.toLowerCase().contains(error.toLowerCase())) return true;
        }
        return false;
      }

      @Override
      public void startFailed(Throwable exception) {
        ex[0] = new VcsException("Process failed to start (" + myCommandLine.getCommandLineString() + "): " + exception.toString(), exception);
      }
    });
    start();
    if (myProcess != null) {
      waitFor();
    }
    if (ex[0] != null) {
      FossilVcs.getInstance(myProject).checkVersion();