mirror of
https://github.com/scm-manager/scm-manager.git
synced 2026-03-07 21:00:54 +01:00
Document SimpleGitWorkingCopyFactory
This commit is contained in:
@@ -21,7 +21,7 @@
|
||||
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||
* SOFTWARE.
|
||||
*/
|
||||
|
||||
|
||||
package sonia.scm.repository.spi;
|
||||
|
||||
//~--- non-JDK imports --------------------------------------------------------
|
||||
@@ -42,12 +42,13 @@ import java.io.File;
|
||||
import java.io.IOException;
|
||||
import java.util.Map;
|
||||
import java.util.function.BiConsumer;
|
||||
import java.util.function.Supplier;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author Sebastian Sdorra
|
||||
*/
|
||||
public class HgCommandContext implements Closeable
|
||||
public class HgCommandContext implements Closeable, Supplier<sonia.scm.repository.Repository>
|
||||
{
|
||||
|
||||
/** Field description */
|
||||
@@ -155,6 +156,11 @@ public class HgCommandContext implements Closeable
|
||||
return scmRepository;
|
||||
}
|
||||
|
||||
@Override
|
||||
public sonia.scm.repository.Repository get() {
|
||||
return getScmRepository();
|
||||
}
|
||||
|
||||
//~--- fields ---------------------------------------------------------------
|
||||
|
||||
/** Field description */
|
||||
|
||||
@@ -104,15 +104,10 @@ public class SimpleHgWorkingCopyFactory extends SimpleWorkingCopyFactory<Reposit
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void closeWorkingCopyInternal(Repository workingCopy) throws Exception {
|
||||
protected void closeWorkingCopy(Repository workingCopy) throws Exception {
|
||||
workingCopy.close();
|
||||
}
|
||||
|
||||
@Override
|
||||
protected sonia.scm.repository.Repository getScmRepository(HgCommandContext context) {
|
||||
return context.getScmRepository();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void configure(PullCommand pullCommand) {
|
||||
pullCommand.cmdAppend("--config", "hooks.changegroup.scm=python:scmhooks.postHook");
|
||||
|
||||
Reference in New Issue
Block a user