view tests/test_binaryfiles.py @ 762:c31a1f92e1c6

svnexternals: preliminary support for subrepos based externals At this point, only pulling externals definitions into .hgsub and .hgsubstate is supported. One difference between subrepos and svn:externals is the former separate the source definition and target revision in two files, while svn:externals definitions contain both. To handle this, the svn:externals revision references is replaced with a {REV} placeholder and stored in .hgsub, prefixed with the external base directory separated with a ':', while the revision is extracted in .hgsubstate. For instance, the following external: -r3 ^/externals/proj2@2 deps/proj2 Becomes: (.hgsub) deps/proj2 = [hgsubversion] :-r{REV} ^/externals/proj2@2 deps/proj2 (.hgsubstate) 3 deps/proj2
author Patrick Mezard <pmezard@gmail.com>
date Thu, 25 Nov 2010 21:55:21 +0100
parents d2ef7220a079
children 312b37bc5e20
line wrap: on
line source

import test_util

import unittest

class TestFetchBinaryFiles(test_util.TestBase):
    def test_binaryfiles(self, stupid=False):
        repo = self._load_fixture_and_fetch('binaryfiles.svndump', stupid=stupid)
        self.assertEqual('cce7fe400d8d', str(repo['tip']))

    def test_binaryfiles_stupid(self):
        self.test_binaryfiles(True)

def suite():
    all = [unittest.TestLoader().loadTestsFromTestCase(TestFetchBinaryFiles),
          ]
    return unittest.TestSuite(all)