From: Pavel Roskin <proski@gnu.org>
To: Catalin Marinas <catalin.marinas@gmail.com>
Cc: git@vger.kernel.org
Subject: Re: Some ideas for StGIT
Date: Mon, 06 Aug 2007 13:17:26 -0400 [thread overview]
Message-ID: <1186420646.12895.3.camel@dv> (raw)
In-Reply-To: <b0943d9e0708060236x19674e4cjf04cec716ae6246c@mail.gmail.com>
On Mon, 2007-08-06 at 10:36 +0100, Catalin Marinas wrote:
> > The main point in favor of quilt is that it allows to edit the patches
> > with the text editor. One can pop all patches, edit them and push the
> > all back.
>
> If this is the main feature they need, they probably don't need git at
> all and quilt would be enough. I was using quilt before starting StGIT
> but the main problem I had with plain patches approach was the
> conflict solving.
OK, I understand it wasn't a good idea to ask for improvement on behalf
of others.
> StGIT does a 'git-diff | git-apply' as a patch push optimization and
> we could even cache the diff but the current algorithm is that if
> git-apply fails, StGIT falls back to a three-way merge and even an
> interactive user merge (via xxdiff for example). I find the three-way
> merging (automatic or interactive) much more powerful than fuzzy patch
> application.
I agree. I have no problem with what StGIT does internally.
> If we would allow patch editing, the 'stg push' algorithms wouldn't
> know when git-apply failed because the patch was edited or the base
> was changed. Falling back to the three-way merge would lose the edited
> patch. If one doesn't need three-way merging, quilt is good enough.
I suggest that StGIT saves the original patch and then does interdiff
between the old and the new patch. The original patch is applied first
just as it's applied now, and then the difference is applied on top of
that.
Temporary files should be kept in case of failure.
> Other advantages of the three-way merging is the detection of full
> patches or hunks merged upstream (the former can also be achieved by
> testing the reverse-application of the patches).
I'm fully with you here. Having git history can only be a good thing.
> I don't usually edit patches during development, I prefer to edit the
> source files and review the diff. It happens many times to move hunks
> between patches but I usually towards the bottom patches in the stack
> (using stg export and emacs) and the three-way merging automatically
> removes the merged hunks from top patches.
What I normally need to edit is the comments. Editing the code is
risky, although I may want to rename some badly named variable
introduced by the patch.
> > I don't suggest that StGIT gives up on the git-based storage, but this
> > mode of operation could be implemented in two ways.
> >
> > One is to have a command opposite to "export". It would read the files
> > that "export" produces, replacing the existing patches.
>
> As Yann said, we already have 'stg import --replace'.
Thanks!
> > Another approach would be to reexamine the patch after "stg refresh -es"
> > and to apply it instead of the original patch. If the patch doesn't
> > apply, the options would be to discard the edits or to re-launch the
> > editor.
>
> That's an interesting idea but maybe we should have a separate command
> like --edit-full to edit the full patch + log (part of the
> functionality already available in import).
I hate to be in a situation when I want to edit something but cannot,
because I didn't run some command before. What I like about StGIT is
that it allows me to do things my way.
I don't know if I want to change the patch before I see it.
> > Finally, it would be great to have TLS support in the mail command.
> > Mercurial has it, and looking at their mail.py, it doesn't seem to be
> > much work.
>
> Indeed, the SMTP Python objects already provide support for TLS via starttls().
And hg provides a great example.
--
Regards,
Pavel Roskin
prev parent reply other threads:[~2007-08-06 17:17 UTC|newest]
Thread overview: 32+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-08-03 17:50 Some ideas for StGIT Pavel Roskin
2007-08-03 18:14 ` Andy Parkins
2007-08-04 5:41 ` Pavel Roskin
2007-08-04 5:51 ` Shawn O. Pearce
2007-08-05 0:08 ` Pavel Roskin
2007-08-05 0:17 ` Jakub Narebski
2007-08-05 2:31 ` Shawn O. Pearce
2007-08-05 3:32 ` Junio C Hamano
2007-08-05 13:39 ` Josef Sipek
2007-08-05 13:56 ` Johannes Schindelin
2007-08-05 14:06 ` Josef Sipek
2007-08-05 14:15 ` Johannes Schindelin
2007-08-05 14:57 ` Josef Sipek
2007-08-04 8:08 ` Yann Dirson
2007-08-06 10:01 ` Catalin Marinas
2007-08-04 14:14 ` Chris Shoemaker
2007-08-04 15:22 ` Johannes Schindelin
2007-08-03 23:23 ` Yann Dirson
2007-08-06 9:49 ` Catalin Marinas
2007-08-06 13:26 ` Pavel Roskin
2007-08-06 15:19 ` Josef Sipek
2007-08-04 6:38 ` Theodore Tso
2007-08-04 8:16 ` Yann Dirson
2007-08-04 21:35 ` Josef Sipek
2007-08-05 0:12 ` Pavel Roskin
2007-08-06 9:36 ` Catalin Marinas
2007-08-06 9:56 ` Karl Hasselström
2007-08-06 12:42 ` Pavel Roskin
2007-08-06 13:52 ` Karl Hasselström
2007-08-23 14:09 ` Catalin Marinas
2007-08-23 14:34 ` Karl Hasselström
2007-08-06 17:17 ` Pavel Roskin [this message]
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=1186420646.12895.3.camel@dv \
--to=proski@gnu.org \
--cc=catalin.marinas@gmail.com \
--cc=git@vger.kernel.org \
/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).