Hg remove -I PATTERN, how does it work?

Ho delete all * .bak or * .orig files in mercurial?

Example:

C:\dev\web>hg stat
? Views\System\UnderConstruction.cshtml.bak
? Views\Topic\Index.cshtml.bak
? Views\Topic\MasterPage.cshtml.bak
? Web.config.bak

C:\dev\web>hg rem -I *.bak
abort: no files specified
+5
source share
4 answers

hg removedeletes only those files that have already been committed. AFAIK, there is no command in mercurial to delete unplayable files.

To find out how file templates work in mercurial, run hg help patterns.

+5
source
  • Tracked files ("?" Mark) can be deleted by the OS, not Mercurial
  • You should leave the files as they are, just add the templates to .hgignore and after it the files matching the templates will no longer be displayed in hg status
  • bak orig hg remove -I **.bak -I **.orig
+2

hg purge:

, Mercurial. uncommitted - .

, :

  • : "?" "hg"
  • : Mercurial , .

:

  • ( --all)
  • , ( "hg add" )

, .

, , . , , -print.

+1

:

D:\workspace>hg purge -I **/*.orig --all

:

D:\workspace>hg purge -I **/*.bak --all

, , . , , --print.

0

All Articles