You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Here's one approach. It uses the xmlstarlet package to parse XML (seems to be fairly popular -- it's on Ubuntu and Debian, at least, and on Mac OS X via brew)
svn status --xml | xmlstarlet sel -t -m '//entry[descendant::wc-status/@item="missing"]/@path' -v . -n | xargs svn rm
I did start by svn status | grep '?' | cut -c9- etc, but was worried about weird edge cases with whitespace in path names (that cut syntax is probably wrong, too, this is just an example from memory) so I wanted to use the XML output so we got the definite path to the removed files.
Here's another one-liner, which detects ! and uses awk {print $2}, similar to cut. This seems reasonably safe to me, but I suppose you're right that there could be edge cases.
svn status prints nothing but ! deleted/file.php, so this might be good enough:
svn status | sed -rn "s/^\!\s+(.*)/\2/p" | xargs svn rm
where /p prints the captured group (.*) instead of the whole matched line
Brainstorming possible solutions per https://github.com/buddypress/bp-sync-to-wporg/blob/master/bp-sync-to-wporg#L39
The text was updated successfully, but these errors were encountered: