git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "Eric S. Raymond" <esr@thyrsus.com>
To: Max Horn <postbox@quendi.de>
Cc: Michael Haggerty <mhagger@alum.mit.edu>,
	Yann Dirson <ydirson@free.fr>, Heiko Voigt <hvoigt@hvoigt.net>,
	Antoine Pelisse <apelisse@gmail.com>,
	Bart Massey <bart@cs.pdx.edu>, Keith Packard <keithp@keithp.com>,
	David Mansfield <david@cobite.com>,
	git@vger.kernel.org
Subject: Re: cvsps, parsecvs, svn2git and the CVS exporter mess
Date: Sat, 5 Jan 2013 10:11:07 -0500	[thread overview]
Message-ID: <20130105151106.GA1938@thyrsus.com> (raw)
In-Reply-To: <1E7F9F86-F040-42E4-98C4-152B8CCE47CE@quendi.de>

Max Horn <postbox@quendi.de>:
> Hm, you snipped this part of Michael's mail:
> 
> >> However, if that is a
> >> problem, it is possible to configure cvs2git to write the blobs inline
> >> with the rest of the dumpfile (this mode is supported because "hg
> >> fast-import" doesn't support detached blobs).
> 
> I would call "hg fast-import" a main potential customer, given that there "cvs2hg" is another part of the cvs2svn suite. So I can't quite see how you can come to your conclusion above...

Perhaps I was unclear.  I consider the interface design error to
be not in the fact that all the blobs are written first or detached,
but rather that the implementation detail of the two separate journal
files is ever exposed.

I understand why the storage of intermediate results was done this
way, in order to decrease the tool's working set during the run, but
finishing by automatically concatenating the results and streaming
them to stdout would surely have been the right thing here.
 
The downstream cost of letting the journalling implementation be
exposed, instead, can be seen in this snippet from the new git-cvsimport
I've been working on:

    def command(self):
        "Emit the command implied by all previous options."
        return "(cvs2git --username=git-cvsimport --quiet --quiet --blobfile={0} --dumpfile={1} {2} {3} && cat {0} {1} && rm {0} {1})".format(tempfile.mkstemp()[1], tempfile.mkstemp()[1], self.opts, self.modulepath)

According to the documentation, every caller of csv2git must go
through analogous contortions!  This is not the Unix way; if Unix
design principles had been minimally applied, that second line would
just read like this:

     return "cvs2git --username=git-cvsimport --quiet --quiet"

If Unix design principles had been thoroughly applied, the "--quiet
--quiet" part would be unnecessary too - well-behaved Unix commands
*default* to being completely quiet unless either (a) they have an
exceptional condition to report, or (b) their expected running time is
so long that tasteful silence would leave users in doubt that they're
working.

(And yes, I do think violating these principles is a lapse of taste when
git tools do it, too.)

Michael Haggerty wants me to trust that cvs2git's analysis stage has
been fixed, but I must say that is a more difficult leap of faith when
two of the most visible things about it are still (a) a conspicuous
instance of interface misdesign, and (b) documentation that is careless and
incomplete.
-- 
		<a href="http://www.catb.org/~esr/">Eric S. Raymond</a>

  reply	other threads:[~2013-01-05 15:11 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-12-22 17:36 cvsps, parsecvs, svn2git and the CVS exporter mess Eric S. Raymond
2012-12-23 20:21 ` Heiko Voigt
2012-12-23 22:45   ` Eric S. Raymond
2013-01-03 15:37 ` Michael Haggerty
2013-01-03 20:53   ` Eric S. Raymond
2013-01-05  8:27     ` Max Horn
2013-01-05 15:11       ` Eric S. Raymond [this message]
2013-01-05 22:57         ` Jonathan Nieder
2013-01-06 11:15         ` Michael Haggerty
     [not found]       ` <CAA6gtpky9JxFDdpLM6kY9su-9FWX8RoWHU4uptd_Zk+ZJuhrtA@mail.gmail.com>
2013-01-05 15:58         ` Eric S. Raymond
2013-01-03 15:51 ` Martin Langhoff

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20130105151106.GA1938@thyrsus.com \
    --to=esr@thyrsus.com \
    --cc=apelisse@gmail.com \
    --cc=bart@cs.pdx.edu \
    --cc=david@cobite.com \
    --cc=git@vger.kernel.org \
    --cc=hvoigt@hvoigt.net \
    --cc=keithp@keithp.com \
    --cc=mhagger@alum.mit.edu \
    --cc=postbox@quendi.de \
    --cc=ydirson@free.fr \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).