git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: [StGIT PATCH] Better diagnostic for wrong branch configuration.

From
CMCatalin Marinas <catalin.marinas@gmail.com>
Date
Oct 8, 2007, 13:00 UTC
Message-ID
<b0943d9e0710080600y55aeeeeei8dbd27d069c681e@mail.gmail.com>
In-Reply-To
<20071005204452.30902.60246.stgit@gandelf.nowhere.earth>
On 05/10/2007, Yann Dirson <ydirson@altern.org> wrote:
Show 14 quoted lines
> --- 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
Previous: Catalin Marinas
Message 6 of 6 in “Better diagnostic for wrong branch configuration.”
  1. Better diagnostic for wrong branch configuration.Yann Dirson, Oct 5, 2007
  2. Karl HasselströmOct 7, 2007
  3. Yann DirsonOct 7, 2007
  4. Karl HasselströmOct 7, 2007
  5. Catalin MarinasOct 7, 2007
  6. Catalin MarinasOct 8, 2007

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.