I think those are the two major contenders.
Possibly, but it'd be a politically and/or physically isolated country.
maybe Andorra
They were last invaded in 1512 by Aragonese troops. The co-prince is then definitively the King of Navarra whose title goes to the kings of France and later presidents of France. But these latters never involved Andorra in their wars. It even remained independant and neutral in the Spain Succession War in the late XVIIth c.
During the Revolution, the new french Republic doesn't want the nobiliary title of co-prince but Andorrans manage to convince Napoleon to take it back. All the while pacifically : who would care to invade a 3000 inhabitants and a few cows mountainous country
(The first true road appears in 1913, to Spain, the second to France in 1933 !)
But in 1812, Andorra is integrated administratively in a french department. It gains its independance back in 1814. Would it count as a limit ? It would then be 300 years of "peace". But it is not really an invasion or a revolution...
During the XIXth century there are political troubles between conservators and more liberal people (or at least wanting to try more liberal trades such as a casino or tabacco plants that the conservators would not like to see
). I can't say it would count as "civil war" or else any brawl in an irish bar is a revolution
Nevertheless, the 1861 strife was violent but didn't lead to any change.
Andorra goes out of its neutrality during WWI (but when ? it's unclear) and realises in 1939 that it is still in war with Germany !
they forgot to sign the Versailles Treaty !
o So Andorra signs a peace treaty with Germany in september 1939 and remains neutral during WWII.
So, Andorra would be a pretender from 1512 to 1914 or 1861 if you count the revolts as a "civil war" or 1812 if you count the napoleonic administrative annexion. At least 300 years and maybe 400