0

我正在hglib-erlang为转换hglib-python为 erlang 语言模块而写作。在 的文件中"test-push.py",有一个测试用例如下。

我认为第二个commit('second')没有什么可提交的并给出错误信息。只有一个日志项('first')。这样对吗?

class test_push(common.basetest):
    def test_basic(self):
        self.append('a', 'a')
        self.client.commit('first', addremove=True)

        self.client.clone(dest='other')
        other = hglib.open('other')

        # broken in hg, doesn't return 1 if nothing to push
        #self.assertFalse(self.client.push('other'))

        self.append('a', 'a')
        self.client.commit('second')

        self.assertTrue(self.client.push('other'))
        self.assertEquals(self.client.log(), other.log())
4

1 回答 1

1

通过粗略阅读此测试代码,似乎self.append('a', 'a')对虚拟副本进行了更改,因此可以self.client.commit('second')正常工作。

于 2012-12-11T15:10:49.113 回答