Details
Details
- Reviewers
pulkit - Group Reviewers
hg-reviewers - Commits
- rHG5a3f8da663e5: purge: apply byteskwargs to opts, fixing all python3 issues here
Diff Detail
Diff Detail
- Repository
- rHG Mercurial
- Lint
Lint Skipped - Unit
Unit Tests Skipped
| pulkit |
| hg-reviewers |
| Lint Skipped |
| Unit Tests Skipped |
| Path | Packages | |||
|---|---|---|---|---|
| M | hgext/purge.py (2 lines) |
| Status | Author | Revision | |
|---|---|---|---|
| Closed | durin42 | ||
| Closed | durin42 | ||
| Closed | durin42 | ||
| Abandoned | durin42 | ||
| Closed | durin42 | ||
| Closed | durin42 | ||
| Closed | durin42 | ||
| Closed | durin42 | ||
| Closed | durin42 | ||
| Closed | durin42 | ||
| Closed | durin42 | ||
| Closed | durin42 | ||
| Closed | durin42 | ||
| Closed | durin42 | ||
| Closed | durin42 | ||
| Closed | durin42 | ||
| Closed | durin42 | ||
| Closed | durin42 | ||
| Closed | durin42 | ||
| Abandoned | durin42 |
| from __future__ import absolute_import | from __future__ import absolute_import | ||||
| import os | import os | ||||
| from mercurial.i18n import _ | from mercurial.i18n import _ | ||||
| from mercurial import ( | from mercurial import ( | ||||
| cmdutil, | cmdutil, | ||||
| error, | error, | ||||
| pycompat, | |||||
| registrar, | registrar, | ||||
| scmutil, | scmutil, | ||||
| util, | util, | ||||
| ) | ) | ||||
| cmdtable = {} | cmdtable = {} | ||||
| command = registrar.command(cmdtable) | command = registrar.command(cmdtable) | ||||
| # Note for extension authors: ONLY specify testedwith = 'ships-with-hg-core' for | # Note for extension authors: ONLY specify testedwith = 'ships-with-hg-core' for | ||||
| If directories are given on the command line, only files in these | If directories are given on the command line, only files in these | ||||
| directories are considered. | directories are considered. | ||||
| Be careful with purge, as you could irreversibly delete some files | Be careful with purge, as you could irreversibly delete some files | ||||
| you forgot to add to the repository. If you only want to print the | you forgot to add to the repository. If you only want to print the | ||||
| list of files that this program would delete, use the --print | list of files that this program would delete, use the --print | ||||
| option. | option. | ||||
| ''' | ''' | ||||
| opts = pycompat.byteskwargs(opts) | |||||
| act = not opts.get('print') | act = not opts.get('print') | ||||
| eol = '\n' | eol = '\n' | ||||
| if opts.get('print0'): | if opts.get('print0'): | ||||
| eol = '\0' | eol = '\0' | ||||
| act = False # --print0 implies --print | act = False # --print0 implies --print | ||||
| removefiles = opts.get('files') | removefiles = opts.get('files') | ||||
| removedirs = opts.get('dirs') | removedirs = opts.get('dirs') | ||||
| if not removefiles and not removedirs: | if not removefiles and not removedirs: | ||||