You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@allura.apache.org by br...@apache.org on 2013/06/03 15:37:43 UTC
[01/21] git commit: [#6235] ticket:352 Add svn repo with
trunk/tags/branches for tests
Updated Branches:
refs/heads/master 56830d92a -> 9d4285f17
[#6235] ticket:352 Add svn repo with trunk/tags/branches for tests
Project: http://git-wip-us.apache.org/repos/asf/incubator-allura/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-allura/commit/67a10215
Tree: http://git-wip-us.apache.org/repos/asf/incubator-allura/tree/67a10215
Diff: http://git-wip-us.apache.org/repos/asf/incubator-allura/diff/67a10215
Branch: refs/heads/master
Commit: 67a102151d6789ec38e0cef5a87a09156831a33a
Parents: 56830d9
Author: Igor Bondarenko <je...@gmail.com>
Authored: Fri May 17 09:49:40 2013 +0000
Committer: Dave Brondsema <db...@slashdotmedia.com>
Committed: Fri May 31 22:14:03 2013 +0000
----------------------------------------------------------------------
.../.SOURCEFORGE-REPOSITORY | 1 +
.../data/testsvn-trunk-tags-branches/README.txt | 5 +
.../data/testsvn-trunk-tags-branches/conf/authz | 32 ++++++
.../data/testsvn-trunk-tags-branches/conf/passwd | 8 ++
.../testsvn-trunk-tags-branches/conf/svnserve.conf | 47 +++++++++
.../data/testsvn-trunk-tags-branches/db/current | 1 +
.../data/testsvn-trunk-tags-branches/db/format | 2 +
.../data/testsvn-trunk-tags-branches/db/fs-type | 1 +
.../data/testsvn-trunk-tags-branches/db/fsfs.conf | 37 +++++++
.../db/min-unpacked-rev | 1 +
.../testsvn-trunk-tags-branches/db/revprops/0/0 | 17 +++
.../testsvn-trunk-tags-branches/db/revprops/0/1 | 13 +++
.../testsvn-trunk-tags-branches/db/revprops/0/10 | 13 +++
.../testsvn-trunk-tags-branches/db/revprops/0/11 | 13 +++
.../testsvn-trunk-tags-branches/db/revprops/0/12 | 13 +++
.../testsvn-trunk-tags-branches/db/revprops/0/13 | 13 +++
.../testsvn-trunk-tags-branches/db/revprops/0/14 | 13 +++
.../testsvn-trunk-tags-branches/db/revprops/0/15 | 13 +++
.../testsvn-trunk-tags-branches/db/revprops/0/16 | 13 +++
.../testsvn-trunk-tags-branches/db/revprops/0/17 | 13 +++
.../testsvn-trunk-tags-branches/db/revprops/0/18 | 13 +++
.../testsvn-trunk-tags-branches/db/revprops/0/19 | 13 +++
.../testsvn-trunk-tags-branches/db/revprops/0/2 | 13 +++
.../testsvn-trunk-tags-branches/db/revprops/0/3 | 14 +++
.../testsvn-trunk-tags-branches/db/revprops/0/4 | 13 +++
.../testsvn-trunk-tags-branches/db/revprops/0/5 | 13 +++
.../testsvn-trunk-tags-branches/db/revprops/0/6 | 14 +++
.../testsvn-trunk-tags-branches/db/revprops/0/7 | 13 +++
.../testsvn-trunk-tags-branches/db/revprops/0/8 | 13 +++
.../testsvn-trunk-tags-branches/db/revprops/0/9 | 13 +++
.../data/testsvn-trunk-tags-branches/db/revs/0/0 | 11 ++
.../data/testsvn-trunk-tags-branches/db/revs/0/1 | 25 +++++
.../data/testsvn-trunk-tags-branches/db/revs/0/10 | Bin 0 -> 717 bytes
.../data/testsvn-trunk-tags-branches/db/revs/0/11 | Bin 0 -> 727 bytes
.../data/testsvn-trunk-tags-branches/db/revs/0/12 | Bin 0 -> 698 bytes
.../data/testsvn-trunk-tags-branches/db/revs/0/13 | 41 ++++++++
.../data/testsvn-trunk-tags-branches/db/revs/0/14 | 50 +++++++++
.../data/testsvn-trunk-tags-branches/db/revs/0/15 | Bin 0 -> 780 bytes
.../data/testsvn-trunk-tags-branches/db/revs/0/16 | 50 +++++++++
.../data/testsvn-trunk-tags-branches/db/revs/0/17 | Bin 0 -> 816 bytes
.../data/testsvn-trunk-tags-branches/db/revs/0/18 | 50 +++++++++
.../data/testsvn-trunk-tags-branches/db/revs/0/19 | Bin 0 -> 810 bytes
.../data/testsvn-trunk-tags-branches/db/revs/0/2 | Bin 0 -> 628 bytes
.../data/testsvn-trunk-tags-branches/db/revs/0/3 | Bin 0 -> 723 bytes
.../data/testsvn-trunk-tags-branches/db/revs/0/4 | Bin 0 -> 708 bytes
.../data/testsvn-trunk-tags-branches/db/revs/0/5 | Bin 0 -> 687 bytes
.../data/testsvn-trunk-tags-branches/db/revs/0/6 | Bin 0 -> 692 bytes
.../data/testsvn-trunk-tags-branches/db/revs/0/7 | Bin 0 -> 696 bytes
.../data/testsvn-trunk-tags-branches/db/revs/0/8 | Bin 0 -> 700 bytes
.../data/testsvn-trunk-tags-branches/db/revs/0/9 | Bin 0 -> 704 bytes
.../testsvn-trunk-tags-branches/db/txn-current | 1 +
.../tests/data/testsvn-trunk-tags-branches/db/uuid | 1 +
.../tests/data/testsvn-trunk-tags-branches/format | 1 +
.../testsvn-trunk-tags-branches/hooks/post-commit | 8 ++
.../hooks/post-commit.tmpl | 50 +++++++++
.../hooks/post-lock.tmpl | 44 ++++++++
.../hooks/post-revprop-change.tmpl | 56 ++++++++++
.../hooks/post-unlock.tmpl | 42 ++++++++
.../hooks/pre-commit.tmpl | 81 +++++++++++++++
.../hooks/pre-lock.tmpl | 71 +++++++++++++
.../hooks/pre-revprop-change | 1 +
.../hooks/pre-revprop-change.tmpl | 66 ++++++++++++
.../hooks/pre-unlock.tmpl | 63 +++++++++++
.../hooks/start-commit.tmpl | 65 ++++++++++++
.../testsvn-trunk-tags-branches/locks/db-logs.lock | 3 +
.../data/testsvn-trunk-tags-branches/locks/db.lock | 3 +
66 files changed, 1184 insertions(+), 0 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-allura/blob/67a10215/ForgeSVN/forgesvn/tests/data/testsvn-trunk-tags-branches/.SOURCEFORGE-REPOSITORY
----------------------------------------------------------------------
diff --git a/ForgeSVN/forgesvn/tests/data/testsvn-trunk-tags-branches/.SOURCEFORGE-REPOSITORY b/ForgeSVN/forgesvn/tests/data/testsvn-trunk-tags-branches/.SOURCEFORGE-REPOSITORY
new file mode 100644
index 0000000..f2990b4
--- /dev/null
+++ b/ForgeSVN/forgesvn/tests/data/testsvn-trunk-tags-branches/.SOURCEFORGE-REPOSITORY
@@ -0,0 +1 @@
+svn
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/incubator-allura/blob/67a10215/ForgeSVN/forgesvn/tests/data/testsvn-trunk-tags-branches/README.txt
----------------------------------------------------------------------
diff --git a/ForgeSVN/forgesvn/tests/data/testsvn-trunk-tags-branches/README.txt b/ForgeSVN/forgesvn/tests/data/testsvn-trunk-tags-branches/README.txt
new file mode 100644
index 0000000..3bf5a57
--- /dev/null
+++ b/ForgeSVN/forgesvn/tests/data/testsvn-trunk-tags-branches/README.txt
@@ -0,0 +1,5 @@
+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.
http://git-wip-us.apache.org/repos/asf/incubator-allura/blob/67a10215/ForgeSVN/forgesvn/tests/data/testsvn-trunk-tags-branches/conf/authz
----------------------------------------------------------------------
diff --git a/ForgeSVN/forgesvn/tests/data/testsvn-trunk-tags-branches/conf/authz b/ForgeSVN/forgesvn/tests/data/testsvn-trunk-tags-branches/conf/authz
new file mode 100644
index 0000000..0b9a410
--- /dev/null
+++ b/ForgeSVN/forgesvn/tests/data/testsvn-trunk-tags-branches/conf/authz
@@ -0,0 +1,32 @@
+### 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
http://git-wip-us.apache.org/repos/asf/incubator-allura/blob/67a10215/ForgeSVN/forgesvn/tests/data/testsvn-trunk-tags-branches/conf/passwd
----------------------------------------------------------------------
diff --git a/ForgeSVN/forgesvn/tests/data/testsvn-trunk-tags-branches/conf/passwd b/ForgeSVN/forgesvn/tests/data/testsvn-trunk-tags-branches/conf/passwd
new file mode 100644
index 0000000..ecaa08d
--- /dev/null
+++ b/ForgeSVN/forgesvn/tests/data/testsvn-trunk-tags-branches/conf/passwd
@@ -0,0 +1,8 @@
+### 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
http://git-wip-us.apache.org/repos/asf/incubator-allura/blob/67a10215/ForgeSVN/forgesvn/tests/data/testsvn-trunk-tags-branches/conf/svnserve.conf
----------------------------------------------------------------------
diff --git a/ForgeSVN/forgesvn/tests/data/testsvn-trunk-tags-branches/conf/svnserve.conf b/ForgeSVN/forgesvn/tests/data/testsvn-trunk-tags-branches/conf/svnserve.conf
new file mode 100644
index 0000000..e62a01e
--- /dev/null
+++ b/ForgeSVN/forgesvn/tests/data/testsvn-trunk-tags-branches/conf/svnserve.conf
@@ -0,0 +1,47 @@
+### 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
http://git-wip-us.apache.org/repos/asf/incubator-allura/blob/67a10215/ForgeSVN/forgesvn/tests/data/testsvn-trunk-tags-branches/db/current
----------------------------------------------------------------------
diff --git a/ForgeSVN/forgesvn/tests/data/testsvn-trunk-tags-branches/db/current b/ForgeSVN/forgesvn/tests/data/testsvn-trunk-tags-branches/db/current
new file mode 100644
index 0000000..d6b2404
--- /dev/null
+++ b/ForgeSVN/forgesvn/tests/data/testsvn-trunk-tags-branches/db/current
@@ -0,0 +1 @@
+19
http://git-wip-us.apache.org/repos/asf/incubator-allura/blob/67a10215/ForgeSVN/forgesvn/tests/data/testsvn-trunk-tags-branches/db/format
----------------------------------------------------------------------
diff --git a/ForgeSVN/forgesvn/tests/data/testsvn-trunk-tags-branches/db/format b/ForgeSVN/forgesvn/tests/data/testsvn-trunk-tags-branches/db/format
new file mode 100644
index 0000000..db06890
--- /dev/null
+++ b/ForgeSVN/forgesvn/tests/data/testsvn-trunk-tags-branches/db/format
@@ -0,0 +1,2 @@
+4
+layout sharded 1000
http://git-wip-us.apache.org/repos/asf/incubator-allura/blob/67a10215/ForgeSVN/forgesvn/tests/data/testsvn-trunk-tags-branches/db/fs-type
----------------------------------------------------------------------
diff --git a/ForgeSVN/forgesvn/tests/data/testsvn-trunk-tags-branches/db/fs-type b/ForgeSVN/forgesvn/tests/data/testsvn-trunk-tags-branches/db/fs-type
new file mode 100644
index 0000000..4fdd953
--- /dev/null
+++ b/ForgeSVN/forgesvn/tests/data/testsvn-trunk-tags-branches/db/fs-type
@@ -0,0 +1 @@
+fsfs
http://git-wip-us.apache.org/repos/asf/incubator-allura/blob/67a10215/ForgeSVN/forgesvn/tests/data/testsvn-trunk-tags-branches/db/fsfs.conf
----------------------------------------------------------------------
diff --git a/ForgeSVN/forgesvn/tests/data/testsvn-trunk-tags-branches/db/fsfs.conf b/ForgeSVN/forgesvn/tests/data/testsvn-trunk-tags-branches/db/fsfs.conf
new file mode 100644
index 0000000..0a5f1fe
--- /dev/null
+++ b/ForgeSVN/forgesvn/tests/data/testsvn-trunk-tags-branches/db/fsfs.conf
@@ -0,0 +1,37 @@
+### This file controls the configuration of the FSFS filesystem.
+
+[memcached-servers]
+### These options name memcached servers used to cache internal FSFS
+### data. See http://www.danga.com/memcached/ for more information on
+### memcached. To use memcached with FSFS, run one or more memcached
+### servers, and specify each of them as an option like so:
+# first-server = 127.0.0.1:11211
+# remote-memcached = mymemcached.corp.example.com:11212
+### The option name is ignored; the value is of the form HOST:PORT.
+### memcached servers can be shared between multiple repositories;
+### however, if you do this, you *must* ensure that repositories have
+### distinct UUIDs and paths, or else cached data from one repository
+### might be used by another accidentally. Note also that memcached has
+### no authentication for reads or writes, so you must ensure that your
+### memcached servers are only accessible by trusted users.
+
+[caches]
+### When a cache-related error occurs, normally Subversion ignores it
+### and continues, logging an error if the server is appropriately
+### configured (and ignoring it with file:// access). To make
+### Subversion never ignore cache errors, uncomment this line.
+# fail-stop = true
+
+[rep-sharing]
+### To conserve space, the filesystem can optionally avoid storing
+### duplicate representations. This comes at a slight cost in performace,
+### as maintaining a database of shared representations can increase
+### commit times. The space savings are dependent upon the size of the
+### repository, the number of objects it contains and the amount of
+### duplication between them, usually a function of the branching and
+### merging process.
+###
+### The following parameter enables rep-sharing in the repository. It can
+### be switched on and off at will, but for best space-saving results
+### should be enabled consistently over the life of the repository.
+# enable-rep-sharing = false
http://git-wip-us.apache.org/repos/asf/incubator-allura/blob/67a10215/ForgeSVN/forgesvn/tests/data/testsvn-trunk-tags-branches/db/min-unpacked-rev
----------------------------------------------------------------------
diff --git a/ForgeSVN/forgesvn/tests/data/testsvn-trunk-tags-branches/db/min-unpacked-rev b/ForgeSVN/forgesvn/tests/data/testsvn-trunk-tags-branches/db/min-unpacked-rev
new file mode 100644
index 0000000..573541a
--- /dev/null
+++ b/ForgeSVN/forgesvn/tests/data/testsvn-trunk-tags-branches/db/min-unpacked-rev
@@ -0,0 +1 @@
+0
http://git-wip-us.apache.org/repos/asf/incubator-allura/blob/67a10215/ForgeSVN/forgesvn/tests/data/testsvn-trunk-tags-branches/db/revprops/0/0
----------------------------------------------------------------------
diff --git a/ForgeSVN/forgesvn/tests/data/testsvn-trunk-tags-branches/db/revprops/0/0 b/ForgeSVN/forgesvn/tests/data/testsvn-trunk-tags-branches/db/revprops/0/0
new file mode 100644
index 0000000..4b35d85
--- /dev/null
+++ b/ForgeSVN/forgesvn/tests/data/testsvn-trunk-tags-branches/db/revprops/0/0
@@ -0,0 +1,17 @@
+K 8
+svn:date
+V 27
+2012-09-14T09:24:53.167845Z
+K 17
+svn:sync-from-url
+V 45
+svn://svn.code.sf.net/p/jetest/test-svn/trunk
+K 18
+svn:sync-from-uuid
+V 36
+2f15bc49-05cb-4844-b76f-9b7a511244b3
+K 24
+svn:sync-last-merged-rev
+V 1
+3
+END
http://git-wip-us.apache.org/repos/asf/incubator-allura/blob/67a10215/ForgeSVN/forgesvn/tests/data/testsvn-trunk-tags-branches/db/revprops/0/1
----------------------------------------------------------------------
diff --git a/ForgeSVN/forgesvn/tests/data/testsvn-trunk-tags-branches/db/revprops/0/1 b/ForgeSVN/forgesvn/tests/data/testsvn-trunk-tags-branches/db/revprops/0/1
new file mode 100644
index 0000000..21befe5
--- /dev/null
+++ b/ForgeSVN/forgesvn/tests/data/testsvn-trunk-tags-branches/db/revprops/0/1
@@ -0,0 +1,13 @@
+K 10
+svn:author
+V 6
+allura
+K 8
+svn:date
+V 27
+2012-09-14T09:24:59.657361Z
+K 7
+svn:log
+V 14
+Initial commit
+END
http://git-wip-us.apache.org/repos/asf/incubator-allura/blob/67a10215/ForgeSVN/forgesvn/tests/data/testsvn-trunk-tags-branches/db/revprops/0/10
----------------------------------------------------------------------
diff --git a/ForgeSVN/forgesvn/tests/data/testsvn-trunk-tags-branches/db/revprops/0/10 b/ForgeSVN/forgesvn/tests/data/testsvn-trunk-tags-branches/db/revprops/0/10
new file mode 100644
index 0000000..7563361
--- /dev/null
+++ b/ForgeSVN/forgesvn/tests/data/testsvn-trunk-tags-branches/db/revprops/0/10
@@ -0,0 +1,13 @@
+K 10
+svn:author
+V 6
+admin1
+K 8
+svn:date
+V 27
+2013-05-10T13:57:49.331144Z
+K 7
+svn:log
+V 2
+10
+END
http://git-wip-us.apache.org/repos/asf/incubator-allura/blob/67a10215/ForgeSVN/forgesvn/tests/data/testsvn-trunk-tags-branches/db/revprops/0/11
----------------------------------------------------------------------
diff --git a/ForgeSVN/forgesvn/tests/data/testsvn-trunk-tags-branches/db/revprops/0/11 b/ForgeSVN/forgesvn/tests/data/testsvn-trunk-tags-branches/db/revprops/0/11
new file mode 100644
index 0000000..1a7c57b
--- /dev/null
+++ b/ForgeSVN/forgesvn/tests/data/testsvn-trunk-tags-branches/db/revprops/0/11
@@ -0,0 +1,13 @@
+K 10
+svn:author
+V 6
+admin1
+K 8
+svn:date
+V 27
+2013-05-10T13:57:54.222285Z
+K 7
+svn:log
+V 2
+11
+END
http://git-wip-us.apache.org/repos/asf/incubator-allura/blob/67a10215/ForgeSVN/forgesvn/tests/data/testsvn-trunk-tags-branches/db/revprops/0/12
----------------------------------------------------------------------
diff --git a/ForgeSVN/forgesvn/tests/data/testsvn-trunk-tags-branches/db/revprops/0/12 b/ForgeSVN/forgesvn/tests/data/testsvn-trunk-tags-branches/db/revprops/0/12
new file mode 100644
index 0000000..e5261de
--- /dev/null
+++ b/ForgeSVN/forgesvn/tests/data/testsvn-trunk-tags-branches/db/revprops/0/12
@@ -0,0 +1,13 @@
+K 10
+svn:author
+V 6
+admin1
+K 8
+svn:date
+V 27
+2013-05-14T13:42:47.373667Z
+K 7
+svn:log
+V 3
+123
+END
http://git-wip-us.apache.org/repos/asf/incubator-allura/blob/67a10215/ForgeSVN/forgesvn/tests/data/testsvn-trunk-tags-branches/db/revprops/0/13
----------------------------------------------------------------------
diff --git a/ForgeSVN/forgesvn/tests/data/testsvn-trunk-tags-branches/db/revprops/0/13 b/ForgeSVN/forgesvn/tests/data/testsvn-trunk-tags-branches/db/revprops/0/13
new file mode 100644
index 0000000..98e59b4
--- /dev/null
+++ b/ForgeSVN/forgesvn/tests/data/testsvn-trunk-tags-branches/db/revprops/0/13
@@ -0,0 +1,13 @@
+K 10
+svn:author
+V 6
+admin1
+K 8
+svn:date
+V 27
+2013-05-17T09:14:58.547186Z
+K 7
+svn:log
+V 28
+Added tags and branches dirs
+END
http://git-wip-us.apache.org/repos/asf/incubator-allura/blob/67a10215/ForgeSVN/forgesvn/tests/data/testsvn-trunk-tags-branches/db/revprops/0/14
----------------------------------------------------------------------
diff --git a/ForgeSVN/forgesvn/tests/data/testsvn-trunk-tags-branches/db/revprops/0/14 b/ForgeSVN/forgesvn/tests/data/testsvn-trunk-tags-branches/db/revprops/0/14
new file mode 100644
index 0000000..0038f28
--- /dev/null
+++ b/ForgeSVN/forgesvn/tests/data/testsvn-trunk-tags-branches/db/revprops/0/14
@@ -0,0 +1,13 @@
+K 10
+svn:author
+V 6
+admin1
+K 8
+svn:date
+V 27
+2013-05-17T09:15:06.279256Z
+K 7
+svn:log
+V 7
+Tag 1.0
+END
http://git-wip-us.apache.org/repos/asf/incubator-allura/blob/67a10215/ForgeSVN/forgesvn/tests/data/testsvn-trunk-tags-branches/db/revprops/0/15
----------------------------------------------------------------------
diff --git a/ForgeSVN/forgesvn/tests/data/testsvn-trunk-tags-branches/db/revprops/0/15 b/ForgeSVN/forgesvn/tests/data/testsvn-trunk-tags-branches/db/revprops/0/15
new file mode 100644
index 0000000..2defcf4
--- /dev/null
+++ b/ForgeSVN/forgesvn/tests/data/testsvn-trunk-tags-branches/db/revprops/0/15
@@ -0,0 +1,13 @@
+K 10
+svn:author
+V 6
+admin1
+K 8
+svn:date
+V 27
+2013-05-17T09:16:49.265539Z
+K 7
+svn:log
+V 13
+added aaa.txt
+END
http://git-wip-us.apache.org/repos/asf/incubator-allura/blob/67a10215/ForgeSVN/forgesvn/tests/data/testsvn-trunk-tags-branches/db/revprops/0/16
----------------------------------------------------------------------
diff --git a/ForgeSVN/forgesvn/tests/data/testsvn-trunk-tags-branches/db/revprops/0/16 b/ForgeSVN/forgesvn/tests/data/testsvn-trunk-tags-branches/db/revprops/0/16
new file mode 100644
index 0000000..0c9fa72
--- /dev/null
+++ b/ForgeSVN/forgesvn/tests/data/testsvn-trunk-tags-branches/db/revprops/0/16
@@ -0,0 +1,13 @@
+K 10
+svn:author
+V 6
+admin1
+K 8
+svn:date
+V 27
+2013-05-17T09:17:11.372670Z
+K 7
+svn:log
+V 10
+aaa branch
+END
http://git-wip-us.apache.org/repos/asf/incubator-allura/blob/67a10215/ForgeSVN/forgesvn/tests/data/testsvn-trunk-tags-branches/db/revprops/0/17
----------------------------------------------------------------------
diff --git a/ForgeSVN/forgesvn/tests/data/testsvn-trunk-tags-branches/db/revprops/0/17 b/ForgeSVN/forgesvn/tests/data/testsvn-trunk-tags-branches/db/revprops/0/17
new file mode 100644
index 0000000..2cb2c2e
--- /dev/null
+++ b/ForgeSVN/forgesvn/tests/data/testsvn-trunk-tags-branches/db/revprops/0/17
@@ -0,0 +1,13 @@
+K 10
+svn:author
+V 6
+admin1
+K 8
+svn:date
+V 27
+2013-05-17T09:17:43.720670Z
+K 7
+svn:log
+V 13
+added bbb.txt
+END
http://git-wip-us.apache.org/repos/asf/incubator-allura/blob/67a10215/ForgeSVN/forgesvn/tests/data/testsvn-trunk-tags-branches/db/revprops/0/18
----------------------------------------------------------------------
diff --git a/ForgeSVN/forgesvn/tests/data/testsvn-trunk-tags-branches/db/revprops/0/18 b/ForgeSVN/forgesvn/tests/data/testsvn-trunk-tags-branches/db/revprops/0/18
new file mode 100644
index 0000000..0d76491
--- /dev/null
+++ b/ForgeSVN/forgesvn/tests/data/testsvn-trunk-tags-branches/db/revprops/0/18
@@ -0,0 +1,13 @@
+K 10
+svn:author
+V 6
+admin1
+K 8
+svn:date
+V 27
+2013-05-17T09:18:43.367408Z
+K 7
+svn:log
+V 22
+deleted svn-commit.tmp
+END
http://git-wip-us.apache.org/repos/asf/incubator-allura/blob/67a10215/ForgeSVN/forgesvn/tests/data/testsvn-trunk-tags-branches/db/revprops/0/19
----------------------------------------------------------------------
diff --git a/ForgeSVN/forgesvn/tests/data/testsvn-trunk-tags-branches/db/revprops/0/19 b/ForgeSVN/forgesvn/tests/data/testsvn-trunk-tags-branches/db/revprops/0/19
new file mode 100644
index 0000000..8009d60
--- /dev/null
+++ b/ForgeSVN/forgesvn/tests/data/testsvn-trunk-tags-branches/db/revprops/0/19
@@ -0,0 +1,13 @@
+K 10
+svn:author
+V 6
+admin1
+K 8
+svn:date
+V 27
+2013-05-17T09:23:35.675301Z
+K 7
+svn:log
+V 8
+ccc.txt.
+END
http://git-wip-us.apache.org/repos/asf/incubator-allura/blob/67a10215/ForgeSVN/forgesvn/tests/data/testsvn-trunk-tags-branches/db/revprops/0/2
----------------------------------------------------------------------
diff --git a/ForgeSVN/forgesvn/tests/data/testsvn-trunk-tags-branches/db/revprops/0/2 b/ForgeSVN/forgesvn/tests/data/testsvn-trunk-tags-branches/db/revprops/0/2
new file mode 100644
index 0000000..57aaf4c
--- /dev/null
+++ b/ForgeSVN/forgesvn/tests/data/testsvn-trunk-tags-branches/db/revprops/0/2
@@ -0,0 +1,13 @@
+K 10
+svn:author
+V 7
+jetmind
+K 8
+svn:date
+V 27
+2012-09-14T09:29:26.468596Z
+K 7
+svn:log
+V 4
+init
+END
http://git-wip-us.apache.org/repos/asf/incubator-allura/blob/67a10215/ForgeSVN/forgesvn/tests/data/testsvn-trunk-tags-branches/db/revprops/0/3
----------------------------------------------------------------------
diff --git a/ForgeSVN/forgesvn/tests/data/testsvn-trunk-tags-branches/db/revprops/0/3 b/ForgeSVN/forgesvn/tests/data/testsvn-trunk-tags-branches/db/revprops/0/3
new file mode 100644
index 0000000..c49edff
--- /dev/null
+++ b/ForgeSVN/forgesvn/tests/data/testsvn-trunk-tags-branches/db/revprops/0/3
@@ -0,0 +1,14 @@
+K 10
+svn:author
+V 7
+jetmind
+K 8
+svn:date
+V 27
+2013-02-20T11:09:25.047049Z
+K 7
+svn:log
+V 4
+wqe
+
+END
http://git-wip-us.apache.org/repos/asf/incubator-allura/blob/67a10215/ForgeSVN/forgesvn/tests/data/testsvn-trunk-tags-branches/db/revprops/0/4
----------------------------------------------------------------------
diff --git a/ForgeSVN/forgesvn/tests/data/testsvn-trunk-tags-branches/db/revprops/0/4 b/ForgeSVN/forgesvn/tests/data/testsvn-trunk-tags-branches/db/revprops/0/4
new file mode 100644
index 0000000..e69fa20
--- /dev/null
+++ b/ForgeSVN/forgesvn/tests/data/testsvn-trunk-tags-branches/db/revprops/0/4
@@ -0,0 +1,13 @@
+K 10
+svn:author
+V 6
+admin1
+K 8
+svn:date
+V 27
+2013-03-12T11:07:12.499418Z
+K 7
+svn:log
+V 3
+yep
+END
http://git-wip-us.apache.org/repos/asf/incubator-allura/blob/67a10215/ForgeSVN/forgesvn/tests/data/testsvn-trunk-tags-branches/db/revprops/0/5
----------------------------------------------------------------------
diff --git a/ForgeSVN/forgesvn/tests/data/testsvn-trunk-tags-branches/db/revprops/0/5 b/ForgeSVN/forgesvn/tests/data/testsvn-trunk-tags-branches/db/revprops/0/5
new file mode 100644
index 0000000..1d776d9
--- /dev/null
+++ b/ForgeSVN/forgesvn/tests/data/testsvn-trunk-tags-branches/db/revprops/0/5
@@ -0,0 +1,13 @@
+K 10
+svn:author
+V 6
+admin1
+K 8
+svn:date
+V 27
+2013-03-12T11:08:27.707083Z
+K 7
+svn:log
+V 5
+yep 2
+END
http://git-wip-us.apache.org/repos/asf/incubator-allura/blob/67a10215/ForgeSVN/forgesvn/tests/data/testsvn-trunk-tags-branches/db/revprops/0/6
----------------------------------------------------------------------
diff --git a/ForgeSVN/forgesvn/tests/data/testsvn-trunk-tags-branches/db/revprops/0/6 b/ForgeSVN/forgesvn/tests/data/testsvn-trunk-tags-branches/db/revprops/0/6
new file mode 100644
index 0000000..cd6b553
--- /dev/null
+++ b/ForgeSVN/forgesvn/tests/data/testsvn-trunk-tags-branches/db/revprops/0/6
@@ -0,0 +1,14 @@
+K 10
+svn:author
+V 6
+admin1
+K 8
+svn:date
+V 27
+2013-05-10T13:57:26.168654Z
+K 7
+svn:log
+V 2
+6
+
+END
http://git-wip-us.apache.org/repos/asf/incubator-allura/blob/67a10215/ForgeSVN/forgesvn/tests/data/testsvn-trunk-tags-branches/db/revprops/0/7
----------------------------------------------------------------------
diff --git a/ForgeSVN/forgesvn/tests/data/testsvn-trunk-tags-branches/db/revprops/0/7 b/ForgeSVN/forgesvn/tests/data/testsvn-trunk-tags-branches/db/revprops/0/7
new file mode 100644
index 0000000..a140dbd
--- /dev/null
+++ b/ForgeSVN/forgesvn/tests/data/testsvn-trunk-tags-branches/db/revprops/0/7
@@ -0,0 +1,13 @@
+K 10
+svn:author
+V 6
+admin1
+K 8
+svn:date
+V 27
+2013-05-10T13:57:34.856691Z
+K 7
+svn:log
+V 1
+7
+END
http://git-wip-us.apache.org/repos/asf/incubator-allura/blob/67a10215/ForgeSVN/forgesvn/tests/data/testsvn-trunk-tags-branches/db/revprops/0/8
----------------------------------------------------------------------
diff --git a/ForgeSVN/forgesvn/tests/data/testsvn-trunk-tags-branches/db/revprops/0/8 b/ForgeSVN/forgesvn/tests/data/testsvn-trunk-tags-branches/db/revprops/0/8
new file mode 100644
index 0000000..507c862
--- /dev/null
+++ b/ForgeSVN/forgesvn/tests/data/testsvn-trunk-tags-branches/db/revprops/0/8
@@ -0,0 +1,13 @@
+K 10
+svn:author
+V 6
+admin1
+K 8
+svn:date
+V 27
+2013-05-10T13:57:40.650304Z
+K 7
+svn:log
+V 1
+8
+END
http://git-wip-us.apache.org/repos/asf/incubator-allura/blob/67a10215/ForgeSVN/forgesvn/tests/data/testsvn-trunk-tags-branches/db/revprops/0/9
----------------------------------------------------------------------
diff --git a/ForgeSVN/forgesvn/tests/data/testsvn-trunk-tags-branches/db/revprops/0/9 b/ForgeSVN/forgesvn/tests/data/testsvn-trunk-tags-branches/db/revprops/0/9
new file mode 100644
index 0000000..c5a3bf0
--- /dev/null
+++ b/ForgeSVN/forgesvn/tests/data/testsvn-trunk-tags-branches/db/revprops/0/9
@@ -0,0 +1,13 @@
+K 10
+svn:author
+V 6
+admin1
+K 8
+svn:date
+V 27
+2013-05-10T13:57:45.270886Z
+K 7
+svn:log
+V 1
+9
+END
http://git-wip-us.apache.org/repos/asf/incubator-allura/blob/67a10215/ForgeSVN/forgesvn/tests/data/testsvn-trunk-tags-branches/db/revs/0/0
----------------------------------------------------------------------
diff --git a/ForgeSVN/forgesvn/tests/data/testsvn-trunk-tags-branches/db/revs/0/0 b/ForgeSVN/forgesvn/tests/data/testsvn-trunk-tags-branches/db/revs/0/0
new file mode 100644
index 0000000..10f5c45
--- /dev/null
+++ b/ForgeSVN/forgesvn/tests/data/testsvn-trunk-tags-branches/db/revs/0/0
@@ -0,0 +1,11 @@
+PLAIN
+END
+ENDREP
+id: 0.0.r0/17
+type: dir
+count: 0
+text: 0 0 4 4 2d2977d1c96f487abe4a1e202dd03b4e
+cpath: /
+
+
+17 107
http://git-wip-us.apache.org/repos/asf/incubator-allura/blob/67a10215/ForgeSVN/forgesvn/tests/data/testsvn-trunk-tags-branches/db/revs/0/1
----------------------------------------------------------------------
diff --git a/ForgeSVN/forgesvn/tests/data/testsvn-trunk-tags-branches/db/revs/0/1 b/ForgeSVN/forgesvn/tests/data/testsvn-trunk-tags-branches/db/revs/0/1
new file mode 100644
index 0000000..ab1abdb
--- /dev/null
+++ b/ForgeSVN/forgesvn/tests/data/testsvn-trunk-tags-branches/db/revs/0/1
@@ -0,0 +1,25 @@
+id: 0-1.0.r1/0
+type: dir
+count: 0
+cpath: /trunk
+copyroot: 0 /
+
+PLAIN
+K 5
+trunk
+V 14
+dir 0-1.0.r1/0
+END
+ENDREP
+id: 0.0.r1/110
+type: dir
+pred: 0.0.r0/17
+count: 1
+text: 1 63 34 34 a669707b1f7dfac13baa7cbf8b292233
+cpath: /
+copyroot: 0 /
+
+_0.0.t0-0 add-dir false false /trunk
+
+
+110 234
http://git-wip-us.apache.org/repos/asf/incubator-allura/blob/67a10215/ForgeSVN/forgesvn/tests/data/testsvn-trunk-tags-branches/db/revs/0/10
----------------------------------------------------------------------
diff --git a/ForgeSVN/forgesvn/tests/data/testsvn-trunk-tags-branches/db/revs/0/10 b/ForgeSVN/forgesvn/tests/data/testsvn-trunk-tags-branches/db/revs/0/10
new file mode 100644
index 0000000..17f46f8
Binary files /dev/null and b/ForgeSVN/forgesvn/tests/data/testsvn-trunk-tags-branches/db/revs/0/10 differ
http://git-wip-us.apache.org/repos/asf/incubator-allura/blob/67a10215/ForgeSVN/forgesvn/tests/data/testsvn-trunk-tags-branches/db/revs/0/11
----------------------------------------------------------------------
diff --git a/ForgeSVN/forgesvn/tests/data/testsvn-trunk-tags-branches/db/revs/0/11 b/ForgeSVN/forgesvn/tests/data/testsvn-trunk-tags-branches/db/revs/0/11
new file mode 100644
index 0000000..f3de3e1
Binary files /dev/null and b/ForgeSVN/forgesvn/tests/data/testsvn-trunk-tags-branches/db/revs/0/11 differ
http://git-wip-us.apache.org/repos/asf/incubator-allura/blob/67a10215/ForgeSVN/forgesvn/tests/data/testsvn-trunk-tags-branches/db/revs/0/12
----------------------------------------------------------------------
diff --git a/ForgeSVN/forgesvn/tests/data/testsvn-trunk-tags-branches/db/revs/0/12 b/ForgeSVN/forgesvn/tests/data/testsvn-trunk-tags-branches/db/revs/0/12
new file mode 100644
index 0000000..9ec8607
Binary files /dev/null and b/ForgeSVN/forgesvn/tests/data/testsvn-trunk-tags-branches/db/revs/0/12 differ
http://git-wip-us.apache.org/repos/asf/incubator-allura/blob/67a10215/ForgeSVN/forgesvn/tests/data/testsvn-trunk-tags-branches/db/revs/0/13
----------------------------------------------------------------------
diff --git a/ForgeSVN/forgesvn/tests/data/testsvn-trunk-tags-branches/db/revs/0/13 b/ForgeSVN/forgesvn/tests/data/testsvn-trunk-tags-branches/db/revs/0/13
new file mode 100644
index 0000000..2429ed6
--- /dev/null
+++ b/ForgeSVN/forgesvn/tests/data/testsvn-trunk-tags-branches/db/revs/0/13
@@ -0,0 +1,41 @@
+id: 0-13.0.r13/0
+type: dir
+count: 0
+cpath: /branches
+copyroot: 0 /
+
+id: 2-13.0.r13/68
+type: dir
+count: 0
+cpath: /tags
+copyroot: 0 /
+
+PLAIN
+K 8
+branches
+V 16
+dir 0-13.0.r13/0
+K 4
+tags
+V 17
+dir 2-13.0.r13/68
+K 5
+trunk
+V 17
+dir 0-1.0.r12/320
+END
+ENDREP
+id: 0.0.r13/250
+type: dir
+pred: 0.0.r12/509
+count: 13
+text: 13 133 104 104 3f9f56b54a923ea2d82149d15bed2320
+cpath: /
+copyroot: 0 /
+
+_0.0.t12-d add-dir false false /branches
+
+_2.0.t12-d add-dir false false /tags
+
+
+250 382
http://git-wip-us.apache.org/repos/asf/incubator-allura/blob/67a10215/ForgeSVN/forgesvn/tests/data/testsvn-trunk-tags-branches/db/revs/0/14
----------------------------------------------------------------------
diff --git a/ForgeSVN/forgesvn/tests/data/testsvn-trunk-tags-branches/db/revs/0/14 b/ForgeSVN/forgesvn/tests/data/testsvn-trunk-tags-branches/db/revs/0/14
new file mode 100644
index 0000000..bf3c497
--- /dev/null
+++ b/ForgeSVN/forgesvn/tests/data/testsvn-trunk-tags-branches/db/revs/0/14
@@ -0,0 +1,50 @@
+id: 0-1.0-14.r14/0
+type: dir
+pred: 0-1.0.r12/320
+count: 12
+text: 12 227 80 80 ba64294fc83c48c9c7a1bd3ce032b6d9
+cpath: /tags/tag-1.0
+copyfrom: 13 /trunk
+
+PLAIN
+K 7
+tag-1.0
+V 18
+dir 0-1.0-14.r14/0
+END
+ENDREP
+id: 2-13.0.r14/206
+type: dir
+pred: 2-13.0.r13/68
+count: 1
+text: 14 153 40 40 6443a2eb5a20cc1d22a37071980805b0
+cpath: /tags
+copyroot: 0 /
+
+PLAIN
+K 8
+branches
+V 16
+dir 0-13.0.r13/0
+K 4
+tags
+V 18
+dir 2-13.0.r14/206
+K 5
+trunk
+V 17
+dir 0-1.0.r12/320
+END
+ENDREP
+id: 0.0.r14/462
+type: dir
+pred: 0.0.r13/250
+count: 14
+text: 14 344 105 105 2bda7023698b9f41502d02d11b6e019b
+cpath: /
+copyroot: 0 /
+
+0-1._0.t13-e add-dir false false /tags/tag-1.0
+13 /trunk
+
+462 594
http://git-wip-us.apache.org/repos/asf/incubator-allura/blob/67a10215/ForgeSVN/forgesvn/tests/data/testsvn-trunk-tags-branches/db/revs/0/15
----------------------------------------------------------------------
diff --git a/ForgeSVN/forgesvn/tests/data/testsvn-trunk-tags-branches/db/revs/0/15 b/ForgeSVN/forgesvn/tests/data/testsvn-trunk-tags-branches/db/revs/0/15
new file mode 100644
index 0000000..1a80c35
Binary files /dev/null and b/ForgeSVN/forgesvn/tests/data/testsvn-trunk-tags-branches/db/revs/0/15 differ
http://git-wip-us.apache.org/repos/asf/incubator-allura/blob/67a10215/ForgeSVN/forgesvn/tests/data/testsvn-trunk-tags-branches/db/revs/0/16
----------------------------------------------------------------------
diff --git a/ForgeSVN/forgesvn/tests/data/testsvn-trunk-tags-branches/db/revs/0/16 b/ForgeSVN/forgesvn/tests/data/testsvn-trunk-tags-branches/db/revs/0/16
new file mode 100644
index 0000000..f9be716
--- /dev/null
+++ b/ForgeSVN/forgesvn/tests/data/testsvn-trunk-tags-branches/db/revs/0/16
@@ -0,0 +1,50 @@
+id: 0-1.0-16.r16/0
+type: dir
+pred: 0-1.0.r15/333
+count: 13
+text: 15 204 116 116 079f4d91976dc8c436c1666ad1d957b1
+cpath: /branches/aaa
+copyfrom: 15 /trunk
+
+PLAIN
+K 3
+aaa
+V 18
+dir 0-1.0-16.r16/0
+END
+ENDREP
+id: 0-13.0.r16/204
+type: dir
+pred: 0-13.0.r13/0
+count: 1
+text: 16 155 36 36 cabd976ed21bae7b43e6eeddc5ffad5f
+cpath: /branches
+copyroot: 0 /
+
+PLAIN
+K 8
+branches
+V 18
+dir 0-13.0.r16/204
+K 4
+tags
+V 18
+dir 2-13.0.r14/206
+K 5
+trunk
+V 17
+dir 0-1.0.r15/333
+END
+ENDREP
+id: 0.0.r16/465
+type: dir
+pred: 0.0.r15/592
+count: 16
+text: 16 345 107 107 76fe20fadbbc96a664e8c348c6bcb6c8
+cpath: /
+copyroot: 0 /
+
+0-1._0.t15-g add-dir false false /branches/aaa
+15 /trunk
+
+465 597
http://git-wip-us.apache.org/repos/asf/incubator-allura/blob/67a10215/ForgeSVN/forgesvn/tests/data/testsvn-trunk-tags-branches/db/revs/0/17
----------------------------------------------------------------------
diff --git a/ForgeSVN/forgesvn/tests/data/testsvn-trunk-tags-branches/db/revs/0/17 b/ForgeSVN/forgesvn/tests/data/testsvn-trunk-tags-branches/db/revs/0/17
new file mode 100644
index 0000000..511ce79
Binary files /dev/null and b/ForgeSVN/forgesvn/tests/data/testsvn-trunk-tags-branches/db/revs/0/17 differ
http://git-wip-us.apache.org/repos/asf/incubator-allura/blob/67a10215/ForgeSVN/forgesvn/tests/data/testsvn-trunk-tags-branches/db/revs/0/18
----------------------------------------------------------------------
diff --git a/ForgeSVN/forgesvn/tests/data/testsvn-trunk-tags-branches/db/revs/0/18 b/ForgeSVN/forgesvn/tests/data/testsvn-trunk-tags-branches/db/revs/0/18
new file mode 100644
index 0000000..e32a413
--- /dev/null
+++ b/ForgeSVN/forgesvn/tests/data/testsvn-trunk-tags-branches/db/revs/0/18
@@ -0,0 +1,50 @@
+PLAIN
+K 6
+README
+V 17
+file 1-2.0.r12/37
+K 7
+aaa.txt
+V 18
+file 1-15.0.r15/31
+K 7
+bbb.txt
+V 18
+file 1-17.0.r17/29
+END
+ENDREP
+id: 0-1.0.r18/123
+type: dir
+pred: 0-1.0.r17/367
+count: 14
+text: 18 0 110 110 2272a90f79e98a1cbae4a108ee067708
+cpath: /trunk
+copyroot: 0 /
+
+PLAIN
+K 8
+branches
+V 18
+dir 0-13.0.r16/204
+K 4
+tags
+V 18
+dir 2-13.0.r14/206
+K 5
+trunk
+V 17
+dir 0-1.0.r18/123
+END
+ENDREP
+id: 0.0.r18/382
+type: dir
+pred: 0.0.r17/628
+count: 18
+text: 18 262 107 107 438df4be71cf3d5878ab91f8cdb6b9e9
+cpath: /
+copyroot: 0 /
+
+1-3.0.r3/82 delete-file false false /trunk/svn-commit.tmp
+
+
+382 514
http://git-wip-us.apache.org/repos/asf/incubator-allura/blob/67a10215/ForgeSVN/forgesvn/tests/data/testsvn-trunk-tags-branches/db/revs/0/19
----------------------------------------------------------------------
diff --git a/ForgeSVN/forgesvn/tests/data/testsvn-trunk-tags-branches/db/revs/0/19 b/ForgeSVN/forgesvn/tests/data/testsvn-trunk-tags-branches/db/revs/0/19
new file mode 100644
index 0000000..c7358c8
Binary files /dev/null and b/ForgeSVN/forgesvn/tests/data/testsvn-trunk-tags-branches/db/revs/0/19 differ
http://git-wip-us.apache.org/repos/asf/incubator-allura/blob/67a10215/ForgeSVN/forgesvn/tests/data/testsvn-trunk-tags-branches/db/revs/0/2
----------------------------------------------------------------------
diff --git a/ForgeSVN/forgesvn/tests/data/testsvn-trunk-tags-branches/db/revs/0/2 b/ForgeSVN/forgesvn/tests/data/testsvn-trunk-tags-branches/db/revs/0/2
new file mode 100644
index 0000000..7e631b9
Binary files /dev/null and b/ForgeSVN/forgesvn/tests/data/testsvn-trunk-tags-branches/db/revs/0/2 differ
http://git-wip-us.apache.org/repos/asf/incubator-allura/blob/67a10215/ForgeSVN/forgesvn/tests/data/testsvn-trunk-tags-branches/db/revs/0/3
----------------------------------------------------------------------
diff --git a/ForgeSVN/forgesvn/tests/data/testsvn-trunk-tags-branches/db/revs/0/3 b/ForgeSVN/forgesvn/tests/data/testsvn-trunk-tags-branches/db/revs/0/3
new file mode 100644
index 0000000..8500fa5
Binary files /dev/null and b/ForgeSVN/forgesvn/tests/data/testsvn-trunk-tags-branches/db/revs/0/3 differ
http://git-wip-us.apache.org/repos/asf/incubator-allura/blob/67a10215/ForgeSVN/forgesvn/tests/data/testsvn-trunk-tags-branches/db/revs/0/4
----------------------------------------------------------------------
diff --git a/ForgeSVN/forgesvn/tests/data/testsvn-trunk-tags-branches/db/revs/0/4 b/ForgeSVN/forgesvn/tests/data/testsvn-trunk-tags-branches/db/revs/0/4
new file mode 100644
index 0000000..5185805
Binary files /dev/null and b/ForgeSVN/forgesvn/tests/data/testsvn-trunk-tags-branches/db/revs/0/4 differ
http://git-wip-us.apache.org/repos/asf/incubator-allura/blob/67a10215/ForgeSVN/forgesvn/tests/data/testsvn-trunk-tags-branches/db/revs/0/5
----------------------------------------------------------------------
diff --git a/ForgeSVN/forgesvn/tests/data/testsvn-trunk-tags-branches/db/revs/0/5 b/ForgeSVN/forgesvn/tests/data/testsvn-trunk-tags-branches/db/revs/0/5
new file mode 100644
index 0000000..0e44839
Binary files /dev/null and b/ForgeSVN/forgesvn/tests/data/testsvn-trunk-tags-branches/db/revs/0/5 differ
http://git-wip-us.apache.org/repos/asf/incubator-allura/blob/67a10215/ForgeSVN/forgesvn/tests/data/testsvn-trunk-tags-branches/db/revs/0/6
----------------------------------------------------------------------
diff --git a/ForgeSVN/forgesvn/tests/data/testsvn-trunk-tags-branches/db/revs/0/6 b/ForgeSVN/forgesvn/tests/data/testsvn-trunk-tags-branches/db/revs/0/6
new file mode 100644
index 0000000..5e704e1
Binary files /dev/null and b/ForgeSVN/forgesvn/tests/data/testsvn-trunk-tags-branches/db/revs/0/6 differ
http://git-wip-us.apache.org/repos/asf/incubator-allura/blob/67a10215/ForgeSVN/forgesvn/tests/data/testsvn-trunk-tags-branches/db/revs/0/7
----------------------------------------------------------------------
diff --git a/ForgeSVN/forgesvn/tests/data/testsvn-trunk-tags-branches/db/revs/0/7 b/ForgeSVN/forgesvn/tests/data/testsvn-trunk-tags-branches/db/revs/0/7
new file mode 100644
index 0000000..9786f31
Binary files /dev/null and b/ForgeSVN/forgesvn/tests/data/testsvn-trunk-tags-branches/db/revs/0/7 differ
http://git-wip-us.apache.org/repos/asf/incubator-allura/blob/67a10215/ForgeSVN/forgesvn/tests/data/testsvn-trunk-tags-branches/db/revs/0/8
----------------------------------------------------------------------
diff --git a/ForgeSVN/forgesvn/tests/data/testsvn-trunk-tags-branches/db/revs/0/8 b/ForgeSVN/forgesvn/tests/data/testsvn-trunk-tags-branches/db/revs/0/8
new file mode 100644
index 0000000..a4bb09f
Binary files /dev/null and b/ForgeSVN/forgesvn/tests/data/testsvn-trunk-tags-branches/db/revs/0/8 differ
http://git-wip-us.apache.org/repos/asf/incubator-allura/blob/67a10215/ForgeSVN/forgesvn/tests/data/testsvn-trunk-tags-branches/db/revs/0/9
----------------------------------------------------------------------
diff --git a/ForgeSVN/forgesvn/tests/data/testsvn-trunk-tags-branches/db/revs/0/9 b/ForgeSVN/forgesvn/tests/data/testsvn-trunk-tags-branches/db/revs/0/9
new file mode 100644
index 0000000..30dad50
Binary files /dev/null and b/ForgeSVN/forgesvn/tests/data/testsvn-trunk-tags-branches/db/revs/0/9 differ
http://git-wip-us.apache.org/repos/asf/incubator-allura/blob/67a10215/ForgeSVN/forgesvn/tests/data/testsvn-trunk-tags-branches/db/txn-current
----------------------------------------------------------------------
diff --git a/ForgeSVN/forgesvn/tests/data/testsvn-trunk-tags-branches/db/txn-current b/ForgeSVN/forgesvn/tests/data/testsvn-trunk-tags-branches/db/txn-current
new file mode 100644
index 0000000..b68fde2
--- /dev/null
+++ b/ForgeSVN/forgesvn/tests/data/testsvn-trunk-tags-branches/db/txn-current
@@ -0,0 +1 @@
+k
http://git-wip-us.apache.org/repos/asf/incubator-allura/blob/67a10215/ForgeSVN/forgesvn/tests/data/testsvn-trunk-tags-branches/db/txn-current-lock
----------------------------------------------------------------------
diff --git a/ForgeSVN/forgesvn/tests/data/testsvn-trunk-tags-branches/db/txn-current-lock b/ForgeSVN/forgesvn/tests/data/testsvn-trunk-tags-branches/db/txn-current-lock
new file mode 100644
index 0000000..e69de29
http://git-wip-us.apache.org/repos/asf/incubator-allura/blob/67a10215/ForgeSVN/forgesvn/tests/data/testsvn-trunk-tags-branches/db/uuid
----------------------------------------------------------------------
diff --git a/ForgeSVN/forgesvn/tests/data/testsvn-trunk-tags-branches/db/uuid b/ForgeSVN/forgesvn/tests/data/testsvn-trunk-tags-branches/db/uuid
new file mode 100644
index 0000000..311e288
--- /dev/null
+++ b/ForgeSVN/forgesvn/tests/data/testsvn-trunk-tags-branches/db/uuid
@@ -0,0 +1 @@
+e99d3fac-e2e0-4e27-8871-fe0e37559895
http://git-wip-us.apache.org/repos/asf/incubator-allura/blob/67a10215/ForgeSVN/forgesvn/tests/data/testsvn-trunk-tags-branches/db/write-lock
----------------------------------------------------------------------
diff --git a/ForgeSVN/forgesvn/tests/data/testsvn-trunk-tags-branches/db/write-lock b/ForgeSVN/forgesvn/tests/data/testsvn-trunk-tags-branches/db/write-lock
new file mode 100644
index 0000000..e69de29
http://git-wip-us.apache.org/repos/asf/incubator-allura/blob/67a10215/ForgeSVN/forgesvn/tests/data/testsvn-trunk-tags-branches/format
----------------------------------------------------------------------
diff --git a/ForgeSVN/forgesvn/tests/data/testsvn-trunk-tags-branches/format b/ForgeSVN/forgesvn/tests/data/testsvn-trunk-tags-branches/format
new file mode 100644
index 0000000..7ed6ff8
--- /dev/null
+++ b/ForgeSVN/forgesvn/tests/data/testsvn-trunk-tags-branches/format
@@ -0,0 +1 @@
+5
http://git-wip-us.apache.org/repos/asf/incubator-allura/blob/67a10215/ForgeSVN/forgesvn/tests/data/testsvn-trunk-tags-branches/hooks/post-commit
----------------------------------------------------------------------
diff --git a/ForgeSVN/forgesvn/tests/data/testsvn-trunk-tags-branches/hooks/post-commit b/ForgeSVN/forgesvn/tests/data/testsvn-trunk-tags-branches/hooks/post-commit
new file mode 100755
index 0000000..1ad70a4
--- /dev/null
+++ b/ForgeSVN/forgesvn/tests/data/testsvn-trunk-tags-branches/hooks/post-commit
@@ -0,0 +1,8 @@
+#!/bin/bash
+# The following is required for site integration, do not remove/modify.
+# Place user hook code in post-commit-user and it will be called from here.
+curl -s http://sf-fortytwo-7045.sb.sf.net/auth/refresh_repo/p/test/code-1/
+
+DIR="$(dirname "${BASH_SOURCE[0]}")"
+if [ -x $DIR/post-commit-user ]; then exec $DIR/post-commit-user "$@"
+fi
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/incubator-allura/blob/67a10215/ForgeSVN/forgesvn/tests/data/testsvn-trunk-tags-branches/hooks/post-commit.tmpl
----------------------------------------------------------------------
diff --git a/ForgeSVN/forgesvn/tests/data/testsvn-trunk-tags-branches/hooks/post-commit.tmpl b/ForgeSVN/forgesvn/tests/data/testsvn-trunk-tags-branches/hooks/post-commit.tmpl
new file mode 100644
index 0000000..98e4f80
--- /dev/null
+++ b/ForgeSVN/forgesvn/tests/data/testsvn-trunk-tags-branches/hooks/post-commit.tmpl
@@ -0,0 +1,50 @@
+#!/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.apache.org/repos/asf/subversion/trunk/tools/hook-scripts/ and
+# http://svn.apache.org/repos/asf/subversion/trunk/contrib/hook-scripts/
+
+
+REPOS="$1"
+REV="$2"
+
+mailer.py commit "$REPOS" "$REV" /path/to/mailer.conf
http://git-wip-us.apache.org/repos/asf/incubator-allura/blob/67a10215/ForgeSVN/forgesvn/tests/data/testsvn-trunk-tags-branches/hooks/post-lock.tmpl
----------------------------------------------------------------------
diff --git a/ForgeSVN/forgesvn/tests/data/testsvn-trunk-tags-branches/hooks/post-lock.tmpl b/ForgeSVN/forgesvn/tests/data/testsvn-trunk-tags-branches/hooks/post-lock.tmpl
new file mode 100644
index 0000000..c779f11
--- /dev/null
+++ b/ForgeSVN/forgesvn/tests/data/testsvn-trunk-tags-branches/hooks/post-lock.tmpl
@@ -0,0 +1,44 @@
+#!/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
http://git-wip-us.apache.org/repos/asf/incubator-allura/blob/67a10215/ForgeSVN/forgesvn/tests/data/testsvn-trunk-tags-branches/hooks/post-revprop-change.tmpl
----------------------------------------------------------------------
diff --git a/ForgeSVN/forgesvn/tests/data/testsvn-trunk-tags-branches/hooks/post-revprop-change.tmpl b/ForgeSVN/forgesvn/tests/data/testsvn-trunk-tags-branches/hooks/post-revprop-change.tmpl
new file mode 100644
index 0000000..3254f5e
--- /dev/null
+++ b/ForgeSVN/forgesvn/tests/data/testsvn-trunk-tags-branches/hooks/post-revprop-change.tmpl
@@ -0,0 +1,56 @@
+#!/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.apache.org/repos/asf/subversion/trunk/tools/hook-scripts/ and
+# http://svn.apache.org/repos/asf/subversion/trunk/contrib/hook-scripts/
+
+
+REPOS="$1"
+REV="$2"
+USER="$3"
+PROPNAME="$4"
+ACTION="$5"
+
+mailer.py propchange2 "$REPOS" "$REV" "$USER" "$PROPNAME" "$ACTION" /path/to/mailer.conf
http://git-wip-us.apache.org/repos/asf/incubator-allura/blob/67a10215/ForgeSVN/forgesvn/tests/data/testsvn-trunk-tags-branches/hooks/post-unlock.tmpl
----------------------------------------------------------------------
diff --git a/ForgeSVN/forgesvn/tests/data/testsvn-trunk-tags-branches/hooks/post-unlock.tmpl b/ForgeSVN/forgesvn/tests/data/testsvn-trunk-tags-branches/hooks/post-unlock.tmpl
new file mode 100644
index 0000000..ae95c4b
--- /dev/null
+++ b/ForgeSVN/forgesvn/tests/data/testsvn-trunk-tags-branches/hooks/post-unlock.tmpl
@@ -0,0 +1,42 @@
+#!/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
http://git-wip-us.apache.org/repos/asf/incubator-allura/blob/67a10215/ForgeSVN/forgesvn/tests/data/testsvn-trunk-tags-branches/hooks/pre-commit.tmpl
----------------------------------------------------------------------
diff --git a/ForgeSVN/forgesvn/tests/data/testsvn-trunk-tags-branches/hooks/pre-commit.tmpl b/ForgeSVN/forgesvn/tests/data/testsvn-trunk-tags-branches/hooks/pre-commit.tmpl
new file mode 100644
index 0000000..ab65642
--- /dev/null
+++ b/ForgeSVN/forgesvn/tests/data/testsvn-trunk-tags-branches/hooks/pre-commit.tmpl
@@ -0,0 +1,81 @@
+#!/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)
+#
+# [STDIN] LOCK-TOKENS ** the lock tokens are passed via STDIN.
+#
+# If STDIN contains the line "LOCK-TOKENS:\n" (the "\n" denotes a
+# single newline), the lines following it are the lock tokens for
+# this commit. The end of the list is marked by a line containing
+# only a newline character.
+#
+# Each lock token line consists of a URI-escaped path, followed
+# by the separator character '|', followed by the lock token string,
+# followed by a newline.
+#
+# 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.apache.org/repos/asf/subversion/trunk/tools/hook-scripts/ and
+# http://svn.apache.org/repos/asf/subversion/trunk/contrib/hook-scripts/
+
+
+REPOS="$1"
+TXN="$2"
+
+# Make sure that the log message contains some text.
+SVNLOOK=/usr/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
http://git-wip-us.apache.org/repos/asf/incubator-allura/blob/67a10215/ForgeSVN/forgesvn/tests/data/testsvn-trunk-tags-branches/hooks/pre-lock.tmpl
----------------------------------------------------------------------
diff --git a/ForgeSVN/forgesvn/tests/data/testsvn-trunk-tags-branches/hooks/pre-lock.tmpl b/ForgeSVN/forgesvn/tests/data/testsvn-trunk-tags-branches/hooks/pre-lock.tmpl
new file mode 100644
index 0000000..13827fb
--- /dev/null
+++ b/ForgeSVN/forgesvn/tests/data/testsvn-trunk-tags-branches/hooks/pre-lock.tmpl
@@ -0,0 +1,71 @@
+#!/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)
+# [4] COMMENT (the comment of the lock)
+# [5] STEAL-LOCK (1 if the user is trying to steal the lock, else 0)
+#
+# If the hook program outputs anything on stdout, the output string will
+# be used as the lock token for this lock operation. If you choose to use
+# this feature, you must guarantee the tokens generated are unique across
+# the repository each time.
+#
+# 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=/usr/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
http://git-wip-us.apache.org/repos/asf/incubator-allura/blob/67a10215/ForgeSVN/forgesvn/tests/data/testsvn-trunk-tags-branches/hooks/pre-revprop-change
----------------------------------------------------------------------
diff --git a/ForgeSVN/forgesvn/tests/data/testsvn-trunk-tags-branches/hooks/pre-revprop-change b/ForgeSVN/forgesvn/tests/data/testsvn-trunk-tags-branches/hooks/pre-revprop-change
new file mode 100755
index 0000000..1a24852
--- /dev/null
+++ b/ForgeSVN/forgesvn/tests/data/testsvn-trunk-tags-branches/hooks/pre-revprop-change
@@ -0,0 +1 @@
+#!/bin/sh
http://git-wip-us.apache.org/repos/asf/incubator-allura/blob/67a10215/ForgeSVN/forgesvn/tests/data/testsvn-trunk-tags-branches/hooks/pre-revprop-change.tmpl
----------------------------------------------------------------------
diff --git a/ForgeSVN/forgesvn/tests/data/testsvn-trunk-tags-branches/hooks/pre-revprop-change.tmpl b/ForgeSVN/forgesvn/tests/data/testsvn-trunk-tags-branches/hooks/pre-revprop-change.tmpl
new file mode 100644
index 0000000..f72ad01
--- /dev/null
+++ b/ForgeSVN/forgesvn/tests/data/testsvn-trunk-tags-branches/hooks/pre-revprop-change.tmpl
@@ -0,0 +1,66 @@
+#!/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.apache.org/repos/asf/subversion/trunk/tools/hook-scripts/ and
+# http://svn.apache.org/repos/asf/subversion/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
http://git-wip-us.apache.org/repos/asf/incubator-allura/blob/67a10215/ForgeSVN/forgesvn/tests/data/testsvn-trunk-tags-branches/hooks/pre-unlock.tmpl
----------------------------------------------------------------------
diff --git a/ForgeSVN/forgesvn/tests/data/testsvn-trunk-tags-branches/hooks/pre-unlock.tmpl b/ForgeSVN/forgesvn/tests/data/testsvn-trunk-tags-branches/hooks/pre-unlock.tmpl
new file mode 100644
index 0000000..d1aa858
--- /dev/null
+++ b/ForgeSVN/forgesvn/tests/data/testsvn-trunk-tags-branches/hooks/pre-unlock.tmpl
@@ -0,0 +1,63 @@
+#!/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)
+# [4] TOKEN (the lock token to be destroyed)
+# [5] BREAK-UNLOCK (1 if the user is breaking the lock, else 0)
+#
+# 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=/usr/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
http://git-wip-us.apache.org/repos/asf/incubator-allura/blob/67a10215/ForgeSVN/forgesvn/tests/data/testsvn-trunk-tags-branches/hooks/start-commit.tmpl
----------------------------------------------------------------------
diff --git a/ForgeSVN/forgesvn/tests/data/testsvn-trunk-tags-branches/hooks/start-commit.tmpl b/ForgeSVN/forgesvn/tests/data/testsvn-trunk-tags-branches/hooks/start-commit.tmpl
new file mode 100644
index 0000000..53690d1
--- /dev/null
+++ b/ForgeSVN/forgesvn/tests/data/testsvn-trunk-tags-branches/hooks/start-commit.tmpl
@@ -0,0 +1,65 @@
+#!/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.apache.org/repos/asf/subversion/trunk/tools/hook-scripts/ and
+# http://svn.apache.org/repos/asf/subversion/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
http://git-wip-us.apache.org/repos/asf/incubator-allura/blob/67a10215/ForgeSVN/forgesvn/tests/data/testsvn-trunk-tags-branches/locks/db-logs.lock
----------------------------------------------------------------------
diff --git a/ForgeSVN/forgesvn/tests/data/testsvn-trunk-tags-branches/locks/db-logs.lock b/ForgeSVN/forgesvn/tests/data/testsvn-trunk-tags-branches/locks/db-logs.lock
new file mode 100644
index 0000000..20dd636
--- /dev/null
+++ b/ForgeSVN/forgesvn/tests/data/testsvn-trunk-tags-branches/locks/db-logs.lock
@@ -0,0 +1,3 @@
+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.
http://git-wip-us.apache.org/repos/asf/incubator-allura/blob/67a10215/ForgeSVN/forgesvn/tests/data/testsvn-trunk-tags-branches/locks/db.lock
----------------------------------------------------------------------
diff --git a/ForgeSVN/forgesvn/tests/data/testsvn-trunk-tags-branches/locks/db.lock b/ForgeSVN/forgesvn/tests/data/testsvn-trunk-tags-branches/locks/db.lock
new file mode 100644
index 0000000..20dd636
--- /dev/null
+++ b/ForgeSVN/forgesvn/tests/data/testsvn-trunk-tags-branches/locks/db.lock
@@ -0,0 +1,3 @@
+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.
[09/21] git commit: [#6235] ticket:352 Pass path parameter only to
svn snapshot urls
Posted by br...@apache.org.
[#6235] ticket:352 Pass path parameter only to svn snapshot urls
Project: http://git-wip-us.apache.org/repos/asf/incubator-allura/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-allura/commit/070c5d6d
Tree: http://git-wip-us.apache.org/repos/asf/incubator-allura/tree/070c5d6d
Diff: http://git-wip-us.apache.org/repos/asf/incubator-allura/diff/070c5d6d
Branch: refs/heads/master
Commit: 070c5d6d4c74cec705726beddbb81c7b07e92e9e
Parents: 91b68da
Author: Igor Bondarenko <je...@gmail.com>
Authored: Fri May 17 16:29:05 2013 +0000
Committer: Dave Brondsema <db...@slashdotmedia.com>
Committed: Fri May 31 22:14:08 2013 +0000
----------------------------------------------------------------------
Allura/allura/templates/repo/tree.html | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-allura/blob/070c5d6d/Allura/allura/templates/repo/tree.html
----------------------------------------------------------------------
diff --git a/Allura/allura/templates/repo/tree.html b/Allura/allura/templates/repo/tree.html
index b2dbcfe..d66a327 100644
--- a/Allura/allura/templates/repo/tree.html
+++ b/Allura/allura/templates/repo/tree.html
@@ -31,7 +31,7 @@ Tree <a href="{{commit.url()}}">{{commit.shorthand_id()}}</a> {{commit_labels(co
{% block actions %}
{% if tarball_url %}
-<a href="{{ tarball_url + ('?path=' + path if path else '') }}" rel="nofollow">
+<a href="{{ tarball_url + ('?path=' + path if c.app.tool_label.lower() == 'svn' and path else '') }}" rel="nofollow">
<b data-icon="{{g.icons.folder.char}}" class="ico {{g.icons.folder.css}}" title="Snapshot"> </b> Download Snapshot
</a>
{% endif %}
[16/21] git commit: [#6235] ticket:366 Fix tarball_filename for svn
Posted by br...@apache.org.
[#6235] ticket:366 Fix tarball_filename for svn
Project: http://git-wip-us.apache.org/repos/asf/incubator-allura/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-allura/commit/e4064477
Tree: http://git-wip-us.apache.org/repos/asf/incubator-allura/tree/e4064477
Diff: http://git-wip-us.apache.org/repos/asf/incubator-allura/diff/e4064477
Branch: refs/heads/master
Commit: e4064477183a3b150417aabefffa3fcb53cdd8f8
Parents: 5068fa1
Author: Igor Bondarenko <je...@gmail.com>
Authored: Fri May 24 14:45:23 2013 +0000
Committer: Dave Brondsema <db...@slashdotmedia.com>
Committed: Fri May 31 22:14:09 2013 +0000
----------------------------------------------------------------------
ForgeSVN/forgesvn/model/svn.py | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-allura/blob/e4064477/ForgeSVN/forgesvn/model/svn.py
----------------------------------------------------------------------
diff --git a/ForgeSVN/forgesvn/model/svn.py b/ForgeSVN/forgesvn/model/svn.py
index 9d0a521..811380a 100644
--- a/ForgeSVN/forgesvn/model/svn.py
+++ b/ForgeSVN/forgesvn/model/svn.py
@@ -102,9 +102,9 @@ class Repository(M.Repository):
return self._impl.commit(self.heads[0].object_id)
def tarball_filename(self, revision, path=None):
- fn = super(Repository, self).tarball_filename(revision, path)
+ fn = super(Repository, self).tarball_filename(revision, path)
path = self._impl._path_to_root(path, revision)
- fn += '-' + '-'.join(path.split('/'))
+ fn += ('-' + '-'.join(path.split('/'))) if path else ''
return fn
[04/21] git commit: [#6235] ticket:352 Test that snapshot contains
only tag/branch/trunk if specified
Posted by br...@apache.org.
[#6235] ticket:352 Test that snapshot contains only tag/branch/trunk if specified
Project: http://git-wip-us.apache.org/repos/asf/incubator-allura/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-allura/commit/d01f821a
Tree: http://git-wip-us.apache.org/repos/asf/incubator-allura/tree/d01f821a
Diff: http://git-wip-us.apache.org/repos/asf/incubator-allura/diff/d01f821a
Branch: refs/heads/master
Commit: d01f821a714074194c01b5dbd2032de32dcf5cd8
Parents: 8e25e0c
Author: Igor Bondarenko <je...@gmail.com>
Authored: Fri May 17 12:30:37 2013 +0000
Committer: Dave Brondsema <db...@slashdotmedia.com>
Committed: Fri May 31 22:14:06 2013 +0000
----------------------------------------------------------------------
ForgeSVN/forgesvn/tests/model/test_repository.py | 43 +++++++++++++++-
1 files changed, 40 insertions(+), 3 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-allura/blob/d01f821a/ForgeSVN/forgesvn/tests/model/test_repository.py
----------------------------------------------------------------------
diff --git a/ForgeSVN/forgesvn/tests/model/test_repository.py b/ForgeSVN/forgesvn/tests/model/test_repository.py
index 9a22ae1..e131764 100644
--- a/ForgeSVN/forgesvn/tests/model/test_repository.py
+++ b/ForgeSVN/forgesvn/tests/model/test_repository.py
@@ -313,64 +313,101 @@ class TestSVNRepo(unittest.TestCase, RepoImplTestBase):
@onlyif(os.path.exists(tg.config.get('scm.repos.tarball.zip_binary', '/usr/bin/zip')), 'zip binary is missing')
def test_tarball_aware_of_tags(self):
- # TODO: check zip that it actually contains only needed files
+ tag_content = ['test-svn-tags-1-tags-tag-1.0/',
+ 'test-svn-tags-1-tags-tag-1.0/svn-commit.tmp',
+ 'test-svn-tags-1-tags-tag-1.0/README']
h.set_context('test', 'svn-tags', neighborhood='Projects')
tarball_path = '/tmp/tarball/svn/t/te/test/testsvn-trunk-tags-branches/'
fn = tarball_path + 'test-svn-tags-1-tags-tag-1.0.zip'
self.svn_tags.tarball('1', '/tags/tag-1.0/')
assert os.path.isfile(fn), fn
+ snapshot = ZipFile(fn, 'r')
+ assert_equal(snapshot.namelist(), tag_content)
os.remove(fn)
self.svn_tags.tarball('1', '/tags/tag-1.0/some/path/')
assert os.path.isfile(fn), fn
+ snapshot = ZipFile(fn, 'r')
+ assert_equal(snapshot.namelist(), tag_content)
os.remove(fn)
# if inside of tags, but no tag is specified
# expect snapshot of trunk
fn = tarball_path + 'test-svn-tags-1-trunk.zip'
self.svn_tags.tarball('1', '/tags/')
assert os.path.isfile(fn), fn
+ snapshot = ZipFile(fn, 'r')
+ assert_equal(snapshot.namelist(), ['test-svn-tags-1-trunk/',
+ 'test-svn-tags-1-trunk/aaa.txt',
+ 'test-svn-tags-1-trunk/bbb.txt',
+ 'test-svn-tags-1-trunk/ccc.txt',
+ 'test-svn-tags-1-trunk/README'])
os.remove(fn)
@onlyif(os.path.exists(tg.config.get('scm.repos.tarball.zip_binary', '/usr/bin/zip')), 'zip binary is missing')
def test_tarball_aware_of_branches(self):
- # TODO: check zip that it actually contains only needed files
+ branch_content = ['test-svn-tags-1-branches-aaa/',
+ 'test-svn-tags-1-branches-aaa/aaa.txt',
+ 'test-svn-tags-1-branches-aaa/svn-commit.tmp',
+ 'test-svn-tags-1-branches-aaa/README']
h.set_context('test', 'svn-tags', neighborhood='Projects')
tarball_path = '/tmp/tarball/svn/t/te/test/testsvn-trunk-tags-branches/'
fn = tarball_path + 'test-svn-tags-1-branches-aaa.zip'
self.svn_tags.tarball('1', '/branches/aaa/')
assert os.path.isfile(fn), fn
+ snapshot = ZipFile(fn, 'r')
+ assert_equal(snapshot.namelist(), branch_content)
os.remove(fn)
self.svn_tags.tarball('1', '/branches/aaa/some/path/')
assert os.path.isfile(fn), fn
+ snapshot = ZipFile(fn, 'r')
+ assert_equal(snapshot.namelist(), branch_content)
os.remove(fn)
# if inside of branches, but no branch is specified
# expect snapshot of trunk
fn = tarball_path + 'test-svn-tags-1-trunk.zip'
self.svn_tags.tarball('1', '/branches/')
assert os.path.isfile(fn), fn
+ snapshot = ZipFile(fn, 'r')
+ assert_equal(snapshot.namelist(), ['test-svn-tags-1-trunk/',
+ 'test-svn-tags-1-trunk/aaa.txt',
+ 'test-svn-tags-1-trunk/bbb.txt',
+ 'test-svn-tags-1-trunk/ccc.txt',
+ 'test-svn-tags-1-trunk/README'])
os.remove(fn)
@onlyif(os.path.exists(tg.config.get('scm.repos.tarball.zip_binary', '/usr/bin/zip')), 'zip binary is missing')
def test_tarball_aware_of_trunk(self):
- # TODO: check zip that it actually contains only needed files
+ trunk_content = ['test-svn-tags-1-trunk/',
+ 'test-svn-tags-1-trunk/aaa.txt',
+ 'test-svn-tags-1-trunk/bbb.txt',
+ 'test-svn-tags-1-trunk/ccc.txt',
+ 'test-svn-tags-1-trunk/README']
h.set_context('test', 'svn-tags', neighborhood='Projects')
tarball_path = '/tmp/tarball/svn/t/te/test/testsvn-trunk-tags-branches/'
fn = tarball_path + 'test-svn-tags-1-trunk.zip'
self.svn_tags.tarball('1', '/trunk/')
assert os.path.isfile(fn), fn
+ snapshot = ZipFile(fn, 'r')
+ assert_equal(snapshot.namelist(), trunk_content)
os.remove(fn)
self.svn_tags.tarball('1', '/trunk/some/path/')
assert os.path.isfile(fn), fn
+ snapshot = ZipFile(fn, 'r')
+ assert_equal(snapshot.namelist(), trunk_content)
os.remove(fn)
# no path, but there are trunk in the repo
# expect snapshot of trunk
self.svn_tags.tarball('1')
assert os.path.isfile(fn), fn
+ snapshot = ZipFile(fn, 'r')
+ assert_equal(snapshot.namelist(), trunk_content)
os.remove(fn)
# no path, and no trunk dir
# expect snapshot of repo root
fn = '/tmp/tarball/svn/t/te/test/testsvn/test-src-1.zip'
self.repo.tarball('1')
assert os.path.isfile(fn), fn
+ snapshot = ZipFile(fn, 'r')
+ assert_equal(snapshot.namelist(), ['test-src-1/', 'test-src-1/README'])
os.remove(fn)
def test_is_empty(self):
[15/21] git commit: [#6235] ticket:366 Use g.tmpdir in tests
Posted by br...@apache.org.
[#6235] ticket:366 Use g.tmpdir in tests
Project: http://git-wip-us.apache.org/repos/asf/incubator-allura/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-allura/commit/2cd57fd8
Tree: http://git-wip-us.apache.org/repos/asf/incubator-allura/tree/2cd57fd8
Diff: http://git-wip-us.apache.org/repos/asf/incubator-allura/diff/2cd57fd8
Branch: refs/heads/master
Commit: 2cd57fd8c4a2e5227f3c58b48c9e74ef154e5045
Parents: d0edb5c
Author: Igor Bondarenko <je...@gmail.com>
Authored: Fri May 24 14:04:55 2013 +0000
Committer: Dave Brondsema <db...@slashdotmedia.com>
Committed: Fri May 31 22:14:09 2013 +0000
----------------------------------------------------------------------
ForgeSVN/forgesvn/tests/model/test_repository.py | 10 +++++-----
1 files changed, 5 insertions(+), 5 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-allura/blob/2cd57fd8/ForgeSVN/forgesvn/tests/model/test_repository.py
----------------------------------------------------------------------
diff --git a/ForgeSVN/forgesvn/tests/model/test_repository.py b/ForgeSVN/forgesvn/tests/model/test_repository.py
index 28b980b..5840033 100644
--- a/ForgeSVN/forgesvn/tests/model/test_repository.py
+++ b/ForgeSVN/forgesvn/tests/model/test_repository.py
@@ -319,7 +319,7 @@ class TestSVNRepo(unittest.TestCase, RepoImplTestBase):
'test-svn-tags-19-tags-tag-1.0/svn-commit.tmp',
'test-svn-tags-19-tags-tag-1.0/README'])
h.set_context('test', 'svn-tags', neighborhood='Projects')
- tarball_path = '/tmp/tarball/svn/t/te/test/testsvn-trunk-tags-branches/'
+ tarball_path = os.path.join(g.tmpdir, 'tarball/svn/t/te/test/testsvn-trunk-tags-branches/')
fn = tarball_path + 'test-svn-tags-19-tags-tag-1.0.zip'
self.svn_tags.tarball(rev, '/tags/tag-1.0/')
assert os.path.isfile(fn), fn
@@ -353,7 +353,7 @@ class TestSVNRepo(unittest.TestCase, RepoImplTestBase):
'test-svn-tags-19-branches-aaa/svn-commit.tmp',
'test-svn-tags-19-branches-aaa/README'])
h.set_context('test', 'svn-tags', neighborhood='Projects')
- tarball_path = '/tmp/tarball/svn/t/te/test/testsvn-trunk-tags-branches/'
+ tarball_path = os.path.join(g.tmpdir, 'tarball/svn/t/te/test/testsvn-trunk-tags-branches/')
fn = tarball_path + 'test-svn-tags-19-branches-aaa.zip'
self.svn_tags.tarball(rev, '/branches/aaa/')
assert os.path.isfile(fn), fn
@@ -388,7 +388,7 @@ class TestSVNRepo(unittest.TestCase, RepoImplTestBase):
'test-svn-tags-19-trunk/ccc.txt',
'test-svn-tags-19-trunk/README'])
h.set_context('test', 'svn-tags', neighborhood='Projects')
- tarball_path = '/tmp/tarball/svn/t/te/test/testsvn-trunk-tags-branches/'
+ tarball_path = os.path.join(g.tmpdir, 'tarball/svn/t/te/test/testsvn-trunk-tags-branches/')
fn = tarball_path + 'test-svn-tags-19-trunk.zip'
self.svn_tags.tarball(rev, '/trunk/')
assert os.path.isfile(fn), fn
@@ -410,12 +410,12 @@ class TestSVNRepo(unittest.TestCase, RepoImplTestBase):
# no path, and no trunk dir
# expect snapshot of repo root
h.set_context('test', 'src', neighborhood='Projects')
- fn = '/tmp/tarball/svn/t/te/test/testsvn/test-src-1.zip'
+ fn = os.path.join(g.tmpdir, 'tarball/svn/t/te/test/testsvn/test-src-1.zip')
self.repo.tarball('1')
assert os.path.isfile(fn), fn
snapshot = ZipFile(fn, 'r')
assert_equal(snapshot.namelist(), ['test-src-1/', 'test-src-1/README'])
- shutil.rmtree('/tmp/tarball/svn/t/te/test/testsvn/', ignore_errors=True)
+ shutil.rmtree(os.path.join(g.tmpdir, 'tarball/svn/t/te/test/testsvn/'), ignore_errors=True)
shutil.rmtree(tarball_path, ignore_errors=True)
def test_is_empty(self):
[13/21] git commit: [#6235] ticket:366 Test for
SVNImplementation._path_to_root()
Posted by br...@apache.org.
[#6235] ticket:366 Test for SVNImplementation._path_to_root()
Project: http://git-wip-us.apache.org/repos/asf/incubator-allura/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-allura/commit/85fbe7d9
Tree: http://git-wip-us.apache.org/repos/asf/incubator-allura/tree/85fbe7d9
Diff: http://git-wip-us.apache.org/repos/asf/incubator-allura/diff/85fbe7d9
Branch: refs/heads/master
Commit: 85fbe7d9990bdb82e3e729af41ee42e5416cfcfd
Parents: 6a77c65
Author: Igor Bondarenko <je...@gmail.com>
Authored: Wed May 29 06:34:37 2013 +0000
Committer: Dave Brondsema <db...@slashdotmedia.com>
Committed: Fri May 31 22:14:09 2013 +0000
----------------------------------------------------------------------
.../forgesvn/tests/model/test_svnimplementation.py | 32 +++++++++++++++
1 files changed, 32 insertions(+), 0 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-allura/blob/85fbe7d9/ForgeSVN/forgesvn/tests/model/test_svnimplementation.py
----------------------------------------------------------------------
diff --git a/ForgeSVN/forgesvn/tests/model/test_svnimplementation.py b/ForgeSVN/forgesvn/tests/model/test_svnimplementation.py
index 9b78c0c..c23c6b3 100644
--- a/ForgeSVN/forgesvn/tests/model/test_svnimplementation.py
+++ b/ForgeSVN/forgesvn/tests/model/test_svnimplementation.py
@@ -74,3 +74,35 @@ class TestSVNImplementation(object):
assert_equal(entries, {path.strip('/'): '5057636b9c1040636b81e4b1:1'})
assert_equal(impl._svn.info2.call_args[0][0], 'file://'+g.tmpdir+'/code/trunk')
+
+ @patch('forgesvn.model.svn.svn_path_exists')
+ def test__path_to_root(self, path_exists):
+ repo = Mock(fs_path=g.tmpdir+'/')
+ repo.name = 'code'
+ repo._id = '5057636b9c1040636b81e4b1'
+ impl = SVNImplementation(repo)
+ path_exists.return_value = False
+ # edge cases
+ assert_equal(impl._path_to_root(None), '')
+ assert_equal(impl._path_to_root(''), '')
+ assert_equal(impl._path_to_root('/some/path/'), '')
+ assert_equal(impl._path_to_root('some/path'), '')
+ # tags
+ assert_equal(impl._path_to_root('/some/path/tags/1.0/some/dir'), 'some/path/tags/1.0')
+ assert_equal(impl._path_to_root('/some/path/tags/1.0/'), 'some/path/tags/1.0')
+ assert_equal(impl._path_to_root('/some/path/tags/'), '')
+ # branches
+ assert_equal(impl._path_to_root('/some/path/branches/b1/dir'), 'some/path/branches/b1')
+ assert_equal(impl._path_to_root('/some/path/branches/b1/'), 'some/path/branches/b1')
+ assert_equal(impl._path_to_root('/some/path/branches/'), '')
+ # trunk
+ assert_equal(impl._path_to_root('/some/path/trunk/some/dir/'), 'some/path/trunk')
+ assert_equal(impl._path_to_root('/some/path/trunk'), 'some/path/trunk')
+ # with fallback to trunk
+ path_exists.return_value = True
+ assert_equal(impl._path_to_root(''), 'trunk')
+ assert_equal(impl._path_to_root('/some/path/'), 'trunk')
+ assert_equal(impl._path_to_root('/tags/'), 'trunk')
+ assert_equal(impl._path_to_root('/branches/'), 'trunk')
+ assert_equal(impl._path_to_root('/tags/1.0'), 'tags/1.0')
+ assert_equal(impl._path_to_root('/branches/branch'), 'branches/branch')
[17/21] git commit: [#6235] ticket:366 Pass path for all repo types
Posted by br...@apache.org.
[#6235] ticket:366 Pass path for all repo types
Project: http://git-wip-us.apache.org/repos/asf/incubator-allura/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-allura/commit/5068fa1d
Tree: http://git-wip-us.apache.org/repos/asf/incubator-allura/tree/5068fa1d
Diff: http://git-wip-us.apache.org/repos/asf/incubator-allura/diff/5068fa1d
Branch: refs/heads/master
Commit: 5068fa1da9c49ca7cdbdcbdc8a9e392a40f1a908
Parents: 2cd57fd
Author: Igor Bondarenko <je...@gmail.com>
Authored: Fri May 24 14:30:21 2013 +0000
Committer: Dave Brondsema <db...@slashdotmedia.com>
Committed: Fri May 31 22:14:09 2013 +0000
----------------------------------------------------------------------
Allura/allura/templates/repo/tree.html | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-allura/blob/5068fa1d/Allura/allura/templates/repo/tree.html
----------------------------------------------------------------------
diff --git a/Allura/allura/templates/repo/tree.html b/Allura/allura/templates/repo/tree.html
index d66a327..b2dbcfe 100644
--- a/Allura/allura/templates/repo/tree.html
+++ b/Allura/allura/templates/repo/tree.html
@@ -31,7 +31,7 @@ Tree <a href="{{commit.url()}}">{{commit.shorthand_id()}}</a> {{commit_labels(co
{% block actions %}
{% if tarball_url %}
-<a href="{{ tarball_url + ('?path=' + path if c.app.tool_label.lower() == 'svn' and path else '') }}" rel="nofollow">
+<a href="{{ tarball_url + ('?path=' + path if path else '') }}" rel="nofollow">
<b data-icon="{{g.icons.folder.char}}" class="ico {{g.icons.folder.css}}" title="Snapshot"> </b> Download Snapshot
</a>
{% endif %}
[18/21] git commit: [#6235] update rat-excludes.txt for new svn test
data
Posted by br...@apache.org.
[#6235] update rat-excludes.txt for new svn test data
Project: http://git-wip-us.apache.org/repos/asf/incubator-allura/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-allura/commit/ab5f161f
Tree: http://git-wip-us.apache.org/repos/asf/incubator-allura/tree/ab5f161f
Diff: http://git-wip-us.apache.org/repos/asf/incubator-allura/diff/ab5f161f
Branch: refs/heads/master
Commit: ab5f161f959443fe04618c4f61d2c526d2f1ecfb
Parents: 30ff42e
Author: Dave Brondsema <db...@slashdotmedia.com>
Authored: Fri May 31 22:13:43 2013 +0000
Committer: Dave Brondsema <db...@slashdotmedia.com>
Committed: Fri May 31 22:14:10 2013 +0000
----------------------------------------------------------------------
rat-excludes.txt | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-allura/blob/ab5f161f/rat-excludes.txt
----------------------------------------------------------------------
diff --git a/rat-excludes.txt b/rat-excludes.txt
index 49e640b..78aba56 100644
--- a/rat-excludes.txt
+++ b/rat-excludes.txt
@@ -34,7 +34,7 @@ Allura/allura/tests/data/test_mime/text_file.txt
Allura/run/dummy.txt
AlluraTesting/jslint/
ForgeGit/forgegit/data/post-receive_tmpl
-ForgeSVN/forgesvn/tests/data/testsvn/
+ForgeSVN/forgesvn/tests/data/
solr_config/core0/conf/spellings.txt
solr_config/core1/conf/spellings.txt
solr_config/solr.xml
[21/21] git commit: move mercurial out of requirements-common.txt
(GPL; only needed if you install ForgeHg)
Posted by br...@apache.org.
move mercurial out of requirements-common.txt (GPL; only needed if you install ForgeHg)
Project: http://git-wip-us.apache.org/repos/asf/incubator-allura/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-allura/commit/9d4285f1
Tree: http://git-wip-us.apache.org/repos/asf/incubator-allura/tree/9d4285f1
Diff: http://git-wip-us.apache.org/repos/asf/incubator-allura/diff/9d4285f1
Branch: refs/heads/master
Commit: 9d4285f17a439c25822f903c45abbc9392d68e04
Parents: 8a71b16
Author: Dave Brondsema <db...@slashdotmedia.com>
Authored: Fri May 31 22:27:09 2013 +0000
Committer: Dave Brondsema <db...@slashdotmedia.com>
Committed: Fri May 31 22:27:09 2013 +0000
----------------------------------------------------------------------
requirements-common.txt | 1 -
requirements-sf.txt | 1 +
2 files changed, 1 insertions(+), 1 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-allura/blob/9d4285f1/requirements-common.txt
----------------------------------------------------------------------
diff --git a/requirements-common.txt b/requirements-common.txt
index 2b5f8b5..a105ba2 100644
--- a/requirements-common.txt
+++ b/requirements-common.txt
@@ -21,7 +21,6 @@ httplib2==0.7.4
iso8601==0.1.4
Jinja2==2.6
Markdown==2.2.0
-mercurial==1.4.3
Ming==0.3.5dev-20130522
oauth2==1.5.170
# tg2 dep PasteDeploy must specified before TurboGears2, to avoid a version/allow-hosts problem
http://git-wip-us.apache.org/repos/asf/incubator-allura/blob/9d4285f1/requirements-sf.txt
----------------------------------------------------------------------
diff --git a/requirements-sf.txt b/requirements-sf.txt
index 5ea8a38..8792c7f 100644
--- a/requirements-sf.txt
+++ b/requirements-sf.txt
@@ -7,6 +7,7 @@ coverage==3.5a1-20110413
ForgeHg==0.1.11
ForgePastebin==0.2.6
mechanize==0.2.4
+mercurial==1.4.3
MySQL-python==1.2.3c1
newrelic==1.11.0.55
phpserialize==1.2
[20/21] git commit: [#6235] bump forgehg version
Posted by br...@apache.org.
[#6235] bump forgehg version
Project: http://git-wip-us.apache.org/repos/asf/incubator-allura/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-allura/commit/8a71b16d
Tree: http://git-wip-us.apache.org/repos/asf/incubator-allura/tree/8a71b16d
Diff: http://git-wip-us.apache.org/repos/asf/incubator-allura/diff/8a71b16d
Branch: refs/heads/master
Commit: 8a71b16d63440fd65bc305fd917f53fc08b0f246
Parents: 7f94539
Author: Dave Brondsema <db...@slashdotmedia.com>
Authored: Fri May 31 22:26:27 2013 +0000
Committer: Dave Brondsema <db...@slashdotmedia.com>
Committed: Fri May 31 22:26:27 2013 +0000
----------------------------------------------------------------------
requirements-sf.txt | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-allura/blob/8a71b16d/requirements-sf.txt
----------------------------------------------------------------------
diff --git a/requirements-sf.txt b/requirements-sf.txt
index 6686610..5ea8a38 100644
--- a/requirements-sf.txt
+++ b/requirements-sf.txt
@@ -4,7 +4,7 @@ akismet==0.2.0
amqplib==0.6.1
kombu==1.0.4
coverage==3.5a1-20110413
-ForgeHg==0.1.10
+ForgeHg==0.1.11
ForgePastebin==0.2.6
mechanize==0.2.4
MySQL-python==1.2.3c1
[08/21] git commit: [#6235] ticket:352 Fix waiting for snapshot page
Posted by br...@apache.org.
[#6235] ticket:352 Fix waiting for snapshot page
Project: http://git-wip-us.apache.org/repos/asf/incubator-allura/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-allura/commit/c0fb628a
Tree: http://git-wip-us.apache.org/repos/asf/incubator-allura/tree/c0fb628a
Diff: http://git-wip-us.apache.org/repos/asf/incubator-allura/diff/c0fb628a
Branch: refs/heads/master
Commit: c0fb628a53d8388e123417a9568d76f9a6d05e68
Parents: 20be6df
Author: Igor Bondarenko <je...@gmail.com>
Authored: Fri May 17 16:05:08 2013 +0000
Committer: Dave Brondsema <db...@slashdotmedia.com>
Committed: Fri May 31 22:14:08 2013 +0000
----------------------------------------------------------------------
Allura/allura/model/repository.py | 4 ++--
Allura/allura/templates/repo/tarball.html | 12 +++++++-----
2 files changed, 9 insertions(+), 7 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-allura/blob/c0fb628a/Allura/allura/model/repository.py
----------------------------------------------------------------------
diff --git a/Allura/allura/model/repository.py b/Allura/allura/model/repository.py
index 65ac0a2..1b6cfc4 100644
--- a/Allura/allura/model/repository.py
+++ b/Allura/allura/model/repository.py
@@ -272,8 +272,8 @@ class Repository(Artifact, ActivityObject):
filename = '%s-%s-%s' % (shortname, mount_point, revision)
return filename
- def tarball_url(self, revision):
- filename = '%s%s' % (self.tarball_filename(revision), '.zip')
+ def tarball_url(self, revision, path=None):
+ filename = '%s%s' % (self.tarball_filename(revision, path), '.zip')
r = os.path.join(self.tool,
self.project.shortname[:1],
self.project.shortname[:2],
http://git-wip-us.apache.org/repos/asf/incubator-allura/blob/c0fb628a/Allura/allura/templates/repo/tarball.html
----------------------------------------------------------------------
diff --git a/Allura/allura/templates/repo/tarball.html b/Allura/allura/templates/repo/tarball.html
index 91f6f0b..e4a9cad 100644
--- a/Allura/allura/templates/repo/tarball.html
+++ b/Allura/allura/templates/repo/tarball.html
@@ -28,10 +28,11 @@ Commit <a href="{{commit.url()}}">{{commit.shorthand_id()}}</a> {{commit_labels(
{% block extra_js %}
{{ super() }}
<script type="text/javascript">$(function() {
+ {% set path = request.params.get('path', '') %}
{% if status == 'ready' %}
{% if 'no-redirect' not in request.params %}
$(document).ready(function() {
- window.location.href = '{{c.app.repo.tarball_url(revision)}}';
+ window.location.href = '{{c.app.repo.tarball_url(revision, path)}}';
});
{% endif %}
{% else %}
@@ -52,15 +53,15 @@ Commit <a href="{{commit.url()}}">{{commit.shorthand_id()}}</a> {{commit_labels(
left: 10 // Left position relative to parent in px
};
var spinner = new Spinner(opts).spin($('#snapshot_status')[0]);
- var delay = 5000
+ var delay = 5000;
// Check tarball status every 5 seconds
function check_status() {
- $.get('{{commit.url()}}tarball_status', function(data) {
+ $.get('{{commit.url()}}tarball_status?path={{path}}', function(data) {
if (data.status === 'ready') {
spinner.stop();
$('#snapshot_status h2').toggle();
{% if 'no-redirect' not in request.params %}
- window.location.href = '{{c.app.repo.tarball_url(revision)}}';
+ window.location.href = '{{c.app.repo.tarball_url(revision, path)}}';
{% endif %}
} else {
if (delay < 600000){
@@ -77,9 +78,10 @@ Commit <a href="{{commit.url()}}">{{commit.shorthand_id()}}</a> {{commit_labels(
{% endblock %}
{% block content %}
+{% set path = request.params.get('path', '') %}
<div id='snapshot_status'>
<h2 class="busy">Generating snapshot...</h2>
- <h2 class="ready">Your download will begin shortly, or use this <a href="{{c.app.repo.tarball_url(revision)}}">direct link</a>.</h2>
+ <h2 class="ready">Your download will begin shortly, or use this <a href="{{c.app.repo.tarball_url(revision, path)}}">direct link</a>.</h2>
</div>
{% endblock %}
[14/21] git commit: [#6235] ticket:352 Don't run test for snapshot if
zip binary isn't available
Posted by br...@apache.org.
[#6235] ticket:352 Don't run test for snapshot if zip binary isn't available
Project: http://git-wip-us.apache.org/repos/asf/incubator-allura/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-allura/commit/d0edb5c2
Tree: http://git-wip-us.apache.org/repos/asf/incubator-allura/tree/d0edb5c2
Diff: http://git-wip-us.apache.org/repos/asf/incubator-allura/diff/d0edb5c2
Branch: refs/heads/master
Commit: d0edb5c2fa3300bc8d9aeaceb1a7537cb004a5f8
Parents: 2e55361
Author: Igor Bondarenko <je...@gmail.com>
Authored: Fri May 17 16:51:12 2013 +0000
Committer: Dave Brondsema <db...@slashdotmedia.com>
Committed: Fri May 31 22:14:09 2013 +0000
----------------------------------------------------------------------
.../forgesvn/tests/functional/test_controllers.py | 5 +++++
1 files changed, 5 insertions(+), 0 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-allura/blob/d0edb5c2/ForgeSVN/forgesvn/tests/functional/test_controllers.py
----------------------------------------------------------------------
diff --git a/ForgeSVN/forgesvn/tests/functional/test_controllers.py b/ForgeSVN/forgesvn/tests/functional/test_controllers.py
index 5a69ee6..2575f58 100644
--- a/ForgeSVN/forgesvn/tests/functional/test_controllers.py
+++ b/ForgeSVN/forgesvn/tests/functional/test_controllers.py
@@ -17,11 +17,14 @@
import json
import shutil
+import os
+import tg
import pkg_resources
from pylons import tmpl_context as c
from ming.orm import ThreadLocalORMSession
from nose.tools import assert_equal
+from IPython.testing.decorators import onlyif
from allura import model as M
from allura.lib import helpers as h
@@ -185,6 +188,7 @@ class TestRootController(SVNTestController):
r = self.app.get('/src/2/log/?path=does/not/exist/')
assert 'No (more) commits' in r
+ @onlyif(os.path.exists(tg.config.get('scm.repos.tarball.zip_binary', '/usr/bin/zip')), 'zip binary is missing')
def test_tarball(self):
r = self.app.get('/src/3/tree/')
assert 'Download Snapshot' in r
@@ -195,6 +199,7 @@ class TestRootController(SVNTestController):
r = self.app.get('/src/3/tarball_status')
assert '{"status": "ready"}' in r
+ @onlyif(os.path.exists(tg.config.get('scm.repos.tarball.zip_binary', '/usr/bin/zip')), 'zip binary is missing')
def test_tarball_tags_aware(self):
h.set_context('test', 'svn-tags', neighborhood='Projects')
shutil.rmtree(c.app.repo.tarball_path, ignore_errors=True)
[12/21] git commit: [#6235] ticket:352 Fix tarball() signature for git
Posted by br...@apache.org.
[#6235] ticket:352 Fix tarball() signature for git
Project: http://git-wip-us.apache.org/repos/asf/incubator-allura/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-allura/commit/2e55361a
Tree: http://git-wip-us.apache.org/repos/asf/incubator-allura/tree/2e55361a
Diff: http://git-wip-us.apache.org/repos/asf/incubator-allura/diff/2e55361a
Branch: refs/heads/master
Commit: 2e55361a8290d5e0e6f46cd4ad1fb5825951a2b2
Parents: 070c5d6
Author: Igor Bondarenko <je...@gmail.com>
Authored: Fri May 17 16:29:57 2013 +0000
Committer: Dave Brondsema <db...@slashdotmedia.com>
Committed: Fri May 31 22:14:09 2013 +0000
----------------------------------------------------------------------
ForgeGit/forgegit/model/git_repo.py | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-allura/blob/2e55361a/ForgeGit/forgegit/model/git_repo.py
----------------------------------------------------------------------
diff --git a/ForgeGit/forgegit/model/git_repo.py b/ForgeGit/forgegit/model/git_repo.py
index a9d16c0..c656dfd 100644
--- a/ForgeGit/forgegit/model/git_repo.py
+++ b/ForgeGit/forgegit/model/git_repo.py
@@ -344,7 +344,7 @@ class GitImplementation(M.RepositoryImplementation):
tree = self.refresh_tree_info(ci.tree, set())
return tree._id
- def tarball(self, commit):
+ def tarball(self, commit, path=None):
if not os.path.exists(self._repo.tarball_path):
os.makedirs(self._repo.tarball_path)
archive_name = self._repo.tarball_filename(commit)
[06/21] git commit: [#6235] ticket:352 Path-aware svn snapshots
Posted by br...@apache.org.
[#6235] ticket:352 Path-aware svn snapshots
Project: http://git-wip-us.apache.org/repos/asf/incubator-allura/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-allura/commit/43364b23
Tree: http://git-wip-us.apache.org/repos/asf/incubator-allura/tree/43364b23
Diff: http://git-wip-us.apache.org/repos/asf/incubator-allura/diff/43364b23
Branch: refs/heads/master
Commit: 43364b23aa54f39829dedd349406c670015850a8
Parents: d01f821
Author: Igor Bondarenko <je...@gmail.com>
Authored: Fri May 17 13:02:40 2013 +0000
Committer: Dave Brondsema <db...@slashdotmedia.com>
Committed: Fri May 31 22:14:07 2013 +0000
----------------------------------------------------------------------
ForgeSVN/forgesvn/model/svn.py | 16 ++-
ForgeSVN/forgesvn/tests/model/test_repository.py | 100 +++++++++--------
2 files changed, 64 insertions(+), 52 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-allura/blob/43364b23/ForgeSVN/forgesvn/model/svn.py
----------------------------------------------------------------------
diff --git a/ForgeSVN/forgesvn/model/svn.py b/ForgeSVN/forgesvn/model/svn.py
index b649dae..8c65f78 100644
--- a/ForgeSVN/forgesvn/model/svn.py
+++ b/ForgeSVN/forgesvn/model/svn.py
@@ -114,10 +114,14 @@ class SVNCalledProcessError(Exception):
(self.cmd, self.returncode, self.stdout, self.stderr)
-def svn_path_exists(path):
+def svn_path_exists(path, rev=None):
svn = SVNLibWrapper(pysvn.Client())
+ if rev:
+ rev = pysvn.Revision(pysvn.opt_revision_kind.number, rev)
+ else:
+ rev = pysvn.Revision(pysvn.opt_revision_kind.unspecified)
try:
- svn.info2(path)
+ svn.info2(path, revision=rev)
return True
except pysvn.ClientError:
return False
@@ -636,7 +640,7 @@ class SVNImplementation(M.RepositoryImplementation):
entries[path] = self._oid(info.last_changed_rev.number)
return entries
- def _path_to_root(self, path):
+ def _path_to_root(self, path, rev=None):
'''Return tag/branch/trunk root for given path inside svn repo'''
if path:
path = path.strip('/').split('/')
@@ -652,13 +656,13 @@ class SVNImplementation(M.RepositoryImplementation):
return '/'.join(path[:idx + 1]) # path/trunk
# no tag/brach/trunk in path
trunk_exists = svn_path_exists(
- 'file://%s%s/%s' % (self._repo.fs_path, self._repo.name, 'trunk'))
+ 'file://%s%s/%s' % (self._repo.fs_path, self._repo.name, 'trunk'), rev)
if trunk_exists:
return 'trunk'
return ''
def tarball(self, commit, path=None):
- path = self._path_to_root(path)
+ path = self._path_to_root(path, commit)
if not os.path.exists(self._repo.tarball_path):
os.makedirs(self._repo.tarball_path)
archive_name = self._repo.tarball_filename(commit, path)
@@ -666,7 +670,7 @@ class SVNImplementation(M.RepositoryImplementation):
filename = os.path.join(self._repo.tarball_path, '%s%s' % (archive_name, '.zip'))
tmpfilename = os.path.join(self._repo.tarball_path, '%s%s' % (archive_name, '.tmp'))
rmtree(dest, ignore_errors=True)
- path = os.path.join(self._url, '')#path)
+ path = os.path.join(self._url, path)
try:
self._svn.export(path,
dest,
http://git-wip-us.apache.org/repos/asf/incubator-allura/blob/43364b23/ForgeSVN/forgesvn/tests/model/test_repository.py
----------------------------------------------------------------------
diff --git a/ForgeSVN/forgesvn/tests/model/test_repository.py b/ForgeSVN/forgesvn/tests/model/test_repository.py
index e131764..28b980b 100644
--- a/ForgeSVN/forgesvn/tests/model/test_repository.py
+++ b/ForgeSVN/forgesvn/tests/model/test_repository.py
@@ -310,105 +310,113 @@ class TestSVNRepo(unittest.TestCase, RepoImplTestBase):
assert os.path.isfile(os.path.join(tmpdir, "svn/t/te/test/testsvn/test-src-1.zip"))
tarball_zip = ZipFile(os.path.join(tmpdir, 'svn/t/te/test/testsvn/test-src-1.zip'), 'r')
assert_equal(tarball_zip.namelist(), ['test-src-1/', 'test-src-1/README'])
+ shutil.rmtree(self.repo.tarball_path, ignore_errors=True)
@onlyif(os.path.exists(tg.config.get('scm.repos.tarball.zip_binary', '/usr/bin/zip')), 'zip binary is missing')
def test_tarball_aware_of_tags(self):
- tag_content = ['test-svn-tags-1-tags-tag-1.0/',
- 'test-svn-tags-1-tags-tag-1.0/svn-commit.tmp',
- 'test-svn-tags-1-tags-tag-1.0/README']
+ rev = '19'
+ tag_content = sorted(['test-svn-tags-19-tags-tag-1.0/',
+ 'test-svn-tags-19-tags-tag-1.0/svn-commit.tmp',
+ 'test-svn-tags-19-tags-tag-1.0/README'])
h.set_context('test', 'svn-tags', neighborhood='Projects')
tarball_path = '/tmp/tarball/svn/t/te/test/testsvn-trunk-tags-branches/'
- fn = tarball_path + 'test-svn-tags-1-tags-tag-1.0.zip'
- self.svn_tags.tarball('1', '/tags/tag-1.0/')
+ fn = tarball_path + 'test-svn-tags-19-tags-tag-1.0.zip'
+ self.svn_tags.tarball(rev, '/tags/tag-1.0/')
assert os.path.isfile(fn), fn
snapshot = ZipFile(fn, 'r')
- assert_equal(snapshot.namelist(), tag_content)
+ assert_equal(sorted(snapshot.namelist()), tag_content)
os.remove(fn)
- self.svn_tags.tarball('1', '/tags/tag-1.0/some/path/')
+ self.svn_tags.tarball(rev, '/tags/tag-1.0/some/path/')
assert os.path.isfile(fn), fn
snapshot = ZipFile(fn, 'r')
- assert_equal(snapshot.namelist(), tag_content)
+ assert_equal(sorted(snapshot.namelist()), tag_content)
os.remove(fn)
# if inside of tags, but no tag is specified
# expect snapshot of trunk
- fn = tarball_path + 'test-svn-tags-1-trunk.zip'
- self.svn_tags.tarball('1', '/tags/')
+ fn = tarball_path + 'test-svn-tags-19-trunk.zip'
+ self.svn_tags.tarball(rev, '/tags/')
assert os.path.isfile(fn), fn
snapshot = ZipFile(fn, 'r')
- assert_equal(snapshot.namelist(), ['test-svn-tags-1-trunk/',
- 'test-svn-tags-1-trunk/aaa.txt',
- 'test-svn-tags-1-trunk/bbb.txt',
- 'test-svn-tags-1-trunk/ccc.txt',
- 'test-svn-tags-1-trunk/README'])
- os.remove(fn)
+ assert_equal(sorted(snapshot.namelist()),
+ sorted(['test-svn-tags-19-trunk/',
+ 'test-svn-tags-19-trunk/aaa.txt',
+ 'test-svn-tags-19-trunk/bbb.txt',
+ 'test-svn-tags-19-trunk/ccc.txt',
+ 'test-svn-tags-19-trunk/README']))
+ shutil.rmtree(tarball_path, ignore_errors=True)
@onlyif(os.path.exists(tg.config.get('scm.repos.tarball.zip_binary', '/usr/bin/zip')), 'zip binary is missing')
def test_tarball_aware_of_branches(self):
- branch_content = ['test-svn-tags-1-branches-aaa/',
- 'test-svn-tags-1-branches-aaa/aaa.txt',
- 'test-svn-tags-1-branches-aaa/svn-commit.tmp',
- 'test-svn-tags-1-branches-aaa/README']
+ rev = '19'
+ branch_content = sorted(['test-svn-tags-19-branches-aaa/',
+ 'test-svn-tags-19-branches-aaa/aaa.txt',
+ 'test-svn-tags-19-branches-aaa/svn-commit.tmp',
+ 'test-svn-tags-19-branches-aaa/README'])
h.set_context('test', 'svn-tags', neighborhood='Projects')
tarball_path = '/tmp/tarball/svn/t/te/test/testsvn-trunk-tags-branches/'
- fn = tarball_path + 'test-svn-tags-1-branches-aaa.zip'
- self.svn_tags.tarball('1', '/branches/aaa/')
+ fn = tarball_path + 'test-svn-tags-19-branches-aaa.zip'
+ self.svn_tags.tarball(rev, '/branches/aaa/')
assert os.path.isfile(fn), fn
snapshot = ZipFile(fn, 'r')
- assert_equal(snapshot.namelist(), branch_content)
+ assert_equal(sorted(snapshot.namelist()), branch_content)
os.remove(fn)
- self.svn_tags.tarball('1', '/branches/aaa/some/path/')
+ self.svn_tags.tarball(rev, '/branches/aaa/some/path/')
assert os.path.isfile(fn), fn
snapshot = ZipFile(fn, 'r')
- assert_equal(snapshot.namelist(), branch_content)
+ assert_equal(sorted(snapshot.namelist()), branch_content)
os.remove(fn)
# if inside of branches, but no branch is specified
# expect snapshot of trunk
- fn = tarball_path + 'test-svn-tags-1-trunk.zip'
- self.svn_tags.tarball('1', '/branches/')
+ fn = tarball_path + 'test-svn-tags-19-trunk.zip'
+ self.svn_tags.tarball(rev, '/branches/')
assert os.path.isfile(fn), fn
snapshot = ZipFile(fn, 'r')
- assert_equal(snapshot.namelist(), ['test-svn-tags-1-trunk/',
- 'test-svn-tags-1-trunk/aaa.txt',
- 'test-svn-tags-1-trunk/bbb.txt',
- 'test-svn-tags-1-trunk/ccc.txt',
- 'test-svn-tags-1-trunk/README'])
- os.remove(fn)
+ assert_equal(sorted(snapshot.namelist()),
+ sorted(['test-svn-tags-19-trunk/',
+ 'test-svn-tags-19-trunk/aaa.txt',
+ 'test-svn-tags-19-trunk/bbb.txt',
+ 'test-svn-tags-19-trunk/ccc.txt',
+ 'test-svn-tags-19-trunk/README']))
+ shutil.rmtree(tarball_path, ignore_errors=True)
@onlyif(os.path.exists(tg.config.get('scm.repos.tarball.zip_binary', '/usr/bin/zip')), 'zip binary is missing')
def test_tarball_aware_of_trunk(self):
- trunk_content = ['test-svn-tags-1-trunk/',
- 'test-svn-tags-1-trunk/aaa.txt',
- 'test-svn-tags-1-trunk/bbb.txt',
- 'test-svn-tags-1-trunk/ccc.txt',
- 'test-svn-tags-1-trunk/README']
+ rev = '19'
+ trunk_content = sorted(['test-svn-tags-19-trunk/',
+ 'test-svn-tags-19-trunk/aaa.txt',
+ 'test-svn-tags-19-trunk/bbb.txt',
+ 'test-svn-tags-19-trunk/ccc.txt',
+ 'test-svn-tags-19-trunk/README'])
h.set_context('test', 'svn-tags', neighborhood='Projects')
tarball_path = '/tmp/tarball/svn/t/te/test/testsvn-trunk-tags-branches/'
- fn = tarball_path + 'test-svn-tags-1-trunk.zip'
- self.svn_tags.tarball('1', '/trunk/')
+ fn = tarball_path + 'test-svn-tags-19-trunk.zip'
+ self.svn_tags.tarball(rev, '/trunk/')
assert os.path.isfile(fn), fn
snapshot = ZipFile(fn, 'r')
- assert_equal(snapshot.namelist(), trunk_content)
+ assert_equal(sorted(snapshot.namelist()), trunk_content)
os.remove(fn)
- self.svn_tags.tarball('1', '/trunk/some/path/')
+ self.svn_tags.tarball(rev, '/trunk/some/path/')
assert os.path.isfile(fn), fn
snapshot = ZipFile(fn, 'r')
- assert_equal(snapshot.namelist(), trunk_content)
+ assert_equal(sorted(snapshot.namelist()), trunk_content)
os.remove(fn)
# no path, but there are trunk in the repo
# expect snapshot of trunk
- self.svn_tags.tarball('1')
+ self.svn_tags.tarball(rev)
assert os.path.isfile(fn), fn
snapshot = ZipFile(fn, 'r')
- assert_equal(snapshot.namelist(), trunk_content)
+ assert_equal(sorted(snapshot.namelist()), trunk_content)
os.remove(fn)
# no path, and no trunk dir
# expect snapshot of repo root
+ h.set_context('test', 'src', neighborhood='Projects')
fn = '/tmp/tarball/svn/t/te/test/testsvn/test-src-1.zip'
self.repo.tarball('1')
assert os.path.isfile(fn), fn
snapshot = ZipFile(fn, 'r')
assert_equal(snapshot.namelist(), ['test-src-1/', 'test-src-1/README'])
- os.remove(fn)
+ shutil.rmtree('/tmp/tarball/svn/t/te/test/testsvn/', ignore_errors=True)
+ shutil.rmtree(tarball_path, ignore_errors=True)
def test_is_empty(self):
assert not self.repo.is_empty()
[03/21] git commit: [#6235] ticket:352 tags/branches/trunk aware
snapshot names
Posted by br...@apache.org.
[#6235] ticket:352 tags/branches/trunk aware snapshot names
Project: http://git-wip-us.apache.org/repos/asf/incubator-allura/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-allura/commit/8e25e0c0
Tree: http://git-wip-us.apache.org/repos/asf/incubator-allura/tree/8e25e0c0
Diff: http://git-wip-us.apache.org/repos/asf/incubator-allura/diff/8e25e0c0
Branch: refs/heads/master
Commit: 8e25e0c03b895e39ca123441ebcdf1a0ec3df9e5
Parents: 77ae4f6
Author: Igor Bondarenko <je...@gmail.com>
Authored: Fri May 17 12:09:26 2013 +0000
Committer: Dave Brondsema <db...@slashdotmedia.com>
Committed: Fri May 31 22:14:05 2013 +0000
----------------------------------------------------------------------
Allura/allura/model/repository.py | 17 +++++---
ForgeSVN/forgesvn/model/svn.py | 40 +++++++++++++----
ForgeSVN/forgesvn/tests/model/test_repository.py | 29 +++++++-----
3 files changed, 58 insertions(+), 28 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-allura/blob/8e25e0c0/Allura/allura/model/repository.py
----------------------------------------------------------------------
diff --git a/Allura/allura/model/repository.py b/Allura/allura/model/repository.py
index 37b95ab..b728987 100644
--- a/Allura/allura/model/repository.py
+++ b/Allura/allura/model/repository.py
@@ -132,7 +132,7 @@ class RepositoryImplementation(object):
'''Return count of the commits related to path'''
raise NotImplementedError, 'commits_count'
- def tarball(self, revision):
+ def tarball(self, revision, path=None):
'''Create a tarball for the revision'''
raise NotImplementedError, 'tarball'
@@ -266,10 +266,13 @@ class Repository(Artifact, ActivityObject):
self.project.shortname,
self.name)
- def tarball_filename(self, revision):
+ def tarball_filename(self, revision, path=None):
shortname = c.project.shortname.replace('/', '-')
mount_point = c.app.config.options.mount_point
filename = '%s-%s-%s' % (shortname, mount_point, revision)
+ if path:
+ path = path.strip('/')
+ filename += '-' + '-'.join(path.split('/'))
return filename
def tarball_url(self, revision):
@@ -282,8 +285,8 @@ class Repository(Artifact, ActivityObject):
filename)
return urljoin(tg.config.get('scm.repos.tarball.url_prefix', '/'), r)
- def get_tarball_status(self, revision):
- pathname = os.path.join(self.tarball_path, self.tarball_filename(revision))
+ def get_tarball_status(self, revision, path=None):
+ pathname = os.path.join(self.tarball_path, self.tarball_filename(revision, path))
filename = '%s%s' % (pathname, '.zip')
tmpfilename = '%s%s' % (pathname, '.tmp')
@@ -551,8 +554,10 @@ class Repository(Artifact, ActivityObject):
def forks(self):
return self.query.find({'upstream_repo.name': self.url()}).all()
- def tarball(self, revision):
- self._impl.tarball(revision)
+ def tarball(self, revision, path=None):
+ if path:
+ path = path.strip('/')
+ self._impl.tarball(revision, path)
class MergeRequest(VersionedArtifact, ActivityObject):
statuses=['open', 'merged', 'rejected']
http://git-wip-us.apache.org/repos/asf/incubator-allura/blob/8e25e0c0/ForgeSVN/forgesvn/model/svn.py
----------------------------------------------------------------------
diff --git a/ForgeSVN/forgesvn/model/svn.py b/ForgeSVN/forgesvn/model/svn.py
index 2189a7f..b649dae 100644
--- a/ForgeSVN/forgesvn/model/svn.py
+++ b/ForgeSVN/forgesvn/model/svn.py
@@ -636,23 +636,45 @@ class SVNImplementation(M.RepositoryImplementation):
entries[path] = self._oid(info.last_changed_rev.number)
return entries
- def tarball(self, commit):
+ def _path_to_root(self, path):
+ '''Return tag/branch/trunk root for given path inside svn repo'''
+ if path:
+ path = path.strip('/').split('/')
+ idx = None
+ if 'tags' in path:
+ idx = path.index('tags')
+ elif 'branches' in path:
+ idx = path.index('branches')
+ if idx is not None and idx < len(path) - 1: # e.g. path/tags/tag-1.0/...
+ return '/'.join(path[:idx + 2]) # path/tags/tag-1.0
+ if 'trunk' in path:
+ idx = path.index('trunk')
+ return '/'.join(path[:idx + 1]) # path/trunk
+ # no tag/brach/trunk in path
+ trunk_exists = svn_path_exists(
+ 'file://%s%s/%s' % (self._repo.fs_path, self._repo.name, 'trunk'))
+ if trunk_exists:
+ return 'trunk'
+ return ''
+
+ def tarball(self, commit, path=None):
+ path = self._path_to_root(path)
if not os.path.exists(self._repo.tarball_path):
os.makedirs(self._repo.tarball_path)
- archive_name = self._repo.tarball_filename(commit)
- path = os.path.join(self._repo.tarball_path, archive_name)
+ archive_name = self._repo.tarball_filename(commit, path)
+ dest = os.path.join(self._repo.tarball_path, archive_name)
filename = os.path.join(self._repo.tarball_path, '%s%s' % (archive_name, '.zip'))
tmpfilename = os.path.join(self._repo.tarball_path, '%s%s' % (archive_name, '.tmp'))
- if os.path.exists(path):
- rmtree(path)
+ rmtree(dest, ignore_errors=True)
+ path = os.path.join(self._url, '')#path)
try:
- self._svn.export(self._url,
- path,
+ self._svn.export(path,
+ dest,
revision=pysvn.Revision(pysvn.opt_revision_kind.number, commit))
- zipdir(path, tmpfilename)
+ zipdir(dest, tmpfilename)
os.rename(tmpfilename, filename)
finally:
- rmtree(path)
+ rmtree(dest, ignore_errors=True)
if os.path.exists(tmpfilename):
os.remove(tmpfilename)
http://git-wip-us.apache.org/repos/asf/incubator-allura/blob/8e25e0c0/ForgeSVN/forgesvn/tests/model/test_repository.py
----------------------------------------------------------------------
diff --git a/ForgeSVN/forgesvn/tests/model/test_repository.py b/ForgeSVN/forgesvn/tests/model/test_repository.py
index c528004..9a22ae1 100644
--- a/ForgeSVN/forgesvn/tests/model/test_repository.py
+++ b/ForgeSVN/forgesvn/tests/model/test_repository.py
@@ -314,60 +314,63 @@ class TestSVNRepo(unittest.TestCase, RepoImplTestBase):
@onlyif(os.path.exists(tg.config.get('scm.repos.tarball.zip_binary', '/usr/bin/zip')), 'zip binary is missing')
def test_tarball_aware_of_tags(self):
# TODO: check zip that it actually contains only needed files
- tarball_path = '/tmp/tarball/svn/t/te/test/svn-tags/'
+ h.set_context('test', 'svn-tags', neighborhood='Projects')
+ tarball_path = '/tmp/tarball/svn/t/te/test/testsvn-trunk-tags-branches/'
fn = tarball_path + 'test-svn-tags-1-tags-tag-1.0.zip'
self.svn_tags.tarball('1', '/tags/tag-1.0/')
- assert os.path.isfile(fn)
+ assert os.path.isfile(fn), fn
os.remove(fn)
self.svn_tags.tarball('1', '/tags/tag-1.0/some/path/')
- assert os.path.isfile(fn)
+ assert os.path.isfile(fn), fn
os.remove(fn)
# if inside of tags, but no tag is specified
# expect snapshot of trunk
fn = tarball_path + 'test-svn-tags-1-trunk.zip'
self.svn_tags.tarball('1', '/tags/')
- assert os.path.isfile(fn)
+ assert os.path.isfile(fn), fn
os.remove(fn)
@onlyif(os.path.exists(tg.config.get('scm.repos.tarball.zip_binary', '/usr/bin/zip')), 'zip binary is missing')
def test_tarball_aware_of_branches(self):
# TODO: check zip that it actually contains only needed files
- tarball_path = '/tmp/tarball/svn/t/te/test/svn-tags/'
+ h.set_context('test', 'svn-tags', neighborhood='Projects')
+ tarball_path = '/tmp/tarball/svn/t/te/test/testsvn-trunk-tags-branches/'
fn = tarball_path + 'test-svn-tags-1-branches-aaa.zip'
self.svn_tags.tarball('1', '/branches/aaa/')
- assert os.path.isfile(fn)
+ assert os.path.isfile(fn), fn
os.remove(fn)
self.svn_tags.tarball('1', '/branches/aaa/some/path/')
- assert os.path.isfile(fn)
+ assert os.path.isfile(fn), fn
os.remove(fn)
# if inside of branches, but no branch is specified
# expect snapshot of trunk
fn = tarball_path + 'test-svn-tags-1-trunk.zip'
self.svn_tags.tarball('1', '/branches/')
- assert os.path.isfile(fn)
+ assert os.path.isfile(fn), fn
os.remove(fn)
@onlyif(os.path.exists(tg.config.get('scm.repos.tarball.zip_binary', '/usr/bin/zip')), 'zip binary is missing')
def test_tarball_aware_of_trunk(self):
# TODO: check zip that it actually contains only needed files
- tarball_path = '/tmp/tarball/svn/t/te/test/svn-tags/'
+ h.set_context('test', 'svn-tags', neighborhood='Projects')
+ tarball_path = '/tmp/tarball/svn/t/te/test/testsvn-trunk-tags-branches/'
fn = tarball_path + 'test-svn-tags-1-trunk.zip'
self.svn_tags.tarball('1', '/trunk/')
- assert os.path.isfile(fn)
+ assert os.path.isfile(fn), fn
os.remove(fn)
self.svn_tags.tarball('1', '/trunk/some/path/')
- assert os.path.isfile(fn)
+ assert os.path.isfile(fn), fn
os.remove(fn)
# no path, but there are trunk in the repo
# expect snapshot of trunk
self.svn_tags.tarball('1')
- assert os.path.isfile(fn)
+ assert os.path.isfile(fn), fn
os.remove(fn)
# no path, and no trunk dir
# expect snapshot of repo root
fn = '/tmp/tarball/svn/t/te/test/testsvn/test-src-1.zip'
self.repo.tarball('1')
- assert os.path.isfile(fn)
+ assert os.path.isfile(fn), fn
os.remove(fn)
def test_is_empty(self):
[19/21] git commit: [#6235] include path in logging
Posted by br...@apache.org.
[#6235] include path in logging
Project: http://git-wip-us.apache.org/repos/asf/incubator-allura/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-allura/commit/7f945398
Tree: http://git-wip-us.apache.org/repos/asf/incubator-allura/tree/7f945398
Diff: http://git-wip-us.apache.org/repos/asf/incubator-allura/diff/7f945398
Branch: refs/heads/master
Commit: 7f945398e8828c6c13b424cc95aed2f86dcdae99
Parents: ab5f161
Author: Dave Brondsema <db...@slashdotmedia.com>
Authored: Fri May 31 22:13:54 2013 +0000
Committer: Dave Brondsema <db...@slashdotmedia.com>
Committed: Fri May 31 22:14:10 2013 +0000
----------------------------------------------------------------------
Allura/allura/tasks/repo_tasks.py | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-allura/blob/7f945398/Allura/allura/tasks/repo_tasks.py
----------------------------------------------------------------------
diff --git a/Allura/allura/tasks/repo_tasks.py b/Allura/allura/tasks/repo_tasks.py
index 95d7052..a99d7d0 100644
--- a/Allura/allura/tasks/repo_tasks.py
+++ b/Allura/allura/tasks/repo_tasks.py
@@ -132,6 +132,6 @@ def tarball(revision=None, path=None):
try:
repo.tarball(revision, path)
except:
- log.error('Could not create tarball for repository %s:%s revision %s' % (c.project.shortname, c.app.config.options.mount_point, revision), exc_info=True)
+ log.error('Could not create tarball for repository %s:%s revision %s path %s' % (c.project.shortname, c.app.config.options.mount_point, revision, path), exc_info=True)
else:
log.warn('Creation of tarball for %s:%s skipped because revision is not specified' % (c.project.shortname, c.app.config.options.mount_point))
[05/21] git commit: [#6235] ticket:352 Pass path to the snapshot task
Posted by br...@apache.org.
[#6235] ticket:352 Pass path to the snapshot task
Project: http://git-wip-us.apache.org/repos/asf/incubator-allura/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-allura/commit/20be6df0
Tree: http://git-wip-us.apache.org/repos/asf/incubator-allura/tree/20be6df0
Diff: http://git-wip-us.apache.org/repos/asf/incubator-allura/diff/20be6df0
Branch: refs/heads/master
Commit: 20be6df0394588f830731b776b25f9f480775bce
Parents: 43364b2
Author: Igor Bondarenko <je...@gmail.com>
Authored: Fri May 17 15:28:06 2013 +0000
Committer: Dave Brondsema <db...@slashdotmedia.com>
Committed: Fri May 31 22:14:07 2013 +0000
----------------------------------------------------------------------
Allura/allura/controllers/repository.py | 9 +-
Allura/allura/model/repository.py | 3 -
Allura/allura/tasks/repo_tasks.py | 6 +-
Allura/allura/templates/repo/tree.html | 4 +-
ForgeSVN/forgesvn/model/svn.py | 6 ++
.../forgesvn/tests/functional/test_controllers.py | 60 +++++++++++++++
6 files changed, 76 insertions(+), 12 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-allura/blob/20be6df0/Allura/allura/controllers/repository.py
----------------------------------------------------------------------
diff --git a/Allura/allura/controllers/repository.py b/Allura/allura/controllers/repository.py
index 6967685..a8f8c68 100644
--- a/Allura/allura/controllers/repository.py
+++ b/Allura/allura/controllers/repository.py
@@ -452,20 +452,21 @@ class CommitBrowser(BaseController):
@expose('jinja:allura:templates/repo/tarball.html')
def tarball(self, **kw):
+ path = kw.pop('path', None)
if not asbool(tg.config.get('scm.repos.tarball.enable', False)):
raise exc.HTTPNotFound()
rev = self._commit.url().split('/')[-2]
- status = c.app.repo.get_tarball_status(rev)
+ status = c.app.repo.get_tarball_status(rev, path)
if status is None:
- allura.tasks.repo_tasks.tarball.post(revision=rev)
+ allura.tasks.repo_tasks.tarball.post(revision=rev, path=path)
return dict(commit=self._commit, revision=rev, status=status)
@expose('json:')
- def tarball_status(self):
+ def tarball_status(self, path=None, **kw):
if not asbool(tg.config.get('scm.repos.tarball.enable', False)):
raise exc.HTTPNotFound()
rev = self._commit.url().split('/')[-2]
- return dict(status=c.app.repo.get_tarball_status(rev))
+ return dict(status=c.app.repo.get_tarball_status(rev, path))
@expose('jinja:allura:templates/repo/log.html')
http://git-wip-us.apache.org/repos/asf/incubator-allura/blob/20be6df0/Allura/allura/model/repository.py
----------------------------------------------------------------------
diff --git a/Allura/allura/model/repository.py b/Allura/allura/model/repository.py
index b728987..65ac0a2 100644
--- a/Allura/allura/model/repository.py
+++ b/Allura/allura/model/repository.py
@@ -270,9 +270,6 @@ class Repository(Artifact, ActivityObject):
shortname = c.project.shortname.replace('/', '-')
mount_point = c.app.config.options.mount_point
filename = '%s-%s-%s' % (shortname, mount_point, revision)
- if path:
- path = path.strip('/')
- filename += '-' + '-'.join(path.split('/'))
return filename
def tarball_url(self, revision):
http://git-wip-us.apache.org/repos/asf/incubator-allura/blob/20be6df0/Allura/allura/tasks/repo_tasks.py
----------------------------------------------------------------------
diff --git a/Allura/allura/tasks/repo_tasks.py b/Allura/allura/tasks/repo_tasks.py
index 837c686..95d7052 100644
--- a/Allura/allura/tasks/repo_tasks.py
+++ b/Allura/allura/tasks/repo_tasks.py
@@ -120,17 +120,17 @@ def reclone_repo(*args, **kwargs):
g.post_event('repo_clone_task_failed', source_url, source_path, traceback.format_exc())
@task
-def tarball(revision=None):
+def tarball(revision=None, path=None):
log = logging.getLogger(__name__)
if revision:
repo = c.app.repo
- status = repo.get_tarball_status(revision)
+ status = repo.get_tarball_status(revision, path)
if status:
log.info('Skipping tarball for repository %s:%s rev %s because it is already %s' %
(c.project.shortname, c.app.config.options.mount_point, revision, status))
else:
try:
- repo.tarball(revision)
+ repo.tarball(revision, path)
except:
log.error('Could not create tarball for repository %s:%s revision %s' % (c.project.shortname, c.app.config.options.mount_point, revision), exc_info=True)
else:
http://git-wip-us.apache.org/repos/asf/incubator-allura/blob/20be6df0/Allura/allura/templates/repo/tree.html
----------------------------------------------------------------------
diff --git a/Allura/allura/templates/repo/tree.html b/Allura/allura/templates/repo/tree.html
index 740ed04..b2dbcfe 100644
--- a/Allura/allura/templates/repo/tree.html
+++ b/Allura/allura/templates/repo/tree.html
@@ -31,8 +31,8 @@ Tree <a href="{{commit.url()}}">{{commit.shorthand_id()}}</a> {{commit_labels(co
{% block actions %}
{% if tarball_url %}
- <a href="{{tarball_url}}" rel="nofollow">
- <b data-icon="{{g.icons.folder.char}}" class="ico {{g.icons.folder.css}}" title="Snapshot"> </b> Download Snapshot
+<a href="{{ tarball_url + ('?path=' + path if path else '') }}" rel="nofollow">
+ <b data-icon="{{g.icons.folder.char}}" class="ico {{g.icons.folder.css}}" title="Snapshot"> </b> Download Snapshot
</a>
{% endif %}
http://git-wip-us.apache.org/repos/asf/incubator-allura/blob/20be6df0/ForgeSVN/forgesvn/model/svn.py
----------------------------------------------------------------------
diff --git a/ForgeSVN/forgesvn/model/svn.py b/ForgeSVN/forgesvn/model/svn.py
index 8c65f78..363dd27 100644
--- a/ForgeSVN/forgesvn/model/svn.py
+++ b/ForgeSVN/forgesvn/model/svn.py
@@ -101,6 +101,12 @@ class Repository(M.Repository):
if not self.heads: return None
return self._impl.commit(self.heads[0].object_id)
+ def tarball_filename(self, revision, path=None):
+ fn = super(Repository, self).tarball_filename(revision, path)
+ path = self._impl._path_to_root(path, revision)
+ fn += '-' + '-'.join(path.split('/'))
+ return fn
+
class SVNCalledProcessError(Exception):
def __init__(self, cmd, returncode, stdout, stderr):
http://git-wip-us.apache.org/repos/asf/incubator-allura/blob/20be6df0/ForgeSVN/forgesvn/tests/functional/test_controllers.py
----------------------------------------------------------------------
diff --git a/ForgeSVN/forgesvn/tests/functional/test_controllers.py b/ForgeSVN/forgesvn/tests/functional/test_controllers.py
index 46a42e3..5a69ee6 100644
--- a/ForgeSVN/forgesvn/tests/functional/test_controllers.py
+++ b/ForgeSVN/forgesvn/tests/functional/test_controllers.py
@@ -16,6 +16,7 @@
# under the License.
import json
+import shutil
import pkg_resources
from pylons import tmpl_context as c
@@ -26,6 +27,7 @@ from allura import model as M
from allura.lib import helpers as h
from alluratest.controller import TestController
from forgesvn.tests import with_svn
+from allura.tests.decorators import with_tool
class SVNTestController(TestController):
def setUp(self):
@@ -33,6 +35,7 @@ class SVNTestController(TestController):
self.setup_with_tools()
@with_svn
+ @with_tool('test', 'SVN', 'svn-tags', 'SVN with tags')
def setup_with_tools(self):
h.set_context('test', 'src', neighborhood='Projects')
repo_dir = pkg_resources.resource_filename(
@@ -46,6 +49,13 @@ class SVNTestController(TestController):
c.app.repo.refresh()
ThreadLocalORMSession.flush_all()
ThreadLocalORMSession.close_all()
+ h.set_context('test', 'svn-tags', neighborhood='Projects')
+ c.app.repo.fs_path = repo_dir
+ c.app.repo.status = 'ready'
+ c.app.repo.name = 'testsvn-trunk-tags-branches'
+ c.app.repo.refresh()
+ ThreadLocalORMSession.flush_all()
+ ThreadLocalORMSession.close_all()
h.set_context('test', 'src', neighborhood='Projects')
@@ -185,6 +195,56 @@ class TestRootController(SVNTestController):
r = self.app.get('/src/3/tarball_status')
assert '{"status": "ready"}' in r
+ def test_tarball_tags_aware(self):
+ h.set_context('test', 'svn-tags', neighborhood='Projects')
+ shutil.rmtree(c.app.repo.tarball_path, ignore_errors=True)
+ r = self.app.get('/svn-tags/19/tree/')
+ link = r.html.find('h2', attrs={'class': 'dark title'})
+ link = link.find('small').findAll('a')[0]
+ assert_equal(link.text, 'Download Snapshot')
+ assert_equal(link.get('href'), '/p/test/svn-tags/19/tarball')
+
+ r = self.app.get('/svn-tags/19/tree/tags/tag-1.0/')
+ link = r.html.find('h2', attrs={'class': 'dark title'})
+ link = link.find('small').findAll('a')[0]
+ assert_equal(link.text, 'Download Snapshot')
+ assert_equal(link.get('href'), '/p/test/svn-tags/19/tarball?path=/tags/tag-1.0')
+
+ r = self.app.get('/svn-tags/19/tarball_status?path=/tags/tag-1.0')
+ assert_equal(r.json['status'], None)
+ r = self.app.get(link.get('href'))
+ assert 'Generating snapshot...' in r
+ M.MonQTask.run_ready()
+ r = self.app.get('/svn-tags/19/tarball_status?path=/tags/tag-1.0')
+ assert_equal(r.json['status'], 'ready')
+
+ r = self.app.get('/svn-tags/19/tarball_status?path=/trunk')
+ assert_equal(r.json['status'], None)
+ r = self.app.get('/svn-tags/19/tarball?path=/trunk/')
+ assert 'Generating snapshot...' in r
+ M.MonQTask.run_ready()
+ r = self.app.get('/svn-tags/19/tarball_status?path=/trunk')
+ assert_equal(r.json['status'], 'ready')
+
+ r = self.app.get('/svn-tags/19/tarball_status?path=/branches/aaa/')
+ assert_equal(r.json['status'], None)
+
+ # All of the following also should be ready because...
+ # ...this is essentially the same as trunk snapshot
+ r = self.app.get('/svn-tags/19/tarball_status?path=/trunk/some/path/')
+ assert_equal(r.json['status'], 'ready')
+ r = self.app.get('/svn-tags/19/tarball_status')
+ assert_equal(r.json['status'], 'ready')
+ # ...the same as trunk, 'cause concrete tag isn't specified
+ r = self.app.get('/svn-tags/19/tarball_status?path=/tags/')
+ assert_equal(r.json['status'], 'ready')
+ # ...the same as trunk, 'cause concrete branch isn't specified
+ r = self.app.get('/svn-tags/19/tarball_status?path=/branches/')
+ assert_equal(r.json['status'], 'ready')
+ # ...this is essentially the same as tag snapshot
+ r = self.app.get('/svn-tags/19/tarball_status?path=/tags/tag-1.0/dir')
+ assert_equal(r.json['status'], 'ready')
+
class TestImportController(SVNTestController):
def test_index(self):
[07/21] git commit: [#6235] ticket:352 Fix path existence check
Posted by br...@apache.org.
[#6235] ticket:352 Fix path existence check
Project: http://git-wip-us.apache.org/repos/asf/incubator-allura/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-allura/commit/91b68daf
Tree: http://git-wip-us.apache.org/repos/asf/incubator-allura/tree/91b68daf
Diff: http://git-wip-us.apache.org/repos/asf/incubator-allura/diff/91b68daf
Branch: refs/heads/master
Commit: 91b68daffc63f5bdb3f36703a1e4905b0c4cbc36
Parents: c0fb628
Author: Igor Bondarenko <je...@gmail.com>
Authored: Fri May 17 16:17:51 2013 +0000
Committer: Dave Brondsema <db...@slashdotmedia.com>
Committed: Fri May 31 22:14:08 2013 +0000
----------------------------------------------------------------------
ForgeSVN/forgesvn/model/svn.py | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-allura/blob/91b68daf/ForgeSVN/forgesvn/model/svn.py
----------------------------------------------------------------------
diff --git a/ForgeSVN/forgesvn/model/svn.py b/ForgeSVN/forgesvn/model/svn.py
index 363dd27..9d0a521 100644
--- a/ForgeSVN/forgesvn/model/svn.py
+++ b/ForgeSVN/forgesvn/model/svn.py
@@ -125,7 +125,7 @@ def svn_path_exists(path, rev=None):
if rev:
rev = pysvn.Revision(pysvn.opt_revision_kind.number, rev)
else:
- rev = pysvn.Revision(pysvn.opt_revision_kind.unspecified)
+ rev = pysvn.Revision(pysvn.opt_revision_kind.head)
try:
svn.info2(path, revision=rev)
return True
[02/21] git commit: [#6235] ticket:352 Basic tests for
trunk/tags/branches aware svn
Posted by br...@apache.org.
[#6235] ticket:352 Basic tests for trunk/tags/branches aware svn
Project: http://git-wip-us.apache.org/repos/asf/incubator-allura/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-allura/commit/77ae4f6c
Tree: http://git-wip-us.apache.org/repos/asf/incubator-allura/tree/77ae4f6c
Diff: http://git-wip-us.apache.org/repos/asf/incubator-allura/diff/77ae4f6c
Branch: refs/heads/master
Commit: 77ae4f6c953885719a760a762b117a7aea62f618
Parents: 67a1021
Author: Igor Bondarenko <je...@gmail.com>
Authored: Fri May 17 10:27:17 2013 +0000
Committer: Dave Brondsema <db...@slashdotmedia.com>
Committed: Fri May 31 22:14:04 2013 +0000
----------------------------------------------------------------------
ForgeSVN/forgesvn/tests/model/test_repository.py | 68 +++++++++++++++++
1 files changed, 68 insertions(+), 0 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-allura/blob/77ae4f6c/ForgeSVN/forgesvn/tests/model/test_repository.py
----------------------------------------------------------------------
diff --git a/ForgeSVN/forgesvn/tests/model/test_repository.py b/ForgeSVN/forgesvn/tests/model/test_repository.py
index 6026125..c528004 100644
--- a/ForgeSVN/forgesvn/tests/model/test_repository.py
+++ b/ForgeSVN/forgesvn/tests/model/test_repository.py
@@ -44,6 +44,7 @@ from allura.tests.model.test_repo import RepoImplTestBase
from forgesvn import model as SM
from forgesvn.model.svn import svn_path_exists
from forgesvn.tests import with_svn
+from allura.tests.decorators import with_tool
class TestNewRepo(unittest.TestCase):
@@ -110,6 +111,7 @@ class TestSVNRepo(unittest.TestCase, RepoImplTestBase):
self.setup_with_tools()
@with_svn
+ @with_tool('test', 'SVN', 'svn-tags', 'SVN with tags')
def setup_with_tools(self):
setup_global_objects()
h.set_context('test', 'src', neighborhood='Projects')
@@ -122,6 +124,13 @@ class TestSVNRepo(unittest.TestCase, RepoImplTestBase):
tool = 'svn',
status = 'creating')
self.repo.refresh()
+ self.svn_tags = SM.Repository(
+ name='testsvn-trunk-tags-branches',
+ fs_path=repo_dir,
+ url_path = '/test/',
+ tool = 'svn',
+ status = 'creating')
+ self.svn_tags.refresh()
ThreadLocalORMSession.flush_all()
ThreadLocalORMSession.close_all()
@@ -302,6 +311,65 @@ class TestSVNRepo(unittest.TestCase, RepoImplTestBase):
tarball_zip = ZipFile(os.path.join(tmpdir, 'svn/t/te/test/testsvn/test-src-1.zip'), 'r')
assert_equal(tarball_zip.namelist(), ['test-src-1/', 'test-src-1/README'])
+ @onlyif(os.path.exists(tg.config.get('scm.repos.tarball.zip_binary', '/usr/bin/zip')), 'zip binary is missing')
+ def test_tarball_aware_of_tags(self):
+ # TODO: check zip that it actually contains only needed files
+ tarball_path = '/tmp/tarball/svn/t/te/test/svn-tags/'
+ fn = tarball_path + 'test-svn-tags-1-tags-tag-1.0.zip'
+ self.svn_tags.tarball('1', '/tags/tag-1.0/')
+ assert os.path.isfile(fn)
+ os.remove(fn)
+ self.svn_tags.tarball('1', '/tags/tag-1.0/some/path/')
+ assert os.path.isfile(fn)
+ os.remove(fn)
+ # if inside of tags, but no tag is specified
+ # expect snapshot of trunk
+ fn = tarball_path + 'test-svn-tags-1-trunk.zip'
+ self.svn_tags.tarball('1', '/tags/')
+ assert os.path.isfile(fn)
+ os.remove(fn)
+
+ @onlyif(os.path.exists(tg.config.get('scm.repos.tarball.zip_binary', '/usr/bin/zip')), 'zip binary is missing')
+ def test_tarball_aware_of_branches(self):
+ # TODO: check zip that it actually contains only needed files
+ tarball_path = '/tmp/tarball/svn/t/te/test/svn-tags/'
+ fn = tarball_path + 'test-svn-tags-1-branches-aaa.zip'
+ self.svn_tags.tarball('1', '/branches/aaa/')
+ assert os.path.isfile(fn)
+ os.remove(fn)
+ self.svn_tags.tarball('1', '/branches/aaa/some/path/')
+ assert os.path.isfile(fn)
+ os.remove(fn)
+ # if inside of branches, but no branch is specified
+ # expect snapshot of trunk
+ fn = tarball_path + 'test-svn-tags-1-trunk.zip'
+ self.svn_tags.tarball('1', '/branches/')
+ assert os.path.isfile(fn)
+ os.remove(fn)
+
+ @onlyif(os.path.exists(tg.config.get('scm.repos.tarball.zip_binary', '/usr/bin/zip')), 'zip binary is missing')
+ def test_tarball_aware_of_trunk(self):
+ # TODO: check zip that it actually contains only needed files
+ tarball_path = '/tmp/tarball/svn/t/te/test/svn-tags/'
+ fn = tarball_path + 'test-svn-tags-1-trunk.zip'
+ self.svn_tags.tarball('1', '/trunk/')
+ assert os.path.isfile(fn)
+ os.remove(fn)
+ self.svn_tags.tarball('1', '/trunk/some/path/')
+ assert os.path.isfile(fn)
+ os.remove(fn)
+ # no path, but there are trunk in the repo
+ # expect snapshot of trunk
+ self.svn_tags.tarball('1')
+ assert os.path.isfile(fn)
+ os.remove(fn)
+ # no path, and no trunk dir
+ # expect snapshot of repo root
+ fn = '/tmp/tarball/svn/t/te/test/testsvn/test-src-1.zip'
+ self.repo.tarball('1')
+ assert os.path.isfile(fn)
+ os.remove(fn)
+
def test_is_empty(self):
assert not self.repo.is_empty()
with TempDirectory() as d:
[11/21] git commit: [#6235] ticket:366 Fix tests
Posted by br...@apache.org.
[#6235] ticket:366 Fix tests
Project: http://git-wip-us.apache.org/repos/asf/incubator-allura/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-allura/commit/6a77c658
Tree: http://git-wip-us.apache.org/repos/asf/incubator-allura/tree/6a77c658
Diff: http://git-wip-us.apache.org/repos/asf/incubator-allura/diff/6a77c658
Branch: refs/heads/master
Commit: 6a77c658413aba128cad594526e5da558acf3109
Parents: e406447
Author: Igor Bondarenko <je...@gmail.com>
Authored: Wed May 29 06:12:19 2013 +0000
Committer: Dave Brondsema <db...@slashdotmedia.com>
Committed: Fri May 31 22:14:09 2013 +0000
----------------------------------------------------------------------
.../forgegit/tests/functional/test_controllers.py | 2 +-
.../forgesvn/tests/functional/test_controllers.py | 26 +++++++-------
2 files changed, 14 insertions(+), 14 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-allura/blob/6a77c658/ForgeGit/forgegit/tests/functional/test_controllers.py
----------------------------------------------------------------------
diff --git a/ForgeGit/forgegit/tests/functional/test_controllers.py b/ForgeGit/forgegit/tests/functional/test_controllers.py
index 787cef1..fd61b4a 100644
--- a/ForgeGit/forgegit/tests/functional/test_controllers.py
+++ b/ForgeGit/forgegit/tests/functional/test_controllers.py
@@ -353,7 +353,7 @@ class TestRootController(_TestCase):
r = self.app.get('/p/test/testgit-index/ci/master/tree/index/')
links = r.html.findAll('a')
download_link = [a for a in links if a.text == 'Download Snapshot'][0]
- assert_equal(download_link.get('href'), '/p/test/testgit-index/ci/master/tarball')
+ assert_equal(download_link.get('href'), '/p/test/testgit-index/ci/master/tarball?path=/index')
class TestRestController(_TestCase):
http://git-wip-us.apache.org/repos/asf/incubator-allura/blob/6a77c658/ForgeSVN/forgesvn/tests/functional/test_controllers.py
----------------------------------------------------------------------
diff --git a/ForgeSVN/forgesvn/tests/functional/test_controllers.py b/ForgeSVN/forgesvn/tests/functional/test_controllers.py
index 2575f58..e07543a 100644
--- a/ForgeSVN/forgesvn/tests/functional/test_controllers.py
+++ b/ForgeSVN/forgesvn/tests/functional/test_controllers.py
@@ -203,51 +203,51 @@ class TestRootController(SVNTestController):
def test_tarball_tags_aware(self):
h.set_context('test', 'svn-tags', neighborhood='Projects')
shutil.rmtree(c.app.repo.tarball_path, ignore_errors=True)
- r = self.app.get('/svn-tags/19/tree/')
+ r = self.app.get('/p/test/svn-tags/19/tree/')
link = r.html.find('h2', attrs={'class': 'dark title'})
link = link.find('small').findAll('a')[0]
assert_equal(link.text, 'Download Snapshot')
assert_equal(link.get('href'), '/p/test/svn-tags/19/tarball')
- r = self.app.get('/svn-tags/19/tree/tags/tag-1.0/')
+ r = self.app.get('/p/test/svn-tags/19/tree/tags/tag-1.0/')
link = r.html.find('h2', attrs={'class': 'dark title'})
link = link.find('small').findAll('a')[0]
assert_equal(link.text, 'Download Snapshot')
assert_equal(link.get('href'), '/p/test/svn-tags/19/tarball?path=/tags/tag-1.0')
- r = self.app.get('/svn-tags/19/tarball_status?path=/tags/tag-1.0')
+ r = self.app.get('/p/test/svn-tags/19/tarball_status?path=/tags/tag-1.0')
assert_equal(r.json['status'], None)
r = self.app.get(link.get('href'))
assert 'Generating snapshot...' in r
M.MonQTask.run_ready()
- r = self.app.get('/svn-tags/19/tarball_status?path=/tags/tag-1.0')
+ r = self.app.get('/p/test/svn-tags/19/tarball_status?path=/tags/tag-1.0')
assert_equal(r.json['status'], 'ready')
- r = self.app.get('/svn-tags/19/tarball_status?path=/trunk')
+ r = self.app.get('/p/test/svn-tags/19/tarball_status?path=/trunk')
assert_equal(r.json['status'], None)
- r = self.app.get('/svn-tags/19/tarball?path=/trunk/')
+ r = self.app.get('/p/test/svn-tags/19/tarball?path=/trunk/')
assert 'Generating snapshot...' in r
M.MonQTask.run_ready()
- r = self.app.get('/svn-tags/19/tarball_status?path=/trunk')
+ r = self.app.get('/p/test/svn-tags/19/tarball_status?path=/trunk')
assert_equal(r.json['status'], 'ready')
- r = self.app.get('/svn-tags/19/tarball_status?path=/branches/aaa/')
+ r = self.app.get('/p/test/svn-tags/19/tarball_status?path=/branches/aaa/')
assert_equal(r.json['status'], None)
# All of the following also should be ready because...
# ...this is essentially the same as trunk snapshot
- r = self.app.get('/svn-tags/19/tarball_status?path=/trunk/some/path/')
+ r = self.app.get('/p/test/svn-tags/19/tarball_status?path=/trunk/some/path/')
assert_equal(r.json['status'], 'ready')
- r = self.app.get('/svn-tags/19/tarball_status')
+ r = self.app.get('/p/test/svn-tags/19/tarball_status')
assert_equal(r.json['status'], 'ready')
# ...the same as trunk, 'cause concrete tag isn't specified
- r = self.app.get('/svn-tags/19/tarball_status?path=/tags/')
+ r = self.app.get('/p/test/svn-tags/19/tarball_status?path=/tags/')
assert_equal(r.json['status'], 'ready')
# ...the same as trunk, 'cause concrete branch isn't specified
- r = self.app.get('/svn-tags/19/tarball_status?path=/branches/')
+ r = self.app.get('/p/test/svn-tags/19/tarball_status?path=/branches/')
assert_equal(r.json['status'], 'ready')
# ...this is essentially the same as tag snapshot
- r = self.app.get('/svn-tags/19/tarball_status?path=/tags/tag-1.0/dir')
+ r = self.app.get('/p/test/svn-tags/19/tarball_status?path=/tags/tag-1.0/dir')
assert_equal(r.json['status'], 'ready')
[10/21] git commit: [#6235] ticket:366 Fix tarball url calculation
for dirs with spaces
Posted by br...@apache.org.
[#6235] ticket:366 Fix tarball url calculation for dirs with spaces
Project: http://git-wip-us.apache.org/repos/asf/incubator-allura/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-allura/commit/30ff42e7
Tree: http://git-wip-us.apache.org/repos/asf/incubator-allura/tree/30ff42e7
Diff: http://git-wip-us.apache.org/repos/asf/incubator-allura/diff/30ff42e7
Branch: refs/heads/master
Commit: 30ff42e72b7a6bfa6d1aa331ae1833c3c62a4a24
Parents: 85fbe7d
Author: Igor Bondarenko <je...@gmail.com>
Authored: Wed May 29 07:12:50 2013 +0000
Committer: Dave Brondsema <db...@slashdotmedia.com>
Committed: Fri May 31 22:14:09 2013 +0000
----------------------------------------------------------------------
Allura/allura/controllers/repository.py | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-allura/blob/30ff42e7/Allura/allura/controllers/repository.py
----------------------------------------------------------------------
diff --git a/Allura/allura/controllers/repository.py b/Allura/allura/controllers/repository.py
index a8f8c68..e4832aa 100644
--- a/Allura/allura/controllers/repository.py
+++ b/Allura/allura/controllers/repository.py
@@ -522,7 +522,7 @@ class TreeBrowser(BaseController, DispatchIndex):
cutout = len('tree' + self._path)
if request.path.endswith('/') and not self._path.endswith('/'):
cutout += 1
- tarball_url = '%starball' % request.path[:-cutout]
+ tarball_url = quote('%starball' % unquote(request.path)[:-cutout])
return dict(
repo=c.app.repo,
commit=self._commit,