Mercurial > hgsubversion
comparison tests/test_utility_commands.py @ 1224:6b3e9cb69761 stable
test_utility_commands: call makememfilectx
| author | Sean Farley <sean.michael.farley@gmail.com> |
|---|---|
| date | Mon, 02 Jun 2014 19:55:32 -0500 |
| parents | cd0d14e25757 |
| children | 180e0d5fba2e |
comparison
equal
deleted
inserted
replaced
| 1223:7e70337c5be4 | 1224:6b3e9cb69761 |
|---|---|
| 14 | 14 |
| 15 from hgsubversion import util | 15 from hgsubversion import util |
| 16 from hgsubversion import svncommands | 16 from hgsubversion import svncommands |
| 17 from hgsubversion import verify | 17 from hgsubversion import verify |
| 18 from hgsubversion import wrappers | 18 from hgsubversion import wrappers |
| 19 from hgsubversion import compathacks | |
| 19 | 20 |
| 20 expected_info_output = '''URL: %(repourl)s/%(branch)s | 21 expected_info_output = '''URL: %(repourl)s/%(branch)s |
| 21 Repository Root: %(repourl)s | 22 Repository Root: %(repourl)s |
| 22 Repository UUID: df2126f7-00ab-4d49-b42c-7e981dde0bcf | 23 Repository UUID: df2126f7-00ab-4d49-b42c-7e981dde0bcf |
| 23 Revision: %(rev)s | 24 Revision: %(rev)s |
| 158 self._load_fixture_and_fetch('two_heads.svndump') | 159 self._load_fixture_and_fetch('two_heads.svndump') |
| 159 u = self.ui() | 160 u = self.ui() |
| 160 u.pushbuffer() | 161 u.pushbuffer() |
| 161 parents = (self.repo['the_branch'].node(), revlog.nullid,) | 162 parents = (self.repo['the_branch'].node(), revlog.nullid,) |
| 162 def filectxfn(repo, memctx, path): | 163 def filectxfn(repo, memctx, path): |
| 163 return context.memfilectx(path=path, | 164 return compathacks.makememfilectx(repo, |
| 164 data='added', | 165 path=path, |
| 165 islink=False, | 166 data='added', |
| 166 isexec=False, | 167 islink=False, |
| 167 copied=False) | 168 isexec=False, |
| 169 copied=False) | |
| 168 ctx = context.memctx(self.repo, | 170 ctx = context.memctx(self.repo, |
| 169 parents, | 171 parents, |
| 170 'automated test', | 172 'automated test', |
| 171 ['added_bogus_file', 'other_added_file', ], | 173 ['added_bogus_file', 'other_added_file', ], |
| 172 filectxfn, | 174 filectxfn, |
| 201 def test_outgoing_output(self): | 203 def test_outgoing_output(self): |
| 202 repo, repo_path = self.load_and_fetch('two_heads.svndump') | 204 repo, repo_path = self.load_and_fetch('two_heads.svndump') |
| 203 u = self.ui() | 205 u = self.ui() |
| 204 parents = (self.repo['the_branch'].node(), revlog.nullid,) | 206 parents = (self.repo['the_branch'].node(), revlog.nullid,) |
| 205 def filectxfn(repo, memctx, path): | 207 def filectxfn(repo, memctx, path): |
| 206 return context.memfilectx(path=path, | 208 return compathacks.makememfilectx(repo, |
| 207 data='added', | 209 path=path, |
| 208 islink=False, | 210 data='added', |
| 209 isexec=False, | 211 islink=False, |
| 210 copied=False) | 212 isexec=False, |
| 213 copied=False) | |
| 211 ctx = context.memctx(self.repo, | 214 ctx = context.memctx(self.repo, |
| 212 parents, | 215 parents, |
| 213 'automated test', | 216 'automated test', |
| 214 ['added_bogus_file', 'other_added_file', ], | 217 ['added_bogus_file', 'other_added_file', ], |
| 215 filectxfn, | 218 filectxfn, |
| 231 | 234 |
| 232 def test_rebase(self): | 235 def test_rebase(self): |
| 233 self._load_fixture_and_fetch('two_revs.svndump') | 236 self._load_fixture_and_fetch('two_revs.svndump') |
| 234 parents = (self.repo[0].node(), revlog.nullid,) | 237 parents = (self.repo[0].node(), revlog.nullid,) |
| 235 def filectxfn(repo, memctx, path): | 238 def filectxfn(repo, memctx, path): |
| 236 return context.memfilectx(path=path, | 239 return compathacks.makememfilectx(repo, |
| 237 data='added', | 240 path=path, |
| 238 islink=False, | 241 data='added', |
| 239 isexec=False, | 242 islink=False, |
| 240 copied=False) | 243 isexec=False, |
| 244 copied=False) | |
| 241 ctx = context.memctx(self.repo, | 245 ctx = context.memctx(self.repo, |
| 242 parents, | 246 parents, |
| 243 'automated test', | 247 'automated test', |
| 244 ['added_bogus_file', 'other_added_file', ], | 248 ['added_bogus_file', 'other_added_file', ], |
| 245 filectxfn, | 249 filectxfn, |
