Re: ReleaseNotes.txt and merge conflicts

2017-11-28 Thread Lubomir I. Ivanov
On 28 November 2017 at 22:52, Lubomir I. Ivanov  wrote:
> On 28 November 2017 at 22:45, Dirk Hohndel  wrote:
>> On Tue, Nov 28, 2017 at 10:32:24PM +0200, Lubomir I. Ivanov wrote:
>>> >
>>> > Thanks for figuring this out, Lubomir!
>>> >
>>> > so, how are we supposed to write those now? A simple hack would of course 
>>> > be
>>> > to actually have a folder release_notes where everybody add _files_ for
>>> > things to report and then for a release we cat all those files…
>>>
>>> yesterday, we figured out that if we have a "release notes" file where
>>> multiple branches / commits add notes on top of it (i.e. line 1) there
>>> won't be any conflicts between the branches if we add this:
>>>
>>> /ReleaseNotes.txt -text merge=union
>>> in a file /.gitattributes
>>>
>>> until we restructure our ReleaseNotes, we have to resolve conflicts
>>> locally and force push to the remote branch from which the PR is
>>> happening.
>>> the github "resolve conflicts" feature with the online editor merges
>>> master into the user branch without fast-forward (--no-ff) and i don't
>>> think we want that.
>>
>> Lubomir, can you create a pull request that adds the .gitattributes file
>> as well as a Changelog file in the correct format plus a note at the top
>> of ReleaseNotes.txt that points to that (and of course we need to adjust
>> the PR instructions as well).
>>
>> I can do that this evening if it's not clear what I'm looking for :-/
>>
>
> should the Changelog file be in the root folder?
>
> i'm not sure about the format

made a PR:
https://github.com/Subsurface-divelog/subsurface/pull/883

not sure if i got it 100% right, so let's amend the PR if needed.

thanks
lubomir
--
___
subsurface mailing list
subsurface@subsurface-divelog.org
http://lists.subsurface-divelog.org/cgi-bin/mailman/listinfo/subsurface


Re: ReleaseNotes.txt and merge conflicts

2017-11-28 Thread Lubomir I. Ivanov
On 28 November 2017 at 22:45, Dirk Hohndel  wrote:
> On Tue, Nov 28, 2017 at 10:32:24PM +0200, Lubomir I. Ivanov wrote:
>> >
>> > Thanks for figuring this out, Lubomir!
>> >
>> > so, how are we supposed to write those now? A simple hack would of course 
>> > be
>> > to actually have a folder release_notes where everybody add _files_ for
>> > things to report and then for a release we cat all those files…
>>
>> yesterday, we figured out that if we have a "release notes" file where
>> multiple branches / commits add notes on top of it (i.e. line 1) there
>> won't be any conflicts between the branches if we add this:
>>
>> /ReleaseNotes.txt -text merge=union
>> in a file /.gitattributes
>>
>> until we restructure our ReleaseNotes, we have to resolve conflicts
>> locally and force push to the remote branch from which the PR is
>> happening.
>> the github "resolve conflicts" feature with the online editor merges
>> master into the user branch without fast-forward (--no-ff) and i don't
>> think we want that.
>
> Lubomir, can you create a pull request that adds the .gitattributes file
> as well as a Changelog file in the correct format plus a note at the top
> of ReleaseNotes.txt that points to that (and of course we need to adjust
> the PR instructions as well).
>
> I can do that this evening if it's not clear what I'm looking for :-/
>

should the Changelog file be in the root folder?

i'm not sure about the format
should it be something like:

-
<---  new entries are added here on top and once we are
done we place a version X on top

- entry 1
- entry 2
- entry 3
- entry 4

some version 

- entry 1
- entry 2
- entry 3
- entry 4
--

lubomir
--
___
subsurface mailing list
subsurface@subsurface-divelog.org
http://lists.subsurface-divelog.org/cgi-bin/mailman/listinfo/subsurface


Re: ReleaseNotes.txt and merge conflicts

