comparison tests/test_utility_commands.py @ 921:8faa91951bb1

svnremoterepo: use and prefer default-push The svnremoterepo class can be constructed without passing it an explicit class. In this case, it previously only considered the default path as the default path to look at. This broke hg svn info when default-push is set to a svn repo but default is not. Chnange it to prefer default-push when available.
author David Schleimer <dschleimer@fb.com>
date Wed, 01 Aug 2012 13:08:56 -0700
parents 761a87134501
children 68191be64af8
comparison
equal deleted inserted replaced
920:1be4ea4f3c0d 921:8faa91951bb1
63 expected = (expected_info_output % 63 expected = (expected_info_output %
64 {'date': '2008-10-08 01:39:05 +0000 (Wed, 08 Oct 2008)', 64 {'date': '2008-10-08 01:39:05 +0000 (Wed, 08 Oct 2008)',
65 'repourl': repourl(repo_path), 65 'repourl': repourl(repo_path),
66 'branch': 'branches/the_branch', 66 'branch': 'branches/the_branch',
67 'rev': 5, 67 'rev': 5,
68 })
69 self.assertMultiLineEqual(actual, expected)
70 destpath = self.wc_path + '_clone'
71 test_util.hgclone(u, self.repo, destpath)
72 repo2 = hg.repository(u, destpath)
73 repo2.ui.setconfig('paths', 'default-push',
74 self.repo.ui.config('paths', 'default'))
75 hg.update(repo2, 'default')
76 svncommands.rebuildmeta(u, repo2, [])
77 u.pushbuffer()
78 svncommands.info(u, repo2)
79 actual = u.popbuffer()
80 expected = (expected_info_output %
81 {'date': '2008-10-08 01:39:29 +0000 (Wed, 08 Oct 2008)',
82 'repourl': repourl(repo_path),
83 'branch': 'trunk',
84 'rev': 6,
68 }) 85 })
69 self.assertMultiLineEqual(actual, expected) 86 self.assertMultiLineEqual(actual, expected)
70 87
71 def test_info_single(self): 88 def test_info_single(self):
72 repo, repo_path = self.load_and_fetch('two_heads.svndump', subdir='trunk') 89 repo, repo_path = self.load_and_fetch('two_heads.svndump', subdir='trunk')