comparison tests/test_utility_commands.py @ 754:caa527346a0f

svncommands: abort on missing metadata or Subversion URL (fixes #226)
author Dan Villiom Podlaski Christiansen <danchr@gmail.com>
date Thu, 18 Nov 2010 14:03:26 +0100
parents 174f03c288d4
children e9af7eba88db
comparison
equal deleted inserted replaced
753:b218d2bb8c45 754:caa527346a0f
80 'branch': 'trunk', 80 'branch': 'trunk',
81 'rev': 6, 81 'rev': 6,
82 }) 82 })
83 self.assertMultiLineEqual(expected, actual) 83 self.assertMultiLineEqual(expected, actual)
84 84
85 def test_info_missing_metadata(self): 85 def test_missing_metadata(self):
86 repo = self._load_fixture_and_fetch('two_heads.svndump') 86 self._load_fixture_and_fetch('two_heads.svndump')
87 test_util.rmtree(repo.join('svn')) 87 test_util.rmtree(self.repo.join('svn'))
88 self.assertRaises(hgutil.Abort, 88 self.assertRaises(hgutil.Abort,
89 repo.svnmeta) 89 self.repo.svnmeta)
90 self.assertRaises(hgutil.Abort, 90 self.assertRaises(hgutil.Abort,
91 svncommands.info, self.ui, self.repo) 91 svncommands.info,
92 self.ui(), repo=self.repo, args=[])
93 self.assertRaises(hgutil.Abort,
94 svncommands.genignore,
95 self.ui(), repo=self.repo, args=[])
96
97 os.remove(self.repo.join('hgrc'))
98 self.assertRaises(hgutil.Abort,
99 self.repo.svnmeta)
100 self.assertRaises(hgutil.Abort,
101 svncommands.info,
102 self.ui(), repo=self.repo, args=[])
103 self.assertRaises(hgutil.Abort,
104 svncommands.genignore,
105 self.ui(), repo=self.repo, args=[])
106
107 self.assertRaises(hgutil.Abort,
108 svncommands.rebuildmeta,
109 self.ui(), repo=self.repo, args=[])
92 110
93 def test_parent_output(self): 111 def test_parent_output(self):
94 self._load_fixture_and_fetch('two_heads.svndump') 112 self._load_fixture_and_fetch('two_heads.svndump')
95 u = self.ui() 113 u = self.ui()
96 u.pushbuffer() 114 u.pushbuffer()