SCM FAQ
From Genunix
Questions/Answers
Q: How do I reparent a workspace in Mercurial?
A: hg reparent. It's part of the Cadmium extensions. If you haven't yet run /opt/onbld/bin/hgsetup, you should.
Q: How do I set up email notification for pushes for a project gate?
A: Browse around in http://src.opensolaris.org/source/xref/scm-migration/onnv-gk-tools/
Q: Is there a good filemerge gui for Mercurial?
A: You can still use filemerge from Teamware. Put the following inside your .hgrc:
[merge-tools] filemerge.gui=True filemerge.args=-a $base $local $other $output filemerge.priority=1 filemerge.premerge=false meld.gui=True meld.priority=0
And make sure that filemerge is in your $PATH:
% which filemerge /ws/onnv-tools/teamware/bin/filemerge %
Q: What's the Mercurial/hg equivalent for wx redelget?
A: The hg recommit command supports collapsing into a single changeset. The -m argument can be left out, in which case Mercurial will invoke $EDITOR on a buffer seeded with the comments from all the change sets it's coalescing. To manage multiple change sets, you'll need to go to a multiple repository scheme. This is one reason to not recommit until the very last moment: you can do your bug updates based on diffs from separate change sets. (That, and it's almost always useful to keep development/merge/code review changes separate.)
Q: I have two change sets, one for each of the two bug fixes, in my Mercurial repo. Is it OK to push two change sets?
A: Yes, since "hg pbchk" is happy.
Q: Can I run Mercurial on Solaris 10, or will I have problems?
A: Mercurial runs on Solaris 10, but it's not bundled; you'll have to install it yourself. Tools support like Cadmium and webrev is part of onnv-tools, which assumes that you're running Nevada.
Q: How do I avoid having to enter my passphrase all the time?
A: See the ssh-agent(1) and ssh-add(1) man pages.
Q: I just added or changed my ssh key. How long do I need to wait for it to be recognized?
A: Five minutes.
Q: I entered my ssh key and I waited for it to propagate, but it doesn't work. Now what?
A: First try to determine if it's an ssh issue or something else. If you can ssh to poll.opensolaris.org, the problem is not with ssh or your key.
If you've ruled out ssh/key problems, make sure you have commit access to at least one repository. If you don't, you won't have an account on the SCM server; use the "anon" login instead.
If you can't ssh to poll.opensolaris.org, make sure you didn't include extra whitespace, such as trailing blanks or newlines, when you entered your ssh key.
If you're still stuck, ask on the opensolaris-help list for help.
Q: How to add separate comments/bugids for individual files?
A: Only by keeping them in separate changesets. The recommit supported by the tools will collapse everything into one changeset, combining the comments along the way.
Q: For local project gate,how to I setup notification for every pull/push to the project gate?
A: See the hooks in ssh://anon@hg.opensolaris.org//hg/scm-migration/onnv-gk-tools,but
> don't enable any of them on your repo until you know what they do, and have made sure they
won't be sending mail to/from the ON gatekeepers,and that you won't attempt to push to the onnv-gate
repo on opensolaris.org.
OR
You can also use the notify extension to mercurial, which is documented in
the source in /usr/lib/python2.4/vendor-packages/hgext/notify.py.
Q: Do I need to setup/configure anything for multiple folks to integrate their changes into the project gate?
A: No, as long as you don't setup any hooks that might cause a transaction to be rolled back. If you do that, you'll want to consider a gate/clone arrangement, with the gate write-only and the clone read-only.
Other Information/Pointers
This note tells you where things like the gate and clone live now:
These three notes kind of go together. They tell you how the gate and clone work, how to access the gate, and how to go about pushing your changes:
- Flag day: Mercurial: What to expect: gate and clone changes
- Flag day: Mercurial: What to expect: ssh access to the gate
- Heads up: Mercurial: What to expect: Pushing your changes
If you're having trouble with errors about trust, or you're confused about what to do with SCCS keywords and ident lines, or you don't know how to delete a file in Mercurial, then read this:
If you're getting errors about unrecognized Mercurial commands, you need to make sure you have the latest tools AND that you have run hgsetup(1):
If you're trying to convert a Teamware workspace, start with the manpage for wx2hg(1):
- man -M /opt/onbld/man wx2hg
...and check out Mike Kupfer's blog about this topic:
..and if you're having teamware/Mercurial sync issues, and you're using -t to specify an existing Mercurial repository, you should probably also be using -r onnv_96 to make sure you get the Mercurial revision that corresponds to the last Teamware update.
