Release URBM 2026.06.15.r010
This commit is contained in:
@@ -202,6 +202,17 @@ func (r *Runner) Stats(ctx context.Context, repo model.Repository, mode string)
|
||||
if mode != "" {
|
||||
args = append(args, "--mode", mode)
|
||||
}
|
||||
stats, err := r.stats(ctx, repo, args)
|
||||
if err == nil || !isRepositoryLocked(err) {
|
||||
return stats, err
|
||||
}
|
||||
if unlockErr := r.Unlock(ctx, repo); unlockErr != nil {
|
||||
return Stats{}, fmt.Errorf("repository statistics locked; remove stale lock: %w", unlockErr)
|
||||
}
|
||||
return r.stats(ctx, repo, args)
|
||||
}
|
||||
|
||||
func (r *Runner) stats(ctx context.Context, repo model.Repository, args []string) (Stats, error) {
|
||||
var output []byte
|
||||
if err := r.run(ctx, repo, args, nil, &output); err != nil {
|
||||
return Stats{}, err
|
||||
|
||||
Reference in New Issue
Block a user