本文整理汇总了Python中urllib.parse.urllib_parse_unquote函数的典型用法代码示例。如果您正苦于以下问题:Python urllib_parse_unquote函数的具体用法?Python urllib_parse_unquote怎么用?Python urllib_parse_unquote使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了urllib_parse_unquote函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: _parse_log
def _parse_log(self, line):
# limit=<N>?
pLIMIT = r'limit=(\d+)'
# revprops=all|(<REVPROP> ...)?
pREVPROPS = r'revprops=(all|\(([^)]+)\))'
m = _match(line, pPATHS, pREVRANGE,
[pLIMIT, 'discover-changed-paths', 'strict',
'include-merged-revisions', pREVPROPS])
paths = [urllib_parse_unquote(x) for x in m.group(1).split()]
left = int(m.group(2))
right = int(m.group(3))
if m.group(5) is None:
limit = 0
else:
limit = int(m.group(5))
discover_changed_paths = m.group(6) is not None
strict = m.group(7) is not None
include_merged_revisions = m.group(8) is not None
if m.group(10) == 'all':
revprops = None
else:
if m.group(11) is None:
revprops = []
else:
revprops = [urllib_parse_unquote(x) for x in m.group(11).split()]
self.handle_log(paths, left, right, limit, discover_changed_paths,
strict, include_merged_revisions, revprops)
return line[m.end():]
示例2: _parse_switch
def _parse_switch(self, line):
m = _match(line, pPATH, pPATHREV, [pDEPTH])
from_path = urllib_parse_unquote(m.group(1))
to_path = urllib_parse_unquote(m.group(2))
to_rev = int(m.group(3))
depth = _parse_depth(m.group(5))
self.handle_switch(from_path, to_path, to_rev, depth)
return line[m.end():]
示例3: _parse_diff_2paths
def _parse_diff_2paths(self, line, m):
from_path = urllib_parse_unquote(m.group(1))
from_rev = int(m.group(2))
to_path = urllib_parse_unquote(m.group(3))
to_rev = int(m.group(4))
depth = _parse_depth(m.group(6))
ignore_ancestry = m.group(7) is not None
self.handle_diff_2paths(from_path, from_rev, to_path, to_rev, depth, ignore_ancestry)
return line[m.end() :]
示例4: _parse_open
def _parse_open(self, line):
pINT = r'(\d+)'
pCAP = r'cap=\(([^)]*)\)'
pCLIENT = pWORD
m = _match(line, pINT, pCAP, pPATH, pCLIENT, pCLIENT)
protocol = int(m.group(1))
if m.group(2) is None:
capabilities = []
else:
capabilities = m.group(2).split()
path = m.group(3)
ra_client = urllib_parse_unquote(m.group(4))
client = urllib_parse_unquote(m.group(5))
self.handle_open(protocol, capabilities, path, ra_client, client)
return line[m.end():]
示例5: _parse_status
def _parse_status(self, line):
m = _match(line, pPATH, pREVNUM, [pDEPTH])
path = urllib_parse_unquote(m.group(1))
revision = int(m.group(2))
depth = _parse_depth(m.group(4))
self.handle_status(path, revision, depth)
return line[m.end():]
示例6: _parse_get_file_revs
def _parse_get_file_revs(self, line):
m = _match(line, pPATH, pREVRANGE, ['include-merged-revisions'])
path = urllib_parse_unquote(m.group(1))
left = int(m.group(2))
right = int(m.group(3))
include_merged_revisions = m.group(4) is not None
self.handle_get_file_revs(path, left, right, include_merged_revisions)
return line[m.end():]
示例7: _parse_get_location_segments
def _parse_get_location_segments(self, line):
m = _match(line, pPATHREV, pREVRANGE)
path = urllib_parse_unquote(m.group(1))
peg = int(m.group(2))
left = int(m.group(3))
right = int(m.group(4))
self.handle_get_location_segments(path, peg, left, right)
return line[m.end():]
示例8: _parse_update
def _parse_update(self, line):
m = _match(line, pPATH, pREVNUM, [pDEPTH, 'send-copyfrom-args'])
path = urllib_parse_unquote(m.group(1))
revision = int(m.group(2))
depth = _parse_depth(m.group(4))
send_copyfrom_args = m.group(5) is not None
self.handle_update(path, revision, depth, send_copyfrom_args)
return line[m.end():]
示例9: _parse_diff_1path
def _parse_diff_1path(self, line, m):
path = urllib_parse_unquote(m.group(1))
left = int(m.group(2))
right = int(m.group(3))
depth = _parse_depth(m.group(5))
ignore_ancestry = m.group(6) is not None
self.handle_diff_1path(path, left, right, depth, ignore_ancestry)
return line[m.end() :]
示例10: _parse_get_mergeinfo
def _parse_get_mergeinfo(self, line):
# <I>
pMERGEINFO_INHERITANCE = pWORD
pINCLUDE_DESCENDANTS = pWORD
m = _match(line, pPATHS, pMERGEINFO_INHERITANCE, ["include-descendants"])
paths = [urllib_parse_unquote(x) for x in m.group(1).split()]
inheritance = _parse_mergeinfo_inheritance(m.group(2))
include_descendants = m.group(3) is not None
self.handle_get_mergeinfo(paths, inheritance, include_descendants)
return line[m.end() :]
示例11: _parse_replay
def _parse_replay(self, line):
m = _match(line, pPATH, pREVNUM)
path = urllib_parse_unquote(m.group(1))
revision = int(m.group(2))
self.handle_replay(path, revision)
return line[m.end():]
示例12: _parse_stat
def _parse_stat(self, line):
m = _match(line, pPATHREV)
path = urllib_parse_unquote(m.group(1))
revnum = int(m.group(2))
self.handle_stat(path, revnum)
return line[m.end():]
示例13: _parse_unlock
def _parse_unlock(self, line):
m = _match(line, pPATHS, ['break'])
paths = [urllib_parse_unquote(x) for x in m.group(1).split()]
self.handle_unlock(paths, m.group(2) is not None)
return line[m.end():]
示例14: _parse_rev_prop
def _parse_rev_prop(self, line):
m = _match(line, pREVNUM, pPROPERTY)
self.handle_rev_prop(int(m.group(1)), urllib_parse_unquote(m.group(2)))
return line[m.end():]
示例15: _parse_get_file
def _parse_get_file(self, line):
m = _match(line, pPATH, pREVNUM, ['text', 'props'])
self.handle_get_file(urllib_parse_unquote(m.group(1)), int(m.group(2)),
m.group(3) is not None,
m.group(4) is not None)
return line[m.end():]