diff --git a/HISTORY.txt b/HISTORY.txt index dfca9b8..2ba6a7b 100644 --- a/HISTORY.txt +++ b/HISTORY.txt @@ -1,6 +1,10 @@ 0.9 - Unreleased ---------------- +* Fix the handling when switching to a svn branch that git already has + a local branch for. + [rossp] + 0.8 - 2010-03-10 ---------------- diff --git a/README.txt b/README.rst similarity index 100% rename from README.txt rename to README.rst diff --git a/gitsvnhelpers/gitify.py b/gitsvnhelpers/gitify.py index 173f077..18610b7 100755 --- a/gitsvnhelpers/gitify.py +++ b/gitsvnhelpers/gitify.py @@ -68,8 +68,8 @@ def __call__(self): # perform all index updates in the cache to avoid conflicts os.chdir(config.GIT_CACHE + package_name) - dummy, existing_branches = popen('git b', False, False) - existing_branches = [b.strip() for b in existing_branches] + dummy, existing_branches = popen('git branch', False, False) + existing_branches = [b.strip('* ') for b in existing_branches] if local_branch in existing_branches: popen('git checkout -f %s' % local_branch, False, False) else: @@ -83,10 +83,13 @@ def __call__(self): # if the working copy is on another branch, switch: if local_branch != git_branch(): if local_branch in existing_branches: - popen('git checkout %s' % local_branch) + popen('git checkout -f %s' % local_branch) else: popen('git checkout -b %s' % local_branch) + assert git_branch() == local_branch, ( + "Changing branches failed, is on %r but should be on %r" + % (git_branch(), local_branch)) print "Git branch '%s' is now following svn branch '%s':" % ( local_branch, remote_branch) popen('svn status') diff --git a/gitsvnhelpers/testing.py b/gitsvnhelpers/testing.py index af0b075..e705f48 100644 --- a/gitsvnhelpers/testing.py +++ b/gitsvnhelpers/testing.py @@ -1,17 +1,16 @@ -import shutil import sys import os import StringIO -from os.path import join, dirname +from os.path import join +import subprocess + from jarn.mkrelease.testing import SubversionSetup, JailSetup, GitSetup -from jarn.mkrelease.process import Process from gitsvnhelpers import config class BaseTestCase(SubversionSetup): name = 'svn' - source = 'testrepo.svn' packagename = 'testpackage' def setUp(self): @@ -20,26 +19,66 @@ def setUp(self): config.GIT_CACHE = join(self.tempdir, '.gitcache/') # copy the test repo to temp, we perform all checkouts from there: try: - original_repo = join(dirname(__file__), 'tests', self.source) # the target folder needs to be the packagename, so that the # file:/// urls used throughout testing match the pacakge name # normally, the filesystem name doesn't matter, when it's being # served via http - os.mkdir("%s/repos/" % self.tempdir) + os.mkdir(join(self.tempdir, "repos")) self.repo = join(self.tempdir, 'repos', self.packagename) - shutil.copytree(original_repo, self.repo) + subprocess.check_call(["svnadmin", "create", self.repo]) + subprocess.check_call( + ["svn", "mkdir", "-m", "repo layout"] + +["file://%s/%s" % (self.repo, folder) + for folder in ('trunk', 'branches', 'tags')], + stdout=subprocess.PIPE) + + self.checkout(target="setUp") + open('README.txt', 'w').write("Package documentation\n") + subprocess.check_call(["svn", "add", "README.txt"], + stdout=subprocess.PIPE) + subprocess.check_call(["svn", "commit", "-m", "Begin docs"], + stdout=subprocess.PIPE) + + open('foo.py', 'w').write('"""fooberizing"""\n') + subprocess.check_call(["svn", "add", "foo.py"], + stdout=subprocess.PIPE) + subprocess.check_call( + ["svn", "commit", "-m", "First attempt at fooberizing"], + stdout=subprocess.PIPE) + subprocess.check_call(["svn", "copy", "-m", "Release 0.1", + "file://%s/trunk" % self.repo, + "file://%s/tags/0.1" % self.repo], + stdout=subprocess.PIPE) + + subprocess.check_call( + ["svn", "copy", "-m", "Begin work on feature bar", + "file://%s/trunk" % self.repo, + "file://%s/branches/feature-bar" % self.repo], + stdout=subprocess.PIPE) + subprocess.check_call( + ["svn", "switch", + "file://%s/branches/feature-bar" % self.repo], + stdout=subprocess.PIPE) + open('README.txt', 'a').write("Now supports bar\n") + open('foo.py', 'a').write('import bar\n') + open('bar.py', 'w').write('"""barberizing"""\n') + subprocess.check_call(["svn", "add", "bar.py"], + stdout=subprocess.PIPE) + subprocess.check_call( + ["svn", "commit", "-m", "Implement bar feature"], + stdout=subprocess.PIPE) except: self.cleanUp() raise def checkout(self, path='trunk', target=None): - process = Process(quiet=True) if target is None: self.checkoutdir = join(self.tempdir, self.packagename) else: self.checkoutdir = join(self.tempdir, target, self.packagename) - process.system('svn checkout file://%s/%s %s' % (self.repo, - path, self.checkoutdir)) + args = ['svn', 'checkout', 'file://%s/%s' % (self.repo, path), + '%s' % self.checkoutdir] + subprocess.check_call(args, stdout=subprocess.PIPE) os.chdir(self.checkoutdir) @@ -81,15 +120,14 @@ def cleanUp(self): class GitTestCase(GitSetup): """ a test class that operates on a git repository """ - source = 'testrepo.git' def setUp(self): JailSetup.setUp(self) try: - package = join(dirname(__file__), 'tests', self.source) self.packagedir = join(self.tempdir, 'testpackage') - shutil.copytree(package, self.packagedir) + os.mkdir(self.packagedir) os.chdir(self.packagedir) + subprocess.check_call(['git', 'init'], stdout=subprocess.PIPE) except: self.cleanUp() raise diff --git a/gitsvnhelpers/tests/test_doctests.py b/gitsvnhelpers/tests/test_doctests.py index a8c0cba..0b26870 100644 --- a/gitsvnhelpers/tests/test_doctests.py +++ b/gitsvnhelpers/tests/test_doctests.py @@ -9,30 +9,32 @@ class TestDoctests(BaseTestCase): + def runTest(self): + raise NotImplemented + def shell(self, cmd): """executes the shell command and prints its output""" code, output = popen(cmd, False, False) for line in output: print line - def _test_doctest(self): - doctest.testfile("%s.txt" % self._testMethodName, - globs=dict(self=self, do=self.shell), - report=True, - optionflags=optionflags) - - def test_gitify(self): - self._test_doctest() - def test_gitify_up(self): - self._test_doctest() +def setUp(test): + self = TestDoctests() + test.globs.update(self=self, do=self.shell) + self.setUp() - def test_gitify_fetch(self): - self._test_doctest() - def test_symlink_migration(self): - self._test_doctest() +def tearDown(test): + test.globs['self'].tearDown() - def test_svn_switch(self): - self._test_doctest() +def test_suite(): + return doctest.DocFileSuite( + 'test_gitify.txt', + 'test_gitify_up.txt', + 'test_gitify_fetch.txt', + 'test_symlink_migration.txt', + 'test_svn_switch.txt', + setUp=setUp, tearDown=tearDown, + optionflags=optionflags) diff --git a/gitsvnhelpers/tests/test_git.py b/gitsvnhelpers/tests/test_git.py index b0f4edd..d8ee951 100644 --- a/gitsvnhelpers/tests/test_git.py +++ b/gitsvnhelpers/tests/test_git.py @@ -27,7 +27,7 @@ def test_dirty_index(self): popen('git add bar.txt') self.failUnless(index_is_dirty()) # Once we've actually committed the change, we're clean again: - popen('git ci -m "added bar"', False, False) + popen('git commit -m "added bar"', False, False) self.failIf(index_is_dirty()) def test_local_changes(self): @@ -42,11 +42,11 @@ def test_local_changes(self): # Once we've actually committed the change, we're clean again: popen('git add bar.txt') self.failUnless(local_changes()) - popen('git ci -m "added bar"', False, False) + popen('git commit -m "added bar"', False, False) self.failIf(local_changes()) # Modifying an existing file will have the same effect: popen('echo "modified" >> bar.txt') self.failUnless(local_changes()) popen('git add bar.txt') - popen('git ci -m "modified bar"', False, False) + popen('git commit -m "modified bar"', False, False) self.failIf(local_changes()) diff --git a/gitsvnhelpers/tests/test_gitify.txt b/gitsvnhelpers/tests/test_gitify.txt index 3105d9f..d491d31 100644 --- a/gitsvnhelpers/tests/test_gitify.txt +++ b/gitsvnhelpers/tests/test_gitify.txt @@ -106,7 +106,7 @@ As expected, git will report the modification: >>> do('git status') # On branch local/trunk - # Changed but not updated: + # Change...: # (use "git add ..." to update what will be committed) # (use "git checkout -- ..." to discard changes in working directory) # @@ -142,25 +142,26 @@ Let's make another git commit before pushing our changes to svn: Now we can push our commits to svn using the ``gitify push`` command: >>> gitify(args=['push']) - Committing to file:///...testpackage/trunk ... - M README.txt - Committed r7 - M README.txt - r7 = ... (refs/remotes/trunk) - No changes between current HEAD and refs/remotes/trunk - Resetting to the latest refs/remotes/trunk - Unstaged changes after reset: - M foo.py - M foo.py - Committed r8 - M foo.py - r8 = ... (refs/remotes/trunk) - No changes between current HEAD and refs/remotes/trunk - Resetting to the latest refs/remotes/trunk - G foo.py - G README.txt - Updated to revision 8. - Pushed local changes to svn. + Committing to file:///...testpackage/trunk ... + M README.txt + Committed r7 + M README.txt + r7 = ... (refs/remotes/trunk) + No changes between current HEAD and refs/remotes/trunk + Resetting to the latest refs/remotes/trunk + Unstaged changes after reset: + M foo.py + M foo.py + Committed r8 + M foo.py + r8 = ... (refs/remotes/trunk) + No changes between current HEAD and refs/remotes/trunk + Resetting to the latest refs/remotes/trunk + Updating '.': + G foo.py + G README.txt + Updated to revision 8. + Pushed local changes to svn. Now git and svn are 'in sync' IOW they both agree that there are no uncommitted local changes: diff --git a/gitsvnhelpers/tests/test_gitify_up.txt b/gitsvnhelpers/tests/test_gitify_up.txt index 08c5d9c..854b8d7 100644 --- a/gitsvnhelpers/tests/test_gitify_up.txt +++ b/gitsvnhelpers/tests/test_gitify_up.txt @@ -68,7 +68,7 @@ Starting easy, we simply add a new file to the svn repo: >>> do('svn commit -m "Added from svn"') Adding svn.txt Transmitting file data . - Committed revision 7. + Committed revision ... Then we re-visit our gitified checkout: @@ -166,6 +166,7 @@ Subversion >>> os.chdir(svnlocal) >>> do("svn up") + Updating '.': G svn.txt Updated to revision 8. @@ -195,7 +196,6 @@ The rebase command works as expected: M svn.txt r8 = ... (refs/remotes/trunk) First, rewinding head to replay your work on top of it... - Nothing to do. Now the slate is clean: @@ -212,7 +212,7 @@ let's first check the status: >>> os.chdir(gitified) >>> do('git status') # On branch local/trunk - # Changed but not updated: + # Change...: # (use "git add ..." to update what will be committed) # (use "git checkout -- ..." to discard changes in working directory) # @@ -231,7 +231,7 @@ except that git now calls them 'unmerged' instead of 'modified': # On branch local/trunk # Unmerged paths: # (use "git reset HEAD ..." to unstage) - # (use "git add ..." to mark resolution) + # (use "git add... to mark resolution) # # both modified: svn.txt # diff --git a/gitsvnhelpers/tests/testrepo.git b/gitsvnhelpers/tests/testrepo.git deleted file mode 160000 index 1522269..0000000 --- a/gitsvnhelpers/tests/testrepo.git +++ /dev/null @@ -1 +0,0 @@ -Subproject commit 15222693eacf069fb98b9391697c317c5aad16a5 diff --git a/gitsvnhelpers/tests/testrepo.svn/README.txt b/gitsvnhelpers/tests/testrepo.svn/README.txt deleted file mode 100644 index 3bf5a57..0000000 --- a/gitsvnhelpers/tests/testrepo.svn/README.txt +++ /dev/null @@ -1,5 +0,0 @@ -This is a Subversion repository; use the 'svnadmin' tool to examine -it. Do not add, delete, or modify files here unless you know how -to avoid corrupting the repository. - -Visit http://subversion.tigris.org/ for more information. diff --git a/gitsvnhelpers/tests/testrepo.svn/conf/authz b/gitsvnhelpers/tests/testrepo.svn/conf/authz deleted file mode 100644 index 0b9a410..0000000 --- a/gitsvnhelpers/tests/testrepo.svn/conf/authz +++ /dev/null @@ -1,32 +0,0 @@ -### This file is an example authorization file for svnserve. -### Its format is identical to that of mod_authz_svn authorization -### files. -### As shown below each section defines authorizations for the path and -### (optional) repository specified by the section name. -### The authorizations follow. An authorization line can refer to: -### - a single user, -### - a group of users defined in a special [groups] section, -### - an alias defined in a special [aliases] section, -### - all authenticated users, using the '$authenticated' token, -### - only anonymous users, using the '$anonymous' token, -### - anyone, using the '*' wildcard. -### -### A match can be inverted by prefixing the rule with '~'. Rules can -### grant read ('r') access, read-write ('rw') access, or no access -### (''). - -[aliases] -# joe = /C=XZ/ST=Dessert/L=Snake City/O=Snake Oil, Ltd./OU=Research Institute/CN=Joe Average - -[groups] -# harry_and_sally = harry,sally -# harry_sally_and_joe = harry,sally,&joe - -# [/foo/bar] -# harry = rw -# &joe = r -# * = - -# [repository:/baz/fuz] -# @harry_and_sally = rw -# * = r diff --git a/gitsvnhelpers/tests/testrepo.svn/conf/passwd b/gitsvnhelpers/tests/testrepo.svn/conf/passwd deleted file mode 100644 index ecaa08d..0000000 --- a/gitsvnhelpers/tests/testrepo.svn/conf/passwd +++ /dev/null @@ -1,8 +0,0 @@ -### This file is an example password file for svnserve. -### Its format is similar to that of svnserve.conf. As shown in the -### example below it contains one section labelled [users]. -### The name and password for each user follow, one account per line. - -[users] -# harry = harryssecret -# sally = sallyssecret diff --git a/gitsvnhelpers/tests/testrepo.svn/conf/svnserve.conf b/gitsvnhelpers/tests/testrepo.svn/conf/svnserve.conf deleted file mode 100644 index e62a01e..0000000 --- a/gitsvnhelpers/tests/testrepo.svn/conf/svnserve.conf +++ /dev/null @@ -1,47 +0,0 @@ -### This file controls the configuration of the svnserve daemon, if you -### use it to allow access to this repository. (If you only allow -### access through http: and/or file: URLs, then this file is -### irrelevant.) - -### Visit http://subversion.tigris.org/ for more information. - -[general] -### These options control access to the repository for unauthenticated -### and authenticated users. Valid values are "write", "read", -### and "none". The sample settings below are the defaults. -# anon-access = read -# auth-access = write -### The password-db option controls the location of the password -### database file. Unless you specify a path starting with a /, -### the file's location is relative to the directory containing -### this configuration file. -### If SASL is enabled (see below), this file will NOT be used. -### Uncomment the line below to use the default password file. -# password-db = passwd -### The authz-db option controls the location of the authorization -### rules for path-based access control. Unless you specify a path -### starting with a /, the file's location is relative to the the -### directory containing this file. If you don't specify an -### authz-db, no path-based access control is done. -### Uncomment the line below to use the default authorization file. -# authz-db = authz -### This option specifies the authentication realm of the repository. -### If two repositories have the same authentication realm, they should -### have the same password database, and vice versa. The default realm -### is repository's uuid. -# realm = My First Repository - -[sasl] -### This option specifies whether you want to use the Cyrus SASL -### library for authentication. Default is false. -### This section will be ignored if svnserve is not built with Cyrus -### SASL support; to check, run 'svnserve --version' and look for a line -### reading 'Cyrus SASL authentication is available.' -# use-sasl = true -### These options specify the desired strength of the security layer -### that you want SASL to provide. 0 means no encryption, 1 means -### integrity-checking only, values larger than 1 are correlated -### to the effective key length for encryption (e.g. 128 means 128-bit -### encryption). The values below are the defaults. -# min-encryption = 0 -# max-encryption = 256 diff --git a/gitsvnhelpers/tests/testrepo.svn/db/current b/gitsvnhelpers/tests/testrepo.svn/db/current deleted file mode 100644 index 1e8b314..0000000 --- a/gitsvnhelpers/tests/testrepo.svn/db/current +++ /dev/null @@ -1 +0,0 @@ -6 diff --git a/gitsvnhelpers/tests/testrepo.svn/db/format b/gitsvnhelpers/tests/testrepo.svn/db/format deleted file mode 100644 index ef83e21..0000000 --- a/gitsvnhelpers/tests/testrepo.svn/db/format +++ /dev/null @@ -1,2 +0,0 @@ -3 -layout sharded 1000 diff --git a/gitsvnhelpers/tests/testrepo.svn/db/fs-type b/gitsvnhelpers/tests/testrepo.svn/db/fs-type deleted file mode 100644 index 4fdd953..0000000 --- a/gitsvnhelpers/tests/testrepo.svn/db/fs-type +++ /dev/null @@ -1 +0,0 @@ -fsfs diff --git a/gitsvnhelpers/tests/testrepo.svn/db/revprops/0/0 b/gitsvnhelpers/tests/testrepo.svn/db/revprops/0/0 deleted file mode 100644 index 4769670..0000000 --- a/gitsvnhelpers/tests/testrepo.svn/db/revprops/0/0 +++ /dev/null @@ -1,5 +0,0 @@ -K 8 -svn:date -V 27 -2009-07-13T20:56:39.461866Z -END diff --git a/gitsvnhelpers/tests/testrepo.svn/db/revprops/0/1 b/gitsvnhelpers/tests/testrepo.svn/db/revprops/0/1 deleted file mode 100644 index 9745c18..0000000 --- a/gitsvnhelpers/tests/testrepo.svn/db/revprops/0/1 +++ /dev/null @@ -1,13 +0,0 @@ -K 10 -svn:author -V 7 -tomster -K 8 -svn:date -V 27 -2009-07-13T20:58:32.955822Z -K 7 -svn:log -V 14 -Added skeleton -END diff --git a/gitsvnhelpers/tests/testrepo.svn/db/revprops/0/2 b/gitsvnhelpers/tests/testrepo.svn/db/revprops/0/2 deleted file mode 100644 index 37598db..0000000 --- a/gitsvnhelpers/tests/testrepo.svn/db/revprops/0/2 +++ /dev/null @@ -1,13 +0,0 @@ -K 10 -svn:author -V 7 -tomster -K 8 -svn:date -V 27 -2009-07-13T21:00:07.427415Z -K 7 -svn:log -V 19 -added documentation -END diff --git a/gitsvnhelpers/tests/testrepo.svn/db/revprops/0/3 b/gitsvnhelpers/tests/testrepo.svn/db/revprops/0/3 deleted file mode 100644 index 8673252..0000000 --- a/gitsvnhelpers/tests/testrepo.svn/db/revprops/0/3 +++ /dev/null @@ -1,13 +0,0 @@ -K 10 -svn:author -V 7 -tomster -K 8 -svn:date -V 27 -2009-07-13T21:03:07.462521Z -K 7 -svn:log -V 28 -First attempt at fooberizing -END diff --git a/gitsvnhelpers/tests/testrepo.svn/db/revprops/0/4 b/gitsvnhelpers/tests/testrepo.svn/db/revprops/0/4 deleted file mode 100644 index 910d22c..0000000 --- a/gitsvnhelpers/tests/testrepo.svn/db/revprops/0/4 +++ /dev/null @@ -1,14 +0,0 @@ -K 10 -svn:author -V 7 -tomster -K 8 -svn:date -V 27 -2009-07-13T21:06:14.397333Z -K 7 -svn:log -V 42 -Creating a branch for the new bar feature - -END diff --git a/gitsvnhelpers/tests/testrepo.svn/db/revprops/0/5 b/gitsvnhelpers/tests/testrepo.svn/db/revprops/0/5 deleted file mode 100644 index 1ac426c..0000000 --- a/gitsvnhelpers/tests/testrepo.svn/db/revprops/0/5 +++ /dev/null @@ -1,13 +0,0 @@ -K 10 -svn:author -V 7 -tomster -K 8 -svn:date -V 27 -2009-07-13T21:09:04.304540Z -K 7 -svn:log -V 17 -We now can barify -END diff --git a/gitsvnhelpers/tests/testrepo.svn/db/revprops/0/6 b/gitsvnhelpers/tests/testrepo.svn/db/revprops/0/6 deleted file mode 100644 index b06cd38..0000000 --- a/gitsvnhelpers/tests/testrepo.svn/db/revprops/0/6 +++ /dev/null @@ -1,13 +0,0 @@ -K 10 -svn:author -V 7 -tomster -K 8 -svn:date -V 27 -2009-08-06T08:06:33.365709Z -K 7 -svn:log -V 13 -releasing 0.1 -END diff --git a/gitsvnhelpers/tests/testrepo.svn/db/revs/0/0 b/gitsvnhelpers/tests/testrepo.svn/db/revs/0/0 deleted file mode 100644 index 10f5c45..0000000 --- a/gitsvnhelpers/tests/testrepo.svn/db/revs/0/0 +++ /dev/null @@ -1,11 +0,0 @@ -PLAIN -END -ENDREP -id: 0.0.r0/17 -type: dir -count: 0 -text: 0 0 4 4 2d2977d1c96f487abe4a1e202dd03b4e -cpath: / - - -17 107 diff --git a/gitsvnhelpers/tests/testrepo.svn/db/revs/0/1 b/gitsvnhelpers/tests/testrepo.svn/db/revs/0/1 deleted file mode 100644 index 3bd83b2..0000000 --- a/gitsvnhelpers/tests/testrepo.svn/db/revs/0/1 +++ /dev/null @@ -1,49 +0,0 @@ -id: 2-1.0.r1/0 -type: dir -count: 0 -cpath: /trunk -copyroot: 0 / - -id: 0-1.0.r1/63 -type: dir -count: 0 -cpath: /branches -copyroot: 0 / - -id: 1-1.0.r1/130 -type: dir -count: 0 -cpath: /tags -copyroot: 0 / - -PLAIN -K 8 -branches -V 15 -dir 0-1.0.r1/63 -K 4 -tags -V 16 -dir 1-1.0.r1/130 -K 5 -trunk -V 14 -dir 2-1.0.r1/0 -END -ENDREP -id: 0.0.r1/306 -type: dir -pred: 0.0.r0/17 -count: 1 -text: 1 194 99 99 f518773917d40d257c04097c223eb7d3 -cpath: / -copyroot: 0 / - -_2.0.t0-0 add false false /trunk - -_0.0.t0-0 add false false /branches - -_1.0.t0-0 add false false /tags - - -306 431 diff --git a/gitsvnhelpers/tests/testrepo.svn/db/revs/0/2 b/gitsvnhelpers/tests/testrepo.svn/db/revs/0/2 deleted file mode 100644 index e4d8222..0000000 Binary files a/gitsvnhelpers/tests/testrepo.svn/db/revs/0/2 and /dev/null differ diff --git a/gitsvnhelpers/tests/testrepo.svn/db/revs/0/3 b/gitsvnhelpers/tests/testrepo.svn/db/revs/0/3 deleted file mode 100644 index d03dd7b..0000000 Binary files a/gitsvnhelpers/tests/testrepo.svn/db/revs/0/3 and /dev/null differ diff --git a/gitsvnhelpers/tests/testrepo.svn/db/revs/0/4 b/gitsvnhelpers/tests/testrepo.svn/db/revs/0/4 deleted file mode 100644 index dbb70a0..0000000 --- a/gitsvnhelpers/tests/testrepo.svn/db/revs/0/4 +++ /dev/null @@ -1,50 +0,0 @@ -id: 2-1.0-4.r4/0 -type: dir -pred: 2-1.0.r3/379 -count: 3 -text: 3 290 76 76 b8a88a153507ce05acbcb35835304d8d -cpath: /branches/feature-bar -copyfrom: 3 /trunk - -PLAIN -K 11 -feature-bar -V 16 -dir 2-1.0-4.r4/0 -END -ENDREP -id: 0-1.0.r4/211 -type: dir -pred: 0-1.0.r1/63 -count: 1 -text: 4 155 43 43 42afb0ce55fca5e12ee82001043d4225 -cpath: /branches -copyroot: 0 / - -PLAIN -K 8 -branches -V 16 -dir 0-1.0.r4/211 -K 4 -tags -V 16 -dir 1-1.0.r1/130 -K 5 -trunk -V 16 -dir 2-1.0.r3/379 -END -ENDREP -id: 0.0.r4/463 -type: dir -pred: 0.0.r3/628 -count: 4 -text: 4 348 102 102 dc1b366ffce335f53a99a7c523abecd1 -cpath: / -copyroot: 0 / - -2-1._0.t3-3 add false false /branches/feature-bar -3 /trunk - -463 591 diff --git a/gitsvnhelpers/tests/testrepo.svn/db/revs/0/5 b/gitsvnhelpers/tests/testrepo.svn/db/revs/0/5 deleted file mode 100644 index 32393f6..0000000 Binary files a/gitsvnhelpers/tests/testrepo.svn/db/revs/0/5 and /dev/null differ diff --git a/gitsvnhelpers/tests/testrepo.svn/db/revs/0/6 b/gitsvnhelpers/tests/testrepo.svn/db/revs/0/6 deleted file mode 100644 index 0ec7e5b..0000000 --- a/gitsvnhelpers/tests/testrepo.svn/db/revs/0/6 +++ /dev/null @@ -1,50 +0,0 @@ -id: 2-1.0-6.r6/0 -type: dir -pred: 2-1.0.r3/379 -count: 3 -text: 3 290 76 76 b8a88a153507ce05acbcb35835304d8d -cpath: /tags/0.1 -copyfrom: 5 /trunk - -PLAIN -K 3 -0.1 -V 16 -dir 2-1.0-6.r6/0 -END -ENDREP -id: 1-1.0.r6/190 -type: dir -pred: 1-1.0.r1/130 -count: 1 -text: 6 143 34 34 22f053462a77c5a03b476cbfd05c2ce4 -cpath: /tags -copyroot: 0 / - -PLAIN -K 8 -branches -V 17 -dir 0-1.0.r5/1240 -K 4 -tags -V 16 -dir 1-1.0.r6/190 -K 5 -trunk -V 16 -dir 2-1.0.r3/379 -END -ENDREP -id: 0.0.r6/440 -type: dir -pred: 0.0.r5/1496 -count: 6 -text: 6 324 103 103 0c66fdf3bec1ee8c5636d7dbcfe50865 -cpath: / -copyroot: 0 / - -2-1._0.t5-5 add false false /tags/0.1 -5 /trunk - -440 569 diff --git a/gitsvnhelpers/tests/testrepo.svn/db/txn-current b/gitsvnhelpers/tests/testrepo.svn/db/txn-current deleted file mode 100644 index 1e8b314..0000000 --- a/gitsvnhelpers/tests/testrepo.svn/db/txn-current +++ /dev/null @@ -1 +0,0 @@ -6 diff --git a/gitsvnhelpers/tests/testrepo.svn/db/txn-current-lock b/gitsvnhelpers/tests/testrepo.svn/db/txn-current-lock deleted file mode 100644 index e69de29..0000000 diff --git a/gitsvnhelpers/tests/testrepo.svn/db/uuid b/gitsvnhelpers/tests/testrepo.svn/db/uuid deleted file mode 100644 index 92f8ccb..0000000 --- a/gitsvnhelpers/tests/testrepo.svn/db/uuid +++ /dev/null @@ -1 +0,0 @@ -a0614927-e084-44b0-b406-a817ffebb7fa diff --git a/gitsvnhelpers/tests/testrepo.svn/db/write-lock b/gitsvnhelpers/tests/testrepo.svn/db/write-lock deleted file mode 100644 index e69de29..0000000 diff --git a/gitsvnhelpers/tests/testrepo.svn/format b/gitsvnhelpers/tests/testrepo.svn/format deleted file mode 100644 index 7ed6ff8..0000000 --- a/gitsvnhelpers/tests/testrepo.svn/format +++ /dev/null @@ -1 +0,0 @@ -5 diff --git a/gitsvnhelpers/tests/testrepo.svn/hooks/post-commit.tmpl b/gitsvnhelpers/tests/testrepo.svn/hooks/post-commit.tmpl deleted file mode 100644 index b8345c6..0000000 --- a/gitsvnhelpers/tests/testrepo.svn/hooks/post-commit.tmpl +++ /dev/null @@ -1,51 +0,0 @@ -#!/bin/sh - -# POST-COMMIT HOOK -# -# The post-commit hook is invoked after a commit. Subversion runs -# this hook by invoking a program (script, executable, binary, etc.) -# named 'post-commit' (for which this file is a template) with the -# following ordered arguments: -# -# [1] REPOS-PATH (the path to this repository) -# [2] REV (the number of the revision just committed) -# -# The default working directory for the invocation is undefined, so -# the program should set one explicitly if it cares. -# -# Because the commit has already completed and cannot be undone, -# the exit code of the hook program is ignored. The hook program -# can use the 'svnlook' utility to help it examine the -# newly-committed tree. -# -# On a Unix system, the normal procedure is to have 'post-commit' -# invoke other programs to do the real work, though it may do the -# work itself too. -# -# Note that 'post-commit' must be executable by the user(s) who will -# invoke it (typically the user httpd runs as), and that user must -# have filesystem-level permission to access the repository. -# -# On a Windows system, you should name the hook program -# 'post-commit.bat' or 'post-commit.exe', -# but the basic idea is the same. -# -# The hook program typically does not inherit the environment of -# its parent process. For example, a common problem is for the -# PATH environment variable to not be set to its usual value, so -# that subprograms fail to launch unless invoked via absolute path. -# If you're having unexpected problems with a hook program, the -# culprit may be unusual (or missing) environment variables. -# -# Here is an example hook script, for a Unix /bin/sh interpreter. -# For more examples and pre-written hooks, see those in -# the Subversion repository at -# http://svn.collab.net/repos/svn/trunk/tools/hook-scripts/ and -# http://svn.collab.net/repos/svn/trunk/contrib/hook-scripts/ - - -REPOS="$1" -REV="$2" - -commit-email.pl "$REPOS" "$REV" commit-watchers@example.org -log-commit.py --repository "$REPOS" --revision "$REV" diff --git a/gitsvnhelpers/tests/testrepo.svn/hooks/post-lock.tmpl b/gitsvnhelpers/tests/testrepo.svn/hooks/post-lock.tmpl deleted file mode 100644 index c779f11..0000000 --- a/gitsvnhelpers/tests/testrepo.svn/hooks/post-lock.tmpl +++ /dev/null @@ -1,44 +0,0 @@ -#!/bin/sh - -# POST-LOCK HOOK -# -# The post-lock hook is run after a path is locked. Subversion runs -# this hook by invoking a program (script, executable, binary, etc.) -# named 'post-lock' (for which this file is a template) with the -# following ordered arguments: -# -# [1] REPOS-PATH (the path to this repository) -# [2] USER (the user who created the lock) -# -# The paths that were just locked are passed to the hook via STDIN (as -# of Subversion 1.2, only one path is passed per invocation, but the -# plan is to pass all locked paths at once, so the hook program -# should be written accordingly). -# -# The default working directory for the invocation is undefined, so -# the program should set one explicitly if it cares. -# -# Because the lock has already been created and cannot be undone, -# the exit code of the hook program is ignored. The hook program -# can use the 'svnlook' utility to help it examine the -# newly-created lock. -# -# On a Unix system, the normal procedure is to have 'post-lock' -# invoke other programs to do the real work, though it may do the -# work itself too. -# -# Note that 'post-lock' must be executable by the user(s) who will -# invoke it (typically the user httpd runs as), and that user must -# have filesystem-level permission to access the repository. -# -# On a Windows system, you should name the hook program -# 'post-lock.bat' or 'post-lock.exe', -# but the basic idea is the same. -# -# Here is an example hook script, for a Unix /bin/sh interpreter: - -REPOS="$1" -USER="$2" - -# Send email to interested parties, let them know a lock was created: -mailer.py lock "$REPOS" "$USER" /path/to/mailer.conf diff --git a/gitsvnhelpers/tests/testrepo.svn/hooks/post-revprop-change.tmpl b/gitsvnhelpers/tests/testrepo.svn/hooks/post-revprop-change.tmpl deleted file mode 100644 index e3b34b5..0000000 --- a/gitsvnhelpers/tests/testrepo.svn/hooks/post-revprop-change.tmpl +++ /dev/null @@ -1,56 +0,0 @@ -#!/bin/sh - -# POST-REVPROP-CHANGE HOOK -# -# The post-revprop-change hook is invoked after a revision property -# has been added, modified or deleted. Subversion runs this hook by -# invoking a program (script, executable, binary, etc.) named -# 'post-revprop-change' (for which this file is a template), with the -# following ordered arguments: -# -# [1] REPOS-PATH (the path to this repository) -# [2] REV (the revision that was tweaked) -# [3] USER (the username of the person tweaking the property) -# [4] PROPNAME (the property that was changed) -# [5] ACTION (the property was 'A'dded, 'M'odified, or 'D'eleted) -# -# [STDIN] PROPVAL ** the old property value is passed via STDIN. -# -# Because the propchange has already completed and cannot be undone, -# the exit code of the hook program is ignored. The hook program -# can use the 'svnlook' utility to help it examine the -# new property value. -# -# On a Unix system, the normal procedure is to have 'post-revprop-change' -# invoke other programs to do the real work, though it may do the -# work itself too. -# -# Note that 'post-revprop-change' must be executable by the user(s) who will -# invoke it (typically the user httpd runs as), and that user must -# have filesystem-level permission to access the repository. -# -# On a Windows system, you should name the hook program -# 'post-revprop-change.bat' or 'post-revprop-change.exe', -# but the basic idea is the same. -# -# The hook program typically does not inherit the environment of -# its parent process. For example, a common problem is for the -# PATH environment variable to not be set to its usual value, so -# that subprograms fail to launch unless invoked via absolute path. -# If you're having unexpected problems with a hook program, the -# culprit may be unusual (or missing) environment variables. -# -# Here is an example hook script, for a Unix /bin/sh interpreter. -# For more examples and pre-written hooks, see those in -# the Subversion repository at -# http://svn.collab.net/repos/svn/trunk/tools/hook-scripts/ and -# http://svn.collab.net/repos/svn/trunk/contrib/hook-scripts/ - - -REPOS="$1" -REV="$2" -USER="$3" -PROPNAME="$4" -ACTION="$5" - -commit-email.pl --revprop-change "$REPOS" "$REV" "$USER" "$PROPNAME" watchers@example.org diff --git a/gitsvnhelpers/tests/testrepo.svn/hooks/post-unlock.tmpl b/gitsvnhelpers/tests/testrepo.svn/hooks/post-unlock.tmpl deleted file mode 100644 index ae95c4b..0000000 --- a/gitsvnhelpers/tests/testrepo.svn/hooks/post-unlock.tmpl +++ /dev/null @@ -1,42 +0,0 @@ -#!/bin/sh - -# POST-UNLOCK HOOK -# -# The post-unlock hook runs after a path is unlocked. Subversion runs -# this hook by invoking a program (script, executable, binary, etc.) -# named 'post-unlock' (for which this file is a template) with the -# following ordered arguments: -# -# [1] REPOS-PATH (the path to this repository) -# [2] USER (the user who destroyed the lock) -# -# The paths that were just unlocked are passed to the hook via STDIN -# (as of Subversion 1.2, only one path is passed per invocation, but -# the plan is to pass all unlocked paths at once, so the hook program -# should be written accordingly). -# -# The default working directory for the invocation is undefined, so -# the program should set one explicitly if it cares. -# -# Because the lock has already been destroyed and cannot be undone, -# the exit code of the hook program is ignored. -# -# On a Unix system, the normal procedure is to have 'post-unlock' -# invoke other programs to do the real work, though it may do the -# work itself too. -# -# Note that 'post-unlock' must be executable by the user(s) who will -# invoke it (typically the user httpd runs as), and that user must -# have filesystem-level permission to access the repository. -# -# On a Windows system, you should name the hook program -# 'post-unlock.bat' or 'post-unlock.exe', -# but the basic idea is the same. -# -# Here is an example hook script, for a Unix /bin/sh interpreter: - -REPOS="$1" -USER="$2" - -# Send email to interested parties, let them know a lock was removed: -mailer.py unlock "$REPOS" "$USER" /path/to/mailer.conf diff --git a/gitsvnhelpers/tests/testrepo.svn/hooks/pre-commit.tmpl b/gitsvnhelpers/tests/testrepo.svn/hooks/pre-commit.tmpl deleted file mode 100644 index 7444c51..0000000 --- a/gitsvnhelpers/tests/testrepo.svn/hooks/pre-commit.tmpl +++ /dev/null @@ -1,70 +0,0 @@ -#!/bin/sh - -# PRE-COMMIT HOOK -# -# The pre-commit hook is invoked before a Subversion txn is -# committed. Subversion runs this hook by invoking a program -# (script, executable, binary, etc.) named 'pre-commit' (for which -# this file is a template), with the following ordered arguments: -# -# [1] REPOS-PATH (the path to this repository) -# [2] TXN-NAME (the name of the txn about to be committed) -# -# The default working directory for the invocation is undefined, so -# the program should set one explicitly if it cares. -# -# If the hook program exits with success, the txn is committed; but -# if it exits with failure (non-zero), the txn is aborted, no commit -# takes place, and STDERR is returned to the client. The hook -# program can use the 'svnlook' utility to help it examine the txn. -# -# On a Unix system, the normal procedure is to have 'pre-commit' -# invoke other programs to do the real work, though it may do the -# work itself too. -# -# *** NOTE: THE HOOK PROGRAM MUST NOT MODIFY THE TXN, EXCEPT *** -# *** FOR REVISION PROPERTIES (like svn:log or svn:author). *** -# -# This is why we recommend using the read-only 'svnlook' utility. -# In the future, Subversion may enforce the rule that pre-commit -# hooks should not modify the versioned data in txns, or else come -# up with a mechanism to make it safe to do so (by informing the -# committing client of the changes). However, right now neither -# mechanism is implemented, so hook writers just have to be careful. -# -# Note that 'pre-commit' must be executable by the user(s) who will -# invoke it (typically the user httpd runs as), and that user must -# have filesystem-level permission to access the repository. -# -# On a Windows system, you should name the hook program -# 'pre-commit.bat' or 'pre-commit.exe', -# but the basic idea is the same. -# -# The hook program typically does not inherit the environment of -# its parent process. For example, a common problem is for the -# PATH environment variable to not be set to its usual value, so -# that subprograms fail to launch unless invoked via absolute path. -# If you're having unexpected problems with a hook program, the -# culprit may be unusual (or missing) environment variables. -# -# Here is an example hook script, for a Unix /bin/sh interpreter. -# For more examples and pre-written hooks, see those in -# the Subversion repository at -# http://svn.collab.net/repos/svn/trunk/tools/hook-scripts/ and -# http://svn.collab.net/repos/svn/trunk/contrib/hook-scripts/ - - -REPOS="$1" -TXN="$2" - -# Make sure that the log message contains some text. -SVNLOOK=/opt/local/bin/svnlook -$SVNLOOK log -t "$TXN" "$REPOS" | \ - grep "[a-zA-Z0-9]" > /dev/null || exit 1 - -# Check that the author of this commit has the rights to perform -# the commit on the files and directories being modified. -commit-access-control.pl "$REPOS" "$TXN" commit-access-control.cfg || exit 1 - -# All checks passed, so allow the commit. -exit 0 diff --git a/gitsvnhelpers/tests/testrepo.svn/hooks/pre-lock.tmpl b/gitsvnhelpers/tests/testrepo.svn/hooks/pre-lock.tmpl deleted file mode 100644 index 020d172..0000000 --- a/gitsvnhelpers/tests/testrepo.svn/hooks/pre-lock.tmpl +++ /dev/null @@ -1,64 +0,0 @@ -#!/bin/sh - -# PRE-LOCK HOOK -# -# The pre-lock hook is invoked before an exclusive lock is -# created. Subversion runs this hook by invoking a program -# (script, executable, binary, etc.) named 'pre-lock' (for which -# this file is a template), with the following ordered arguments: -# -# [1] REPOS-PATH (the path to this repository) -# [2] PATH (the path in the repository about to be locked) -# [3] USER (the user creating the lock) -# -# The default working directory for the invocation is undefined, so -# the program should set one explicitly if it cares. -# -# If the hook program exits with success, the lock is created; but -# if it exits with failure (non-zero), the lock action is aborted -# and STDERR is returned to the client. - -# On a Unix system, the normal procedure is to have 'pre-lock' -# invoke other programs to do the real work, though it may do the -# work itself too. -# -# Note that 'pre-lock' must be executable by the user(s) who will -# invoke it (typically the user httpd runs as), and that user must -# have filesystem-level permission to access the repository. -# -# On a Windows system, you should name the hook program -# 'pre-lock.bat' or 'pre-lock.exe', -# but the basic idea is the same. -# -# Here is an example hook script, for a Unix /bin/sh interpreter: - -REPOS="$1" -PATH="$2" -USER="$3" - -# If a lock exists and is owned by a different person, don't allow it -# to be stolen (e.g., with 'svn lock --force ...'). - -# (Maybe this script could send email to the lock owner?) -SVNLOOK=/opt/local/bin/svnlook -GREP=/bin/grep -SED=/bin/sed - -LOCK_OWNER=`$SVNLOOK lock "$REPOS" "$PATH" | \ - $GREP '^Owner: ' | $SED 's/Owner: //'` - -# If we get no result from svnlook, there's no lock, allow the lock to -# happen: -if [ "$LOCK_OWNER" = "" ]; then - exit 0 -fi - -# If the person locking matches the lock's owner, allow the lock to -# happen: -if [ "$LOCK_OWNER" = "$USER" ]; then - exit 0 -fi - -# Otherwise, we've got an owner mismatch, so return failure: -echo "Error: $PATH already locked by ${LOCK_OWNER}." 1>&2 -exit 1 diff --git a/gitsvnhelpers/tests/testrepo.svn/hooks/pre-revprop-change.tmpl b/gitsvnhelpers/tests/testrepo.svn/hooks/pre-revprop-change.tmpl deleted file mode 100644 index 2f2de98..0000000 --- a/gitsvnhelpers/tests/testrepo.svn/hooks/pre-revprop-change.tmpl +++ /dev/null @@ -1,66 +0,0 @@ -#!/bin/sh - -# PRE-REVPROP-CHANGE HOOK -# -# The pre-revprop-change hook is invoked before a revision property -# is added, modified or deleted. Subversion runs this hook by invoking -# a program (script, executable, binary, etc.) named 'pre-revprop-change' -# (for which this file is a template), with the following ordered -# arguments: -# -# [1] REPOS-PATH (the path to this repository) -# [2] REVISION (the revision being tweaked) -# [3] USER (the username of the person tweaking the property) -# [4] PROPNAME (the property being set on the revision) -# [5] ACTION (the property is being 'A'dded, 'M'odified, or 'D'eleted) -# -# [STDIN] PROPVAL ** the new property value is passed via STDIN. -# -# If the hook program exits with success, the propchange happens; but -# if it exits with failure (non-zero), the propchange doesn't happen. -# The hook program can use the 'svnlook' utility to examine the -# existing value of the revision property. -# -# WARNING: unlike other hooks, this hook MUST exist for revision -# properties to be changed. If the hook does not exist, Subversion -# will behave as if the hook were present, but failed. The reason -# for this is that revision properties are UNVERSIONED, meaning that -# a successful propchange is destructive; the old value is gone -# forever. We recommend the hook back up the old value somewhere. -# -# On a Unix system, the normal procedure is to have 'pre-revprop-change' -# invoke other programs to do the real work, though it may do the -# work itself too. -# -# Note that 'pre-revprop-change' must be executable by the user(s) who will -# invoke it (typically the user httpd runs as), and that user must -# have filesystem-level permission to access the repository. -# -# On a Windows system, you should name the hook program -# 'pre-revprop-change.bat' or 'pre-revprop-change.exe', -# but the basic idea is the same. -# -# The hook program typically does not inherit the environment of -# its parent process. For example, a common problem is for the -# PATH environment variable to not be set to its usual value, so -# that subprograms fail to launch unless invoked via absolute path. -# If you're having unexpected problems with a hook program, the -# culprit may be unusual (or missing) environment variables. -# -# Here is an example hook script, for a Unix /bin/sh interpreter. -# For more examples and pre-written hooks, see those in -# the Subversion repository at -# http://svn.collab.net/repos/svn/trunk/tools/hook-scripts/ and -# http://svn.collab.net/repos/svn/trunk/contrib/hook-scripts/ - - -REPOS="$1" -REV="$2" -USER="$3" -PROPNAME="$4" -ACTION="$5" - -if [ "$ACTION" = "M" -a "$PROPNAME" = "svn:log" ]; then exit 0; fi - -echo "Changing revision properties other than svn:log is prohibited" >&2 -exit 1 diff --git a/gitsvnhelpers/tests/testrepo.svn/hooks/pre-unlock.tmpl b/gitsvnhelpers/tests/testrepo.svn/hooks/pre-unlock.tmpl deleted file mode 100644 index 4d17b78..0000000 --- a/gitsvnhelpers/tests/testrepo.svn/hooks/pre-unlock.tmpl +++ /dev/null @@ -1,61 +0,0 @@ -#!/bin/sh - -# PRE-UNLOCK HOOK -# -# The pre-unlock hook is invoked before an exclusive lock is -# destroyed. Subversion runs this hook by invoking a program -# (script, executable, binary, etc.) named 'pre-unlock' (for which -# this file is a template), with the following ordered arguments: -# -# [1] REPOS-PATH (the path to this repository) -# [2] PATH (the path in the repository about to be unlocked) -# [3] USER (the user destroying the lock) -# -# The default working directory for the invocation is undefined, so -# the program should set one explicitly if it cares. -# -# If the hook program exits with success, the lock is destroyed; but -# if it exits with failure (non-zero), the unlock action is aborted -# and STDERR is returned to the client. - -# On a Unix system, the normal procedure is to have 'pre-unlock' -# invoke other programs to do the real work, though it may do the -# work itself too. -# -# Note that 'pre-unlock' must be executable by the user(s) who will -# invoke it (typically the user httpd runs as), and that user must -# have filesystem-level permission to access the repository. -# -# On a Windows system, you should name the hook program -# 'pre-unlock.bat' or 'pre-unlock.exe', -# but the basic idea is the same. -# -# Here is an example hook script, for a Unix /bin/sh interpreter: - -REPOS="$1" -PATH="$2" -USER="$3" - -# If a lock is owned by a different person, don't allow it be broken. -# (Maybe this script could send email to the lock owner?) - -SVNLOOK=/opt/local/bin/svnlook -GREP=/bin/grep -SED=/bin/sed - -LOCK_OWNER=`$SVNLOOK lock "$REPOS" "$PATH" | \ - $GREP '^Owner: ' | $SED 's/Owner: //'` - -# If we get no result from svnlook, there's no lock, return success: -if [ "$LOCK_OWNER" = "" ]; then - exit 0 -fi - -# If the person unlocking matches the lock's owner, return success: -if [ "$LOCK_OWNER" = "$USER" ]; then - exit 0 -fi - -# Otherwise, we've got an owner mismatch, so return failure: -echo "Error: $PATH locked by ${LOCK_OWNER}." 1>&2 -exit 1 diff --git a/gitsvnhelpers/tests/testrepo.svn/hooks/start-commit.tmpl b/gitsvnhelpers/tests/testrepo.svn/hooks/start-commit.tmpl deleted file mode 100644 index 7597f58..0000000 --- a/gitsvnhelpers/tests/testrepo.svn/hooks/start-commit.tmpl +++ /dev/null @@ -1,65 +0,0 @@ -#!/bin/sh - -# START-COMMIT HOOK -# -# The start-commit hook is invoked before a Subversion txn is created -# in the process of doing a commit. Subversion runs this hook -# by invoking a program (script, executable, binary, etc.) named -# 'start-commit' (for which this file is a template) -# with the following ordered arguments: -# -# [1] REPOS-PATH (the path to this repository) -# [2] USER (the authenticated user attempting to commit) -# [3] CAPABILITIES (a colon-separated list of capabilities reported -# by the client; see note below) -# -# Note: The CAPABILITIES parameter is new in Subversion 1.5, and 1.5 -# clients will typically report at least the "mergeinfo" capability. -# If there are other capabilities, then the list is colon-separated, -# e.g.: "mergeinfo:some-other-capability" (the order is undefined). -# -# The list is self-reported by the client. Therefore, you should not -# make security assumptions based on the capabilities list, nor should -# you assume that clients reliably report every capability they have. -# -# The working directory for this hook program's invocation is undefined, -# so the program should set one explicitly if it cares. -# -# If the hook program exits with success, the commit continues; but -# if it exits with failure (non-zero), the commit is stopped before -# a Subversion txn is created, and STDERR is returned to the client. -# -# On a Unix system, the normal procedure is to have 'start-commit' -# invoke other programs to do the real work, though it may do the -# work itself too. -# -# Note that 'start-commit' must be executable by the user(s) who will -# invoke it (typically the user httpd runs as), and that user must -# have filesystem-level permission to access the repository. -# -# On a Windows system, you should name the hook program -# 'start-commit.bat' or 'start-commit.exe', -# but the basic idea is the same. -# -# The hook program typically does not inherit the environment of -# its parent process. For example, a common problem is for the -# PATH environment variable to not be set to its usual value, so -# that subprograms fail to launch unless invoked via absolute path. -# If you're having unexpected problems with a hook program, the -# culprit may be unusual (or missing) environment variables. -# -# Here is an example hook script, for a Unix /bin/sh interpreter. -# For more examples and pre-written hooks, see those in -# the Subversion repository at -# http://svn.collab.net/repos/svn/trunk/tools/hook-scripts/ and -# http://svn.collab.net/repos/svn/trunk/contrib/hook-scripts/ - - -REPOS="$1" -USER="$2" - -commit-allower.pl --repository "$REPOS" --user "$USER" || exit 1 -special-auth-check.py --user "$USER" --auth-level 3 || exit 1 - -# All checks passed, so allow the commit. -exit 0 diff --git a/gitsvnhelpers/tests/testrepo.svn/locks/db-logs.lock b/gitsvnhelpers/tests/testrepo.svn/locks/db-logs.lock deleted file mode 100644 index 20dd636..0000000 --- a/gitsvnhelpers/tests/testrepo.svn/locks/db-logs.lock +++ /dev/null @@ -1,3 +0,0 @@ -This file is not used by Subversion 1.3.x or later. -However, its existence is required for compatibility with -Subversion 1.2.x or earlier. diff --git a/gitsvnhelpers/tests/testrepo.svn/locks/db.lock b/gitsvnhelpers/tests/testrepo.svn/locks/db.lock deleted file mode 100644 index 20dd636..0000000 --- a/gitsvnhelpers/tests/testrepo.svn/locks/db.lock +++ /dev/null @@ -1,3 +0,0 @@ -This file is not used by Subversion 1.3.x or later. -However, its existence is required for compatibility with -Subversion 1.2.x or earlier. diff --git a/gitsvnhelpers/utils.py b/gitsvnhelpers/utils.py index 7df015c..f2e7ca3 100644 --- a/gitsvnhelpers/utils.py +++ b/gitsvnhelpers/utils.py @@ -126,7 +126,7 @@ def local_changes(): """ result, output = popen('git status', False, False) try: - return not output[1].startswith("nothing to commit") + return not output[-1].startswith("nothing to commit") except IndexError: return True diff --git a/setup.py b/setup.py index 0332342..43efa81 100644 --- a/setup.py +++ b/setup.py @@ -7,7 +7,7 @@ version=version, description="Command-line tools to make git-svn simple", long_description = ( - open('README.txt').read() + open('README.rst').read() + '\n' + 'Change history\n' '**************\n'