示例#1
0
  def test_inherited_props(self):
    """Test inherited props"""

    trunk_url = self.repos_uri + b'/trunk'
    client.propset_remote(b'svn:global-ignores', b'*.q', trunk_url,
                          False, 12, {}, None, self.client_ctx)

    head = core.svn_opt_revision_t()
    head.kind = core.svn_opt_revision_head
    props, iprops, rev = client.propget5(b'svn:global-ignores', trunk_url,
                                         head, head, core.svn_depth_infinity,
                                         None, self.client_ctx)
    self.assertEqual(props[trunk_url], b'*.q\n')

    dir1_url = trunk_url + b'/dir1'
    props, iprops, rev = client.propget5(b'svn:global-ignores', dir1_url,
                                         head, head, core.svn_depth_infinity,
                                         None, self.client_ctx)
    self.assertEqual(iprops[trunk_url], {b'svn:global-ignores':b'*.q\n'})

    self.proplist_receiver_trunk_calls = 0
    client.proplist4(trunk_url, head, head, core.svn_depth_empty, None, True,
                     self.proplist_receiver_trunk, self.client_ctx)
    self.assertEqual(self.proplist_receiver_trunk_calls, 1)

    self.proplist_receiver_dir1_calls = 0
    self.proplist_receiver_dir1_key = trunk_url
    client.proplist4(dir1_url, head, head, core.svn_depth_empty, None, True,
                     self.proplist_receiver_dir1, self.client_ctx)
    self.assertEqual(self.proplist_receiver_dir1_calls, 1)
示例#2
0
文件: client.py 项目: Ranga123/test1
  def test_inherited_props(self):
    """Test inherited props"""

    trunk_url = self.repos_uri + '/trunk'
    client.propset_remote('svn:global-ignores', '*.q', trunk_url,
                          False, 12, {}, None, self.client_ctx)

    head = core.svn_opt_revision_t()
    head.kind = core.svn_opt_revision_head
    props, iprops, rev = client.propget5('svn:global-ignores', trunk_url,
                                         head, head, core.svn_depth_infinity,
                                         None, self.client_ctx)
    self.assertEquals(props[trunk_url], '*.q\n')

    dir1_url = trunk_url + '/dir1'
    props, iprops, rev = client.propget5('svn:global-ignores', dir1_url,
                                         head, head, core.svn_depth_infinity,
                                         None, self.client_ctx)
    self.assertEquals(iprops[trunk_url], {'svn:global-ignores':'*.q\n'})

    self.proplist_receiver_trunk_calls = 0
    client.proplist4(trunk_url, head, head, core.svn_depth_empty, None, True,
                     self.proplist_receiver_trunk, self.client_ctx)
    self.assertEquals(self.proplist_receiver_trunk_calls, 1)

    self.proplist_receiver_dir1_calls = 0
    self.proplist_receiver_dir1_key = trunk_url
    client.proplist4(dir1_url, head, head, core.svn_depth_empty, None, True,
                     self.proplist_receiver_dir1, self.client_ctx)
    self.assertEquals(self.proplist_receiver_dir1_calls, 1)