Mercurial > hgsubversion
changeset 542:bb00f7ca5b8c
Rewrite simple_branch.sh fixture from svn dump
I needed it to reproduce the space in branch issue, but failed to do so. At
least I recreated the fixture, so here it is.
author | Patrick Mezard <pmezard@gmail.com> |
---|---|
date | Tue, 02 Feb 2010 23:20:42 +0100 |
parents | d380e7e4175a |
children | 2f5c7cef1723 |
files | tests/fixtures/simple_branch.sh tests/fixtures/simple_branch.svndump tests/test_fetch_command.py |
diffstat | 3 files changed, 43 insertions(+), 18 deletions(-) [+] |
line wrap: on
line diff
new file mode 100755 --- /dev/null +++ b/tests/fixtures/simple_branch.sh @@ -0,0 +1,31 @@ +#!/bin/sh +# +# Generate simple_branch.svndump +# + +mkdir temp +cd temp + +mkdir project-orig +cd project-orig +mkdir trunk branches tags +cd .. + +svnadmin create testrepo +svnurl=file://`pwd`/testrepo +svn import --username durin project-orig $svnurl -m "Empty dirs." + +svn co $svnurl project +cd project +echo 'file: alpha' > trunk/alpha +svn add trunk/alpha +svn ci --username durin -m 'Add alpha' +echo 'Data of beta' > trunk/beta +svn add trunk/beta +svn ci --username durin -m 'Add beta' +svn up +svn cp trunk branches/the_branch +svn ci --username durin -m 'Make a branch' +cd .. + +svnadmin dump testrepo > ../simple_branch.svndump
--- a/tests/fixtures/simple_branch.svndump +++ b/tests/fixtures/simple_branch.svndump @@ -1,6 +1,6 @@ SVN-fs-dump-format-version: 2 -UUID: df2126f7-00ab-4d49-b42c-7e981dde0bcf +UUID: 3cd547df-371e-4add-bccf-aba732a2baf5 Revision-number: 0 Prop-content-length: 56 @@ -9,7 +9,7 @@ Content-length: 56 K 8 svn:date V 27 -2008-10-07T22:49:12.059692Z +2010-02-02T21:54:11.642093Z PROPS-END Revision-number: 1 @@ -27,7 +27,7 @@ durin K 8 svn:date V 27 -2008-10-07T22:49:41.118037Z +2010-02-02T21:54:11.673761Z PROPS-END Node-path: branches @@ -72,7 +72,7 @@ durin K 8 svn:date V 27 -2008-10-07T23:23:02.991743Z +2010-02-02T21:54:12.073120Z PROPS-END Node-path: trunk/alpha @@ -81,6 +81,7 @@ Node-action: add Prop-content-length: 10 Text-content-length: 12 Text-content-md5: 3c72ebf8bbd7fa88b1fdcee5398b5a17 +Text-content-sha1: f552a50b53177d35b29a4a0ab1cece918b5b5e9b Content-length: 22 PROPS-END @@ -102,7 +103,7 @@ durin K 8 svn:date V 27 -2008-10-07T23:28:22.651398Z +2010-02-02T21:54:13.096862Z PROPS-END Node-path: trunk/beta @@ -111,6 +112,7 @@ Node-action: add Prop-content-length: 10 Text-content-length: 13 Text-content-md5: 981d1eb5fd0bbe05354c292105944863 +Text-content-sha1: 5d40e0a9ceda69f3d98d4851a6bee02c10a6e277 Content-length: 23 PROPS-END @@ -132,7 +134,7 @@ durin K 8 svn:date V 27 -2008-10-08T01:35:39.984789Z +2010-02-02T21:54:16.042325Z PROPS-END Node-path: branches/the_branch @@ -140,13 +142,5 @@ Node-kind: dir Node-action: add Node-copyfrom-rev: 3 Node-copyfrom-path: trunk -Prop-content-length: 34 -Content-length: 34 - -K 13 -svn:mergeinfo -V 0 - -PROPS-END
--- a/tests/test_fetch_command.py +++ b/tests/test_fetch_command.py @@ -33,15 +33,15 @@ class TestBasicRepoLayout(test_util.Test def test_branches(self): repo = self._load_fixture_and_fetch('simple_branch.svndump') self.assertEqual(node.hex(repo[0].node()), - '434ed487136c1b47c1e8f952edb4dc5a8e6328df') + 'a1ff9f5d90852ce7f8e607fa144066b0a06bdc57') self.assertEqual(node.hex(repo['tip'].node()), - 'f1ff5b860f5dbb9a59ad0921a79da77f10f25109') + '545e36ed13615e39c5c8fb0c325109d8cb8e00c3') self.assertEqual(len(repo['tip'].parents()), 1) self.assertEqual(repo['tip'].parents()[0], repo['default']) self.assertEqual(repo['tip'].extra()['convert_revision'], - 'svn:df2126f7-00ab-4d49-b42c-7e981dde0bcf/branches/the_branch@4') + 'svn:3cd547df-371e-4add-bccf-aba732a2baf5/branches/the_branch@4') self.assertEqual(repo['default'].extra()['convert_revision'], - 'svn:df2126f7-00ab-4d49-b42c-7e981dde0bcf/trunk@3') + 'svn:3cd547df-371e-4add-bccf-aba732a2baf5/trunk@3') self.assertEqual(len(repo.heads()), 1) def test_two_branches_with_heads(self):