merging & hgignore

watlab watlab at
Thu Jun 30 13:25:50 CDT 2011

Tom Anderson wrote:
> REPO=/path/to/repo
> find $REPO -path $REPO/.hg -prune -o -regextype posix-extended -regex
> "$REPO/($(echo -n $(sed 's#^\^##; t $; s#^#(.*/)?#; :$ s#/$#$#;
> s#.*#(&)#' $REPO/.hgignore) | tr ' ' '|')).*" -print
> You can then pipe that to xargs hg rm. What could be easier?
Dont know. Maybe not having to remember a 50 character sed command every
time you merge a branch? I think, I'll wait till tomorrow. ;)

In the case I'm on now, it's not a real problem anyway since all these files
share a common suffix.

Thanks for your help, everybody.

View this message in context:
Sent from the General mailing list archive at

More information about the Mercurial mailing list