Plan 9 from Bell Labs’s /usr/web/sources/contrib/jas/root/sys/lib/python2.7/site-packages/hgext/purge.pyc

Copyright © 2021 Plan 9 Foundation.
Distributed under the MIT License.
Download the Plan 9 distribution.


��Pc
@s�dZddlmZmZmZmZddlmZddlZddl	Z	iZ
eje
�ZdZedddded	�fd
dded�fd
dded�fddded�fgejed��d��ZdS(s<command to delete untracked files from the working directoryi�(tutiltcommandstcmdutiltscmutil(t_Ntinternalspurge|cleantasabort-on-errsabort if an error occursttallspurge ignored files tootptprints(print filenames instead of deleting themt0tprint0s?end filenames with NUL, for use with xargs (implies -p/--print)shg purge [OPTION]... [DIR]...c
sR�d�d��dr*d�t�n�����fd�}d�}g}tj�d|��}|j|_�jd|d�d	d
t�}xDt|d|d�D]*}	�j	t
d
�|	�|||	�q�Wxit|dt�D]U}	||	�r�j�j
|	��r�j	t
d�|	�|tj|	�q�WdS(s�removes files not tracked by Mercurial

    Delete files not known to Mercurial. This is useful to test local
    and uncommitted changes in an otherwise-clean source tree.

    This means that purge will delete:

    - Unknown files: files marked with "?" by :hg:`status`
    - Empty directories: in fact Mercurial ignores directories unless
      they contain files under source control management

    But it will leave untouched:

    - Modified and unmodified tracked files
    - Ignored files (unless --all is specified)
    - New files added to the repository (with :hg:`add`)

    If directories are given on the command line, only files in these
    directories are considered.

    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
    list of files that this program would delete, use the --print
    option.
    R
s
Rtcs��rwy|�j|��Wq�tk
rstd�|}�drYtj|��n�jtd�|�q�Xn�jd|�f�dS(Ns%s cannot be removedtabort_on_errswarning: %s
s%s%s(twjointOSErrorRRtAborttwarntwrite(tremove_functnametm(tactteoltoptstrepotui(s//sys/lib/python2.7/site-packages/hgext/purge.pytremoveKs

cSs�ytj|�Wnltk
rtj|�}|jtj@dkrL�ntj|tj|j�tjB�tj|�nXdS(Ni(tosRRtstattst_modetS_IWRITEtchmodtS_IMODE(tpathts((s//sys/lib/python2.7/site-packages/hgext/purge.pyt
removefileWs
#tmatchtignoredRtunknowniisremoving file %s
treversesremoving directory %s
N(tFalseRR&tNonetappendtdirtstatustTruetsortedtnoteRRtlistdirRtrmdir(
RRtdirsRRR%tdirectoriesR&R.tf((RRRRRs//sys/lib/python2.7/site-packages/hgext/purge.pytpurge#s$"
		"%(t__doc__t	mercurialRRRRtmercurial.i18nRRRtcmdtabletcommandt
testedwithR+twalkoptsR7(((s//sys/lib/python2.7/site-packages/hgext/purge.pyt<module>s"

Bell Labs OSI certified Powered by Plan 9

(Return to Plan 9 Home Page)

Copyright © 2021 Plan 9 Foundation. All Rights Reserved.
Comments to webmaster@9p.io.