ó €ˆtPc @sëdZddlmZmZmZmZddlmZddlZddl Z iZ ej e ƒZ dZ e dddded ƒfd d ded ƒfd ddedƒfdddedƒfgejedƒƒd„ƒZdS(s<command to delete untracked files from the working directoryiÿÿÿÿ(tutiltcommandstcmdutiltscmutil(t_Ntinternals purge|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õt j ˆj | ƒƒ rõˆj t dƒ| ƒ|t j| ƒqõqõWdS(sremoves 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(t remove_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%t directoriesR&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.pyts"