![]() When looking for tags, only the latest revision of. The file only grows and should not be edited, except when it generates a merge conflict.īecause it is revision controlled, there is a corresponding revlog. ![]() Two important things need to be remembered about how. hgtags file is versioned as a normal file, all the file modifications are stored as part of the repository history. hgtags residing in the root directory of a repository clone. ![]() In Mercurial, though, they are stored in a special text file called. In Git, global tags have a dedicated repository object type these tags are usually referred as annotated tags. Apparently they serve the same purpose, however they are treated differently. Global tags is one of the aspects that really differs from Git. Local tags are only visible where they were created and do not propagate, so they behave practically the same in both systems. Like with branches both Git and Mercurial support two tag levels: local and global. For more information about named branches: This kind of branch does not have a Git equivalent. They can be referred also by a bookmark, which can be pushed and pulled with the -B/ -bookmark option.įinally, Mercurial has another branching functionality called NamedBranches, also known as long lived branches. In brief, it is like using Git detached heads instead of branch names, but much easier and without the risk of garbage collection (see hg help heads). In Mercurial, the X and Y branches are called heads and they can be referred by their changeset identifier: either local (number) or global (SHA1 hash). If a new commit is appended to e then the reference X would point to such commit, like this: In Git, branches X and Y are simply references to the e and g commits. Take the following history graph as an example: Then Git has its famous lightweight branches, which allow switching between development lines within the same clone of a repository. This way of branching is sometimes referred to as heavy branches and works almost the same in both systems. First and foremost, each clone of a repository represents a branch, potentially identical to other clones of the same repositories. For instance, the graphical representation of history is the same in the two.Īlso like in Git, Mercurial supports branching in different ways. ![]() (Mercurial also includes a powerful query language for specifying revisions called revsets.)įrom that, Mercurial's view of history is, just like Git's, a DAG or Directed Acyclic Graph of changesets. Additionally, Mercurial also provides a local revision number, a simply incrementing integer, for each changeset, in addition to the reverse count notation provided by Git (like HEAD~4). To identify these objects both systems use a SHA1 hash value, what Mercurial calls nodeid. Mercurial also builds up history upon the same three concepts, respectively: file, manifest and changeset. These are the building blocks for the history model. One of the first Git lessons is the repository basic object types: blob, tree and commit. This section tries to prove that the only logical architecture difference between the two systems, is nomenclature. To Mercurial newcomers with Git experience, this often gives the false appearance that Mercurial is less powerful or featureful than it really is. Mercurial is also safer by default: functionality like history rewriting (which is considered an advanced topic for a version control newcomer) must be enabled. In comparison to Git, Mercurial requires a shallower understanding to operate in a useful manner. Git tends to expose lower-level implementation details to users, requiring knowledge of them in order to use Git effectively (e.g. This makes Mercurial easier to learn - even for someone who has never used version control before. Mercurial has always focused heavily on interface aspects. Mercurial and Git differ mainly in nomenclature, interface, and - of course - implementation details, including features.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |