![]() ![]() The ConvertExtension, packaged with Mercurial, has Git support.-R, -repository repository root directory or name of overlay bundle file -cwd change working directory -y, However, it is not able to handle all Git repositories in particular, it cannot handle octopus merges, i.e. Data is stored only once, so the on-disk footprint is much lower.Each commit only has one node ID, which is the Git hash.The GitExtension, which is packaged with Mercurial, interacts with a Git repository directly, avoiding the intermediate conversion. make pushing using dulwich more efficient (faster packing, thin packs, etc).making tags and Git state transferable between Mercurial repositories.the workflow and user experience is in general quite unsatisfying.If you want to help with the development of hg-git, here are some things you can help with: This will cause 'hg gexport' to update the 'from-hg' branch, instead of the master branch, so that your changes will not be lost even if you work on the master branch. Optionally you can change your hgrc to include an exportbranch statement: This will put your changes on top of the current hg tip. If you have made commits in the git repository and want to convert them to hg commits, first make sure the changes you want are on the master branch, then do: hg directory) that you can interact with like any regular git repository. git repository in the working directory (alongside the. ![]() Then do the following from in the hg repository: hg/hgrc (or your ~/.hgrc if you want to make this the default): This section is outdated (references to master branch and exportbranch config) Using hg-git to interact with a hg repository with git if there are bookmarks with no remote branch, a new branch is created.for each branch in the remote repository, if there is a bookmark or a tag with the same name that points to a descendent of the head, then push it.if there are no bookmarks and the remote repository is empty, the tip is pushed as the master branch.When pushing to Git, the following happens: When you pull from a Git repository in the section of hgrc, it will "fast-forward" the bookmarks if the branches haven't diverged. Hg clone will also create a bookmark for each git branch, and add local tags default/ for each branch. If you want to clone a repository via ssh, you can do so using a git+ssh:// protocol prefix : Will clone the git mirror of the hg-git repository in a directory named 'hg-git.git'. You can clone a Git repository as you would clone a mercurial repository, for example : hgrc to enable the extension by adding following lines: There should be no errors, and hg-git version should be visible.Ĭonfigure your. hg -config extensions.hggit=~/.hgext/hg-git/hggit version -v ![]() To install hg-git, for example in ~/.hgext directory. The only dependency is Dulwich Python library. This plugin is entirely in Python - you do not need to have Git installed on your system. It is intended that Mercurial users may wish to use this to collaborate even if no Git users are involved in the project, and it may even provide some advantages if you're using bookmarks (see below). At the same time, it can also be used to interact with a Mercurial repository using Git.Ĭommits and changesets are converted losslessly from one system to another, so you can push from a Mercurial repository and another Mercurial client can pull it and their changeset node ids will be identical - Mercurial data does not get lost in translation. It also allows using a Git server as a collaboration point for a team with developers using both Git and Mercurial. This extension adds the ability to work on a Git repository from Mercurial. Note: This extension is not distributed with Mercurial. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |