Mercurial > hgsubversion
diff tests/test_util.py @ 277:3848a7f9b983
push: Add a test that demonstrates base-text detection works
author | Augie Fackler <durin42@gmail.com> |
---|---|
date | Fri, 24 Apr 2009 20:31:17 -0500 |
parents | 2848d17eae71 |
children | 60acc38eac96 |
line wrap: on
line diff
--- a/tests/test_util.py +++ b/tests/test_util.py @@ -140,7 +140,7 @@ class TestBase(unittest.TestCase): entries.sort() return entries - def commitchanges(self, changes): + def commitchanges(self, changes, parent='tip'): """Commit changes to mercurial directory 'changes' is a sequence of tuples (source, dest, data). It can look @@ -153,7 +153,7 @@ class TestBase(unittest.TestCase): - (source, None, None) to remove source. """ repo = self.repo - parentctx = repo['tip'] + parentctx = repo[parent] changed, removed = [], [] for source, dest, newdata in changes: @@ -187,7 +187,7 @@ class TestBase(unittest.TestCase): '2008-10-07 20:59:48 -0500') nodeid = repo.commitctx(ctx) repo = self.repo - hg.update(repo, nodeid) + hg.clean(repo, nodeid) return nodeid def assertchanges(self, changes, ctx):