Mercurial + NetBeans Training - Frequently Asked Questions


Q: So is hg ci more or less like cvs ci?

A: Not really. Hg commits are always local. You eventually need to push one or commits.


Q: I have to make a separate checkin for each merge?

A: Yes.

Q: ...even if the other person modified totally unrelated files?

A: Yes.

Q: Is there a point to this? I don't have to do this in CVS.

A: CVS does an implicit merge whenever you do an update and you have modified files. It does not record the state of your working dir before this implicit merge. If you had things working perfectly and then someone else's change spoiled it, you cannot go back to where you were and record that. Hg always records your commit as you actually made it. It also records the commit as merged with other people's work. Most of the time your change will work fine even after merging. But if it does not, you can always trace the problem back to the merge.

Q: Won't there be a lot of contention if every commit also needs to merge?

A: If everyone pushes immediately after they commit to a central repo, then yes. If you wait to push commits until after you have tested them some locally, then you will probably only need to do one merge for the whole batch. If you work mostly in a team repository, there will be much less contention.

Q: Won't contention slow down work right before a feature freeze (the "crunch")?

A: Maybe.

Q: Do I need to retest after every merge?

A: Up to you. Probably not in most cases. If the merge looked suspicious then yes.

Repository size

Q: The (main) repository sounds pretty big. Is it?

A: The download of a compressed bundle is only 133 Mb currently. The .hg history unpacked is 550 Mb. The working copy is 1344 Mb (unbuilt). When you make local clones, the history is shared but the working copy is not. (This is because some editing tools fail to break hardlinks.)

Q: So everyone has to download all this?

A: You can easily set up a local mirror. You can even just clone your colleague's repository to get started. After cloning, just set the default pull path to the remote server, and pull any outstanding changesets.

Layout of main repo

Q: So there won't be any more directory with all the UML or Visual Web modules?

A: No, one top-level dir per module.

Q: Reason?

A: Simplify lookup of sources for a given module. CVS layout was in many cases arbitrary.

Q: Can we have some kind of grouping at top level?

A: TBD. Do not want to have special-case grouping for just some modules. Could group by cluster, though modules do sometimes move from cluster to cluster, and clusters do sometimes get split apart. (Can move a module easily in Hg though repo size will increase a bit as a result.)

Q: Is the layout final?

A: Not until the switch. Hudson project runs every night so different policies can be previewed. The current Hg repos are throwaway test repos.

Not logged in. Log in, Register

By use of this website, you agree to the NetBeans Policies and Terms of Use. © 2012, Oracle Corporation and/or its affiliates. Sponsored by Oracle logo