Mercurial > hg-stable
comparison hgext/purge.py @ 36600:5a3f8da663e5
purge: apply byteskwargs to opts, fixing all python3 issues here
Differential Revision: https://phab.mercurial-scm.org/D2547
author | Augie Fackler <augie@google.com> |
---|---|
date | Fri, 02 Mar 2018 00:37:07 -0500 |
parents | 04baab18d60a |
children | 7fea205fd5dc |
comparison
equal
deleted
inserted
replaced
36599:4df06d2f60e1 | 36600:5a3f8da663e5 |
---|---|
29 | 29 |
30 from mercurial.i18n import _ | 30 from mercurial.i18n import _ |
31 from mercurial import ( | 31 from mercurial import ( |
32 cmdutil, | 32 cmdutil, |
33 error, | 33 error, |
34 pycompat, | |
34 registrar, | 35 registrar, |
35 scmutil, | 36 scmutil, |
36 util, | 37 util, |
37 ) | 38 ) |
38 | 39 |
82 Be careful with purge, as you could irreversibly delete some files | 83 Be careful with purge, as you could irreversibly delete some files |
83 you forgot to add to the repository. If you only want to print the | 84 you forgot to add to the repository. If you only want to print the |
84 list of files that this program would delete, use the --print | 85 list of files that this program would delete, use the --print |
85 option. | 86 option. |
86 ''' | 87 ''' |
88 opts = pycompat.byteskwargs(opts) | |
87 act = not opts.get('print') | 89 act = not opts.get('print') |
88 eol = '\n' | 90 eol = '\n' |
89 if opts.get('print0'): | 91 if opts.get('print0'): |
90 eol = '\0' | 92 eol = '\0' |
91 act = False # --print0 implies --print | 93 act = False # --print0 implies --print |