Return-Path: X-Original-To: notmuch@notmuchmail.org Delivered-To: notmuch@notmuchmail.org Received: from localhost (localhost [127.0.0.1]) by olra.theworths.org (Postfix) with ESMTP id 4A673431FD0 for ; Mon, 9 Jan 2012 02:38:59 -0800 (PST) X-Virus-Scanned: Debian amavisd-new at olra.theworths.org X-Spam-Flag: NO X-Spam-Score: -2.3 X-Spam-Level: X-Spam-Status: No, score=-2.3 tagged_above=-999 required=5 tests=[RCVD_IN_DNSWL_MED=-2.3] autolearn=disabled Received: from olra.theworths.org ([127.0.0.1]) by localhost (olra.theworths.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id u1HL8bH3MYDo for ; Mon, 9 Jan 2012 02:38:58 -0800 (PST) Received: from tempo.its.unb.ca (tempo.its.unb.ca [131.202.1.21]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by olra.theworths.org (Postfix) with ESMTPS id 6B63A431FB6 for ; Mon, 9 Jan 2012 02:38:58 -0800 (PST) Received: from zancas.localnet (fctnnbsc36w-156034072155.pppoe-dynamic.High-Speed.nb.bellaliant.net [156.34.72.155]) (authenticated bits=0) by tempo.its.unb.ca (8.13.8/8.13.8) with ESMTP id q09AcsbF015720 (version=TLSv1/SSLv3 cipher=AES256-SHA bits=256 verify=NO); Mon, 9 Jan 2012 06:38:55 -0400 Received: from bremner by zancas.localnet with local (Exim 4.77) (envelope-from ) id 1RkCcw-0007t8-Gx; Mon, 09 Jan 2012 06:38:54 -0400 From: David Bremner To: David Edmondson , notmuch@notmuchmail.org Subject: Re: [PATCH v2] emacs: Helpers for notmuch developers. In-Reply-To: References: <1325685678-12710-1-git-send-email-dme@dme.org> <1325844199-1812-1-git-send-email-dme@dme.org> <87lipjk9t9.fsf@zancas.localnet> User-Agent: Notmuch/0.10.2+167~g5f51512 (http://notmuchmail.org) Emacs/23.3.1 (x86_64-pc-linux-gnu) Date: Mon, 09 Jan 2012 06:38:54 -0400 Message-ID: <87mx9xw475.fsf@zancas.localnet> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-BeenThere: notmuch@notmuchmail.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: "Use and development of the notmuch mail system." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 09 Jan 2012 10:38:59 -0000 On Mon, 09 Jan 2012 08:23:53 +0000, David Edmondson wrote: > On Sat, 07 Jan 2012 07:53:54 -0400, David Bremner wrote: > > On Fri, 6 Jan 2012 10:03:19 +0000, David Edmondson wrote: > > > --- > > > > > > - Prefix the branch name with 'review/' > > > - Avoid `shell-command', which also results in better error reporting > > > when 'git-am' fails. > > > > > > > One thing I noticed is that reviewing a patch for the second time fails > > because the branch already exists. I'm not sure if this is covered under > > "upkeep of the repo" but it is a little inconvenient. > > Oh. It's supposed to delete the existing branch. It did in my test. What > happens for you? FWIW, I loaded notmuch-dev.el on top of current master. The magit buffer shows $ git --no-pager checkout -b review/patch-emacs-don't-signal-an-error-when-reaching-the-end-of-the-search-results master fatal: A branch named 'review/patch-emacs-don't-signal-an-error-when-reaching-the-end-of-the-search-results' already exists. The backtrace is signal(error ("Git failed")) error("Git failed") magit-run*(("git" "--no-pager" "checkout" "-b" "review/patch-emacs-don't-signal-an-error-when-reaching-the-end-of-the-search-results" "master")) #[nil "\303\304 B\n\"!\207" [magit-git-executable magit-git-standard-options args magit-run* append] 4]() magit-refresh-wrapper(#[nil "\303\304 B\n\"!\207" [magit-git-executable magit-git-standard-options args magit-run* append] 4]) magit-run-git("checkout" "-b" "review/patch-emacs-don't-signal-an-error-when-reaching-the-end-of-the-search-results" "master") magit-create-branch("review/patch-emacs-don't-signal-an-error-when-reaching-the-end-of-the-search-results" "master") notmuch-dev-create-branch("review/patch-emacs-don't-signal-an-error-when-reaching-the-end-of-the-search-results") (let ((default-directory notmuch-dev-temporary-repository-path)) (notmuch-dev-checkout-master) (condition-case nil (notmuch-dev-delete-branch patch-name) (error nil)) (notmuch-dev-create-branch patch-name) (with-temp-file mbox-path (erase-buffer) (call-process notmuch-command nil t nil "show" "--format=mbox" search-terms)) (magit-run* (list magit-git-executable "am" mbox-path)) (magit-status notmuch-dev-temporary-repository-path)) (let ((patch-name ...) (mbox-path ...)) (notmuch-dev-make-temporary-repository) (let (...) (notmuch-dev-checkout-master) (condition-case nil ... ...) (notmuch-dev-create-branch patch-name) (with-temp-file mbox-path ... ...) (magit-run* ...) (magit-status notmuch-dev-temporary-repository-path))) notmuch-dev-review-patch("[PATCH] emacs: Don't signal an error when reaching the end of the search results." "id:\"1324370714-28545-1-git-send-email-dme@dme.org\"") notmuch-dev-show-review-patch() call-interactively(notmuch-dev-show-review-patch t nil) execute-extended-command(nil) call-interactively(execute-extended-command nil nil)