threads / patch / 3689

patchDon't use merge labels in the ed scripts

Subject: [PATCH] Don't use merge labels in the ed scripts

## tl;dr

5 messages between Mar 21, 2006 and Mar 22, 2006. Diffs are folded; open one to read it.

replies: 4people: 2as markdown or json

Pavel Roskin· Mar 21, 2006, 20:54 UTC · lore
From: Pavel Roskin <proski@gnu.org>

Merge labels keep changing, and they are not required to identify specific lines uniquely for the test purposes.

Signed-off-by: Pavel Roskin <proski@gnu.org>
---
 .../tutorial-script/0010-alice-bob-fixup.ed        |    2 +-
 .../tutorial-script/0017-alice-bob-fixup.ed        |    4 ++--
 .../tutorial-script/0018-alice-charlie-fixup1.ed   |    4 ++--
 .../tutorial-script/0019-alice-charlie-fixup2.ed   |    4 ++--
 .../tutorial-script/0021-bob-alice-fixup1.ed       |    4 ++--
 .../tutorial-script/0022-bob-alice-fixup2.ed       |    2 +-
 6 files changed, 10 insertions(+), 10 deletions(-)
Show changes to 6 files +10 −10

Documentation/tutorial-script/0010-alice-bob-fixup.ed, Documentation/tutorial-script/0017-alice-bob-fixup.ed, Documentation/tutorial-script/0018-alice-charlie-fixup1.ed, Documentation/tutorial-script/0019-alice-charlie-fixup2.ed, Documentation/tutorial-script/0021-bob-alice-fixup1.ed, Documentation/tutorial-script/0022-bob-alice-fixup2.ed

diff --git a/Documentation/tutorial-script/0010-alice-bob-fixup.ed b/Documentation/tutorial-script/0010-alice-bob-fixup.ed
index 81b1360..35ba0c3 100644
--- a/Documentation/tutorial-script/0010-alice-bob-fixup.ed
+++ b/Documentation/tutorial-script/0010-alice-bob-fixup.ed
@@ -1,3 +1,3 @@
-/^<<<<<<< bob/,/^>>>>>>> bobswork/d
+/^<<<<<<< /,/^>>>>>>> /d
 w
 q
diff --git a/Documentation/tutorial-script/0017-alice-bob-fixup.ed b/Documentation/tutorial-script/0017-alice-bob-fixup.ed
index ad04eb7..00626e3 100644
--- a/Documentation/tutorial-script/0017-alice-bob-fixup.ed
+++ b/Documentation/tutorial-script/0017-alice-bob-fixup.ed
@@ -1,5 +1,5 @@
-/^<<<<<<< Makefile/d
+/^<<<<<<< /d
 /^=======/,/^=======/+1d
-/^>>>>>>> \.merge_file_/d
+/^>>>>>>> /d
 w
 q
diff --git a/Documentation/tutorial-script/0018-alice-charlie-fixup1.ed b/Documentation/tutorial-script/0018-alice-charlie-fixup1.ed
index 9682b4a..f73223c 100644
--- a/Documentation/tutorial-script/0018-alice-charlie-fixup1.ed
+++ b/Documentation/tutorial-script/0018-alice-charlie-fixup1.ed
@@ -1,7 +1,7 @@
-/^<<<<<<< master/d
+/^<<<<<<< /d
 /^rpn\.o:/s/\.h.*$/.h lexer.h/
 /^lexer\.o:/s/:.*$/: lexer.h/
-/^=======/,/^>>>>>>> charlie/d
+/^=======/,/^>>>>>>> /d
 w
 q
 
diff --git a/Documentation/tutorial-script/0019-alice-charlie-fixup2.ed b/Documentation/tutorial-script/0019-alice-charlie-fixup2.ed
index 5d531de..75832f1 100644
--- a/Documentation/tutorial-script/0019-alice-charlie-fixup2.ed
+++ b/Documentation/tutorial-script/0019-alice-charlie-fixup2.ed
@@ -1,5 +1,5 @@
-/^<<<<<<< master/,/^=======/d
-/^>>>>>>> charlie/d
+/^<<<<<<< /,/^=======/d
+/^>>>>>>> /d
 w
 q
 
diff --git a/Documentation/tutorial-script/0021-bob-alice-fixup1.ed b/Documentation/tutorial-script/0021-bob-alice-fixup1.ed
index df703d5..9950144 100644
--- a/Documentation/tutorial-script/0021-bob-alice-fixup1.ed
+++ b/Documentation/tutorial-script/0021-bob-alice-fixup1.ed
@@ -1,4 +1,4 @@
-/^<<<<<<< master/,/^=======/d
-/^>>>>>>> origin/d
+/^<<<<<<< /,/^=======/d
+/^>>>>>>> /d
 w
 q
diff --git a/Documentation/tutorial-script/0022-bob-alice-fixup2.ed b/Documentation/tutorial-script/0022-bob-alice-fixup2.ed
index d8c5746..df1c077 100644
--- a/Documentation/tutorial-script/0022-bob-alice-fixup2.ed
+++ b/Documentation/tutorial-script/0022-bob-alice-fixup2.ed
@@ -1,5 +1,5 @@
 /^#include "stack\.h"/+1d
 /^#include "lexer\.h"/+1,/^#include "stack\.h"/d