2017-11-28 Thread Dirk Hohndel
On Tue, Nov 28, 2017 at 10:32:24PM +0200, Lubomir I. Ivanov wrote:
> >
> > Thanks for figuring this out, Lubomir!
> >
> > so, how are we supposed to write those now? A simple hack would of course be
> > to actually have a folder release_notes where everybody add _files_ for
> > things to report and then for a release we cat all those files…
> 
> yesterday, we figured out that if we have a "release notes" file where
> multiple branches / commits add notes on top of it (i.e. line 1) there
> won't be any conflicts between the branches if we add this:
> 
> /ReleaseNotes.txt -text merge=union
> in a file /.gitattributes
> 
> until we restructure our ReleaseNotes, we have to resolve conflicts
> locally and force push to the remote branch from which the PR is
> happening.
> the github "resolve conflicts" feature with the online editor merges
> master into the user branch without fast-forward (--no-ff) and i don't
> think we want that.

Lubomir, can you create a pull request that adds the .gitattributes file
as well as a Changelog file in the correct format plus a note at the top
of ReleaseNotes.txt that points to that (and of course we need to adjust
the PR instructions as well).

I can do that this evening if it's not clear what I'm looking for :-/

/D
___
subsurface mailing list
subsurface@subsurface-divelog.org
http://lists.subsurface-divelog.org/cgi-bin/mailman/listinfo/subsurface


Re: ReleaseNotes.txt and merge conflicts

2017-11-28 Thread Lubomir I. Ivanov
On 28 November 2017 at 22:24, Robert Helling  wrote:
> Hi,
>
>
> On 28. Nov 2017, at 03:48, Dirk Hohndel  wrote:
>
> We should try this - but in a simpler way. Have an actual Changelog style
> file instead of the current format.
> So change ReleaseNotes.txt to simply say "As of v4.7.5 we are tracking the
> changes in the Changelog file"
> I can come up with a way to add the version markers in the Changelog file
> automatically at release time.
> And if I feel ambitious, I can even copy things over
>
> Thanks for figuring this out, Lubomir!
>
>
> so, how are we supposed to write those now? A simple hack would of course be
> to actually have a folder release_notes where everybody add _files_ for
> things to report and then for a release we cat all those files…
>

yesterday, we figured out that if we have a "release notes" file where
multiple branches / commits add notes on top of it (i.e. line 1) there
won't be any conflicts between the branches if we add this:

/ReleaseNotes.txt -text merge=union
in a file /.gitattributes

until we restructure our ReleaseNotes, we have to resolve conflicts
locally and force push to the remote branch from which the PR is
happening.
the github "resolve conflicts" feature with the online editor merges
master into the user branch without fast-forward (--no-ff) and i don't
think we want that.

lubomir
--
___
subsurface mailing list
subsurface@subsurface-divelog.org
http://lists.subsurface-divelog.org/cgi-bin/mailman/listinfo/subsurface


Re: ReleaseNotes.txt and merge conflicts

2017-11-28 Thread Robert Helling
Hi,


> On 28. Nov 2017, at 03:48, Dirk Hohndel  wrote:
> 
> We should try this - but in a simpler way. Have an actual Changelog style 
> file instead of the current format.
> So change ReleaseNotes.txt to simply say "As of v4.7.5 we are tracking the 
> changes in the Changelog file"
> I can come up with a way to add the version markers in the Changelog file 
> automatically at release time.
> And if I feel ambitious, I can even copy things over
> 
> Thanks for figuring this out, Lubomir!

so, how are we supposed to write those now? A simple hack would of course be to 
actually have a folder release_notes where everybody add _files_ for things to 
report and then for a release we cat all those files…

Best
Robert


signature.asc
Description: Message signed with OpenPGP
___
subsurface mailing list
subsurface@subsurface-divelog.org
http://lists.subsurface-divelog.org/cgi-bin/mailman/listinfo/subsurface


Re: ReleaseNotes.txt and merge conflicts

2017-11-27 Thread Dirk Hohndel

