Skip to content

Commit ced126b

Browse files
committed
Progress: show repo url and branch name #23
1 parent e765fce commit ced126b

File tree

3 files changed

+6
-4
lines changed

3 files changed

+6
-4
lines changed

src/main/java/org/scm4j/releaser/SCMReleaser.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -63,6 +63,7 @@ public IAction getActionTree(Component comp, ActionKind actionKind, Map<String,
6363
bs = getBuildStatus(rb);
6464
} else {
6565
// If we are build, build_mdeps or actualize_patches then we need to use mdeps from release branches to show what versions we are going to build or actualize
66+
progress.startTrace(String.format("analyzing %s, url %s:\r\n", comp, comp.getVcsRepository().getUrl()));
6667
progress.startTrace("determining release branch version for " + comp.getCoordsNoComment() + "... ");
6768
rb = new ReleaseBranch(comp);
6869
progress.endTrace("done");

src/main/java/org/scm4j/releaser/actions/PrintAction.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ public class PrintAction {
1010
private int level = 0;
1111

1212
public void print(PrintStream ps, IAction rootAction){
13-
ps.println(Strings.repeat("\t", level) + rootAction.toString());
13+
ps.println(Strings.repeat("\t", level) + rootAction.toStringAction());
1414
level++;
1515
for (IAction currentAction : rootAction.getChildActions()) {
1616
print(ps, currentAction);

src/main/java/org/scm4j/releaser/scmactions/SCMActionRelease.java

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -65,13 +65,14 @@ protected void executeAction(IProgress progress) {
6565

6666
@Override
6767
public String toStringAction() {
68-
return (getProcs().isEmpty() && getBsFrom() != BuildStatus.DONE ? "skip " : "" ) + getBsFrom() + (getBsTo() != null && getBsTo() != getBsFrom() ? " -> " + getBsTo() : "") + " " + comp.getCoords().toString()
69-
+ ", target version: " + targetRB.getVersion().toString();
68+
String skipStr = getProcs().isEmpty() && getBsFrom() != BuildStatus.DONE ? "skip " : "";
69+
String bsToStr = getBsTo() != null && getBsTo() != getBsFrom() ? " -> " + getBsTo() : "";
70+
return String.format("%s%s%s %s, target version %s, target branch: %s", skipStr, getBsFrom(), bsToStr , comp.getCoords(), targetRB.getVersion(), targetRB.getName());
7071
}
7172

7273
@Override
7374
public String toString() {
74-
return getBsFrom() + " " + comp.getCoords().toString() + ", target version: " + targetRB.getVersion().toString();
75+
return String.format("%s %s, target version: %s", getBsFrom(), comp.getCoords(), targetRB.getVersion());
7576
}
7677

7778
public BuildStatus getBsFrom() {

0 commit comments

Comments
 (0)