Skip to content

Commit

Permalink
Merge pull request #93 from yodamad/dev
Browse files Browse the repository at this point in the history
v1.18.1
  • Loading branch information
yodamad authored Feb 22, 2020
2 parents f8d6f9a + 3b0d84f commit 2a5fd78
Show file tree
Hide file tree
Showing 5 changed files with 12 additions and 7 deletions.
2 changes: 1 addition & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

<groupId>fr.yodamad.svn2git</groupId>
<artifactId>svn-2-git</artifactId>
<version>1.18</version>
<version>1.18.1</version>
<packaging>jar</packaging>
<name>Svn 2 GitLab</name>

Expand Down
2 changes: 2 additions & 0 deletions src/main/java/fr/yodamad/svn2git/service/Cleaner.java
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,8 @@ public Cleaner(final HistoryManager historyManager, final MigrationRemovedFileRe
*/
private static boolean isForbiddenExtension(WorkUnit workUnit, Path path) {

if (workUnit.migration.getForbiddenFileExtensions() == null) return false;

List<String> extensions = Arrays.stream(workUnit.migration.getForbiddenFileExtensions().
split(",")).map(String::toLowerCase).collect(Collectors.toList());

Expand Down
9 changes: 6 additions & 3 deletions src/main/java/fr/yodamad/svn2git/service/HistoryManager.java
Original file line number Diff line number Diff line change
Expand Up @@ -63,9 +63,12 @@ public void endStep(MigrationHistory history, StatusEnum status, String data) {
history.setStatus(status);
if (data != null) history.setData(data);

// Compute executionTime
Long execution = Instant.now().toEpochMilli() - history.getStartTime().toEpochMilli();
history.setExecutionTime(DateFormatter.toNiceFormat(execution));
if (history.getStartTime() == null) { history.setExecutionTime("N/A"); }
else {
// Compute executionTime
Long execution = Instant.now().toEpochMilli() - history.getStartTime().toEpochMilli();
history.setExecutionTime(DateFormatter.toNiceFormat(execution));
}

migrationHistoryRepository.save(history);
LOG.info(format("Finish step %s with status %s in %s", history.getStep(), status, history.getExecutionTime()));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -297,7 +297,7 @@ public void startMigration(final long migrationId, final boolean retry) {

gitCommand = "git add README.md";
execCommand(commandManager, workUnit.directory, gitCommand);
gitCommand = "git commit -m \"Add generated README.md\"";
gitCommand = "git commit -m \"📃 Add generated README.md\"";
execCommand(commandManager, workUnit.directory, gitCommand);
gitCommand = format("%s --set-upstream origin master", GIT_PUSH);
execCommand(commandManager, workUnit.directory, gitCommand);
Expand Down
4 changes: 2 additions & 2 deletions src/main/resources/config/application.yml
Original file line number Diff line number Diff line change
Expand Up @@ -141,8 +141,8 @@ application:
uploadPauseMilliSeconds: 5000
gitlab:
url: http://localhost/
account: TO_REPLACE
token: TO_REPLACE
account: root
token: 1uCYVVdwB32yCy4sB-2w
credentials: optional
waitSeconds: 15
dynamic-local-config[0]: pack.deltaCacheSize 256m,Limiting deltaCacheSize to 256m (default)
Expand Down

0 comments on commit 2a5fd78

Please sign in to comment.