Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Pedro Alves <palves@redhat.com>
To: Eli Zaretskii <eliz@gnu.org>
Cc: gdb-patches@sourceware.org
Subject: Re: [COMMIT] Re: [PATCH 0/9][gdbserver] Split server.h.
Date: Fri, 06 Sep 2013 09:36:00 -0000	[thread overview]
Message-ID: <5229A20A.5060302@redhat.com> (raw)
In-Reply-To: <83wqmumrhq.fsf@gnu.org>

On 09/06/2013 06:46 AM, Eli Zaretskii wrote:
>> Date: Thu, 05 Sep 2013 23:22:50 +0100
>> From: Pedro Alves <palves@redhat.com>
>>
>> Gah, and completely forgot to 'cvs add' all the new
>> headers, so the gdbserver build is broken now for
>> everyone.   :-/  Now fixed...
>>
>> /me longs for 'git push'.
> 
> Git doesn't save you from having to "git add" new files, does it?

No.  But when you use git for all the development work
(excluding the final commit), there's no way to forget it.
git shows the new files in the diff, and if you forget to
add the file, it won't appear in the submitted patch, for
example.  This is a fault in my workflow, of course.
The issue is when moving the patch from git/patch to
cvs, for final commit.  I always do:

 $ cvs diff > leftovers.diff
 $ less leftovers.diff

before and after committing a patch.  cvs diff
by default doesn't show you new files - instead it says:

 cvs diff: dll.h is a new entry, no comparison available

Even before using git/stgit for development, I was using
quilt on top of cvs to manage my patches/series.  I still
use that, particularly when moving patches from git -> cvs.
I do

 $ stg export -d patches

in my stg/git checkout, and that puts a quilt-ready patch
series in the patches directory.

I then have a separate gdb cvs checkout that I only use
for commits, that has src/patches symlinked to the
git checkout's src/patches.  So to push a series, I just
go to the cvs checkout dir (I always have a terminal open
for that alone), and manually do:

for each patch in series; do
 quilt push
 quilt diff
 move ChangeLog text from patch header to ChangeLog file
 cvs diff
 cvs ci
done

quilt diff does show new files in the diff (diffed
against /dev/null), yet another thing conspiring for me
missing cvs add.

For some I-can't-justify reason, I've trained my brain to
not expect to see new files in the "cvs diff" step.
That "is a new entry, no comparison available" warning goes
to stderr, but I failed to notice in the first patch.  And
then as I pushed the series in sequence, I skipped
that 'cvs diff' step in between committing patches, so I ended
up forgetting to add all new files...

The simple fix for me without learning a whole new workflow
seems to be to just use cvs diff -N.  My ~/.cvsrc now has:

 diff -upN

train myself to expect to see the new files in the
resulting diff, and perhaps write a little wrapper script
around cvs diff that warns me if there are non-added files
in the resulting diff (the ? lines), unless there's already
something like that in the set of cvs commands (cvs status
seems to be practically useless, I never use it).

Hopefully that'll help catch this mistake going forward.

(BTW, I also long for git push for being able to push a
series of patches with a single command)

-- 
Pedro Alves


  parent reply	other threads:[~2013-09-06  9:36 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-09-03 20:26 Pedro Alves
2013-09-03 20:26 ` [PATCH 8/9] [gdbserver] Split a new event-loop.h file out of server.h Pedro Alves
2013-09-03 20:26 ` [PATCH 2/9] [gdbserver] Split a new remote-utils.h " Pedro Alves
2013-09-03 20:26 ` [PATCH 5/9] [gdbserver] Split a new ax.h " Pedro Alves
2013-09-05 20:49   ` [PATCH 5/9] [gdbserver] Move bytecode compilation bits from server.h to ax.h. (was: Re: [PATCH 5/9] [gdbserver] Split a new ax.h file out of server.h.) Pedro Alves
2013-09-03 20:26 ` [PATCH 1/9] [gdbserver] Delete _ macro (gettext) Pedro Alves
2013-09-03 20:26 ` [PATCH 7/9] [gdbserver] Split a new dll.h file out of server.h Pedro Alves
2013-09-05 20:50   ` Pedro Alves
2013-09-03 20:26 ` [PATCH 9/9] [gdbserver] Split a new hostio.h " Pedro Alves
2013-09-05 20:50   ` Pedro Alves
2013-09-03 20:26 ` [PATCH 4/9] [gdbserver] Split a new tracepoint.h " Pedro Alves
2013-09-03 20:26 ` [PATCH 3/9] [gdbserver] Split a new utils.h " Pedro Alves
2013-09-03 20:54 ` [PATCH 6/9] [gdbserver] Split a new inferiors.h " Pedro Alves
2013-09-05 20:47 ` [COMMIT] Re: [PATCH 0/9][gdbserver] Split server.h Pedro Alves
2013-09-05 22:22   ` Pedro Alves
2013-09-05 23:52     ` Joel Brobecker
2013-09-06  5:47     ` Eli Zaretskii
2013-09-06  6:51       ` Ricard Wanderlof
2013-09-06  7:42         ` Eli Zaretskii
2013-09-06  9:36       ` Pedro Alves [this message]
2013-09-06 10:05         ` Agovic, Sanimir
2013-09-06 10:09           ` Pedro Alves

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=5229A20A.5060302@redhat.com \
    --to=palves@redhat.com \
    --cc=eliz@gnu.org \
    --cc=gdb-patches@sourceware.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