Mercurial: Class library that will exist for both .NET 3.5 and 4.0?
Posted
by Lasse V. Karlsen
on Stack Overflow
See other posts from Stack Overflow
or by Lasse V. Karlsen
Published on 2010-05-20T12:13:37Z
Indexed on
2010/05/20
13:20 UTC
Read the original article
Hit count: 164
I have a rather big class library written in .NET 3.5 that I'd like to upgrade to make available for .NET 4.0 as well.
In that process, I will rip out a lot of old junk, and rewrite some code to better take advantage of the new classes and support in .NET 4.0 (like TPL.) The class libraries will thus diverge, but still be similar enough that some bug-fixes can be done to both in the same manner.
How should I best organize this class library in Mercurial? I'm using Kiln (fogbugz) if that matters.
I'm thinking:
- Named branches in one repository, can then transplant any bugfixes from one to the other
- Unnamed branches in one repository, can also transplant, but I think this will look messy
- Separate repositories, will have to reimplement the bugfixes (or use a non-mercurial-integraded compare tool to help me)
What would you do? (any other alternatives that I haven't though of is welcome as well.)
Note that the class libraries will diverge pretty heavily in areas, I have some remnants of old collection-type code that does something similar to Linq that I will remove, and some code that uses it that I will rewrite to use the Linq-methods instead. As such, just copying the project files and using #if NET40..#endif
sections is not going to work out. Also, the 3.5 version of the class library will not be getting many new features, mostly just critical bug-fixes, so keeping both versions equally "alive" isn't really necessary. Thus, separate copies of all the files are good enough.
© Stack Overflow or respective owner