How to make clean armor with mercury?

How to return the working state of the directory to what it would be from a new clone of the repository (obviously, I could clone my repository, but it seems a little wild.)

With git, I would do:

git clean -xdn (dry-run, to see what I'm about to destroy)

git clean -xdf (force, to actually do it)

And I guess there is probably a subtle other equivalent, but I can't find it.

+3
source share
2 answers

Your team git cleanremoves unprocessed files from the working tree, including ignored files. The equivalent Mercurial command is provided by the standard cleanup extension :

hg clean --all --print

Delete --printto actually delete files, delete --allto delete unnecessary files and leave ignored files behind.

, , ..

git reset --hard origin/master

mq

hg strip "outgoing()"

, .

(, , , .)

+7

update -C --clean .

hg status   (to see what you're about to destroy)
hg update <revision> -C

, revert:

hg revert -anC  (dry run)
hg revert -aC  (all files, no backups)

hg help update hg help revert .

+2

All Articles