mirror of
https://github.com/scm-manager/scm-manager.git
synced 2026-05-07 03:26:32 +02:00
Show messages from native scm protocol
This commit is contained in:
@@ -37,6 +37,8 @@ import sonia.scm.repository.api.BranchRequest;
|
||||
import sonia.scm.repository.work.WorkingCopy;
|
||||
import sonia.scm.user.User;
|
||||
|
||||
import java.io.IOException;
|
||||
|
||||
/**
|
||||
* Mercurial implementation of the {@link BranchCommand}.
|
||||
* Note that this creates an empty commit to "persist" the new branch.
|
||||
@@ -106,9 +108,8 @@ public class HgBranchCommand extends AbstractCommand implements BranchCommand {
|
||||
PullCommand pullCommand = PullCommand.on(workingCopy.getCentralRepository());
|
||||
workingCopyFactory.configure(pullCommand);
|
||||
pullCommand.execute(workingCopy.getDirectory().getAbsolutePath());
|
||||
} catch (Exception e) {
|
||||
// TODO handle failed update
|
||||
throw new IntegrateChangesFromWorkdirException(getRepository(),
|
||||
} catch (IOException e) {
|
||||
throw new InternalRepositoryException(getRepository(),
|
||||
String.format("Could not pull changes '%s' into central repository", branch),
|
||||
e);
|
||||
}
|
||||
|
||||
@@ -114,8 +114,10 @@ public class HgModifyCommand implements ModifyCommand {
|
||||
com.aragost.javahg.commands.PullCommand pullCommand = PullCommand.on(workingCopy.getCentralRepository());
|
||||
workingCopyFactory.configure(pullCommand);
|
||||
return pullCommand.execute(workingCopy.getDirectory().getAbsolutePath());
|
||||
} catch (Exception e) {
|
||||
throw new IntegrateChangesFromWorkdirException(context.getScmRepository(),
|
||||
} catch (ExecutionException e) {
|
||||
throw IntegrateChangesFromWorkdirException.forMessage(context.getScmRepository(), e.getMessage());
|
||||
} catch (IOException e) {
|
||||
throw new InternalRepositoryException(context.getScmRepository(),
|
||||
String.format("Could not pull modify changes from working copy to central repository for branch %s", request.getBranch()),
|
||||
e);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user