Mercurial > python-hglib
annotate tests/test-push.py @ 89:351d2799f145
client: added context manager protocol methods
This allows client objects to be used with the 'with' statement and be closed
automatically when the 'with' context exits.
author | Jeff Laughlin <jmlaughlin@integrated-informatics.com> |
---|---|
date | Wed, 23 Nov 2011 09:57:37 -0500 |
parents | 0555d58a7313 |
children | 4359cabcb0cc |
rev | line source |
---|---|
39 | 1 import common, hglib |
2 | |
3 class test_push(common.basetest): | |
4 def test_basic(self): | |
5 self.append('a', 'a') | |
6 self.client.commit('first', addremove=True) | |
7 | |
8 self.client.clone(dest='other') | |
9 other = hglib.open('other') | |
10 | |
11 # broken in hg, doesn't return 1 if nothing to push | |
12 #self.assertFalse(self.client.push('other')) | |
13 | |
14 self.append('a', 'a') | |
15 self.client.commit('second') | |
16 | |
17 self.assertTrue(self.client.push('other')) | |
18 self.assertEquals(self.client.log(), other.log()) |