On 8 September 2014 04:05, Ben Hutchings <ben@decadent.org.uk> wrote:--How does git-debcherry cope with the overlapping changes when generating
debian/patches? What can you do if it fails to linearise the changes
(as, apparently, it may sometimes do)?Just did some fiddling.I have no idea if this is the git-debcherry I should be using or not, so far it is the only copy I have found: git://pivot.cs.unb.ca/gitpkg.gitI created a script that generates a some commits on different feature branches, with a deliberate conflict.Unexpectedly, this means there is only one patch generating with both feature branches included. However the results appear to be technically correct.My random thought: I like being able to predict what will happen to patches in git-dpm. For example, if I supply the git-debcherry produced patch file name, when upstream get around to looking at it, that patch may no longer exist because I (accidentally?) created a newer patch that conflicts.Not! sure if there is an easy way to tell if two feature branches conflict or not. This might be me and/or something that can be fixed in git-debcherry though.Regardless, if you need to make a sequence of changes, say to one file, git-dpm would appear to be the better choice, I think.Note the script does a "rm -rf a", so don't do this on anything important. git-debcherry location is also hard coded.=== cut ===#!/bin/shset -exrm -rf amkdir acd agit inittouch readme.txtgit add readme.txtgit commit -m "upstream"git branch upstream# feature a version 1git checkout -b feature_a upstreamecho "My line 1" > readme.txtecho "My line 1" > readme0.txtgit add readme.txt readme0.txtgit commit -m "feature a version 1"# feature b version 1git checkout -b feature_b upstreamecho "My line 2" > readme2.txtgit add readme2.txtgit commit -m "feature b version 1"# merge feature a and feature b into debiangit checkout -b debian upstreamgit merge feature_a -m "merge feature a"git merge feature_b -m "merge feature b"# modify feature agit checkout feature_aecho "My line 1 (modified)" > readme.txtgit add readme.txtgit commit -m "feature a version 2"# merge feature a into debiangit checkout debiangit merge feature_a -m "merge feature a"# modify feature b, make it conflict with feature agit checkout feature_becho "My line 1 (extra modified)" > readme.txtecho "My line 2 (extra modified)" > readme2.txtgit add readme.txt readme2.txtgit commit -m "feature b version 2"# merge feature b into debian, resolve conflictgit checkout debiangit merge feature_b -m "merge feature b" -X theirs# generate patch../gitpkg/git-debcherry -o debian/patches upstream../gitpkg/git-debcherry --stat upstream=== cut ===The gives me one patch file, with all the changes:=== cut ===From 71ed7d5182996226fdaa4c1195a3e0dd0bb3fce7 Mon Sep 17 00:00:00 2001From: Brian May <brian@microcomaustralia.com.au>Date: Mon, 8 Sep 2014 13:13:35 +1000Subject: [PATCH] debcherry fixup patch18eb718 feature b version 2- no changes against upstream or conflicts558086e feature a version 2- extra changes or conflictsa898018 feature b version 1- extra changes or conflictsdaa2cc6 feature a version 1- extra changes or conflicts---readme.txt | 1 +readme0.txt | 1 +readme2.txt | 1 +3 files changed, 3 insertions(+)create mode 100644 readme0.txtcreate mode 100644 readme2.txtdiff --git a/readme.txt b/readme.txtindex e69de29..2f782d4 100644--- a/readme.txt+++ b/readme.txt@@ -0,0 +1 @@+My line 1 (extra modified)diff --git a/readme0.txt b/readme0.txtnew file mode 100644index 0000000..d6d5ab4--- /dev/null+++ b/readme0.txt@@ -0,0 +1 @@+My line 1diff --git a/readme2.txt b/readme2.txtnew file mode 100644index 0000000..977df1d--- /dev/null+++ b/readme2.txt@@ -0,0 +1 @@+My line 2 (extra modified)--1.9.1=== cut ===
Brian May <brian@microcomaustralia.com.au>