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

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 05/10/2007, Yann Dirson <ydirson@xxxxxxxxxx> 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
-
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]

  Powered by Linux