Want to take the pulse of the GOP on immigration? Ask Sen. John McCain (R-Ariz.) what he thinks.

Perhaps no other Republican has typified the GOP's evolving views on the issue better than McCain, who is currently a key player in the push to overhaul the nation's immigration system. From his previous efforts to pass comprehensive reform to his pivot toward a heavy emphasis on tough border security, a closer look at the senator's path speaks volumes about the way his party has moved to and fro.

"Look at John McCain," said GOP strategist Alex Castellanos. "Yes, he's fought for immigration reform a long time. And yes, he is flying that flag again now. But we forget that in between, when McCain himself was challenged in a tough GOP primary for re-election, he ran TV spots saying, 'build the dang[ed] fence.'" (Technically, it was "complete the danged fence" but you get the idea.)

McCain is part of a bipartisan group of eight senators who on Monday unveiled a sweeping set of principles for change that would, among other things, allow a path to citizenship for the country's more than 11 million illegal immigrants.

This isn't the first time McCain has spearheaded a comprehensive reform effort. In 2005, he sponsored a measure with the late Democratic senator Ted Kennedy of Massachusetts that included a pathway to citizenship. The bill stalled in the Senate, but a subsequent measure he supported passed the Senate before failing to clear a conference committee with the House.

McCain also pressed for reform in 2007 in consultation with the Bush White House. That time, though, McCain kept some distance from the negotiations over the measure but still wound up struggling in his bid for the Republican presidential nomination because of his support for a comprehensive approach.

By early 2008, McCain had distanced himself from any broad-scale immigration reform effort that included a path to citizenship; "No, I would not, because we know what the situation is today. The people want the borders secured first," he said at the time.

But then, after winning the GOP nomination, McCain again said in July 2008 that he would push for comprehensive reform, telling the National Council of La Raza: "I do ask for your trust that when I say, I remain committed to fair, practical and comprehensive immigration reform, I mean it. I think I have earned that trust."

With amnesty (again) becoming a dirty word in conservative circles and McCain facing a primary challenger running to his right on immigration in 2010, the senator shifted his emphasis to border security (again).

McCain's tone in that ad (and his 2010 campaign generally) was a remarkable shift from the McCain of 2003, who told the Tucson Citizen: “Amnesty has to be an important part (of immigration reform) because there are people who have lived in this country for 20, 30 or 40 years, who have raised children here and pay taxes here and are not citizens."

For the GOP, times have changed since the 2010 wave election, in which Republicans were boosted by conservative activists and tea party groups. Not only did Romney lose the presidential race in 2012, but he carried an even smaller share of the Hispanic vote than McCain did in 2008. That prompted many Republicans -- including McCain -- to declare it time to once again embrace comprehensive reform.

"Look at the last election," McCain said Sunday on ABC News' "This Week With George Stephanopoulos." "We are losing dramatically the Hispanic vote, which we think should be ours, for a variety of reasons, and we've got to understand that."

And today, of course, McCain is back to pushing for a comprehensive bill.

McCain's allies say his position has been consistent and that shifts in emphasis have been guided by developments on the ground. Nonetheless, his frequent evolutions on this issue are a near-perfect metaphor for that party as a whole.

There remains a strident element in the GOP that opposes a path to citizenship. As a CBS News poll today shows, that element is a pretty small minority of the American public (24 percent), but it remains very active(and powerful) within the GOP, and Republicans who fear being primaried have generally tacked right on the issue, resisting the idea of comprehensive reform.

This much seems clear, though: The fact that McCain is back at the forefront of the effort for comprehensive reform suggests that other Republicans will soon move in that direction. The question is how many and whether they're enough to pass something.