annotate tests/test-push.py @ 125:8d9a9da3e7b4

client: add 'phase' method to set or get the phase of a changeset
author Paul Tonelli <paul.tonelli@logilab.fr>
date Fri, 16 May 2014 18:21:12 +0200
parents 0555d58a7313
children 4359cabcb0cc
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
39
0555d58a7313 client: add push command
Idan Kamara <idankk86@gmail.com>
parents:
diff changeset
1 import common, hglib
0555d58a7313 client: add push command
Idan Kamara <idankk86@gmail.com>
parents:
diff changeset
2
0555d58a7313 client: add push command
Idan Kamara <idankk86@gmail.com>
parents:
diff changeset
3 class test_push(common.basetest):
0555d58a7313 client: add push command
Idan Kamara <idankk86@gmail.com>
parents:
diff changeset
4 def test_basic(self):
0555d58a7313 client: add push command
Idan Kamara <idankk86@gmail.com>
parents:
diff changeset
5 self.append('a', 'a')
0555d58a7313 client: add push command
Idan Kamara <idankk86@gmail.com>
parents:
diff changeset
6 self.client.commit('first', addremove=True)
0555d58a7313 client: add push command
Idan Kamara <idankk86@gmail.com>
parents:
diff changeset
7
0555d58a7313 client: add push command
Idan Kamara <idankk86@gmail.com>
parents:
diff changeset
8 self.client.clone(dest='other')
0555d58a7313 client: add push command
Idan Kamara <idankk86@gmail.com>
parents:
diff changeset
9 other = hglib.open('other')
0555d58a7313 client: add push command
Idan Kamara <idankk86@gmail.com>
parents:
diff changeset
10
0555d58a7313 client: add push command
Idan Kamara <idankk86@gmail.com>
parents:
diff changeset
11 # broken in hg, doesn't return 1 if nothing to push
0555d58a7313 client: add push command
Idan Kamara <idankk86@gmail.com>
parents:
diff changeset
12 #self.assertFalse(self.client.push('other'))
0555d58a7313 client: add push command
Idan Kamara <idankk86@gmail.com>
parents:
diff changeset
13
0555d58a7313 client: add push command
Idan Kamara <idankk86@gmail.com>
parents:
diff changeset
14 self.append('a', 'a')
0555d58a7313 client: add push command
Idan Kamara <idankk86@gmail.com>
parents:
diff changeset
15 self.client.commit('second')
0555d58a7313 client: add push command
Idan Kamara <idankk86@gmail.com>
parents:
diff changeset
16
0555d58a7313 client: add push command
Idan Kamara <idankk86@gmail.com>
parents:
diff changeset
17 self.assertTrue(self.client.push('other'))
0555d58a7313 client: add push command
Idan Kamara <idankk86@gmail.com>
parents:
diff changeset
18 self.assertEquals(self.client.log(), other.log())