> On Nov 27, 2017, at 5:13 PM, Lubomir I. Ivanov  wrote:
> 
> .gitattributes
> /ReleaseNotes.txt -text merge=union
> 
> so it seems that it doesn't like the layout of your file:
> https://github.com/Subsurface-divelog/subsurface/blob/f39e9001862f0550bc126d5fa0cd57a16657f755/ReleaseNotes/ReleaseNotes.txt
> 
> if one adds on this line (per our layout) or at the bottom of the file:
> https://github.com/Subsurface-divelog/subsurface/blob/f39e9001862f0550bc126d5fa0cd57a16657f755/ReleaseNotes/ReleaseNotes.txt#L27
> 
> instead of line 1:
> https://github.com/Subsurface-divelog/subsurface/blob/f39e9001862f0550bc126d5fa0cd57a16657f755/ReleaseNotes/ReleaseNotes.txt#L1
> 
> it does't work and it creates a merge conflict.
> so it only works if adding on top of the file...
> 
> to not have to change the layout of ReleaseNotes.txt, we can create a
> new file called ReleaseNotesStub.txt (not a good name)
> and make changes to it, where we instruct commits to add release notes
> on line 1.
> 
> but i'm not sure how well it would work even if only adding on top of the 
> file.

We should try this - but in a simpler way. Have an actual Changelog style file 
instead of the current format.
So change ReleaseNotes.txt to simply say "As of v4.7.5 we are tracking the 
changes in the Changelog file"
I can come up with a way to add the version markers in the Changelog file 
automatically at release time.
And if I feel ambitious, I can even copy things over

Thanks for figuring this out, Lubomir!

/D
___
subsurface mailing list
subsurface@subsurface-divelog.org
http://lists.subsurface-divelog.org/cgi-bin/mailman/listinfo/subsurface


Re: ReleaseNotes.txt and merge conflicts

2017-11-27 Thread Lubomir I. Ivanov
On 28 November 2017 at 02:53, Lubomir I. Ivanov  wrote:
> On 28 November 2017 at 02:42, Lubomir I. Ivanov  wrote:
>> On 28 November 2017 at 02:07, Thiago Macieira  wrote:
>>> On Monday, 27 November 2017 15:18:19 PST Lubomir I. Ivanov wrote:
 > Isn’t this what we are looking for:
 >
 > http://krlmlr.github.io/using-gitattributes-to-avoid-merge-conflicts/

 i think, yes. that's exactly what we are looking for.
 i wonder if it would work with the current ReleaseNotes.txt layout
 where lines are inserted at the bottom of a new release and on top of
 old ones. i guess i can test it.
>>>
>>> Since we're using GitHub itself to do the merges, can you confirm that it 
>>> does
>>> respect this .gitattributes attribute?
>>>
>>
>> i've just tried it a couple of times and it seems that it doesn't
>> support the `merge=union` attribute.
>> the github UI still gives "Can’t automatically merge".
>>
>
> i wrote that too fast,
>
> it seems that it doesn't like the layout of our ReleaseNotes or maybe
> it's something more specific.
> i got "merge=union" working with github when adding text at the top of
> the same file from two different merges / PRs.
>
> will investigate more.
>

.gitattributes
/ReleaseNotes.txt -text merge=union

so it seems that it doesn't like the layout of your file:
https://github.com/Subsurface-divelog/subsurface/blob/f39e9001862f0550bc126d5fa0cd57a16657f755/ReleaseNotes/ReleaseNotes.txt

if one adds on this line (per our layout) or at the bottom of the file:
https://github.com/Subsurface-divelog/subsurface/blob/f39e9001862f0550bc126d5fa0cd57a16657f755/ReleaseNotes/ReleaseNotes.txt#L27

instead of line 1:
https://github.com/Subsurface-divelog/subsurface/blob/f39e9001862f0550bc126d5fa0cd57a16657f755/ReleaseNotes/ReleaseNotes.txt#L1

it does't work and it creates a merge conflict.
so it only works if adding on top of the file...

to not have to change the layout of ReleaseNotes.txt, we can create a
new file called ReleaseNotesStub.txt (not a good name)
and make changes to it, where we instruct commits to add release notes
on line 1.

