Alan Mackenzie writes:
Hi, XEmacs.
When I do "hg commit", I get the error message
abort: no username supplied (see "hg help config")
In ~/.hgrc, I suggest:
----------------------------------------------------------------
[ui]
username = Alan Mackenzie <acm(a)muc.de>
ignore = ~/.hgglobalignore
[extensions]
hgext.mq =
hgext.hgk =
----------------------------------------------------------------
The username line is what you asked for (look Ma, no quotes!).
I don't recall any other configuration gotchas. The other lines are
suggested conveniences.
In .hgglobalignore (a deliberately clumsy name to avoid collisions), I
suggest regexps matching Emacs backups and autosave files (if you keep
them in the same directory as the edited files), as well as VC
detritus. These are things you want to ignore, but are (somewhat)
personal to you rather than related to the projects you work on. I
*think* the following should do the trick:
----------------------------------------------------------------
.*~$
\#.*\#$
.*\.rej$
.*\.orig$
----------------------------------------------------------------
but I don't actually use the feature myself (for shame!) so I'm not
100% sure of the syntax. (Specifically I forget if the hashes need to
be quoted; git allows comments in ignore files but I forget if hg
does.) If you have private naming conventions for personal use files
that should never be added to VC (eg, I tend to name build directories
with a leading "+" such as "+optimized" and temporary files such as
log messages with a leading "," like ",msg"), you can put those in
here too. This allows you to avoid polluting the project ignore file
with such things.
The "mq" extension enables Mercurial queues. This is convenient (but
not as convenient as git stash or bzr shelve) when you've got some
Real Work in progress that you don't really want to commit, and an
unrelated typo or something:
<save file>
hg new tmp
<fix typo and save file>
hg new -m "Fix typo." typo
hg qpop # now you're back where you were in Real Work
<finish Real Work and save file>
hg qrefresh -m "Appropriate log message for commit."
hg qfinish # converts mq patch into a real commit with the above
# log message
hg qpush
hg qfinish # converts typo patch into a real commit with the
# "Fix typo." log message
If that workflow looks too annoying, I'm sure there is something
closer to bzr shelves. I use mq personally to organize my real work
(cf recent discussion on emacs-devel of pipelines and looms). Since
mq provides named patches, it's almost like tiny branches. It does
obey a stack discipline (so why do they call it "queues?" :-), but you
can use more advanced features like guards and collapsing to achieve
any combination of patches you like. But I won't be offended if you
don't use it. :-)
The "hgk extension" enables the "hg view" command, which provides a
graphical browser for the DAG similar to gitk. Just try it, you'll
see. It may not be terribly useful for you in the XEmacs context,
since the repo should have a linear history, but even there it can be
a convenient way to access diffs and logs.
There may be better alternatives than the above for you, but they're
probably better than nothing.
_______________________________________________
XEmacs-Beta mailing list
XEmacs-Beta(a)xemacs.org
http://lists.xemacs.org/mailman/listinfo/xemacs-beta