git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "Catalin Marinas" <catalin.marinas@gmail.com>
To: "Yann Dirson" <ydirson@altern.org>
Cc: git@vger.kernel.org
Subject: Re: [StGIT PATCH] Better diagnostic for wrong branch configuration.
Date: Mon, 8 Oct 2007 14:00:48 +0100	[thread overview]
Message-ID: <b0943d9e0710080600y55aeeeeei8dbd27d069c681e@mail.gmail.com> (raw)
In-Reply-To: <20071005204452.30902.60246.stgit@gandelf.nowhere.earth>

On 05/10/2007, Yann Dirson <ydirson@altern.org> wrote:
> --- a/stgit/git.py
> +++ b/stgit/git.py
> @@ -1003,11 +1003,14 @@ def fetch_head():
>          m = re.match('^([^\t]*)\t\t', line)
>          if m:
>              if fetch_head:
> -                raise GitException, "StGit does not support multiple FETCH_HEAD"
> +                raise GitException, 'StGit does not support multiple FETCH_HEAD'
>              else:
>                  fetch_head=m.group(1)
>      stream.close()
>
> +    if not fetch_head:
> +        raise GitException, 'No for-merge remote head found in FETCH_HEAD'

OK, I tried and it doesn't work with my StGIT over SVN configuration.

What I did is defining 'pull-policy' as 'fetch-rebase', 'fetchcmd' as
'git svn fetch' which doesn't create any FETCH_HEAD. The 'pullcmd' is
defined as 'git svn rebase' and it doesn't use any argument if
git.fetch_head() return None.

I also think it is better for the pull command to re-raise the
git.fetch_head exception as this one contains more detailed
information about the error (after the out.error call). It currently
shows that the remote head couldn't be found but there is the multiple
heads case raised by git.fetch_head.

-- 
Catalin

      parent reply	other threads:[~2007-10-08 13:01 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-10-05 20:44 [StGIT PATCH] Better diagnostic for wrong branch configuration Yann Dirson
2007-10-07 13:14 ` Karl Hasselström
2007-10-07 14:17   ` Yann Dirson
2007-10-07 15:25     ` Karl Hasselström
2007-10-07 21:04 ` Catalin Marinas
2007-10-08 13:00 ` Catalin Marinas [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=b0943d9e0710080600y55aeeeeei8dbd27d069c681e@mail.gmail.com \
    --to=catalin.marinas@gmail.com \
    --cc=git@vger.kernel.org \
    --cc=ydirson@altern.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).