Hi Bjoern,

On Tue, Apr 05, 2011 at 11:16:52AM +0200, Bjoern Ricks wrote:
> Package: git-buildpackage
> Version: 0.5.19
> Severity: normal
> Tags: patch
> 
> If upstream_version contains an epoch checking for an already existing
> tag did fail and afterwards a git error was raised. Version check must
> use upstream version without epoch to check for a tag to let the user
> override an already existing tag.

Thanks for the patch. This doesn't look fully correct though, see below.

[..snip..] 
> diff --git a/git-import-dsc b/git-import-dsc
> index 30284aa..44cb58e 100755
> --- a/git-import-dsc
> +++ b/git-import-dsc
> @@ -256,11 +256,12 @@ def main(argv):
>              format = [(options.upstream_tag, "Upstream"), 
> (options.debian_tag, "Debian")][src.native]
>              tag = build_tag(format[0], src.upstream_version)
>              msg = "%s version %s" % (format[1], src.upstream_version)
> +            version = "%s-%s" % (src.upstream_version, src.debian_version)
>  
> -            if repo.find_version(options.debian_tag, src.debian_version):

This code isn't in the tree, it's:
         if repo.find_version(options.debian_tag, src.version):

src.debian_verfsion only contains the last part of the version number.

However using the full version is correct since that's what you're
looking at. Can you provide a test case that fails for you?

Cheers,
 -- Guido

> -                gbp.log.warn("Version %s already imported." % src.version)
> +            if repo.find_version(options.debian_tag, version):
> +                gbp.log.warn("Version %s already imported." % version)
>                  if options.allow_same_version:
> -                    gbp.log.info("Moving tag of version '%s' since import 
> forced" % src.version)
> +                    gbp.log.info("Moving tag of version '%s' since import 
> forced" % version)
>                      move_tag_stamp(repo, options.debian_tag, src.version)
>                  else:
>                      raise SkipImport
> -- 
> 1.7.4.1
> 

> >From 90832a0e10a101fdf4c516bf408ceacdbdbcf527 Mon Sep 17 00:00:00 2001
> From: =?UTF-8?q?Bj=C3=B6rn=20Ricks?= <bjoern.ri...@intevation.de>
> Date: Tue, 5 Apr 2011 10:36:58 +0200
> Subject: [PATCH] correct indentation
> 
> ---
>  git-import-dsc |    8 ++++----
>  1 files changed, 4 insertions(+), 4 deletions(-)
> 
> diff --git a/git-import-dsc b/git-import-dsc
> index 5062014..30284aa 100755
> --- a/git-import-dsc
> +++ b/git-import-dsc
> @@ -257,12 +257,12 @@ def main(argv):
>              tag = build_tag(format[0], src.upstream_version)
>              msg = "%s version %s" % (format[1], src.upstream_version)
>  
> -            if repo.find_version(options.debian_tag, src.version):
> -                 gbp.log.warn("Version %s already imported." % src.version)
> -                 if options.allow_same_version:
> +            if repo.find_version(options.debian_tag, src.debian_version):
> +                gbp.log.warn("Version %s already imported." % src.version)
> +                if options.allow_same_version:
>                      gbp.log.info("Moving tag of version '%s' since import 
> forced" % src.version)
>                      move_tag_stamp(repo, options.debian_tag, src.version)
> -                 else:
> +                else:
>                      raise SkipImport
>  
>              commit = repo.find_version(format[0], src.upstream_version)
> -- 
> 1.7.4.1
> 




-- 
To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org

Reply via email to