It would be use to add gbp (git buildpackage) support to myrepos.
Here's the config I have created (I'm not sure where's best to post patches/PRs, so if someone can point me in the right direction I'll create one):
git_test = test -e "$MR_REPO/.git" && ! test -e "$MR_REPO/debian/gbp.conf"
gbp_test = test -e "$MR_REPO/.git" && test -e "$MR_REPO/debian/gbp.conf"
gbp_trusted_checkout = gbp clone $url
gbp_register =
url="`LC_ALL=C git config --get remote.origin.url`" || true
if [ -z "$url" ]; then
error "cannot determine gbp url"
fi
echo "Registering gbp url: $url in $MR_CONFIG"
mr -c "$MR_CONFIG" config "`pwd`" checkout="gbp clone '$url'"
gbp_update = gbp pull
# additional
gbp_buildpackage = gbp buildpackage "$@"
gbp_importorig = gbp import-orig "$@"
gbp_importdsc = gbp import-dsc "$@"
gbp_importdscs = gbp import-dscs "$@"
gbp_dch = gbp dch "$@"
gbp_pq = gbp pq "$@"
gbp_createremoterepo = gbp create-remote-repo "$@"
# same as git
gbp_fetch = git fetch --all --prune --tags "$@"
gbp_status = git status -s "$@" || true; git --no-pager log --branches --not --remotes --simplify-by-decoration --decorate --oneline || true; git --no-pager stash list
gbp_commit = git commit -a "$@" && git push --all
gbp_record = git commit -a "$@"
gbp_push = git push "$@"
gbp_diff = git diff "$@"
gbp_log = git log "$@"
gbp_grep = git grep "$@"
gbp_clean =
if [ "x$1" = x-f ] ; then
shift
git clean -dx --force "$@"
else
git clean -dx --dry-run "$@"
fi
Please add a link to a git repository containing the commit you want to add.
Some suggestions for that:
Please include the gbp support as a plugin rather than in mr itself.
Please add a copyright and license notice in comments at the start of the plugin.
Please add some documentation in comments at the start of the plugin.
Please use perl: for the gbp_test/git_test code, it is faster and most of the other *_test code uses it.
Please sync gbp_grep with git_grep, the latter always returns true.
gbp clone
, so I could see the value of a short plugin that handles cloning and registering gbp repos. But I don't see why you would ever want to rungbp dch
across more than one repo at once.gbp dch
on multiple repos after making a change using sed or another automated mechanism?mr run
.