To start up the built-in web server, right-click in your repository and choose TortoiseHg > Web Server. (Though if you've already got one of those, I suspect you could make this work through them, if you were really adventurous and masochistic.) You don't need to go install Apache or WebLogic or any of that crap. What we'll do is ridiculously light weight, and it's a part of Mercurial itself. The easiest way to do this is to basically set up a web server to host your repository.īut don't let "web server" panic you. To do this, though, you'll need to be able to access the repository from your current location. You can use similar steps to create a clone of something that exists anywhere, not just on your file system. It probably makes sense to delete the clone we just made (but that's not a requirement - you could leave it hanging around if you really want). We're now going to branch out to more sophisticated setups. hg folder, so it's easy to tell they're both under version control, and each have their own repository.Ī file system clone like this is the simplest way to clone a repository, but it requires you to have a need to have two repositories of the same project on the same computer. Once you open them up, though, you can see that both of them have a. These are probably both on the same computer, and at an initial pass, they may look like just two copies of the same directory. (More on pushing and pulling later.)Īfter the clone, we've now got two repositories, each with their own working copy: Once you've got the new location, hit Clone, and like magic, you'll have your new cloned repository created! You can now check into either repository and push and pull changes between them. Use the Browse button after Destination to find the place you want to create your clone. To do a file system clone, right-click on your repository and choose TortoiseHg > Clone…. We'll start here anyway, and then proceed to more realistic and better scenarios. Local File System ClonesĪ local file system clone of a repository is the simplest form of cloning that you can do. One is to do a local file system clone, and the second is to do a clone across the network (which still allows you to put the second copy on the same machine as the first). There are two ways that you can clone an existing repository. hg folder in our working copy) along with our working copy. We have our repository (technically in the. Third, how to pull changes from one repository into another. Second, how to push changes from one repository to another. We're going to cover three basic things here. In this tutorial, we're going to dive in and start doing this from a practical standpoint in Mercurial. Doing so, deletes the uncommitted changes on the main repository server.In the last tutorial, we covered handling multiple repositories at a conceptual level. Performing a clean update to revision tip on the main repository server resolves this issue. This happens when changes have been made directly to the main repository without committing. Pushes to the main repository may be aborted with one of the following messages: remote: abort: outstanding merge conflicts remote: abort: untracked files in working directory differ from files in requested revision The path would then be something along the line of: Push aborts Instead of a web server, a web-based repository hosting service like Bitbucket could be used. The output in this case needs to be redirected to stderr (&2), because stdout (&1) is used for the actual data stream. $ hg push Auto-update the main repositoryĬhangegroup = hg update Push to an additional serverĬhangegroup.webserver = hg push -f webserver Lowest common denominator It is more important that people start using distributed revision control instead of nothing at all. December 2011: Git has three “philosophical” distinctions in its favour, as well as more attention to detail.August 2008: Mercurial offers a comfortable command-line experience, learning Git can be a bit daunting.Mercurial has been better supported under Windows.Distributed revision control Why I went with Mercurial In the mean time, please, bare with me and check back for updates. Nonetheless, the basic outline of this page may already be useful and this is why I am sharing it. #This page is work in progress! Much of the explanatory text still needs to be written. Stroobandt Copyright 2013–2020, licensed under Creative Commons BY-NC-SA
0 Comments
Leave a Reply. |