#645 Improved release name deduction
Merged by onosek. Opened by oturpe.
oturpe/rpkg default-branch-merge  into  master

Download 645.patch

Previously, when not inside a Git repository,
or when inside a Git repository is not connected to a remote,
rpkg-based tools have required manually specifying --release option.
This is quite unwieldy, even though such use is quite common.
For example, initial work on new packages is often done without source control,
or only with local source control.

Allow downstream tools to define a default release,
to be used when there is no Git repository.
In Fedora, for example, this can be defined as rawhide,
which exactly matches the Fedora principle of making modifications in Rawhide first.

Downstreams define the default branch name by overriding the default_branch_merge() method.
The default implementation raises an exception, which matches the earlier behavior.

Fixes #635

Companion pull request that defines default_branch_merge(): fedpkg#495

rebased onto 6cf51a798e255b971fd4895103dbba653611810d

Commit be7461d1 fixes this pull-request

Pull-Request has been merged by onosek

Thanks for the code. Let's give it a chance.
I have just fixed minor things and unittests.

Metadata