I have been tasked with coming up with a strategy for branching, merging and releasing over the next 6 months.
The complication comes from the fact the we will be running multiple projects all with different code changes and different release dates but approximately the same development start dates.
At present we are using VSS for code management, but are aware that it will probably cause some issues and will be migrating to TFS before new development starts.
What strategies should I be employing and what things should I be considering before setting a plan down?
Sorry if this is vague, feel free to ask questions and I will update with more information if required.
We are evaluating IoC containers for C# projects, and both Unity and Castle.Windsor are standing out. One thing that I like about Unity (NInject and StructureMap also do this) is that types where it is obvious how to construct them do not have to be registered with the IoC Container.
Is there way to do this in Castle.Windsor? Am I being fair to Castle.Windsor to say that it does not do this? Is there a design reason to deliberately not do this, or is it an oversight, or just not seen as important or useful?
I am aware of container.Register(AllTypes... in Windsor but that's not quite the same thing. It's not entirely automatic, and it's very broad.
To illustrate the point, here are two NUnit tests doing the same thing via Unity and Castle.Windsor. The Castle.Windsor one fails. :
namespace SimpleIocDemo
{
using NUnit.Framework;
using Castle.Windsor;
using Microsoft.Practices.Unity;
public interface ISomeService
{
string DoSomething();
}
public class ServiceImplementation : ISomeService
{
public string DoSomething()
{
return "Hello";
}
}
public class RootObject
{
public ISomeService SomeService { get; private set; }
public RootObject(ISomeService service)
{
SomeService = service;
}
}
[TestFixture]
public class IocTests
{
[Test]
public void UnityResolveTest()
{
UnityContainer container = new UnityContainer();
container.RegisterType<ISomeService, ServiceImplementation>();
// Root object needs no registration in Unity
RootObject rootObject = container.Resolve<RootObject>();
Assert.AreEqual("Hello", rootObject.SomeService.DoSomething());
}
[Test]
public void WindsorResolveTest()
{
WindsorContainer container = new WindsorContainer();
container.AddComponent<ISomeService, ServiceImplementation>();
// fails with exception "Castle.MicroKernel.ComponentNotFoundException:
// No component for supporting the service SimpleIocDemo.RootObject was found"
// I could add
// container.AddComponent<RootObject>();
// but that approach does not scale
RootObject rootObject = container.Resolve<RootObject>();
Assert.AreEqual("Hello", rootObject.SomeService.DoSomething());
}
}
}
I have a problem that is described here: http://stackoverflow.com/questions/2146198/tfs-cannot-set-up-new-build
I use Visual Studio 2008. Unfortunately, the solution provided there, didn't help.
I tried to remove and add again my TFS server - no help. Also, it's not a problem with security policies or lack of proper right, because I can initiate a new build, with the same user through Visual Studio 2005, also installed on my computer.
In addition my colleagues have no problems at all.
If someone else have experienced similar problem - I will appreciate any help !
We use Visual Source Safe 6.0 at work and VB6 is supposed to integrate smoothly with Source Safe. Both applications are installed on my PC, but VB6 is not showing the options to integrate with Source Safe (e.g. checking out a file, seeing if a file is shared, etc.).
What do I need to do to get VB6 to integrate with Source Safe 6.0?
In my project I register many ISerializers implementations with the assembly scanner. FWIW this is the code that registers my ISerializers
Scan(scanner =>
{
scanner.AssemblyContainingType<ISerializer>();
scanner.AddAllTypesOf<ISerializer>().NameBy(type => type.Name);
scanner.WithDefaultConventions();
});
Which then correctly registers
ISerializer (...ISerializer)
Scoped as: Transient
JsonSerializer Configured Instance of ...JsonSerializer
BsonSerializer Configured Instance of ...BsonSerializer
And so forth.
Currently the only way I've been able to figure out how to resolve the serializer I want is to hardcode a service location call with
jsonSerializer = ObjectFactory.GetNamedInstance<ISerializer>("JsonSerializer");
Now I know in my class that I specifically want the jsonSerializer so is there a way to configure a rule or similar that says for ISerializer's to connect the named instance based on the property name? So that I could have
MySomeClass(ISerializer jsonSerializer, ....)
And StructureMap correctly resolve this scenario? Or am I approaching this wrong and perhaps I should just register the concrete type that implements ISerializer and then just specifically use
MySomeClass(JsonSerializer jsonSerializer, ....)
for something along these lines with the concrete class?
I want to run scheduled nightly exports of my database code into my SVN source.
It's easy to schedule automated check-in's into svn from a folder, but scheduling the export from SQL in SQL Management Studio is
Right click target database, choose Tasks Generate Scripts.
Follow the wizard and presto you've got scripts in a folder.
Is it possible to extract a single script that the wizard generates, and stuff that into a stored proc which I can run nightly?
Ideas?
I've setup a git repository one a remote server. Now I'm trying to checkout from it with:
git fetch ssh://[email protected]/~username/workfolder/
but I get an error:
fatal: Not a git repository
What am I doing wrong? Could it be the server does not support Git+SSH?
Please note this is not a question about online/hosted SVN services.
I am working on a home based, solo developer, project that now has commercial significance and it is time to think about remote source code backup. There is no need for file level check in/out, all I need is once a day or once a week directory level snapshot to remote storage. Automatic encryption would be a bonus to protect my IP.
What I have in mind is some sort of GUI interface app that will squirt a source code snapshot off to an Amazon S3 bucket on an automatic schedule.
(My development PC runs on MS Windows.)
I have a file in a project that is in a bitkeeper repository. I checked in a file but I haven't committed the change to create a changeset. How can I undo the checkin?
If I had a changeset I could undo the commit with:
bk undo -r<rev>
But in this case I can't commit and undo the changeset because I have other checked-in files that I don't want to touch.
When I commit changes with Emacs' built-in VCS interface (I use it with Bazaar) it commits only one file - that's open in current buffer.
So when I press C-c v v, enter message and C-c C-c, it does something like
bzr commit -m "my message" file/open/in.buffer
instead of
bzr commit -m "my message"
How to commit all changes with Emacs?
Title says it. What's the best tool for viewing and editing a merge in Git? I'd like to get a 3-way merge view, with "mine", "theirs" and "output" in separate panels.
Also, instructions for invoking said tool would be great. (I still haven't figure out how to start kdiff3 in such a way that it doesn't give me an error)
edit: My OS is Ubuntu.
I know that in Visual SourceSafe you can go in and drill down to the history of an individual file and then drill down to an individual check-in and apply a comment to the check-in that way but that's tedious and time consuming - if you have a lot of files that were checked in at the same time and you want the same comment to apply to all of them this will take forever.
I use the tool VSSReporter to generate reports of checkins and other stuff from VSS, but it cannot edit anything, only report on them.
Are there any tools which will let you go back and retroactively apply comments to check-ins in an efficient and easy manner?
I keep searching, but cannot find a clear and simple explanation on how to include one XCode project, along with all of it's sub-classes into another project. I routinely see stuff like that in sample projects that I download off the web, but do not know how to do this myself.
Within XCode, along with .h and .m files, and folders, there's a whole new project, starting with a blue xcode project icon, that is expandable to contain everything within the project.
Please, can someone explain to me step by step what do I need to do to add one XCode project into another one? I've seen a ton of one liners like "header search paths", but that does not tell me much.
UPDATE: After re-reading the documentation, I realized that the project to include must be dragged ONTO the BLUE project icon of the parent project. Regular sources can be dragged anywhere, but a project must be dragged onto a project.
Thank you!
We are having havoc with our project at work, because our VCS is doing some awful merging when we move information across files.
The scenario is thus:
You have lots of files that, say, contain information about terms from a dictionary, so you have a file for each letter of the alphabet.
Users entering terms blindly follow the dictionary order, so they will put an entry like "kick the bucket" under B if that is where the dictionary happened to list it (or it might have been listed under both B, bucket and K, kick).
Later, other users move the terms to their correct files. Lots of work is being done on the dictionary terms all the time.
e.g. User A may have taken the B file and elaborated on the "kick the bucket" entry. User B took the B and K files, and moved the "kick the bucket" entry to the K file. Whichever order they end up getting committed in, the VCS will probably lose entries and not "figure out" that an entry has been moved.
(These entries are later automatically converted to an SQL database. But they are kept in a "human friendly" form for working on them, with lots of comments, examples etc. So it is not acceptable to say "make your users enter SQL directly".)
It is so bad that we have taken to almost manually merging these kinds of files now, because we can't trust our VCS. :(
So what is the solution? I would love to hear that there is a VCS that could cope with this. Or a better merge algorithm? Or otherwise, maybe someone can suggest a better workflow or file arrangement to try and avoid this problem?
Hi folks,
I'm trying to wire up a simple ASP.NET MVC2 controller class to my own LoggingService.
Code compiles fine, but I get the following runtime error :-
{"StructureMap Exception Code: 202
No Default Instance defined for PluginFamily System.Type, mscorlib,
Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"}
what the? mscorlib ????
Here's some sample code of my wiring up ..
protected void Application_Start()
{
MvcHandler.DisableMvcResponseHeader = true;
BootstrapStructureMap();
ControllerBuilder.Current.SetControllerFactory(
new StructureMapControllerFactory());
RegisterRoutes(RouteTable.Routes);
}
private static void BootstrapStructureMap()
{
ObjectFactory.Initialize(x =>
x.For<ILoggingService>().Use<Log4NetLoggingService>());
}
and finally the controller, simplified for this question ...
public class SearchController : Controller
{
private readonly ILoggingService _log { get; set; }
public SearchController(ILoggingService loggingService) :
base(loggingService)
{
// Error checking removed for brevity.
_log = loggingService;
_log.Tag = "SearchController";
}
...
}
and the structuremap factory (main method), also way simplified for this question...
protected override IController GetControllerInstance(RequestContext requestContext, Type controllerType)
{
IController result = null;
if (controllerType != null)
{
try
{
result = ObjectFactory.GetInstance(controllerType) as Controller;
}
catch (Exception exception)
{
if (exception is StructureMapException)
{
Debug.WriteLine(ObjectFactory.WhatDoIHave());
}
}
}
}
hmm. I just don't get it.
StructureMap version 2.6.1.0
ASP.NET MVC 2.
Any ideas?
Hi,
we want to use Unity for IOC.
All i've seen is the implementation that there is one global static service which holds a reference to the Unity container, which registers all interface/class combinations and every class asks that object: give me an implementation for Ithis or IThat.
Frequently i see a response that this pattern is not good because it leads to a dependency from ALL classes to this service.
But what i don't see often, is: what is the alternative way?
Michel
Yesterday I was reading some articles in this site while I stumbled on an article about this two new IoC tools. Which one should I learn first? Is there some specification about which one should be used when?
I am currently maintaining a Mercurial repository of the project I am working on.
The rest of the team, however, doesn't.
There is a "good" (unversioned) copy of the code base that I can access by SSH. What I would like to do is be able to do something like an hg pull from that good copy into my master repository whenever it gets updated.
As far as I can tell, there's no obvious way to do this, as hg pull requires you have a source hg repository.
I suppose I could use a utility like rsync to update my repository, then commit, but I was wondering:
Is there was an easier/less contrived way to do this?
How can I query those of the labels in ClearCase with cleartool that have a specific attribute.
I can list the labels with
lstype -kind lbtype
but I'd like to get only those that have an attribute called TestAttr.
I have the oddest problem (but aren't all programming problems odd?). I have a winform that contains a webbrowser object that opens a website that has flash on it. This winform is running on a touchscreen computer (I can't find the brand or model number).
Here is what I know:
flash objects embeded in a website that is accessed via the webbrowser object in my winform do not function properly
said flash objects only react to the first 'click' on them. So the website opens and if I hit a button, that button works but nothing afterward works within the flash object works. If my first 'click' misses a button, nothing works there after.
trying to 'click' an flash button gives the same response as just hovering over the button
This isn't a problem with the touch part of the touch screen as using a mouse also gives the same not working right response
this isn't a problem with the web page as I can open up explorer on the same computer and navigate the webpage just fine from there
The program also works 100% right on my personal computer so it shouldn't be the program's fault
if it's not the touch screen fault and not the program's fault, I can't blame anything right now.
the EXACT same program worked 100% on our old touch screen (which was having other problems so we had to get rid of it).
Oh, also, surfing just a 'normal' webpage in a webbrowser in the winform works just fine.
I need to develop a product catalog (about 4000 products) application, which would be given to clients on CD or DVD. The catalog exists in webpage format using PHP and MySQL.
IMPORTANT: the application is given to clients who maight have old PC, old System. For minimal requirements I would put Windows XP and Internet Explorer 6 (if needed).
I need the following features:
1 search option (after productID AND after keyword)
2 print option (by selecting multiple products)
3 shopping cart (making a list which will be sent to an email address if there is any Internet Connection on the computer)
When I was asked to do it I had 2 days to realise a very basic version, so I took the whole website and exported it in HTML pages, and developed an application in C# which contains an embeded browser. So the whole website is now static and put on a CD. Everything fine so far. Now here are the problems:
1. the search option was realized by parsing the html files and reading the productID or looking for keywords inside of them. Put on a CD it was extremely slow (searching in 600MB of html files). FOR THIS I WOULD NEED A SOLUTION WITH A STATIC DATABASE (USING ACCESS OR SOMETHING) TO HAVE INDEXED ROWS, SO THE SEARCH COULD BE A VERY FAST ONE.
2. the printing option was a simply call of the embeded Internet Explorer print functions. Here are two problems:
a) user needs IE7 for printing the website scaled (FIT TO PAGE), otherwise the edges of the page are cut down.
b) users of this app does not have even the basic PC usage skills, so they can't set the printing settings, so there will appear in header and footer the page numbers and titles. QUESTION: can I set these settings from CSS for printing?
3. couldn't make a a shopping cart as I don't use a database, so I have static websites and content is inside the HTML.
QUESTION: WHICH ARE THE BEST SOLUTIONS FOR THE PROBLEMS DESCRIBED ABOVE?
PLEASE ANSWER EVEN IF YOUR ANSWER IS FOR ONE QUESTION ONLY. THANKS