Details
Details
- Reviewers
Alphare - Group Reviewers
hg-reviewers - Commits
- rHG46b3ecfb16e2: stringutil: remove Python 2 support code
Diff Detail
Diff Detail
- Repository
- rHG Mercurial
- Branch
- default
- Lint
No Linters Available - Unit
No Unit Test Coverage
( )
| Alphare |
| hg-reviewers |
| No Linters Available |
| No Unit Test Coverage |
| Path | Packages | |||
|---|---|---|---|---|
| M | mercurial/utils/stringutil.py (4 lines) |
| Commit | Parents | Author | Summary | Date |
|---|---|---|---|---|
| d519bd538061 | 126d9ed4691e | Gregory Szorc | Feb 21 2022, 12:53 PM |
| else: | else: | ||||
| result = value | result = value | ||||
| return result or [] | return result or [] | ||||
| def evalpythonliteral(s): | def evalpythonliteral(s): | ||||
| """Evaluate a string containing a Python literal expression""" | """Evaluate a string containing a Python literal expression""" | ||||
| # We could backport our tokenizer hack to rewrite '' to u'' if we want | # We could backport our tokenizer hack to rewrite '' to u'' if we want | ||||
| if pycompat.ispy3: | |||||
| return ast.literal_eval(s.decode('latin1')) | return ast.literal_eval(s.decode('latin1')) | ||||
| return ast.literal_eval(s) | |||||