Remove files by status in svn/mercurial

/ Published in: Bash
Save to your folder(s)

sed is required because hg status returns paths with \ (backslash) instead of / (slash). I'm using the Windows version of Mercurial, in a linux version you can omit the sed part.

Copy this code and paste it in your HTML
  1. hg status|grep ^?|sed -e 's/\\/\//g'|awk '{print $2}'|xargs rm


Report this snippet


RSS Icon Subscribe to comments

You need to login to post a comment.