0: source control system wakatime

Build a distributed source control system in the style of Git. It should be possible to initialise a repository in a directory and the repository proper should be stored in a dot-prefixed subdirectory. There should be support for staging files (git add) and committing them. There should be a way to view the commit history, to create branches, merge and do diffs between them. Conflicting changes should be detected but there's no need to build resolution features for them, or anything like rebasing. It should also be possible to clone the repository (on disk—it doesn't have to work over network). Finally, there should be a way to ignore files.

Design Patterns

  • Commands have been done with the Command Design Pattern
  • The inputs parsed into a Command Facade running a list of commands with the Facade pattern

Documentation generation

    dart doc

Run documentation locally

    dart doc/doc_server.dart

Code generation

  dart run build_runner build --delete-conflicting-outputs

Test

Test in isolation

  dart run test --concurrency=1

Build

For Windows:

  dart compile exe bin/balo.dart -o build/windows/balo.exe --target-os=windows

For macOS:

  dart compile exe bin/balo.dart -o build/macos/balo --target-os=macos

For Linux:

  dart compile exe bin/balo.dart -o build/linux/balo --target-os=linux

Running

Dart

  dart run bin/balo.dart

Binary

For Windows:

  ./build/windows/balo

For macOS:

  ./build/macos/balo

For Linux:

   ./build/linux/balo

Installing Options

For dart

    dart pub global activate --source path .

For Windows:

  • Copy to System32
  copy .\build\windows\balo.exe C:\Windows\System32\balo.exe
  • Create symlink to System32
  mklink C:\Windows\System32\balo.exe .\build\windows\balo.exe 

For macOS:

  • Copy to local bin directory
  sudo cp ./build/macos/balo /usr/local/bin/balo && sudo chmod +x /usr/local/bin/balo
  • Create symlink to local bin directory
  sudo ln -s ./build/macos/balo /usr/local/bin/balo 

For Linux:

  • Copy to local bin directory
   sudo cp ./build/linux/balo /usr/local/bin
  • Create symlink to local bin directory
    sudo ln -s ./build/linux/balo /usr/local/bin/balo