|
|
| 1 2 3 4 |
|
walt-2
|
No, no, I'm not the one calling for a vote. You old-timers here
will know the name Matt Dillon, who is leading the dragonflybsd project (www.dragonflybsd.org). Matt is the one who is calling for the vote in his thread "Vote for your source control system" in the dragonfly.kernel group, accessible via nntp://nntp.dragonflybsd.org. I've already cast my vote for git, which I confess is not very honest because I've never even tried mercurial. I would truly be grateful to anyone here who knows both git and mercurial who could contribute verifiable facts to that debate. Thanks. -- To unsubscribe from this list: send the line "unsubscribe git" in the body of a message to [hidden email] More majordomo info at http://vger.kernel.org/majordomo-info.html |
|
Jakub Narebski
|
[Cc: gmane.comp.version-control.git,
gmane.comp.version-control.mercurial.general] walt <[hidden email]> writes: > No, no, I'm not the one calling for a vote. You old-timers here > will know the name Matt Dillon, who is leading the dragonflybsd > project (www.dragonflybsd.org). > > Matt is the one who is calling for the vote in his thread "Vote > for your source control system" in the dragonfly.kernel group, > accessible via nntp://nntp.dragonflybsd.org. > > I've already cast my vote for git, which I confess is not very > honest because I've never even tried mercurial. I would truly > be grateful to anyone here who knows both git and mercurial who > could contribute verifiable facts to that debate. I also used only Git, but I have read a bit about Mercurial; however the information I have on Mercurial might be out of date. Below I have tried to compare Git with Mercurial, pointing the most important (to me) facts: 1. Documentation and ease of use. Mercurial is supposedly better documented and easier to use; I think this descends from the early days of Git, where it was not very user friendly. IMHO Git has much improved since. Mercurial had 'hgbook' from the beginning; Git User's Manual is more recent. I also think that ease of use is just different learning curve. I am also biased and I think that Mercurial starts easy, but it has more difficult things (like e.g. merging, multiple branches in single repository etc.) harder than it Git. I'll admit that Mercurial UI is better designed; Git UI was not as much designed as it evolved from 'stupid content tracker' to full-featured SCM, therefore there are a few oddities (for example git-revert might do not what you expect, if you are accustomed to Subversion UI). 2. Implementation, portability, bindings and extending Mercurial is implemented in Python, with core written in C for better performance. It has a plugin system, and additional extra features implemented through extensions. I don't know what is the status of bindings (or implementations) in other programming languages; but it has some API for use in extensions at least. Git is implemented as mixture of C, shell scripts, Perl and Tcl/Tk (for GUI). The main way of extending it is by scripting around powerfull set of low level tools, called 'plumbing', meant to be used in scripts. JGit is for example _reimplementation_ of Git in Java. 3. Repository design and performance. Git is designed around idea of content adressed object database; objects are adressed by their content (by SHA-1 of their type and content). Commits for example have information about author and comitter, pointer to zero or more parent commits, and pointer to tree object (representing top directory in project). Branches and tags are just pointers to DAG (Direct Acyclic Graph) of commits; current branch is denoted by HEAD pointer to branch. There is explicit staging area called 'index', used for conflict resolution dureing merges, and which can be used to make commit in stages, allow uncomitted changes in tree (in working directory). Git design supports very well multiple branches in single repository, and tracking changes in multiple remote repositories each with multiple branches. Mercurial, from what I have read of its documentation, and from the few discussion on #revctrl IRC channel, and from what I understand is based on changes stored per file, with information about files and their versions stored in manifest (flat) file, and with changes described in changelog-like file (changerev). One of limitations of "record" database (as opposed to Git's object database) is that commits can have zero (root commit), one or two (merge commits) parents only. There is apparent in design that Mercurial was developed with single branch per repository paradigm in mind. Local branches from what I understand are marked in CVS-like fashion using tags. Tags are implemented as either local to repository and untransferable, or as .hgtags versioned file with special case treatment. (But I'm obviously biased here). Git and Mercurial have similar performance, although it is thought that due to design Mercurla has faster patch applying and is optimized for cold cache case, while Git has faster merging and is optimized for warm cache case. Mercurial may have (or had) problems with larger binary files, from what I have heard. 3. Advanced features, interfaces and tools I don't know much about Mercurial beside basic usage, what I remember from 'hgbook', but I think that most if not all advanced Git features are available either in Mercurial core, or as Mercurial extensions (plugins). For example both Git and Mercurial have bisect command for finding bug by searching (possibly nonlinear) history for commit which introduced bug, ForestExtension is rough equivalent of git submodules (or third party git-externals), there is Transplain extension for git-rebase, etc. Mercurial has hgserve which can function as both web repository browser and as anonymous server; in Git they are split between git-daemon for anonymous repository access, and gitweb (or other web interfaces: cgit, git-php, ViewGit, Gitorious,..) for web interface. NOTE: In Git repacking and garbage collecting is explicit (although can be automated with "git gc --auto", and some of it happens automatically); Git use _rename detection_ rather than _rename tracking_, which has its advantages and disadvantages. They are many articles comparing Mercurial and Git; if they are blog posts please read the comments too. Among them are: * "Git vs. Mercurial: Please Relax" (Git is MacGyver, Mercurial is James Bond) http://importantshock.wordpress.com/2008/08/07/git-vs-mercurial/ * "The Differences Between Mercurial and Git" http://www.rockstarprogrammer.org/post/2008/apr/06/differences-between-mercurial-and-git/ * "Git vs. Mercurial" http://blog.experimentalworks.net/archives/38-Git-vs.-Mercurial.html * "Git versus Mercurial..." http://codeheadsystems.wordpress.com/2008/05/10/git-versus-mercurial/ * "Git vs Mercurial" http://www.simplicidade.org/notes/archives/2007/12/git_vs_mercuria_1.html Note however that the comparison at "Better SCM Initiative" has some wrong information about Git: see * "Git at Better SCM Initiative comparison of VCS (long)" http://thread.gmane.org/gmane.comp.version-control.git/95809/focus=97253 -- Jakub Narebski Poland ShadeHawk on #git -- To unsubscribe from this list: send the line "unsubscribe git" in the body of a message to [hidden email] More majordomo info at http://vger.kernel.org/majordomo-info.html |
||||||||||||||||
|
Maxim Vuets
|
On 26 Oct 2008 15:15:57 +0100, Jakub Narebski <[hidden email]> wrote:
> 1. Documentation and ease of use. > > Mercurial is supposedly better documented and easier to use; I > think this descends from the early days of Git, where it was not > very user friendly. IMHO Git has much improved since. Mercurial > had 'hgbook' from the beginning; Git User's Manual is more recent. Also, there is http://book.git-scm.com/ that is similar to hgbook, I think. Thanks for the comprarision! -- . Hoc est simplicissimum! ..: maxim.vuets.name -- To unsubscribe from this list: send the line "unsubscribe git" in the body of a message to [hidden email] More majordomo info at http://vger.kernel.org/majordomo-info.html |
||||||||||||||||
|
Leo Razoumov
|
On 10/26/08, Maxim Vuets <[hidden email]> wrote:
> On 26 Oct 2008 15:15:57 +0100, Jakub Narebski <[hidden email]> wrote: > > 1. Documentation and ease of use. > > > > Mercurial is supposedly better documented and easier to use; I > > think this descends from the early days of Git, where it was not > > very user friendly. IMHO Git has much improved since. Mercurial > > had 'hgbook' from the beginning; Git User's Manual is more recent. > > > Also, there is http://book.git-scm.com/ that is similar to hgbook, I think. > > Thanks for the comprarision! I have been using Mercurial for about two years and am very comfortable with it. Here are some cons and pros Mercurial PROS: * Easier and more consistent UI. Newbie friendly. * Better documentation. IMHO, hgbook is by far better than http://book.git-scm.com/ * Windows support (personally, I do not care) Mercurial CONS: * Less potential than git. Once Ted Tso even said that "git has more legs than mercurial", see http://thunk.org/tytso/blog/2007/03/24/git-and-hg/ * Hg is strictly an SCM system while GIT is a content addressable file system that can be used in other ways, hence the name Global Information Tracker (GIT) * Recently, Hg development seems to have somewhat slowed down. To simply put it, there is not enough room in the world for several similar SCM systems. With git's pace and momentum the other SCMs including Hg are fighting an uphill battle. Just my two cents. --Leo-- -- To unsubscribe from this list: send the line "unsubscribe git" in the body of a message to [hidden email] More majordomo info at http://vger.kernel.org/majordomo-info.html |
||||||||||||||||
|
Felipe Contreras
|
In reply to this post
by Jakub Narebski
On Sun, Oct 26, 2008 at 4:15 PM, Jakub Narebski <[hidden email]> wrote:
> [Cc: gmane.comp.version-control.git, > gmane.comp.version-control.mercurial.general] > > walt <[hidden email]> writes: > >> No, no, I'm not the one calling for a vote. You old-timers here >> will know the name Matt Dillon, who is leading the dragonflybsd >> project (www.dragonflybsd.org). >> >> Matt is the one who is calling for the vote in his thread "Vote >> for your source control system" in the dragonfly.kernel group, >> accessible via nntp://nntp.dragonflybsd.org. >> >> I've already cast my vote for git, which I confess is not very >> honest because I've never even tried mercurial. I would truly >> be grateful to anyone here who knows both git and mercurial who >> could contribute verifiable facts to that debate. <snip/> > 3. Repository design and performance. > > Git is designed around idea of content adressed object database; > objects are adressed by their content (by SHA-1 of their type and > content). Commits for example have information about author and > comitter, pointer to zero or more parent commits, and pointer to > tree object (representing top directory in project). Branches > and tags are just pointers to DAG (Direct Acyclic Graph) of > commits; current branch is denoted by HEAD pointer to branch. > There is explicit staging area called 'index', used for conflict > resolution dureing merges, and which can be used to make commit in > stages, allow uncomitted changes in tree (in working directory). > Git design supports very well multiple branches in single > repository, and tracking changes in multiple remote repositories > each with multiple branches. > > Mercurial, from what I have read of its documentation, and from the > few discussion on #revctrl IRC channel, and from what I understand > is based on changes stored per file, with information about files > and their versions stored in manifest (flat) file, and with changes > described in changelog-like file (changerev). One of limitations > of "record" database (as opposed to Git's object database) is that > commits can have zero (root commit), one or two (merge commits) > parents only. There is apparent in design that Mercurial was > developed with single branch per repository paradigm in mind. > Local branches from what I understand are marked in CVS-like > fashion using tags. Tags are implemented as either local to > repository and untransferable, or as .hgtags versioned file with > special case treatment. (But I'm obviously biased here). > > Git and Mercurial have similar performance, although it is thought > that due to design Mercurla has faster patch applying and is > optimized for cold cache case, while Git has faster merging and is > optimized for warm cache case. > > Mercurial may have (or had) problems with larger binary files, from > what I have heard. The fact that hg is changeset based means that certain operations are slower, like checkout a specific commit. In hg my bet is you would need to gather a bunch of changesets while in git the operation is done in a single step. It also means that bare clones are not possible in hg, or at least very complicated. Note: I'm not sure if what I'm claiming is correct. -- Felipe Contreras -- To unsubscribe from this list: send the line "unsubscribe git" in the body of a message to [hidden email] More majordomo info at http://vger.kernel.org/majordomo-info.html |
||||||||||||||||
|
Jakub Narebski
|
In reply to this post
by Leo Razoumov
I'm not sure if Mercurial mailing list is not subscribe only. Git isn't.
On Sun, 26 Oct 2008, Leo Razoumov wrote: > On 10/26/08, Maxim Vuets <[hidden email]> wrote: >> On 26 Oct 2008 15:15:57 +0100, Jakub Narebski <[hidden email]> wrote: >>> >>> 1. Documentation and ease of use. >>> >>> Mercurial is supposedly better documented and easier to use; I >>> think this descends from the early days of Git, where it was not >>> very user friendly. IMHO Git has much improved since. Mercurial >>> had 'hgbook' from the beginning; Git User's Manual is more recent. >> >> Also, there is http://book.git-scm.com/ that is similar to hgbook, I think. >> >> Thanks for the comprarision! > > I have been using Mercurial for about two years and am very > comfortable with it. Here are some cons and pros > > Mercurial PROS: > * Easier and more consistent UI. Newbie friendly. I think that _might_ be example of "Worse is better" scenario, with Git having UI which evolved rather than was designed, and therefore less consistent. Also if you are limiting to what is described in main chapters of 'hgbook', namely one branch (one "fork") per repository paradigm everything is simpler. > * Better documentation. IMHO, hgbook is by far better than > http://book.git-scm.com/ And probably better than "Git User's Manual". There are lot of various git-related documentation: "Git Magic", "Git for Computer Scientists", "Git from bottoms up"... > * Windows support (personally, I do not care) And I think it is not important for DragonflyBSD. Besides git _has_ MS Windows support, in the form of Cygwin and in the form of msysGit project. It is still not as full as Linux support (for example git-svn comes to mind), but it is not bad. Well, Mercurial has TortiouseHg, while Git-Cheetah is in very early stages... > > Mercurial CONS: > * Less potential than git. Once Ted Tso even said that "git has more > legs than mercurial", see > http://thunk.org/tytso/blog/2007/03/24/git-and-hg/ I agree, and I think it is at least partially because of Git having cleaner design, even if you have to understand more terms at first. > * Hg is strictly an SCM system while GIT is a content addressable file > system that can be used in other ways, hence the name Global > Information Tracker (GIT) Errr... I think you are mislead by tongue-in-cheek backronym, which was created in the beginning, when git had very weak porcelain (i.e. SCM UI). > * Recently, Hg development seems to have somewhat slowed down. To > simply put it, there is not enough room in the world for several > similar SCM systems. With git's pace and momentum the other SCMs > including Hg are fighting an uphill battle. The competing _distributed_ version control systems left seems to be Bazaar-NG (Ubuntu), Mercurial (OpenSolaris, Mozilla), Git (Linux kernel, Freedesktop.org, Ruby on Rails people). There are many IDEs, many editors, many web browsers; there is Linux and there are *BSD; I hope that Mercurial would continue to be developed, and not vanish in obscurity like Arch and clones... -- Jakub Narebski Poland -- To unsubscribe from this list: send the line "unsubscribe git" in the body of a message to [hidden email] More majordomo info at http://vger.kernel.org/majordomo-info.html |
||||||||||||||||
|
Jakub Narebski
|
In reply to this post
by Felipe Contreras
I'm not sure if Mercurial mailing list is not subscribe only. Git isn't.
On Sun, 26 Sep 2008, Felipe Contreras wrote: > On Sun, Oct 26, 2008 at 4:15 PM, Jakub Narebski <[hidden email]> wrote: > > [Cc: gmane.comp.version-control.git, > > gmane.comp.version-control.mercurial.general] > > 3. Repository design and performance. > > Git and Mercurial have similar performance, although it is thought > > that due to design Mercurial has faster patch applying and is > > optimized for cold cache case, while Git has faster merging and is > > optimized for warm cache case. > > > > Mercurial may have (or had) problems with larger binary files, from > > what I have heard. > > The fact that hg is changeset based means that certain operations are > slower, like checkout a specific commit. In hg my bet is you would > need to gather a bunch of changesets while in git the operation is > done in a single step. Actually from what I have read Mercurial stores current version (snapshot) from time to time, so time to resolve specific commit is limited. Also if you have packed your Git repository (good idea not only to limit size, but also for performance (I/O performance)), then resolving specific commit also might require some delta resolution (by default delta chain length is limited to 50, see pack.depth). > It also means that bare clones are not possible in hg, or at least > very complicated. I think it is things like .hgtags which make bare clones (without working directory) to be hard or even impossible in Mercurial. > Note: I'm not sure if what I'm claiming is correct. Hmmm... -- Jakub Narebski Poland -- To unsubscribe from this list: send the line "unsubscribe git" in the body of a message to [hidden email] More majordomo info at http://vger.kernel.org/majordomo-info.html |
||||||||||||||||
|
Felipe Contreras
|
On Sun, Oct 26, 2008 at 9:07 PM, Jakub Narebski <[hidden email]> wrote:
> I'm not sure if Mercurial mailing list is not subscribe only. Git isn't. > > On Sun, 26 Sep 2008, Felipe Contreras wrote: >> On Sun, Oct 26, 2008 at 4:15 PM, Jakub Narebski <[hidden email]> wrote: >> > [Cc: gmane.comp.version-control.git, >> > gmane.comp.version-control.mercurial.general] > >> > 3. Repository design and performance. > >> > Git and Mercurial have similar performance, although it is thought >> > that due to design Mercurial has faster patch applying and is >> > optimized for cold cache case, while Git has faster merging and is >> > optimized for warm cache case. >> > >> > Mercurial may have (or had) problems with larger binary files, from >> > what I have heard. >> >> The fact that hg is changeset based means that certain operations are >> slower, like checkout a specific commit. In hg my bet is you would >> need to gather a bunch of changesets while in git the operation is >> done in a single step. > > Actually from what I have read Mercurial stores current version > (snapshot) from time to time, so time to resolve specific commit is > limited. Also if you have packed your Git repository (good idea not > only to limit size, but also for performance (I/O performance)), then > resolving specific commit also might require some delta resolution > (by default delta chain length is limited to 50, see pack.depth). Ah, ok, good to know. >> It also means that bare clones are not possible in hg, or at least >> very complicated. > > I think it is things like .hgtags which make bare clones (without > working directory) to be hard or even impossible in Mercurial. Oops, I meant shallow clones (git clone --depth=1). -- Felipe Contreras -- To unsubscribe from this list: send the line "unsubscribe git" in the body of a message to [hidden email] More majordomo info at http://vger.kernel.org/majordomo-info.html |
||||||||||||||||
|
Arne Babenhauserheide-2
|
In reply to this post
by Jakub Narebski
Am Sonntag 26 Oktober 2008 19:55:09 schrieb Jakub Narebski:
> > * Recently, Hg development seems to have somewhat slowed down. To > > simply put it, there is not enough room in the world for several > > similar SCM systems. With git's pace and momentum the other SCMs > > including Hg are fighting an uphill battle. > > The competing _distributed_ version control systems left seems to be > Bazaar-NG (Ubuntu), Mercurial (OpenSolaris, Mozilla), Git (Linux kernel, > Freedesktop.org, Ruby on Rails people). There are many IDEs, many > editors, many web browsers; there is Linux and there are *BSD; I hope > that Mercurial would continue to be developed, and not vanish in > obscurity like Arch and clones... I created a head-to-head code_swarm of Mercurial and Git and it clearly shows that Mercurial development didn't slow down. The code_swarm isn't a fancy one with music and annotations, but I think you'll directly see for yourself what I mean: - http://www.rakjar.de/shared_codeswarm/hg-vs-git-short.avi red is git, blue is Mercurial. It is a result of my shared_codeswarm project with which you can create code_swarms from more than one repository automatically - and update them incrementally, creating new code_swarms of only the new commits in the repositories: - http://www.rakjar.de/shared_codeswarm/project_activity_battle_swarm.html Best wishes, Arne -- My stuff: http://draketo.de - stories, songs, poems, programs and stuff :) -- Infinite Hands: http://infinite-hands.draketo.de - singing a part of the history of free software. -- Ein Würfel System: http://1w6.org - einfach saubere (Rollenspiel-) Regeln. -- PGP/GnuPG: http://draketo.de/inhalt/ich/pubkey.txt |
||||||||||||||||
|
Arne Babenhauserheide-2
|
In reply to this post
by Jakub Narebski
Am Sonntag 26 Oktober 2008 19:55:09 schrieb Jakub Narebski:
> I agree, and I think it is at least partially because of Git having > cleaner design, even if you have to understand more terms at first. What do you mean by "cleaner design"? From what I see (and in my definition of "design"), Mercurial is designed as VCS with very clear and clean design, which even keeps things like streaming disk access in mind. Also, looking at git, git users still have to garbage collect regularly, which shows to me that the design wasn't really cleaner. As an example: If I want some revision in hg, my repository just reads the files in the store, jumps to the latest snapshots, adds the changes after these and has the data. In git is has to check all changesets which affect the file. If you read the hgbook, you'll find one especially nice comment: "Unlike many revision control systems, the concepts upon which Mercurial is built are simple enough that it’s easy to understand how the software really works. Knowing this certainly isn’t necessary, but I find it useful to have a “mental model” of what’s going on." - http://hgbook.red-bean.com/hgbookch4.html I really like that, and in my opinion it is a great compliment to hg, for two reasons: 1) Hg is easy to understand 2) You don't have to understand it to use it And both are indications of a good design, the first of the core, the second of the UI. Best wishes, Arne -- My stuff: http://draketo.de - stories, songs, poems, programs and stuff :) -- Infinite Hands: http://infinite-hands.draketo.de - singing a part of the history of free software. -- Ein Würfel System: http://1w6.org - einfach saubere (Rollenspiel-) Regeln. -- PGP/GnuPG: http://draketo.de/inhalt/ich/pubkey.txt |
||||||||||||||||
|
Jakub Narebski
|
On Mon, 27 Oct 2008, Arne Babenhauserheide wrote:
> Am Sonntag 26 Oktober 2008 19:55:09 schrieb Jakub Narebski: > > > > I agree, and I think it is at least partially because of Git having > > cleaner design, even if you have to understand more terms at first. > > What do you mean by "cleaner design"? Clean _underlying_ design. Git has very nice underlying model of graph (DAG) of commits (revisions), and branches and tags as pointers to this graph. > From what I see (and in my definition of "design"), Mercurial is designed as > VCS with very clear and clean design, which even keeps things like streaming > disk access in mind. I have read description of Mercurial's repository format, and it is not very clear in my opinion. File changesets, bound using manifest, bound using changerev / changelog. Mercurial relies on transactions and O_TRUNC support, while Git relies on atomic write and on updating data then updating reference to data. I don't quite understand comment about streaming disk access... > Also, looking at git, git users still have to garbage collect regularly, which > shows to me that the design wasn't really cleaner. Well, they have to a lot less than they used to, and there is "git gc --auto" that can be put in crontab safely. Explicit garbage collection was a design _decision_, not a sign of not clear design. We can argue if it was good or bad decision, but one should consider the following issues: * Rolling back last commit to correct it, or equivalently amending last commit (for example because we forgot some last minute change, or forgot to signoff a commit), or backing out of changes to the last commit in Mercurial relies on transactions (and locking) and correct O_TRUNC, while in Git it leaves dangling objects to be garbage collected later. * Mercurial relies on transaction support. Git relies on atomic write support and on the fact that objects are immutable; those that are not needed are garbage collected later. Beside IIRC some of ways of implementing transaction in databases leads to garbage collecting. * Explicit packing and having two repository "formats": loose and packed is a bit of historical reason: at the beginning there was only loose format. Pack format was IIRC invented for network transport, and was used for on disk storage (the same format!) for better I/O patterns[1]. Having packs as 'rewrite to pack' instead of 'append to pack' allows to prefer recency order, which result in faster access as objects from newer commits are earlier in delta chain and reduction in size in usual case of size growing with time as recency order allows to use delete deltas. Also _choosing_ base object allows further reduce size, especially in presence of nonlinear history. * From what I understand Mercurial by default uses packed format for branches and tags; Git uses "loose" format for recent branches (meaning one file per branch), while packing older references. Using loose affects performance (and size) only for insane number of references, and only for some operations like listing all references, while using packed format is IMHO a bit error prone when updating. * Git has reflogs which are pruned (expired) during garbage collecting to not grow them without bounds; AFAIK Mercurial doesn't have equivalent of this feature. (Reflogs store _local_ history of branch tip, noting commits, fetches, merges, rewinding branch, switching branches, etc._ [1] You wrote about "streaming disk access". Git relies (for reading) on good mmap implementation. > As an example: If I want some revision in hg, my repository just reads the > files in the store, jumps to the latest snapshots, adds the changes after > these and has the data. If you want to show some revision in Git, meaning commit message and diff in patch format (result of "git show"), Git just reads the commit, outputs commit message, reads parent, reads trees and performs diff. If you want to checkout to specific revision, Git just reads commit, reads tree, and writes this tree (via index) to working area. > In git is has to check all changesets which affect the file. I don't understand you here... if I understand correctly above, then you are wrong about Git. > If you read the hgbook, you'll find one especially nice comment: > > "Unlike many revision control systems, the concepts upon which Mercurial is > built are simple enough that it’s easy to understand how the software really > works. Knowing this certainly isn’t necessary, but I find it useful to have a > “mental model” of what’s going on." > - http://hgbook.red-bean.com/hgbookch4.html > > I really like that, and in my opinion it is a great compliment to hg, for two > reasons: > > 1) Hg is easy to understand Because it is simple... and less feature rich, c.f. multiple local branches in single repository. > 2) You don't have to understand it to use it You don't have to understand details of Git design (pack format, index, stages, refs,...) to use it either. > > And both are indications of a good design, the first of the core, the second > of the UI. Well, Git is built around concept of DAG of commits and branches as references to it. Without it you can use Git, but it is hard. But if you understand it, you can understand easily most advanced Git features. I agree that Mercurial UI is better; as usually in "Worse is Better" case... :-) -- Jakub Narebski Poland -- To unsubscribe from this list: send the line "unsubscribe git" in the body of a message to [hidden email] More majordomo info at http://vger.kernel.org/majordomo-info.html |
||||||||||||||||
|
Leo Razoumov
|
In reply to this post
by Arne Babenhauserheide-2
On 10/26/08, Arne Babenhauserheide <[hidden email]> wrote:
> Am Sonntag 26 Oktober 2008 19:55:09 schrieb Jakub Narebski: > > > > * Recently, Hg development seems to have somewhat slowed down. To > > > simply put it, there is not enough room in the world for several > > > similar SCM systems. With git's pace and momentum the other SCMs > > > including Hg are fighting an uphill battle. > > > > The competing _distributed_ version control systems left seems to be > > Bazaar-NG (Ubuntu), Mercurial (OpenSolaris, Mozilla), Git (Linux kernel, > > Freedesktop.org, Ruby on Rails people). There are many IDEs, many > > editors, many web browsers; there is Linux and there are *BSD; I hope > > that Mercurial would continue to be developed, and not vanish in > > obscurity like Arch and clones... > > > Before we get tangled in this train of thought: > > I created a head-to-head code_swarm of Mercurial and Git and it clearly shows > that Mercurial development didn't slow down. > I am not familiar with code swarms, sorry. My impressions are subjective are thoroughly un-scientific:-) (1) Judging by the activity of mailing lists git community is several times larger and more active in terms of actual submitted patches. (2) Hg forest extension is still not in the tree with outdated and incorrect documentation in the wiki. For me it was biggest reason to migrate from Hg to git. --Leo-- -- To unsubscribe from this list: send the line "unsubscribe git" in the body of a message to [hidden email] More majordomo info at http://vger.kernel.org/majordomo-info.html |
||||||||||||||||
|
Arne Babenhauserheide-2
|
Am Montag 27 Oktober 2008 05:15:11 schrieb Leo Razoumov:
> > I created a head-to-head code_swarm of Mercurial and Git and it clearly > > shows that Mercurial development didn't slow down. > > I am not familiar with code swarms, sorry. My impressions are > subjective are thoroughly un-scientific:-) That's always the case with code_swarms. They only show the commit activity: How often how many files where changed. They aren't a fair comparision but a damn unfair battle relying strongly on development style, programming language (influences the style) and such. What you can see very clearly in them is how activity patterns _change_. And the Mercurial activity doesn't slow down. Instead in the beginning you can see them pacing each other, git always the bigger activity. There was a moment in may this year when git activity had receded to the point where it was equal to Mercurials activity, but it recovered from that. An artifact in Mercurial is that it took an almost two week break in July this year, but apart from that development always rolled on, and in august the commits where coming fast again. The smaller activity can for example be a result of a development style where changes are thouroughly discussed before they get implemented. > (1) Judging by the activity of mailing lists git community is several > times larger and more active in terms of actual submitted patches. This is something which didn't change. Git had higher activity from the start, yet Mercurials actual code paced it well and was faster at some things. Git still has higher activity, but that can simply stem from Mercurial being almost completely done in Python which need less code to do the same work. > (2) Hg forest extension is still not in the tree with outdated and > incorrect documentation in the wiki. For me it was biggest reason to > migrate from Hg to git. Why didn't you instead update the documentation in the wiki? I don't use the forest extension, so I can't judge whether it is fit for inclusion in the tree. But I wrote the group extension and learned that way that writing Mercurial extensions is far easier than I thought. And different from the shell, Python code is platform independent. Best wishes, Arne -- My stuff: http://draketo.de - stories, songs, poems, programs and stuff :) -- Infinite Hands: http://infinite-hands.draketo.de - singing a part of the history of free software. -- Ein Würfel System: http://1w6.org - einfach saubere (Rollenspiel-) Regeln. -- PGP/GnuPG: http://draketo.de/inhalt/ich/pubkey.txt |
||||||||||||||||
|
devnull
|
In reply to this post
by Leo Razoumov
Hello,
On Mon, Oct 27, 2008 at 9:45 AM, Leo Razoumov <[hidden email]> wrote: > (2) Hg forest extension is still not in the tree with outdated and > incorrect documentation in the wiki. For me it was biggest reason to > migrate from Hg to git. There are a few extensions that ought to be part of main hg, I have proposed rdiff and am still waiting to hear. Since hg depends a lot on extensions to extend it (good design), commnly used or useful extensions must be made part of mainstream at a steady pace. Otherwise, new users who are not aware of existence of various extensions will start comparing main hg with git. Since git has most of the features in the core part, hence the comparisons will be not apple to apple. -dhruva -- Contents reflect my personal views only! -- To unsubscribe from this list: send the line "unsubscribe git" in the body of a message to [hidden email] More majordomo info at http://vger.kernel.org/majordomo-info.html |
||||||||||||||||
|
Arne Babenhauserheide-2
|
In reply to this post
by Jakub Narebski
Am Montag 27 Oktober 2008 02:52:22 schrieb Jakub Narebski:
> On Mon, 27 Oct 2008, Arne Babenhauserheide wrote: > > Am Sonntag 26 Oktober 2008 19:55:09 schrieb Jakub Narebski: > > > I agree, and I think it is at least partially because of Git having > > > cleaner design, even if you have to understand more terms at first. > > > > What do you mean by "cleaner design"? > > Clean _underlying_ design. Git has very nice underlying model of graph > (DAG) of commits (revisions), and branches and tags as pointers to this > graph. > > > From what I see (and in my definition of "design"), Mercurial is designed > > as VCS with very clear and clean design, which even keeps things like > > streaming disk access in mind. > > I have read description of Mercurial's repository format, and it is not > very clear in my opinion. File changesets, bound using manifest, bound > using changerev / changelog. inodes and datanodes (the files in the store), organized in directories which keep many files (manifests) bound in changesets which keep additional data. > Mercurial relies on transactions and O_TRUNC support, while Git relies > on atomic write and on updating data then updating reference to data. For most operations Mercurial just relies on appending support. > I don't quite understand comment about streaming disk access... If you tell a disk "give me files a, b, c, d, e, f (of the whole abc)", it is faster then if you tell it "give me files a k p q s t", because the filesystem can easier optimize that call. That's why for example Mercurial avoids hashing filenames. > Well, they have to a lot less than they used to, and there is > "git gc --auto" that can be put in crontab safely. relying on crontab which might not be available in all systems (I only use GNU/Linux, but what about friends of mine who have to use Windows?) > Explicit garbage collection was a design _decision_, not a sign of not > clear design. We can argue if it was good or bad decision, but one > should consider the following issues: > > * Rolling back last commit to correct it, or equivalently amending > last commit (for example because we forgot some last minute change, > or forgot to signoff a commit), or backing out of changes to the > last commit in Mercurial relies on transactions (and locking) and > correct O_TRUNC, while in Git it leaves dangling objects to be > garbage collected later. Linux. > * Mercurial relies on transaction support. Git relies on atomic write > support and on the fact that objects are immutable; those that are > not needed are garbage collected later. Beside IIRC some of ways of > implementing transaction in databases leads to garbage collecting. But Mercurial normally works on standard filesystems, so this isn't the case for normal operations. You culd say, though, that git implements a very simple transaction model: Keep all old data until it gets purged explicitely. > * Explicit packing and having two repository "formats": loose and > packed is a bit of historical reason: at the beginning there was > only loose format. Pack format was IIRC invented for network > transport, and was used for on disk storage (the same format!) for > better I/O patterns[1]. Having packs as 'rewrite to pack' instead > of 'append to pack' allows to prefer recency order, which result in > faster access as objects from newer commits are earlier in delta > chain and reduction in size in usual case of size growing with time > as recency order allows to use delete deltas. Also _choosing_ base > object allows further reduce size, especially in presence of > nonlinear history. Mercurial which doesn't need user interaction. > * From what I understand Mercurial by default uses packed format for > branches and tags; Git uses "loose" format for recent branches > (meaning one file per branch), while packing older references. > Using loose affects performance (and size) only for insane number of > references, and only for some operations like listing all references, > while using packed format is IMHO a bit error prone when updating. As far as I know, Mercurial got that "using packed format" right from the beginning. > * Git has reflogs which are pruned (expired) during garbage collecting > to not grow them without bounds; AFAIK Mercurial doesn't have > equivalent of this feature. > > (Reflogs store _local_ history of branch tip, noting commits, > fetches, merges, rewinding branch, switching branches, etc._ As far as I know Mercurial only tracks the state of the working directory, so it doesn't track your whole local history. But others can better tell you more about that in greater detail. > [1] You wrote about "streaming disk access". Git relies (for reading) > on good mmap implementation. > > > In git is has to check all changesets which affect the file. > > I don't understand you here... if I understand correctly above, > then you are wrong about Git. Might be that I remember incorrectly about what git does. Are its commits "the whole changed file" or "the diff of the changes"? If the latter, it needs to walk back all commits to the snapshot revision to get the file data. One story I experienced with that: My amd64 GNU/Linux box suffers from performance problems when it gets high levels of disk activity (something about the filesystem layer doesn't play well with amd64 - reported by others, too). When I pulled a the Linux kernel repository with git half a year ago, my disk started klicking and the whole computer slowed down to a crawl. When I pulled the same repository data from a Mercurial repository, the computer kept running smooth, the disk stayed silent and happily wrote the data. Mercurial felt smooth, while git felt damn clumsy (though not slow). > > 1) Hg is easy to understand > > Because it is simple... and less feature rich, c.f. multiple local > branches in single repository. That works quite well. People just don't use it very often, because the workflow of having multiple repositories is easier with hg. > > 2) You don't have to understand it to use it > > You don't have to understand details of Git design (pack format, index, > stages, refs,...) to use it either. I remember that to have been incorrect about half a year ago, when I stumbled over many problems in git whenever I tried to do something a bit nonstandard. It took me hours (and in the end asking a friend) to find out about "git checkout ." just to get back my deleted files. The answer I got when I asked why it's done that way was "this is because of the inner workings of git. You should know them if you use it". > > And both are indications of a good design, the first of the core, the > > second of the UI. > > Well, Git is built around concept of DAG of commits and branches as > references to it. Without it you can use Git, but it is hard. But > if you understand it, you can understand easily most advanced Git > features. > > I agree that Mercurial UI is better; as usually in "Worse is Better" > case... :-) Best wishes, Arne -- My stuff: http://draketo.de - stories, songs, poems, programs and stuff :) -- Infinite Hands: http://infinite-hands.draketo.de - singing a part of the history of free software. -- Ein Würfel System: http://1w6.org - einfach saubere (Rollenspiel-) Regeln. -- PGP/GnuPG: http://draketo.de/inhalt/ich/pubkey.txt |
||||||||||||||||
|
Benoit Boissinot
|
In reply to this post
by Jakub Narebski
On Mon, Oct 27, 2008 at 2:52 AM, Jakub Narebski <[hidden email]> wrote:
> On Mon, 27 Oct 2008, Arne Babenhauserheide wrote: >> Am Sonntag 26 Oktober 2008 19:55:09 schrieb Jakub Narebski: >> > >> > I agree, and I think it is at least partially because of Git having >> > cleaner design, even if you have to understand more terms at first. >> >> What do you mean by "cleaner design"? > > Clean _underlying_ design. Git has very nice underlying model of graph > (DAG) of commits (revisions), and branches and tags as pointers to this > graph. Git and Mercurial are very close from that point of view. Mercurial explicitely disallow octopus merges (and we don't think there's a good reason to allow them, although I agree with Linus, they look very nice in gitk ;) ). And we don't have "branches as pointer" in core, but the bookmark extension does that. Appart from that I think the underlying format are interchangeable, someone could use the git format with the hg ui, or use revlogs (the basic format of mercurial) like packs. The only special thing about revlogs is the linkrev stuff, it's a pointer to the first revision that introduced an object, so we can easily find what to send in our network protocol (we don't have to read the manifest, ie the "tree" of objects"). linkrev can be useful to speedup "hg log" too. > I have read description of Mercurial's repository format, and it is not > very clear in my opinion. File changesets, bound using manifest, bound > using changerev / changelog. > just do a s/// with the git terminology: filelog -> blob manifest -> tree changelog -> commit object regards, Benoit -- To unsubscribe from this list: send the line "unsubscribe git" in the body of a message to [hidden email] More majordomo info at http://vger.kernel.org/majordomo-info.html |
||||||||||||||||
|
Jakub Narebski
|
In reply to this post
by Arne Babenhauserheide-2
On Mon, 27 Oct 2008, Arne Babenhauserheide wrote:
> Am Montag 27 Oktober 2008 02:52:22 schrieb Jakub Narebski: >> On Mon, 27 Oct 2008, Arne Babenhauserheide wrote: >>> Am Sonntag 26 Oktober 2008 19:55:09 schrieb Jakub Narebski: >>>> >>>> I agree, and I think it is at least partially because of Git having >>>> cleaner design, even if you have to understand more terms at first. >>> >>> What do you mean by "cleaner design"? >>> From what I see (and in my definition of "design"), Mercurial is designed >>> as VCS with very clear and clean design, which even keeps things like >>> streaming disk access in mind. >> >> I have read description of Mercurial's repository format, and it is not >> very clear in my opinion. File changesets, bound using manifest, bound >> using changerev / changelog. > > This grows very simple if you keep common filesystem layout in mind. > > inodes and datanodes (the files in the store), organized in directories which > keep many files (manifests) bound in changesets which keep additional data. Well, for you it might be simple, for others it is binding things together with duct tape and spit. (I am exaggerating here). What Mercurial repository design did not get correctly, in my opinion is its handling of tags and [named] branches. >> I don't quite understand comment about streaming disk access... > > If you tell a disk "give me files a, b, c, d, e, f (of the whole abc)", it is > faster then if you tell it "give me files a k p q s t", because the filesystem > can easier optimize that call. I would expect _good_ filesystem to be able to optimize this call as well. As I said it looks like Mercurial and Git are optimized for different cases: Git relies on filesystem for caching, and optimizes for warm cache performance. > > That's why for example Mercurial avoids hashing filenames. First, git does not hash filenames. The hash is contents, not of name. You can say it stores objects (in loose format) in hash-based filenames. Second, in packed repository you don't have to ask filesystem to "give me files a, k, p, q, s, t (of the whole abc)"; you ask filesystem to mmap a _single_ pack file (well, almost, there is also pack index to mmap). Yes, that means that you should periodically repack for better performance... but currently git tries to use packed format as much as possible, keeping packs from network if they are not too small, repacking if creating large number of objects, etc. >> Well, they have to a lot less than they used to, and there is >> "git gc --auto" that can be put in crontab safely. > > relying on crontab which might not be available in all systems (I only use > GNU/Linux, but what about friends of mine who have to use Windows?) So they would have to either periodically repack by hand, or use some crontab equivalent on MS Windows. But that doesn't matter in the context of this discussion, which is DragonflyBSD; worse or better support for MS Windows doesn't matter here, does it? > >> Explicit garbage collection was a design _decision_, not a sign of not >> clear design. We can argue if it was good or bad decision, but one >> should consider the following issues: >> >> * Rolling back last commit to correct it, or equivalently amending >> last commit (for example because we forgot some last minute change, >> or forgot to signoff a commit), or backing out of changes to the >> last commit in Mercurial relies on transactions (and locking) and >> correct O_TRUNC, while in Git it leaves dangling objects to be >> garbage collected later. > > As far as I know the only problem with O_TRUNC was that it sadly had bugs in > Linux. > >> * Mercurial relies on transaction support. Git relies on atomic write >> support and on the fact that objects are immutable; those that are >> not needed are garbage collected later. Beside IIRC some of ways of >> implementing transaction in databases leads to garbage collecting. > > But Mercurial normally works on standard filesystems, so this isn't the case > for normal operations. Mercurial implements transactions as a way to keeping operations atomic. So I don't know what you mean by "normally works on standard filesystem" here. > > You could say, though, that git implements a very simple transaction model: > Keep all old data until it gets purged explicitely. Git just uses different way to keep operations atomic, different way of implementing transactions. I'm not sure if I should have mentioned transactions in databases here. Oh, well... Note however that there are advanced way of doing transactions in relational databases which lead to dangling things to be purged when transaction is interrupted. But this is not to the point... > >> * Explicit packing and having two repository "formats": loose and >> packed is a bit of historical reason: at the beginning there was >> only loose format. Pack format was IIRC invented for network >> transport, and was used for on disk storage (the same format!) for >> better I/O patterns[1]. Having packs as 'rewrite to pack' instead >> of 'append to pack' allows to prefer recency order, which result in >> faster access as objects from newer commits are earlier in delta >> chain and reduction in size in usual case of size growing with time >> as recency order allows to use delete deltas. Also _choosing_ base >> object allows further reduce size, especially in presence of >> nonlinear history. > > So having multiple packs is equivalent to the automatic snapshot system in > Mercurial which doesn't need user interaction. Snapshot system doesn't change the fact that Mercurial (from what I understand) implements forward deltas, from older version to never version, and not from newer version to older. Also from what I remember Mercurial didn't implement deltification right from the start; it had problems with nonlinear history (it used delta from last version appended, not from the parent version). >> * From what I understand Mercurial by default uses packed format for >> branches and tags; Git uses "loose" format for recent branches >> (meaning one file per branch), while packing older references. >> Using loose affects performance (and size) only for insane number of >> references, and only for some operations like listing all references, >> while using packed format is IMHO a bit error prone when updating. > > As far as I know, Mercurial got that "using packed format" right from the > beginning. And probably requires transactions and locks for that. Git simply uses atomic write solution for atomic update of references. > >> * Git has reflogs which are pruned (expired) during garbage collecting >> to not grow them without bounds; AFAIK Mercurial doesn't have >> equivalent of this feature. >> >> (Reflogs store _local_ history of branch tip, noting commits, >> fetches, merges, rewinding branch, switching branches, etc._ > > As far as I know Mercurial only tracks the state of the working directory, so > it doesn't track your whole local history. > > But others can better tell you more about that in greater detail. Reflogs are very useful, and are natural extension of simple rollback last transaction Mercurial has (which Git had equivalent from the very beginning in the form of ORIG_HEAD). They allow for example for you go back to the state before incorrect rewinding a branch, or before applying series of patches from email, etc. >> [1] You wrote about "streaming disk access". Git relies (for reading) >> on good mmap implementation. >> >>> In git is has to check all changesets which affect the file. >> >> I don't understand you here... if I understand correctly above, >> then you are wrong about Git. > > Might be that I remember incorrectly about what git does. > > Are its commits "the whole changed file" or "the diff of the changes"? > > If the latter, it needs to walk back all commits to the snapshot revision to > get the file data. Git is snapshot based SCM, although 'behind the scenes' it uses deltas in the pack format. So to get file data at given revision (i.e. to do something like "git show <revision>:<filename>") it needs to access <revision>, access its tree, and access contents of a file (blob). Behind the scenes, at a lower level, Git does necessary delta resolving. Delta chains in packs have limited length (as they have in Mercurial). > One story I experienced with that: > > My amd64 GNU/Linux box suffers from performance problems when it gets high > levels of disk activity (something about the filesystem layer doesn't play > well with amd64 - reported by others, too). > > When I pulled a the Linux kernel repository with git half a year ago, my disk > started klicking and the whole computer slowed down to a crawl. > > When I pulled the same repository data from a Mercurial repository, the > computer kept running smooth, the disk stayed silent and happily wrote the > data. > > Mercurial felt smooth, while git felt damn clumsy (though not slow). The answer usually is: did you have this repository packed? I admit that it might be considered one of disadvantages of git, this having to do garbage collection from time to time... just like in C ;-) >>> 1) Hg is easy to understand >> >> Because it is simple... and less feature rich, c.f. multiple local >> branches in single repository. > > That works quite well. People just don't use it very often, because the > workflow of having multiple repositories is easier with hg. Workflow of having multiple repositories, or one branch per repository, is IMHO as simple in Git as in Mercurial, and as in Bazaar-NG. >>> 2) You don't have to understand it to use it >> >> You don't have to understand details of Git design (pack format, index, >> stages, refs,...) to use it either. > > I remember that to have been incorrect about half a year ago, when I stumbled > over many problems in git whenever I tried to do something a bit nonstandard. > > It took me hours (and in the end asking a friend) to find out about > > "git checkout ." > > just to get back my deleted files. > > The answer I got when I asked why it's done that way was "this is because of > the inner workings of git. You should know them if you use it". Well, understanding "git checkout ." doesn't require understanding inner workings of git. Your friend was incorrect here. I'll agree though that it is a bit of quirk in UI[1] (but I use usually "git reset --hard" to reset to last committed state). [1] Having git-checkout behave very differently with and without pathname parameter, and overloading of git-checkout. >>> And both are indications of a good design, the first of the core, the >>> second of the UI. >> >> Well, Git is built around concept of DAG of commits and branches as >> references to it. Without it you can use Git, but it is hard. But >> if you understand it, you can understand easily most advanced Git >> features. >> >> I agree that Mercurial UI is better; as usually in "Worse is Better" >> case... :-) > > What do you mean with that? Just Google for "Worse is Better". But what I actually mean that Git feature set and UI has evolved from very bare-bones plumbing, adding features and UI _as needed_, instead of being designed according to what designer thought it was needed. For example in http://gitster.livejournal.com/9970.html Junio C Hamano (git maintainer) writes: By the time the basic structure as we currently know has stabilized, we had help from literally dozens of contributors to add many things on top of the very original version: [...] * We did not envision that multiple branches in a single repository would turn out to be such a useful way to work, and did not have support for switching branches. [...] It still is amazing that all of these were done without having to go back to the drawing board. It shows how sound the initial conceptual design was. P.S. See "Innovations in git", http://gitster.livejournal.com/16077.html -- Jakub Narebski Poland -- To unsubscribe from this list: send the line "unsubscribe git" in the body of a message to [hidden email] More majordomo info at http://vger.kernel.org/majordomo-info.html |
||||||||||||||||
|
Leslie P. Polzer
|
> I'm not sure if I should have mentioned transactions in databases here. > Oh, well... Note however that there are advanced way of doing > transactions in relational databases which lead to dangling things > to be purged when transaction is interrupted. For the record: transactions are applicable to all kinds of databases, not only relational ones. Leslie -- To unsubscribe from this list: send the line "unsubscribe git" in the body of a message to [hidden email] More majordomo info at http://vger.kernel.org/majordomo-info.html |
||||||||||||||||
|
Arne Babenhauserheide-2
|
In reply to this post
by Jakub Narebski
Am Montag 27 Oktober 2008 10:41:53 schrieb Jakub Narebski:
> > If you tell a disk "give me files a, b, c, d, e, f (of the whole abc)", > > it is faster then if you tell it "give me files a k p q s t", because the > > filesystem can easier optimize that call. > > I would expect _good_ filesystem to be able to optimize this call as > well. As I said it looks like Mercurial and Git are optimized for > different cases: Git relies on filesystem for caching, and optimizes > for warm cache performance. The problem is by which knowledge the filesystem should optimize this call when it is storing the files in the first place. > > relying on crontab which might not be available in all systems (I only > > use GNU/Linux, but what about friends of mine who have to use Windows?) > > But that doesn't matter in the context of this discussion, which is > DragonflyBSD; worse or better support for MS Windows doesn't matter > here, does it? It only matters, if some developers are forced to work on WIndows machines at times. > > But Mercurial normally works on standard filesystems, so this isn't the > > case for normal operations. > > Mercurial implements transactions as a way to keeping operations atomic. > So I don't know what you mean by "normally works on standard filesystem" > here. I just meant "databases are a bit off topic" :) > > You could say, though, that git implements a very simple transaction > > model: Keep all old data until it gets purged explicitely. > > Git just uses different way to keep operations atomic, different way > of implementing transactions. That's what I wanted to express. > And probably requires transactions and locks for that. Git simply uses > atomic write solution for atomic update of references. Doesn't atomic write also need locks, though on a lower level (to ensure atomicity)? > Behind the scenes, at a lower level, Git does necessary delta resolving. > Delta chains in packs have limited length (as they have in Mercurial). So both do snapshots - they seem more and more similar to me :) > The answer usually is: did you have this repository packed? I admit > that it might be considered one of disadvantages of git, this having > to do garbage collection from time to time... just like in C ;-) I cloned from the official repositories. I hope Linus had his repository packed :) > Well, understanding "git checkout ." doesn't require understanding > inner workings of git. Your friend was incorrect here. I'll agree > though that it is a bit of quirk in UI[1] (but I use usually > "git reset --hard" to reset to last committed state). Damn - one more way how I could have archieved what I wanted... one more way I didn't find. > Just Google for "Worse is Better". But what I actually mean that Git > feature set and UI has evolved from very bare-bones plumbing, adding > features and UI _as needed_, instead of being designed according to > what designer thought it was needed. And that's how it feels to me. A great testing ground, but it developed too many stumbling blocks which keep me from trying things. When I now use git, I only do the most basic operations: clone, pull, push, add, commit, checkout. When anything else arises, I check if it is worth the risk of having to read up for hours - and since that wasn't the case for the last few months, I then just ignore the problem or ask someone else if he can fix it. As a contrast, when I encounter a problem with Mercurial, I simply check the commands for a moment and then try to solve it, and normally I have what I wanted within seconds to minutes. Git instead bit me once too often. I know that this isn't something which hits everyone and that it is subjective, but since it hit me, I'm wary of git, because in my view it isn't something for the majority of people - and you almost always have someone from that "majority" in your project. I don't want people getting afraid of solving their own problems, so I avoid systems which bite so often, that they create fear (for example of losing much time on something which should be a side issue). All in all it's a UI issue - while the git UI bit me quite often, the Mercurial UI just works. Best wishes, Arne -- My stuff: http://draketo.de - stories, songs, poems, programs and stuff :) -- Infinite Hands: http://infinite-hands.draketo.de - singing a part of the history of free software. -- Ein Würfel System: http://1w6.org - einfach saubere (Rollenspiel-) Regeln. -- PGP/GnuPG: http://draketo.de/inhalt/ich/pubkey.txt |
||||||||||||||||
|
Jakub Narebski
|
In reply to this post
by Benoit Boissinot
Dnia poniedziałek 27. października 2008 10:29, Benoit Boissinot napisał:
> On Mon, Oct 27, 2008 at 2:52 AM, Jakub Narebski <[hidden email]> wrote: >> On Mon, 27 Oct 2008, Arne Babenhauserheide wrote: >>> Am Sonntag 26 Oktober 2008 19:55:09 schrieb Jakub Narebski: >>>> >>>> I agree, and I think it is at least partially because of Git having >>>> cleaner design, even if you have to understand more terms at first. >>> >>> What do you mean by "cleaner design"? >> >> Clean _underlying_ design. Git has very nice underlying model of graph >> (DAG) of commits (revisions), and branches and tags as pointers to this >> graph. > > Git and Mercurial are very close from that point of view. > > Mercurial explicitely disallow octopus merges (and we don't think there's > a good reason to allow them, although I agree with Linus, they look very nice > in gitk ;) ). From what I see Mercurial disallows octopus merges (merges with more than two parents) because of its rigid-record database repository design, while Git is more like object database. Fixed width records of VMS vs delimited records of Unix... There is simply place on zero, one or two parents (two parent fields, which can be null) in Mercurial changerev format. By the way flexibility of Git design allowed to add 'encoding' header to commit message (if commits message is encoded not in utf-8) after the fact, without affecting older repository data, and playing well with old git installations which do not understand this header. > And we don't have "branches as pointer" in core, but the bookmark > extension does that. I disagree. Mercurial implementation of tags is strange, and from what I remember and from discussion on #revctrl implementation of local named branches is also strange (CVS-like). They are IMHO not well designed. Also the 'hidden' branches after fetching from remote repository (hg pull) but before merging (hg update) are IMHO worse design than explicit remote-tracking branches in Git, especially in presence of multiple [named] branches in repositories. > Apart from that I think the underlying format are interchangeable, > someone could use the git format with the hg ui, or use revlogs > (the basic format of mercurial) like packs. I don't think so. The 'content addressed filesystem' idea of Git is quite pervasive along Git implementation and Git thoughtflows. > > The only special thing about revlogs is the linkrev stuff, it's a > pointer to the first revision that introduced an object, so we can > easily find what to send in our network protocol (we don't have to > read the manifest, ie the "tree" of objects"). linkrev can be useful > to speedup "hg log" too. At first I thought: what a nice idea... but then I realized that in distributed environment there is no way to define "first revision that introduced an object". Take for example the following history (independent introduction): .---.---.---.---x---.---.---. \ --x---.---. where both 'x' have the same version of an object. The top branch appeared first in current repository, but the bottom branch had 'x' with earlier timestamp (earlier authordate). Git just relies on the fact that traversing revision is a part of it that is heavily optimized and really fast. Git very much by design doesn't store any backlinks in repository object database. >> I have read description of Mercurial's repository format, and it is not >> very clear in my opinion. File changesets, bound using manifest, bound >> using changerev / changelog. >> > > just do a s/// with the git terminology: > filelog -> blob > manifest -> tree > changelog -> commit object True. But as I see it they are bound in reverse order in Mercurial: deltas are stored in filelog, filelogs are bound together in manifest, manifest are bound using changelog, while in Git commit object references tree (and parents), trees references blobs, and blob store content of a file. But that might be just my impression. ....................................................................... By the way, going back to the matter of choosing version control system for DragonflyBSD; some time ago I have written post * "Mercurial's only true "plugin" extension: inotify... and can it be done in Git?" http://thread.gmane.org/gmane.comp.version-control.git/76661 (current answer: it is possible using 'assume unchanged' bit) about how nearly every Mercurial extension has equivalent functionality in Git. But what about the reverse, about the following features and issues in Mercurial: * Merging in presence of criss-cross merges[1], and in presence of file renames, i.e what merge-recursive does in Git. * git-rerere, reusing recorded resolution of conflicted merges. Resolving the same merge happens often if you use topic branches and trial merging. * git-grep that allows you to "and" the match criteria together, and also pick a file (not a line) that matches all the criteria; and of course allow searching given revision and not only working directory. * pickaxe search (git log -S) which contrary to blame/annotate allow to find commit which _deleted_ given fragment. * easy management of multiple repositories you fetch from with remote-tracking branches and git-remote command. * blame that follows block-of-line movement (it was invented by Linus as a vision long time ago, but it took very long time to materialize). * a way to review merge resolution, something that is done in git by using combined diff format * git-stash, allowing to stash away changes to go back to them later; it allows to stash away even partially resolved merge conflict (merge resolution in progress). * git-filter-branch (based on cg-admin-rewrite-hist), which allow to rewrite history for example to remove file which should never be added to version control (for example because of copyright or license). References: =========== [1] http://revctrl.org/CrissCrossMerge BTW I wonder why reverting spam is made so hard on revctrl.org wiki -- Jakub Narebski Poland -- To unsubscribe from this list: send the line "unsubscribe git" in the body of a message to [hidden email] More majordomo info at http://vger.kernel.org/majordomo-info.html |
||||||||||||||||
| Free Embeddable Forum Powered by Nabble | Help |