Re: Rebase and incrementing version numbers
- From
Jeff King <peff@peff.net>
- Date
- Jan 25, 2012, 02:09 UTC
- Message-ID
- <20120125020903.GA21535@sigill.intra.peff.net>
- In-Reply-To
- <CAH3Anro8T4SJqBvw1E_7u__4kYyB6hMCYPbtHSVxkgSUYSb2+A@mail.gmail.com>
On Fri, Jan 20, 2012 at 08:33:57AM +1100, Jon Seymour wrote:
Show 7 quoted lines
> I wonder if you can defer your changes to the config files until after > you have synced with the current SVN head, so that you typically only > modify the latest configuration file. Then use git to work out what > numbers you have to update (by working out which files you changed > that the SVN upstream has not seen yet). Not perfect, because of race > conditions, and may not work with your integration testing processes, > but perhaps worth considering.
That was my thought, too (assuming this workflow, which seems slightly insane, is outside your power to change).
In this list here:
Show 10 quoted lines
> Something like: > > 1. pull latest SVN > 2. work on file > 3. test. skip back to 2 until done. > 4. ready to push to upstream > 5. pull latest SVN > 6. calculate configuration changes required > 7. apply configuration changes > 8. push work + configuration changes upstream
Steps 5 and 8 are basically "git svn dcommit". I suspect you could use some combination of "git svn rebase" and "git filter-branch" to rewrite your commits with the right counters, and then dcommit the result (hopefully fast enough to avoid races).
-Peff