[Python-Dev] Mercurial conversion repositories

Cameron Simpson cs at zip.com.au
Sat Feb 26 01:04:59 CET 2011


On 25Feb2011 14:43, Barry Warsaw <barry at python.org> wrote:
| [...]  And I have to
| remember to fiddle with .hg/hgrc when I clone a new branch working directory,
| but I guess that's mostly a one-time cost.

Hmm. Why do you need to fiddle with the hgrc? Just curious.

| I'll have to remember that 'hg pull' does not update the working copy by
| default, and eventually I'll figure out the whole merge thing.

"hg fetch" does though. That's my usual incanation.

| One immediate thing that I'm missing from Bazaar is that 'bzr commit' invokes
| my editor and always shows me a 'diff -u' in the commit message buffer.  This
| is incredibly handy because I don't have to remember to do the diff in a
| different window, and I always have all the information I want right there to
| craft the commit message.  It doesn't look like this is possible with 'hg
| commit' though, right?

CVS had that problem. I had a wrapper somewhere that masquerades as
$EDITOR and writes a diff into the commit buffer as you describe.
[ Digs through my hg repository... ] 
Ok; then it took the form of a script called "cvscommit" that set
$EDITOR to the command "cvscommit-editor", wrote the diff stuff,
invoked "cvs commit". That ran "cvscommit-editor", which invoked the old
$EDITOR and off you went.

I would think editing the hgrc to set the hg editor and using the commit
hooks would streamline this for Mercurial so you could do the usual "hg
commit" command without going through the outer wrapper.

I'll devote a little time today, since I've missed this little hack:-(

Interested?

Cheers,
-- 
Cameron Simpson <cs at zip.com.au> DoD#743
http://www.cskk.ezoshosting.com/cs/

We don't just *borrow* words; on occasion, English has pursued other
languages down alleyways to beat them unconscious and rifle their pockets for
new vocabulary. - James D. Nicoli


More information about the Python-Dev mailing list