Merge qa-regression-testing:quilt-exit-codes into qa-regression-testing:master

Proposed by Mark Esler
Status: Merged
Merged at revision: fc65a457e79059daef402662e9eb119207801ca2
Proposed branch: qa-regression-testing:quilt-exit-codes
Merge into: qa-regression-testing:master
Diff against target: 13 lines (+1/-1)
1 file modified
scripts/testlib.py (+1/-1)
Reviewer Review Type Date Requested Status
Steve Beattie Approve
Review via email: mp+424009@code.launchpad.net

Commit message

Enables quilt's exit code 2:

https://man7.org/linux/man-pages/man1/quilt.1.html#EXIT_STATUS
> An exit status of 2 denotes that quilt did not do anything to
> complete the command. This happens in particular when asking to
> push when the whole stack is already pushed, or asking to pop
> when the whole stack is already popped. This behavior is
> intended to ease the scripting around quilt.

To post a comment you must log in.
Revision history for this message
Steve Beattie (sbeattie) wrote :

LGTM, nice catch, thanks!

For reference, launchpad lets you push to a forked project a la github; you'd do something like:

  $ git remote add eslerm lp:~eslerm/qa-regression-testing

(Assuming you have the lp: alias set up in your git config from the
https://help.launchpad.net/Code/Git#Configuring_Git )

and then push your local branch to the new remote via:

  $ git push eslerm quilt-exit-codes

launchpad will return you an url for your branch and it will tell you how to propose a merge request from your pushed branch. This way, we don't have extra branches attached to the primary git project.

[I really need to propose some team best practices and tips for working with git, so we have something to argue incessantly about.]

Thanks again!

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1diff --git a/scripts/testlib.py b/scripts/testlib.py
2index 5bce8fa..d453585 100644
3--- a/scripts/testlib.py
4+++ b/scripts/testlib.py
5@@ -712,7 +712,7 @@ def prepare_source(source, builder, cached_src, build_src, patch_system):
6 if patch_system == "quilt":
7 os.environ.setdefault('QUILT_PATCHES', 'debian/patches')
8 rc, report = cmd(['quilt', 'push', '-a'])
9- assert (rc == 0)
10+ assert (rc in [0, 2])
11 elif patch_system == "cdbs":
12 rc, report = cmd(['./debian/rules', 'apply-patches'])
13 assert (rc == 0)

Subscribers

People subscribed via source and target branches