Mercurial records in every commit, that branch it was made. It is part of it's identity. That is what the parent is talking about. Git does not do this. Because git does not have this concept of named branches.
In other words, Mercurial has feature branches, while git has developer branches. This gives much more possible workflows in case of Mercurial.
>Mercurial tends to only give you immediate, direct ancestors, any kind of complicated history and Mercurial can't be bothered to actually to dive in and tell you what branches a commit is really apart of...
>Git does not do this. Because git does not have this concept of named branches.
It doesn't pre-bake the information in the commit, because it's entirely useless information to bake into a commit; and even in the case of Mercurial can paint the wrong picture about the nature of a commit given branches that it's on.
>This gives much more possible workflows in case of Mercurial.
That is the exact opposite of what it gives you. I'm not even sure how you possibly arrived at that conclusion.
>Mercurial contains vastly more querying capabilities in the form of revsets.
Git doesn't need a query language, because you can literally do everything revsets will give you with git log and then maybe some very elementary bash script knowledge. You are literally arguing that Mercurial having its own arbitrary DSL is somehow better than git being able to seamlessly use popular tooling with conventional command line syntax; which seems to be at odds with the whole "mercurial is easier to use." I take extreme issue with your claim that Mercurial has "vastly" more querying capabilities and then you not even give one measly example.
>because it's entirely useless information to bake into a commit;
I have found it very useful in untangling a complex history. You might not see the value in it becuase git does not care to maintain a truthful history, but promotes building a "clean" history. It makes sense to do that if you are maintaing somethign like linux kernal. But for smaller projects, maintaining a truthful history is much more valuable.
So I would say that it is extremely valuable information in the context of Mercurial.
And there are other version control systems that follow similar model. Take a look at the '3.3 Branches' heading in another fantastic version control system called 'Fossil' here [1].
>That is the exact opposite of what it gives you. I'm not even sure how you possibly arrived at that conclusion.
Well, Mercurial supports git's branching model and a lot of others. I am not sure how that is not clear.
>Git doesn't need a query language...
Of course. It is not meant to be used by mere mortals..
>because you can literally do everything revsets will give you with git log ...
Are you seriously saying that using command line flags is more powerful and easier than using a query language that lets you use arbitrarily expressions to query a data set?
> I take extreme issue with your claim that Mercurial has "vastly" more querying capabilities and then you not even give one measly example.
Checkout the link I mentioned in my earlier comment.
This is the manual page for revsets [2]. Please take a look.
>But for smaller projects, maintaining a truthful history is much more valuable.
Elaborate.
>Mercurial supports git's branching model and a lot of others.
Except, it doesn't completely.
>Are you seriously saying that using command line flags is more powerful and easier than using a query language that lets you use arbitrarily expressions to query a data set?
Yes, because command line flags are ubiquitous in nearly every single tool, versus an arbitrary DSL that has no convention behind it, or can be easily parsed by other tools in the same ecosystem.
> Please take a look.
You seem to be under the impression that I have not or do not use Mercurial. You would be mistaken. Both of those pages do not lend support to your claim that the ability to "query" (with or without a DSL) the history graph is somehow superior in Mercurial. They merely document the feature, but do not draw any meaningful comparisons highlighting what it can do that git log or even git rev-list (which git log uses) can't.
For example, to answer questions like "What feature was this commit part of, originally". "How and where did the merges happened?". To answer these questions months after the merges happened, even after you did't think that you would need to answer these questions, something like the workflows mercurial is essential.
>Except, it doesn't completely.
Elaborate?
>Yes, because command line flags are ubiquitous in nearly every single tool
Ok. But that does not mean that it is powerful enough and can be a replacement for or better than a proper query laguage..
> arbitrary DSL that has no convention behind it
What convention? I am not getting you.
>can be easily parsed by other tools in the same ecosystem.
Parse what exactly?
>Both of those pages do not lend support to your claim that the ability to "query" (with or without a DSL) the history graph is somehow superior in Mercurial. They merely document the feature, but do not draw any meaningful comparisons highlighting what it can do that git log or even git rev-list (which git log uses) can't.
Oh it does support it plenty. Take a look at the vocabulary supported by revsets in form of intuitive and easy to remember predicates. I don't think you are really impartial if you are not convinced by it.
>to answer questions like "What feature was this commit part of, originally"
Neither system will answer that. If you're relying on branches to tell you what feature sets changes belong to, you should be adding that to your commits.
>"How and where did the merges happened?"
Git will do this faster and in a more correct manner. In a complicated history graph, Mercurial will actually hide information from you if you try to query it and sometimes even mislead you. I'm starting to think you haven't used either system extensively.
>Parse what exactly?
Arguments and output.
>Oh it does support it plenty.
It does not. If you can't give an example, you can just admit that you don't know what you're talking about.
I am not sure what you are talking about. Every change set in Mercurial contain the branch in which it was made. Even after a merge, there is a clear distinction about the commits made in a certain branch.
I think you might be thinking of rebased change sets. In that case, you would be right.
>Git will do this faster and in a more correct manner..
Please show an example. I would also like to see an instance where Mercurial hiding information from you and giving misleading answers to your queries.
>Arguments and output.
But it is supposed to be used by people. So it should be first human friendly. And there is nothing stopping you from parsing output of mercurial commands. And what is the use case of parsing arguments? Why did you think so? Mercurial has even a template feature letting you format the output in any way you want. I am not sure, it seems to me that you are not making a whole lot of sense..
>If you can't give an example, you can just admit that you don't know what you're talking about.
There are some examples at the bottom of the revset page I linked. Knock yourself out. And do share some examples of your claims, because your last commits contained enough stuff to doubt your experience..(stuff about conventions and DSLs, what was that again?)
> I would also like to see an instance where Mercurial hiding information from you and giving misleading answers to your queries.
A branch with two heads. Two branches that have the same name. Which commit came from where? What happens if that branch was merged into the other? Or what happens if only one got merged into a "mainline" branch, while the other one was reverted else where. It's useless information at best, and misleading at worse.
>But it is supposed to be used by people. So it should be first human friendly.
You're going to claim a DSL that you have to research is somehow easier to use than simple command line arguments that have decades of convention behind them? Odd.
Git allows you to format output as well. Not sure why you felt the need to bring that up. Again, unless you've extensively used both systems I'm not sure why you feel the need to argue because it's making you look foolish.
>There are some examples at the bottom of the revset page I linked.
> It's useless information at best, and misleading at worse.
It seems useless to you because you see it from a git viewpoint. It is clear when you say that "Two branches that have the same name". It is not "two branches", but one branch with two heads. In Mercurial, a Branch is a set of commits. That view is incompatible with the thing that git call "branches".
If you think about it, Mercurial's implementation of a Branch is closer to the idea of a "Branch". As I told earlier, Mercurial branches are "Feature" branches". I am not sure if you have gone through the fossil doc page I linked earlier. When you see it like that, it makes complete sense that a Branch can have any number of heads. Say, the second head containing a different implementation of the same feature.
(God I miss Mercurial)
>Which commit came from where? What happens if that branch was merged into the other? Or what happens if only one got merged into a "mainline" branch, while the other one was reverted else where. It's useless information at best, and misleading at worse.
These questions are the result of trying to make sense of Mercurial branches in a GIt way..
>what happens if only one got merged into a "mainline" branch, while the other one was reverted else where.
Again, this question is a result of you seeing mercurial branches in a git way. Because git define a branch as the set of commits starting from a "head", the idea of merging only one of the heads does not make sense to you.
But you can do the same with git, right. You can move back couple of commits from a head and create a new head by starting committing from there. Only that in git, the previous head would be hidden. And you will have to go to the reflog to dig them up. But in Mercurial, things are much clearer and exposed (contrary to your accusation of it hiding and misleading).
So again, it feels misleading to you because it is different from git. It is very consistent in conforming to its on model.
>You're going to claim a DSL that you have to research is somehow easier to use than simple command line arguments that have decades of convention behind them? Odd.
I am not at all getting you here. "command line arguments that have decades of convention"? What exactly does that mean? And what is the thing about "a DSL that you have to research"?. You don't have to look up command line arguments of git? And you call git's command line arguments simple?
>Again, unless you've extensively used both systems I'm not sure why you feel the need to argue because it's making you look foolish.
I didn't claim that git does not allow you to format the output, but just that Mercurial allows you to do that so that your argument about easily parseable output is moot.
In other words, Mercurial has feature branches, while git has developer branches. This gives much more possible workflows in case of Mercurial.
>Mercurial tends to only give you immediate, direct ancestors, any kind of complicated history and Mercurial can't be bothered to actually to dive in and tell you what branches a commit is really apart of...
http://stackoverflow.com/questions/7166011/mercurial-find-al...
Is that what you are talking about?
Mercurial contains vastly more querying capabilities in the form of revsets. No such thing exists for Git.
If you go head to head with git vs mercurial, git will loose pathetically.