( ctx context.Context, revranges []string, pathspecs []string, filters cmd.LogFilters, )
| 115 | } |
| 116 | |
| 117 | func RevList( |
| 118 | ctx context.Context, |
| 119 | revranges []string, |
| 120 | pathspecs []string, |
| 121 | filters cmd.LogFilters, |
| 122 | ) (_ []string, err error) { |
| 123 | defer func() { |
| 124 | if err != nil { |
| 125 | err = fmt.Errorf("error getting full rev list: %w", err) |
| 126 | } |
| 127 | }() |
| 128 | |
| 129 | revs := []string{} |
| 130 | |
| 131 | subprocess, err := cmd.RunRevList(ctx, revranges, pathspecs, filters) |
| 132 | if err != nil { |
| 133 | return revs, err |
| 134 | } |
| 135 | |
| 136 | lines, finish := subprocess.StdoutLines() |
| 137 | for line := range lines { |
| 138 | revs = append(revs, line) |
| 139 | } |
| 140 | |
| 141 | err = finish() |
| 142 | if err != nil { |
| 143 | return revs, err |
| 144 | } |
| 145 | |
| 146 | err = subprocess.Wait() |
| 147 | if err != nil { |
| 148 | return revs, err |
| 149 | } |
| 150 | |
| 151 | return revs, nil |
| 152 | } |
| 153 | |
| 154 | func GetRoot() (_ string, err error) { |
| 155 | defer func() { |
no test coverage detected