Merge lp:~mhall119/devscripts/fixes-947180 into lp:devscripts

Proposed by Michael Hall on 2012-03-05
Status: Merged
Merge reported by: Benjamin Drung
Merged at revision: not available
Proposed branch: lp:~mhall119/devscripts/fixes-947180
Merge into: lp:devscripts
Diff against target: 21 lines (+4/-1)
1 file modified
scripts/edit-patch.sh (+4/-1)
To merge this branch: bzr merge lp:~mhall119/devscripts/fixes-947180
Reviewer Review Type Date Requested Status
Michael Vogt (community) Approve on 2012-03-07
devscripts developers 2012-03-05 Pending
Review via email: mp+95929@code.launchpad.net

Description of the Change

Currently edit-patch does not take into consideration the currently applied/unapplied patches on a branch, it just applied them all and then unapplied them all. This can lead to more changes that the developer intends.

Before pushing unapplied patches, first save the top patch. Then, instead of popping all applied patches, pop back only to the patch that was on top before running edit-patch. This should minimize the branch changes caused by edit-patch to only those made in the quilt shell.

To post a comment you must log in.
Michael Vogt (mvo) wrote :

Thanks, this change looks fine. I am not actually a commiter to devscripts but as the original author of
edit-patch a +1 from me for this merge.

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'scripts/edit-patch.sh'
2--- scripts/edit-patch.sh 2011-05-21 21:35:20 +0000
3+++ scripts/edit-patch.sh 2012-03-05 16:16:17 +0000
4@@ -121,6 +121,8 @@
5
6 edit_patch_quilt() {
7 export QUILT_PATCHES=debian/patches
8+ top_patch=$(quilt top)
9+ echo "Top patch: $top_patch"
10 if [ -e $PREFIX/$1 ]; then
11 # if its a existing patch and we are at the end of the stack,
12 # go back at the beginning
13@@ -138,7 +140,8 @@
14 # use a sub-shell
15 quilt shell
16 quilt refresh
17- quilt pop -a
18+ echo "Reverting quilt back to $top_patch"
19+ quilt pop $top_patch
20 vcs_add $PREFIX/$1 $PREFIX/series
21 }
22

Subscribers

People subscribed via source and target branches

to all changes: