This patch has been sent a couple of times before. It makes update -C behave equally for hg, svn and git subrepos. Changes since last is that tests have been moved to the test-subrepo.t, test-subrepo-svn.t and test-subrepo-git.t test cases, and there use the repositories that already exists in these tests.