but i'm not sure how well it would work even if only adding on top of the file.

lubomir
--
___
subsurface mailing list
subsurface@subsurface-divelog.org
http://lists.subsurface-divelog.org/cgi-bin/mailman/listinfo/subsurface


Re: ReleaseNotes.txt and merge conflicts

2017-11-27 Thread Lubomir I. Ivanov
On 28 November 2017 at 02:42, Lubomir I. Ivanov  wrote:
> On 28 November 2017 at 02:07, Thiago Macieira  wrote:
>> On Monday, 27 November 2017 15:18:19 PST Lubomir I. Ivanov wrote:
>>> > Isn’t this what we are looking for:
>>> >
>>> > http://krlmlr.github.io/using-gitattributes-to-avoid-merge-conflicts/
>>>
>>> i think, yes. that's exactly what we are looking for.
>>> i wonder if it would work with the current ReleaseNotes.txt layout
>>> where lines are inserted at the bottom of a new release and on top of
>>> old ones. i guess i can test it.
>>
>> Since we're using GitHub itself to do the merges, can you confirm that it 
>> does
>> respect this .gitattributes attribute?
>>
>
> i've just tried it a couple of times and it seems that it doesn't
> support the `merge=union` attribute.
> the github UI still gives "Can’t automatically merge".
>

i wrote that too fast,

it seems that it doesn't like the layout of our ReleaseNotes or maybe
it's something more specific.
i got "merge=union" working with github when adding text at the top of
the same file from two different merges / PRs.

will investigate more.

lubomir
--
___
subsurface mailing list
subsurface@subsurface-divelog.org
http://lists.subsurface-divelog.org/cgi-bin/mailman/listinfo/subsurface


Re: ReleaseNotes.txt and merge conflicts

2017-11-27 Thread Lubomir I. Ivanov
On 28 November 2017 at 02:07, Thiago Macieira  wrote:
> On Monday, 27 November 2017 15:18:19 PST Lubomir I. Ivanov wrote:
>> > Isn’t this what we are looking for:
>> >
>> > http://krlmlr.github.io/using-gitattributes-to-avoid-merge-conflicts/
>>
>> i think, yes. that's exactly what we are looking for.
>> i wonder if it would work with the current ReleaseNotes.txt layout
>> where lines are inserted at the bottom of a new release and on top of
>> old ones. i guess i can test it.
>
> Since we're using GitHub itself to do the merges, can you confirm that it does
> respect this .gitattributes attribute?
>

i've just tried it a couple of times and it seems that it doesn't
support the `merge=union` attribute.
the github UI still gives "Can’t automatically merge".

github issues like this one:
https://github.com/isaacs/github/issues/487
suggest that Gitlab already supports merge=union, but Github still doesn't.

users are proposing a tool called `git-merge-changelog`
https://github.com/isaacs/github/issues/560

but to me it seems that one has to build a custom Git or a Git plugin
got use it:
http://git.savannah.gnu.org/gitweb/?p=gnulib.git;a=blob;f=lib/git-merge-changelog.c

in the meantime i like what Qt is doing and we can end up with a similar systax:

---
commit title

commit message body
commit message body
commit message body

[ReleaseNote]
- ReleaseNote text...
  ReleaseNote text...
  ReleaseNote text...
[/ReleaseNote]
---

then write a script (perhaps in perl) that goes from start to end
commit and collects all release notes.

lubomir
--
___
subsurface mailing list
subsurface@subsurface-divelog.org
http://lists.subsurface-divelog.org/cgi-bin/mailman/listinfo/subsurface


Re: ReleaseNotes.txt and merge conflicts

2017-11-27 Thread Thiago Macieira
On Monday, 27 November 2017 15:18:19 PST Lubomir I. Ivanov wrote:
> > Isn’t this what we are looking for:
> > 
> > http://krlmlr.github.io/using-gitattributes-to-avoid-merge-conflicts/
> 
> i think, yes. that's exactly what we are looking for.
> i wonder if it would work with the current ReleaseNotes.txt layout
> where lines are inserted at the bottom of a new release and on top of
> old ones. i guess i can test it.

