Added --limit functionality to sync and publish history