Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

View vs's full-sized avatar

Semyon Vadishev vs

View GitHub Profile
@vs
vs / ScenarioNotation.groovy
Created November 19, 2010 17:27
Proposed syntax for functional tests
class Scenario {
@Delegate ShellEnvironment env
def svn
def git
GsSvnUrl repo = sandbox.svnRepoRoot
GsSvnUrl trunk = sandbox.trunk;
GsSvnUrl branch = sandbox.getBranch('branch')
@vs
vs / Test.groovy
Created November 22, 2010 18:22
Test notation
class GsTest {
static {
File.metaClass.div = { path ->
new File(delegate.toString(), path.toString())
}
GsSvnUrl.metaClass.div = { path ->
delegate.appendPath(path.toString())
}
@vs
vs / Test2.java
Created February 16, 2011 13:21
Reading SVN password authentication cache.
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 February 16, 2011 13:04
SVNKit API to work with ~/.subversion/ configuration area.
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 / SvnExportAction.java
Created May 20, 2011 13:21
SVNKit API: adjusting HTTP connection timeout
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 / MkDir.java
Created August 30, 2011 18:48
SVNKit: svn mkdir ^/tags/test
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 / Snippet.java
Created December 11, 2012 00:43
JavaHL: Creating FSFS repository with a whitespace in its name
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,
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 / map.txt
Created November 6, 2013 14:50
git show refs/svn/map
$ 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
@vs
vs / subgit.groovy
Created February 12, 2014 17:57
GitBlit pre-receive hook for enabling Git-SVN mirror via SubGit http://subgit.com
/*
* 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