--- oslo-series-final/0019-Check-that-guilt-graph-works-when-working-on-a-branc.patch +++ oslo-series-v2/v2-0019-Check-that-guilt-graph-works-when-working-on-a-br.patch @@ -1,8 +1,8 @@ -From eaad6b4ec34321ffcf78a713ea90e8929ad4f388 Mon Sep 17 00:00:00 2001 +From 48835c6686df86c095c6b87020300f237df74cbf Mon Sep 17 00:00:00 2001 From: Per Cederqvist -Date: Wed, 19 Mar 2014 21:46:44 +0100 -Subject: [GUILT 19/28] Check that "guilt graph" works when working on a branch - with a comma. +Date: Tue, 13 May 2014 21:04:02 +0200 +Subject: [GUILT v2 19/29] Check that "guilt graph" works when working on a + branch with a comma. To: Jeff Sipek Cc: git@vger.kernel.org @@ -11,7 +11,7 @@ Signed-off-by: Per Cederqvist --- - regression/t-033.out | 62 ++++++++++++++++++++++++++++++++++++++++++++++++++++ - regression/t-033.sh | 37 +++++++++++++++++++++++++++++++ - 2 files changed, 99 insertions(+) + regression/t-033.out | 65 ++++++++++++++++++++++++++++++++++++++++++++++++++++ + regression/t-033.sh | 39 +++++++++++++++++++++++++++++++ + 2 files changed, 104 insertions(+) diff --git a/regression/t-033.out b/regression/t-033.out index 76613f9..e638d7b 100644 --- a/regression/t-033.out +++ b/regression/t-033.out - @@ -1,3 +1,65 @@ + @@ -1,3 +1,68 @@ % setup_repo % guilt graph No patch applied. + +%% Testing branch a,graph +% git checkout -b a,graph master +Switched to a new branch 'a,graph' +% guilt init [...] +# checking rev ff2775f8d1dc753f635830adcc3a067e0b681e2d + "ff2775f8d1dc753f635830adcc3a067e0b681e2d" [label="a.patch"] +} + +%% Adding an unrelated file in a new patch. No deps. +% guilt new b.patch +% git add file2.txt +% guilt refresh [...] +# checking rev ff2775f8d1dc753f635830adcc3a067e0b681e2d + "ff2775f8d1dc753f635830adcc3a067e0b681e2d" [label="a.patch"] +} + +%% Changing a file already changed in the first patch adds a dependency. +% guilt new c.patch +% git add file.txt +% guilt refresh [...] + "ff2775f8d1dc753f635830adcc3a067e0b681e2d" [label="a.patch"] + "891bc14b5603474c9743fd04f3da888644413dc5" -> "ff2775f8d1dc753f635830adcc3a067e0b681e2d"; // ? +} diff --git a/regression/t-033.sh b/regression/t-033.sh index ae40577..57dce78 100755 --- a/regression/t-033.sh +++ b/regression/t-033.sh - @@ -3,9 +3,46 @@ + @@ -3,6 +3,13 @@ + # Test the graph code + # + + +function fixup_time_info + +{ + + cmd guilt pop + + touch -a -m -t "$TOUCH_DATE" ".git/patches/a,graph/$1" + + cmd guilt push + +} + + + source "$REG_DIR/scaffold" + + cmd setup_repo + @@ -11,3 +18,35 @@ cmd setup_repo - # Test the graph code - # - - +function fixup_time_info - +{ - + cmd guilt pop - + touch -a -m -t "$TOUCH_DATE" ".git/patches/a,graph/$1" - + cmd guilt push - +} - + - source "$REG_DIR/scaffold" - - cmd setup_repo - + # message when no patches are applied. (An older version of guilt + # used to enter an endless loop in this situation.) shouldfail guilt graph - + + + +echo "%% Testing branch a,graph" +cmd git checkout -b a,graph master + +cmd guilt init [...] +fixup_time_info a.patch +cmd guilt graph + - +# An unrelated file. No deps. + +echo "%% Adding an unrelated file in a new patch. No deps." +cmd guilt new b.patch +cmd echo b >> file2.txt +cmd git add file2.txt [...] +fixup_time_info b.patch +cmd guilt graph + - +# An change to an old file. Should add a dependency. + +echo "%% Changing a file already changed in the first patch adds a dependency." +cmd guilt new c.patch +cmd echo c >> file.txt +cmd git add file.txt [...] +fixup_time_info c.patch +cmd guilt graph --