I have a fairly large class library written in .NET 3.5, which I would like to update to make available for .NET 4.0.
In this process, I will rip out a lot of old junk files and rewrite the code to make better use of the new classes and support in .NET 4.0 (like TPL). Class libraries will thus diverge, but still it will be that some bug fixes can be performed the same way.
What is the best way to organize a class library in Mercurial? I use Kiln (fogbugz) if that matters.
I think:
- Named branches in one repository, then they can transplant any corrections from one to another
- Untitled in one repository can also be transplanted, but I think it will look dirty.
- Individual repositories will need to override the fixes (or use a mercury-free comparison tool to help me).
What would you do? (any other alternatives that I have are welcome, though.)
Note that class libraries vary widely in areas, I have some remnants of the old code like collection that does something similar to Linq that I will remove, and some code that uses it that I rewrote to use Linq methods instead of this. Thus, simply copying project files and using partitions #if NET40..#endifwill not work. In addition, the class version 3.5 of the class library will not receive many new functions, mostly only critical bug fixes, so keeping both versions equally "alive" is not really required. Thus, individual copies of all files are good enough.
Edit From @Rudi, answer here , I think he says this:
- ( " " , "default" =.NET 4.0 "net35" =.NET 3.5 )
- , (.. 3.5 4.0) , 3.5 , , , ( , ).
- , , ( ), , 3.5 4.0, .
. , Mercurial , , , , , "" , .