Guido Günther <a...@sigxcpu.org> writes:

[...]

>> +        cp = klass(filename="debian/changelog")
>> +        cp.first = True
>> +        return cp
>
> It's better to have a:
>
> cp.is_empty()
>
> method here. You can simply stat the file and check it's length to
> implement this until we have the ChangeLog class parsing the changelog
> for real.

Actually a ChangeLog instance can not represent an empty
debian/changelog, that's the reason of ChangeLog.create().

But after ChangeLog.create(), the debian/changelog is not empty anymore
and we must take care that 

since = repo.find_version(options.debian_tag, cp['Version'])

will never work in the case of a truly new package.

If the changelog was removed, using

since = guess_snapshot_commit(cp, repo, options)

will do the work.

I agree we need to get the state of the changelog, either preexistant or
newly created by ChangeLog.create(), I just wonder what is the good way
to do it (and to name whatever attribute/method).

Regards.

-- 
Daniel Dehennin
Récupérer ma clef GPG:
gpg --keyserver pgp.mit.edu --recv-keys 0x7A6FE2DF

Attachment: pgpwn20J5floL.pgp
Description: PGP signature

Reply via email to