Allow all command line arguments to be specificed as an
environment variable. If both the command line argument
and environment variable is present the command line argument
takes precedence.
Signed-off-by: Eric Callahan <arksine.code@gmail.com>
This allows Moonraker to report anomalies detected in an updater
that won't prevent an update. Front ends may decide to present
these to users in a more subtle fashion so they know the state of
the repo without being concerned of an issue.
Signed-off-by: Eric Callahan <arksine.code@gmail.com>
Add a command line option that allows the installation to specify
the exact path to Moonraker's unix domain server socket. The
default location remains at:
<data_path>/comms/moonraker.sock
Signed-off-by: Eric Callahan <arksine.code@gmail.com>
When the parent folder of a web client is a git repo note the specific
directory that contians a .git subdirectory.
Signed-off-by: Eric Callahan <arksine.code@gmail.com>
After performing a recovery attempt to reset to the commit the
repo was at prior to the repo failure.
Signed-off-by: Eric Callahan <arksine.code@gmail.com>
Add a check for shallow repos and move validation logic to the
GitRepo class. Additionally report the real number of commits behind.
Signed-off-by: Eric Callahan <arksine.code@gmail.com>
Use git-config to set track the current Moonraker instance managing a
a git repo. If multiple instances are detected log and create a repo
warning.
Singed-off-by: Eric Callahan <arksine.code@gmail.com>
Submodules contain a .git file that includes the path to the
actual repository folder. Extract that path and use it for
lock file detection.
Signed-off-by: Eric Callahan <arksine.code@gmail.com>
Use git-branch to determine current the current branch and
head state instead of git-status. The former is a porcelain
command with guaranteed output.
Signed-off-by: Eric Callahan <arksine.code@gmail.com>
Streamline the rollback defaults so only one dict object
is explicitly defined in "capture_state_for_rollback()".
Validate the rollback branch on detached heads before
setting it.
Signed-off-by: Eric Callahan <arksine.code@gmail.com>
Use the newly implemented versions utility for git version parsing.
This allows for simple access to version information and
version comparison.
Signed-off-by: Eric Callahan <arksine.code@gmail.com>
The versions module contains classes that can parse
Python and Git versions, providing methods to access
the version details.
Signed-off-by: Eric Callahan <arksine.code@gmail.com>
If a git repo not configured on the dev channel it is necessary
to move the HEAD to the commit for the correct tag.
Signed-off-by: Eric Callahan <arksine.code@gmail.com>
When a client repeatedly makes a request that results in an error
the log is spammed with tracebacks that don't provide significant
value. The method name, code, and error message should be
enough for basic troubleshooting.
Signed-off-by: Eric Callahan <arksine.code@gmail.com>
When logging stderr in realtime omit the program name. It often
does not provide useful context. The program itself can provide
context through its own logging facilities.
Signed-off-by: Eric Callahan <arksine.code@gmail.com>