Skip to content

Instantly share code, notes, and snippets.

Avatar

Semyon Vadishev vs

  • TMate Software s.r.o.
  • Prague, Czech Republic
View GitHub Profile
@vs
vs / subgit.groovy
Created Feb 12, 2014
GitBlit pre-receive hook for enabling Git-SVN mirror via SubGit http://subgit.com
View subgit.groovy
/*
* Copyright 2014 TMate Software <support@subgit.com>
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
@vs
vs / map.txt
Created Nov 6, 2013
git show refs/svn/map
View map.txt
$ git show refs/svn/map
commit 4c38fadd79139a1e33d9f5137d6bbc7425d32444
Author: subgit <support@subgit.com>
Date: Wed Nov 6 15:36:32 2013 +0100
diff --git a/01/983ff01676698650e2b9c427be39c1d7da5ba6 b/01/983ff01676698650e2b9c427be39c1d7da5ba6
new file mode 100644
index 0000000..7685172
--- /dev/null
+++ b/01/983ff01676698650e2b9c427be39c1d7da5ba6
View LargeFilesScanner.java
package org.tmatesoft.translator.client;
import java.io.File;
import java.io.IOException;
import java.text.SimpleDateFormat;
import java.util.ArrayList;
import java.util.Date;
import java.util.List;
import java.util.TimeZone;
import java.util.regex.Pattern;
@vs
vs / Snippet.java
Created Dec 11, 2012
JavaHL: Creating FSFS repository with a whitespace in its name
View Snippet.java
final File tmpDir = new File(System.getProperty("java.io.tmpdir", "/tmp"));
final File repoRoot = new File(tmpDir, "repo with space");
final String url = SVNURL.fromFile(repoRoot).toDecodedString();
final File wcRoot = new File(tmpDir, "wc");
SVNAdmin admin = new SVNAdmin();
admin.create(repoRoot.getAbsolutePath(), true, true, null, SVNAdmin.FSFS);
SVNClientInterface client = SVNClientImpl.newInstance();
client.checkout(url,
@vs
vs / MkDir.java
Created Aug 30, 2011
SVNKit: svn mkdir ^/tags/test
View MkDir.java
package org.tmatesoft.svn.core.javahl;
import org.tmatesoft.svn.core.*;
import org.tmatesoft.svn.core.internal.io.fs.*;
import org.tmatesoft.svn.core.wc.*;
public class MkDir {
public static void main(String[] args) throws SVNException {
FSRepositoryFactory.setup();
@vs
vs / SvnExportAction.java
Created May 20, 2011
SVNKit API: adjusting HTTP connection timeout
View SvnExportAction.java
package org.tmatesoft.svn.util;
import java.io.File;
import java.util.Collection;
import org.tmatesoft.svn.core.SVNDepth;
import org.tmatesoft.svn.core.SVNException;
import org.tmatesoft.svn.core.SVNURL;
import org.tmatesoft.svn.core.auth.SVNAuthentication;
import org.tmatesoft.svn.core.internal.wc.DefaultSVNAuthenticationManager;
@vs
vs / Test2.java
Created Feb 16, 2011
Reading SVN password authentication cache.
View Test2.java
package org.tmatesoft.svn.util;
import java.io.File;
import org.tmatesoft.svn.core.SVNException;
import org.tmatesoft.svn.core.SVNProperties;
import org.tmatesoft.svn.core.SVNPropertyValue;
import org.tmatesoft.svn.core.internal.wc.SVNFileListUtil;
import org.tmatesoft.svn.core.internal.wc.SVNWCProperties;
import org.tmatesoft.svn.core.wc.SVNWCUtil;
@vs
vs / Test.java
Created Feb 16, 2011
SVNKit API to work with ~/.subversion/ configuration area.
View Test.java
package org.tmatesoft.svn.util;
import java.io.File;
import java.util.Arrays;
import org.tmatesoft.svn.core.SVNException;
import org.tmatesoft.svn.core.SVNURL;
import org.tmatesoft.svn.core.internal.wc.DefaultSVNAuthenticationManager;
import org.tmatesoft.svn.core.internal.wc.DefaultSVNHostOptionsProvider;
import org.tmatesoft.svn.core.internal.wc.DefaultSVNOptions;
@vs
vs / Test.groovy
Created Nov 22, 2010
Test notation
View Test.groovy
class GsTest {
static {
File.metaClass.div = { path ->
new File(delegate.toString(), path.toString())
}
GsSvnUrl.metaClass.div = { path ->
delegate.appendPath(path.toString())
}
@vs
vs / ScenarioNotation.groovy
Created Nov 19, 2010
Proposed syntax for functional tests
View ScenarioNotation.groovy
class Scenario {
@Delegate ShellEnvironment env
def svn
def git
GsSvnUrl repo = sandbox.svnRepoRoot
GsSvnUrl trunk = sandbox.trunk;
GsSvnUrl branch = sandbox.getBranch('branch')