Since we're using GitHub itself to do the merges, can you confirm that it does 
respect this .gitattributes attribute?

-- 
Thiago Macieira - thiago (AT) macieira.info - thiago (AT) kde.org
   Software Architect - Intel Open Source Technology Center

___
subsurface mailing list
subsurface@subsurface-divelog.org
http://lists.subsurface-divelog.org/cgi-bin/mailman/listinfo/subsurface


Re: ReleaseNotes.txt and merge conflicts

2017-11-27 Thread Thiago Macieira
On Monday, 27 November 2017 14:19:50 PST Lubomir I. Ivanov wrote:
> maybe we can think of a mechanic to avoid the release note conflicts,
> as these are more common now that everyone edits the file next to a
> pull request.

The way we do in Qt is to add it to the commit message. Later, in the release 
process, we run a script that collects all entries and produces the file.

If we want to use the Qt script, the format is:

[ChangeLog][Area1][Area2] Text text.

The Area2 is optional. Each entry is a separate Git commit message paragraph, 
so it can be wrapped around multiple lines and needs to be separated from 
other text (including other entries) by a blank line. See as an example:

http://code.qt.io/cgit/qt/qtbase.git/commit/?
id=92ca09147fc239762927595165f71a0d1ecff98f

-- 
Thiago Macieira - thiago (AT) macieira.info - thiago (AT) kde.org
   Software Architect - Intel Open Source Technology Center

___
subsurface mailing list
subsurface@subsurface-divelog.org
http://lists.subsurface-divelog.org/cgi-bin/mailman/listinfo/subsurface


Re: ReleaseNotes.txt and merge conflicts

2017-11-27 Thread Lubomir I. Ivanov
On 28 November 2017 at 00:45, Dirk Hohndel  wrote:
>
> On Nov 27, 2017, at 2:19 PM, Lubomir I. Ivanov  wrote:
>
> hello,
>
> maybe we can think of a mechanic to avoid the release note conflicts,
> as these are more common now that everyone edits the file next to a
> pull request.
>
> Currently, if they are 2 pending pull-requests at Github and one of
> them gets merged there is a good change that this will create a merge
> conflict for the second PR that also touches the notes.
>
> i wonder if there is a way to stage / schedule a release note and
> something else can merge it later that would be best.
>
> i was thinking about using Google docs to collaborate on a "latest
> release notes changes" document, but that requires invites and someone
> has to commit them manually in the end.
>
>
> Isn’t this what we are looking for:
>
> http://krlmlr.github.io/using-gitattributes-to-avoid-merge-conflicts/
>


i think, yes. that's exactly what we are looking for.
i wonder if it would work with the current ReleaseNotes.txt layout
where lines are inserted at the bottom of a new release and on top of
old ones. i guess i can test it.

thanks for the link.
lubomir
--
___
subsurface mailing list
subsurface@subsurface-divelog.org
http://lists.subsurface-divelog.org/cgi-bin/mailman/listinfo/subsurface


Re: ReleaseNotes.txt and merge conflicts

2017-11-27 Thread Dirk Hohndel

> On Nov 27, 2017, at 2:19 PM, Lubomir I. Ivanov  wrote:
> 
> hello,
> 
> maybe we can think of a mechanic to avoid the release note conflicts,
> as these are more common now that everyone edits the file next to a
> pull request.
> 
> Currently, if they are 2 pending pull-requests at Github and one of
> them gets merged there is a good change that this will create a merge
> conflict for the second PR that also touches the notes.
> 
> i wonder if there is a way to stage / schedule a release note and
> something else can merge it later that would be best.
> 
> i was thinking about using Google docs to collaborate on a "latest
> release notes changes" document, but that requires invites and someone
> has to commit them manually in the end.

Isn’t this what we are looking for:

http://krlmlr.github.io/using-gitattributes-to-avoid-merge-conflicts/ 


/D___
subsurface mailing list
subsurface@subsurface-divelog.org
http://lists.subsurface-divelog.org/cgi-bin/mailman/listinfo/subsurface