Patch for commit messages with an editor
Johan Rydberg
jrydberg at gnu.org
Mon May 23 14:05:07 BST 2005
Torsten Marek <shlomme at gmx.net> writes:
> Hello bzr-ng devs,
>
> I made a little patch which enables bzr to start an editor if no
> commit message is specified by --file or --msg. Surely not all
> quirks are worked out yet (I just "ported" it from 0.0.4 to the
> development branch), but I find it much more convenient like that.
I think it looks good. I have one comment though. It should not be
possible to generalize it a bit further. There is a possible chance
that we would need to spawn an editor for other things than just "bzr
commit".
> + def names():
> + for i in itertools.count():
> + yield ".bzr-commit.%i" % (i,)
> +
> + try:
> +
> + # get name which is unused
> + for n in names():
> + if not os.path.exists(n):
> + msgfilename = n
> + break
> +
Why not use a temporary name instead?
~j
More information about the bazaar
mailing list