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

5 messages from 2006-03-21 to 2006-03-22. Participants: Pavel Roskin, Petr Baudis.
Thread: https://gitlist.dev/t/3689

## Pavel Roskin, 2006-03-21 20:54

Subject: [PATCH] Don't use merge labels in the ed scripts
Message-ID: <20060321205414.8301.97041.stgit@dv.roinet.com>
URL: https://gitlist.dev/e/20060321205414.8301.97041.stgit%40dv.roinet.com

```
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(-)

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, 2006-03-21 20:59

Subject: Re: [PATCH] Don't use merge labels in the ed scripts
Message-ID: <20060321205956.GX19263@pasky.or.cz>
URL: https://gitlist.dev/e/20060321205956.GX19263%40pasky.or.cz
In-Reply-To: <20060321205414.8301.97041.stgit@dv.roinet.com>

```
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. ;-)

-- 
				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, 2006-03-21 21:44

Subject: Re: [PATCH] Don't use merge labels in the ed scripts
Message-ID: <1142977465.8712.4.camel@dv>
URL: https://gitlist.dev/e/1142977465.8712.4.camel%40dv
In-Reply-To: <20060321205956.GX19263@pasky.or.cz>

```
Hi, Petr!

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.

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, 2006-03-21 21:48

Subject: Re: [PATCH] Don't use merge labels in the ed scripts
Message-ID: <20060321214818.GY19263@pasky.or.cz>
URL: https://gitlist.dev/e/20060321214818.GY19263%40pasky.or.cz
In-Reply-To: <1142977465.8712.4.camel@dv>

```
  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...
> 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, 2006-03-22 04:07

Subject: Re: [PATCH] Don't use merge labels in the ed scripts
Message-ID: <1143000449.23183.8.camel@dv>
URL: https://gitlist.dev/e/1143000449.23183.8.camel%40dv
In-Reply-To: <20060321214818.GY19263@pasky.or.cz>

```
Hi, Petr!

On Tue, 2006-03-21 at 22:48 +0100, Petr Baudis wrote:
> > > 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

```
