They occupied Edinburgh (but not the castle) and defeated a government army at the Battle of Prestonpans.
The castle was pretty much left unscathed during this time.