diff options
Diffstat (limited to 'meta/recipes-devtools/guilt/files/guilt-pop.patch')
| -rw-r--r-- | meta/recipes-devtools/guilt/files/guilt-pop.patch | 73 |
1 files changed, 0 insertions, 73 deletions
diff --git a/meta/recipes-devtools/guilt/files/guilt-pop.patch b/meta/recipes-devtools/guilt/files/guilt-pop.patch deleted file mode 100644 index 9c0542740f..0000000000 --- a/meta/recipes-devtools/guilt/files/guilt-pop.patch +++ /dev/null | |||
| @@ -1,73 +0,0 @@ | |||
| 1 | guilt: pop and delete tags | ||
| 2 | |||
| 3 | Add support for popping to a tag and the ability to delete | ||
| 4 | a tag while popping from the tree | ||
| 5 | |||
| 6 | Upstream-Status: Inappropriate [oe-specific] | ||
| 7 | |||
| 8 | Signed-off-by: Bruce Ashfield <bruce.ashfield@windriver.com> | ||
| 9 | |||
| 10 | --- | ||
| 11 | guilt-pop | 28 ++++++++++++++++++++++++++-- | ||
| 12 | 1 file changed, 26 insertions(+), 2 deletions(-) | ||
| 13 | |||
| 14 | --- a/guilt-pop | ||
| 15 | +++ b/guilt-pop | ||
| 16 | @@ -17,6 +17,13 @@ while [ $# -gt 0 ]; do | ||
| 17 | -n) | ||
| 18 | num=t | ||
| 19 | ;; | ||
| 20 | + -t|--t) | ||
| 21 | + tag=$2 | ||
| 22 | + shift | ||
| 23 | + ;; | ||
| 24 | + -d|--d) # can only be used with --t | ||
| 25 | + delete_tag=t | ||
| 26 | + ;; | ||
| 27 | *) | ||
| 28 | break | ||
| 29 | ;; | ||
| 30 | @@ -24,7 +31,7 @@ while [ $# -gt 0 ]; do | ||
| 31 | shift | ||
| 32 | done | ||
| 33 | |||
| 34 | -# "guilt-pop" or "guilt-pop foo" or "guilt-pop -n foo" | ||
| 35 | +# "guilt-pop" or "guilt-pop foo" or "guilt-pop -n foo" or "guilt-pop -t <tag>" | ||
| 36 | if [ -z "$all" ] && [ $# -gt 1 ]; then | ||
| 37 | usage | ||
| 38 | fi | ||
| 39 | @@ -44,12 +51,26 @@ fi | ||
| 40 | patch="$1" | ||
| 41 | [ ! -z "$all" ] && patch="-a" | ||
| 42 | |||
| 43 | + | ||
| 44 | +# tag processing will just roll into another one of | ||
| 45 | +# the pop types, number or patch name | ||
| 46 | +if [ ! -z "$tag" ]; then | ||
| 47 | + git-rev-list HEAD ^$tag > /dev/null 2>/dev/null | ||
| 48 | + if [ $? -eq 0 ]; then | ||
| 49 | + revs="`git-rev-list HEAD ^$tag`" | ||
| 50 | + num=`echo "$revs" | wc -l` | ||
| 51 | + patch=$num | ||
| 52 | + else | ||
| 53 | + echo "Cannot find tag $tag"; | ||
| 54 | + exit 0 | ||
| 55 | + fi | ||
| 56 | +fi | ||
| 57 | + | ||
| 58 | if [ ! -s "$applied" ]; then | ||
| 59 | disp "No patches applied." | ||
| 60 | exit 0 | ||
| 61 | elif [ "$patch" = "-a" ]; then | ||
| 62 | # we are supposed to pop all patches | ||
| 63 | - | ||
| 64 | sidx=`wc -l < $applied` | ||
| 65 | eidx=0 | ||
| 66 | elif [ ! -z "$num" ]; then | ||
| 67 | @@ -96,3 +117,6 @@ pop_many_patches `git rev-parse refs/pat | ||
| 68 | p=`get_top` | ||
| 69 | [ ! -z "$p" ] && disp "Now at $p." || disp "All patches popped." | ||
| 70 | |||
| 71 | +if [ ! -z "$delete_tag" ]; then | ||
| 72 | + git tag -d $tag | ||
| 73 | +fi; | ||
