Skip to content

Instantly share code, notes, and snippets.

@seangenabe
Created June 7, 2015 10:59
Show Gist options
  • Save seangenabe/0fb6f544737daf60eebd to your computer and use it in GitHub Desktop.
Save seangenabe/0fb6f544737daf60eebd to your computer and use it in GitHub Desktop.
Perforce revert all
# Make sure to have CRLF line endings on Windows.
$opened = p4 opened;
$split1 = $opened.Split([Environment]::NewLine);
$split2 = New-Object System.Collections.Generic.List[System.String];
foreach ($x in $split1) {
$split2.Add($x.Split("#")[0])
}
foreach ($x in $split2) {
p4 revert $x
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment