Re:Ride the carousel of folly with a Python migration
by dr_zoidberg on Tuesday January 24, 2017 @11:23AM
(#13472677)
Part of wanting no uncommited changes is to push a few issues that have been lingering around as "too easy, not important" and get the team to fix them once for all. But yeah, we could be a bit more "correct to the git way".
Re:Ride the carousel of folly with a Python migration
by throwanem on Tuesday January 24, 2017 @05:40AM
(#13470283)
That would prevent 2to3 from seeing them, though.
Re:Ride the carousel of folly with a Python migration
by brianshaler on Tuesday January 24, 2017 @11:27AM
(#13472719)
Yes, because they're pending changes. When they're finished, they can be committed and the branch can be rebased to include them.
Re:Ride the carousel of folly with a Python migration
by throwanem on Tuesday January 24, 2017 @12:14PM
(#13473281)
At which point you need to run 2to3 again, and maybe update callers of the code you stashed, depending on what it actually does. If you know with certainty it isn't going to be affected in any way by the upgrade tool, of course, then either works as well. But otherwise I'd argue strongly for finishing the changes first, committing them, and only then running the upgrader.
It's an argument of preference in practice, and therefore all but guaranteed to go nowhere. I tend to think that updating a whole codebase like this is best done atomically rather than piecemeal, especially when the code belongs to a team rather than an individual. But I can see where opinions might differ on such a point.
If you have uncommitted changes, instead of dropping them in as "last before..." you can git-stash them before branching and git-stash-pop them when you come back.