-/^<<<<<<< master/-1,/^>>>>>>> origin/d
+/^<<<<<<< /-1,/^>>>>>>> /d
 w
 q
Petr Baudis· Mar 21, 2006, 20:59 UTC · re: Pavel Roskin · lore

Re: [PATCH] Don't use merge labels in the ed scripts

Dear diary, on Tue, Mar 21, 2006 at 09:54:14PM CET, I got a letter where Pavel Roskin <proski@gnu.org> said that...

Show 6 quoted lines
> From: Pavel Roskin <proski@gnu.org>
> 
> Merge labels keep changing, and they are not required to identify
> specific lines uniquely for the test purposes.
> 
> Signed-off-by: Pavel Roskin <proski@gnu.org>
Well, I sincerely hope that they won't change again. ;-)
-- 
				Petr "Pasky" Baudis
Stuff: http://pasky.or.cz/
Right now I am having amnesia and deja-vu at the same time.  I think
I have forgotten this before.
Pavel Roskin· Mar 21, 2006, 21:44 UTC · re: Petr Baudis · lore

Re: [PATCH] Don't use merge labels in the ed scripts

Hi, Petr!
On Tue, 2006-03-21 at 21:59 +0100, Petr Baudis wrote:
Show 10 quoted lines
> Dear diary, on Tue, Mar 21, 2006 at 09:54:14PM CET, I got a letter
> where Pavel Roskin <proski@gnu.org> said that...
> > From: Pavel Roskin <proski@gnu.org>
> > 
> > Merge labels keep changing, and they are not required to identify
> > specific lines uniquely for the test purposes.
> > 
> > Signed-off-by: Pavel Roskin <proski@gnu.org>
> 
> Well, I sincerely hope that they won't change again. ;-)

Actually, it would be nice to never expose labels starting with ".merge_file_" - cogito should provide more meaningful labels instead.

If you prefer, I'll submit a minimal patch to 0017-alice-bob-fixup.ed instead. Once ".merge_file_" is gone, the "tutorial" testsuite would check that such labels never appear again.

-- 
Regards,
Pavel Roskin
Petr Baudis· Mar 21, 2006, 21:48 UTC · re: Pavel Roskin · lore

Re: [PATCH] Don't use merge labels in the ed scripts

  Hi,

Dear diary, on Tue, Mar 21, 2006 at 10:44:25PM CET, I got a letter where Pavel Roskin <proski@gnu.org> said that...

Show 14 quoted lines
> On Tue, 2006-03-21 at 21:59 +0100, Petr Baudis wrote:
> > Dear diary, on Tue, Mar 21, 2006 at 09:54:14PM CET, I got a letter
> > where Pavel Roskin <proski@gnu.org> said that...
> > > From: Pavel Roskin <proski@gnu.org>
> > > 
> > > Merge labels keep changing, and they are not required to identify
> > > specific lines uniquely for the test purposes.
> > > 
> > > Signed-off-by: Pavel Roskin <proski@gnu.org>
> > 
> > Well, I sincerely hope that they won't change again. ;-)
> 
> Actually, it would be nice to never expose labels starting with
> ".merge_file_" - cogito should provide more meaningful labels instead.
  we shouldn't ever expose them, though. If we do, that's a bug.
> If you prefer, I'll submit a minimal patch to 0017-alice-bob-fixup.ed
> instead.  Once ".merge_file_" is gone, the "tutorial" testsuite would
> check that such labels never appear again.
  Curious, it contains the old-style label yet does not fail here now.
Unfortunately I have no time to play with it now. :-( A patch will be
most welcome.
  Thanks,
-- 
				Petr "Pasky" Baudis
Stuff: http://pasky.or.cz/
Right now I am having amnesia and deja-vu at the same time.  I think
I have forgotten this before.
Pavel Roskin· Mar 22, 2006, 04:07 UTC · re: Petr Baudis · lore

Re: [PATCH] Don't use merge labels in the ed scripts

Hi, Petr!
On Tue, 2006-03-21 at 22:48 +0100, Petr Baudis wrote:
Show 6 quoted lines
> > > Well, I sincerely hope that they won't change again. ;-)
> > 
> > Actually, it would be nice to never expose labels starting with
> > ".merge_file_" - cogito should provide more meaningful labels instead.
> 
>   we shouldn't ever expose them, though. If we do, that's a bug.

It turns out those labels were produced by "git merge". Either "git merge" should be removed from the test, or "cg-reset" should be used after the failure. I prefer the later since it's another test for Cogito.

Once the mess from "git merge" is cleaned up, it turns out that the last merge in the testsuite doesn't fail, and several final fixups are no longer needed. I think it should be OK to remove corresponding code. It has no Cogito commands other than cg-commit, which is already tested elsewhere.

I'm sending you the new patch.
-- 
Regards,
Pavel Roskin

← back to recent threads