Re: HEADS UP: FreeBSD src repo transitioning to git this weekend

2021-01-04 Thread Ulrich Spörlein

On Sun, 2021-01-03 at 19:02:24 +0100, Helge Oldach wrote:

Hi all,

I have deep cloned main from https://git.freebsd.org/src.git as
described in the mini primer and started pulling updates. Now I'm
stumbling over a bit of confusion:

| hmo@p48 /usr/src $ git log -p e35a01eec6926bfb5c088ca8961079b51a067bf3
| commit e35a01eec6926bfb5c088ca8961079b51a067bf3
| Merge: 2ff66a91552 96b88ac701b
| Author: Philip Paeps 
| Date:   Wed Dec 30 12:50:26 2020 +0800
|
| contrib/tzdata: import tzdata 2020f
|
| Merge commit '96b88ac701b35ce68425046d4be8f51cb75b5d5b' into main
|
| Changes: https://github.com/eggert/tz/blob/2020f/NEWS
|
| MFC after:1 day
|
| commit 96b88ac701b35ce68425046d4be8f51cb75b5d5b
| Author: Philip Paeps 
| Date:   Wed Dec 30 12:45:24 2020 +0800
|
| Import tzdata 2020f
|
| diff --git a/Makefile b/Makefile
| index 5064a190c5a..1136af9298f 100644
| --- a/Makefile
| +++ b/Makefile
| @@ -945,7 +945,10 @@ check_public: $(VERSION_DEPS)
| mkdir public.dir
| ln $(VERSION_DEPS) public.dir

What confuses me is that the diff refers to just "Makefile". Same for
the other files in this commit. The diff just looks like the vendor
commit and not like the merged commit. This is kind of confusing as
clearly this commit does not refer to the main source Makefile, but just
to contrib/tzdata/Makefile.


Well, you're looking at the diff of the vendor import, not the diff of 
the merge commit. The vendor area doesn't have a prefix in its tree, see 
the output of

git ls-tree -r 96b88ac701b35ce68425046d4be8f51cb75b5d5b
That is the vendor area tree for tzdata.

What trips you up is that git log -p does _not_ show diffs for merge 
commits by default, because with 2 parents for a commit, what's the diff 
really? Look carefully at the 2nd line, it says "Merge: 2ff66a91552 96b88ac701b" indicating that this is a merge commit.


To get a meaningful diff output, you sadly have to hand-hold git. What 
always works is comparing 2 trees directly, so (add -p to see full 
diff):

% git diff-tree 2ff66a91552 e35a01eec6926bfb5c088ca8961079b51a067bf3
:04 04 8feda71c4bc2d2deb3a6c3dcf19ca1272ef51c71 
6e6f976db44b4430645b0c6d7a169d5e5564acec M  contrib

This has to assume that the first parent shown was the previous commit 
on main, but it could well have been the other way round. But you also 
list the commit for 96b88ac701b35ce68425046d4be8f51cb75b5d5b so it's 
clear that this had to be the one.


You can short-cut this, assuming that the first parent will always be on 
main (I think this is true in the conversion).


% git diff e35a01eec^1..e35a01eec

(^1 means first parent of the commit, and is often equivalent to ~1 
which means "go 1 back").


At which point you can read git-log(1) and see that there's also a 
--first-parent option, which will only walk the first parent and 
properly works in tandem with -p.


hth
Uli
___
freebsd-stable@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/freebsd-stable
To unsubscribe, send any mail to "freebsd-stable-unsubscr...@freebsd.org"


Re: HEADS UP: FreeBSD src repo transitioning to git this weekend

2020-12-31 Thread Ed Maste
On Thu, 31 Dec 2020 at 02:50, Helge Oldach  wrote:
>
> The only sensible way out is to retire mergemaster and switch to
> etcupdate. This would affect any stable/1? users building from source.

stable/11 and stable/12 users can continue to update via svn and have
$FreeBSD$ expanded, for the life of those branches.
___
freebsd-stable@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/freebsd-stable
To unsubscribe, send any mail to "freebsd-stable-unsubscr...@freebsd.org"


Re: HEADS UP: FreeBSD src repo transitioning to git this weekend

2020-12-31 Thread George Mitchell

On 12/23/20 11:58 AM, Warner Losh wrote:

[...]

mergemaster and etcupdate can cope without them.

Warner
[...]


Until this moment, I had never heard of etcupdate, and I had
mergemaster practically programmed into my fingers for system updates.
So I read the man page for etcupdate, and it looks like just what I
should have been using all along!

Given that my habitual method for updating with mergemaster will
clearly not work any more, it seems highly regrettable that there
is no reference to etcupdate anywhere in the FreeBSD Handbook, or
in /usr/src/UPDATING in the tail end COMMON ITEMS section.  If it
hadn't been for this email thread, I never would have found out
about it (and I would have become highly wrought when update time
rolled around once again).

Could someone who is more familiar with etcupdate please modify
/usr/src/UPDATING and the Handbook appropriately?  Thanks. -- George



OpenPGP_signature
Description: OpenPGP digital signature


Re: HEADS UP: FreeBSD src repo transitioning to git this weekend

2020-12-31 Thread David Wolfskill
On Thu, Dec 31, 2020 at 01:06:17PM +0200, Christos Chatzaras wrote:
>  ...
> But the latest doc version has no reference about "mergemaster -p".
> 
> So "mergemaster/etcupdate -p" is not needed if we use 12.2?
> 

I used src/UPDATING (near the end, under "COMMON ITEMS", then "To
rebuild everything and install it on the current system.") to inform me
as to the proper sequence.

It cites the use of "mergemaster -Fp"; accordingly, for my (daily)
tracking of stable/12 (and head), I (now) invoke "etcupdate -p" before
"make installworld" and "etcupdate" (without "-p" after "make
installworld".

Gory details (which I have tried to update to reflect reality) are at:
https://www.catwhisker.org/~david/FreeBSD/upgrade.html

Peace,
david
-- 
David H. Wolfskill  da...@catwhisker.org
While Trump successfully conned a lot of people for a while, in the
end he's just a failure throwing a temper tantrum because he lost.

See https://www.catwhisker.org/~david/publickey.gpg for my public key.


signature.asc
Description: PGP signature


Re: HEADS UP: FreeBSD src repo transitioning to git this weekend

2020-12-31 Thread Christos Chatzaras



> Or I don't need "etcupdate -p" ? In 
> https://www.freebsd.org/doc/en_US.ISO8859-1/books/handbook/makeworld.html 
>  I 
> don't see that "mergemaster -p" is needed and I don't remember where I found 
> this command but I use it for a long time.


I found the "mergemaster -p" in an older doc version:

http://www.far-far-away.com/doc/en_US.ISO8859-1/books/handbook/makeworld.html 



mergemaster -p :

This does some initial configuration file updates in preparation for the new 
world. For instance it may add new user groups to the system, or new user names 
to the password database. This is often necessary when new groups or special 
system-user accounts have been added since the last update, so that the 
installworld step will be able to use the newly installed system user or system 
group names without problems.

But the latest doc version has no reference about "mergemaster -p".

So "mergemaster/etcupdate -p" is not needed if we use 12.2?
___
freebsd-stable@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/freebsd-stable
To unsubscribe, send any mail to "freebsd-stable-unsubscr...@freebsd.org"


Re: HEADS UP: FreeBSD src repo transitioning to git this weekend

2020-12-31 Thread Christos Chatzaras



> No need to. etcupdate should merge back local changes and shout if it
> can't.
> 

So I run these commands?

rm -fr /usr/src
gitup release

cd /usr/src
make buildworld
make buildkernel

make installkernel
etcupdate -p
make installworld
etcupdate

Or I don't need "etcupdate -p" ? In 
https://www.freebsd.org/doc/en_US.ISO8859-1/books/handbook/makeworld.html 
 I 
don't see that "mergemaster -p" is needed and I don't remember where I found 
this command but I use it for a long time.
___
freebsd-stable@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/freebsd-stable
To unsubscribe, send any mail to "freebsd-stable-unsubscr...@freebsd.org"


Re: HEADS UP: FreeBSD src repo transitioning to git this weekend

2020-12-31 Thread Christos Chatzaras



> On 31 Dec 2020, at 09:50, Helge Oldach  wrote:
> 
> Mergemaster is looking for "[$]${ID_TAG}:" (note the colon) which will
> break with the git "$FreeBSD$" scheme. This makes autoupdate annoyingly
> explicit as local changes to /etc files will no longer be recognized as
> "accepted".
> 
> Furthermore, will the replay from git to svn (for stable branches)
> retain the existing "$FreeBSD: ..." tags? I guess not...
> 
> The only sensible way out is to retire mergemaster and switch to
> etcupdate. This would affect any stable/1? users building from source.
> 
> IMHO this is suprising behaviour and deserves a note in UPDATING.
> 
> Kind regards
> Helge


If I understood it correctly when we upgrade to a new patch level in the same 
releng (for example 12.2p1 to 12.2p2) the mergmaster will ask us again to 
merge/install/ignore every file we made changes in /etc . With SVN this 
happened only once when we upgrade from different releng (for example 12.1 to 
12.2) and upgrading to a new patch level need less work for the system 
administrator.

First time I hear about etcupdate.

Until now I use these commands to upgrade:

cd /usr/src
make buildworld
make buildkernel

make installkernel
mergemaster -p
make installworld
mergemaster -UiF

So now the commands will be like this?

cd /usr/src
make buildworld
make buildkernel

make installkernel
make installworld
etcupdate

Or we have to run etcupdate before installworld to save our local changes?
___
freebsd-stable@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/freebsd-stable
To unsubscribe, send any mail to "freebsd-stable-unsubscr...@freebsd.org"


Re: HEADS UP: FreeBSD src repo transitioning to git this weekend

2020-12-31 Thread Marek Zarychta

W dniu 31.12.2020 o 08:50, Helge Oldach pisze:

Warner Losh wrote on Wed, 23 Dec 2020 17:58:10 +0100 (CET):

On Wed, Dec 23, 2020 at 3:35 AM Marek Zarychta < zarychtam at 
plan-b.pwste.edu.pl> wrote:

In file header, we have now only $FreeBSD$ since svn tags
disappeared after the transition. Adding ident tags to certain
files which are updated by mergemaster(8) or etcupdated(8) would be
appreciated.

mergemaster and etcupdate can cope without them.

Mergemaster is looking for "[$]${ID_TAG}:" (note the colon) which will
break with the git "$FreeBSD$" scheme. This makes autoupdate annoyingly
explicit as local changes to /etc files will no longer be recognized as
"accepted".

Furthermore, will the replay from git to svn (for stable branches)
retain the existing "$FreeBSD: ..." tags? I guess not...

The only sensible way out is to retire mergemaster and switch to
etcupdate. This would affect any stable/1? users building from source.

IMHO this is suprising behaviour and deserves a note in UPDATING.

Kind regards
Helge



We can still make use of these $FreeBSD$ tags with Git clean and smudge
filters.[1] This will help to keep the track of files updated by
mergemaster(8) or etcupdate(8). The whole work can be done at
local git repository administrator level.

The filters should be applied to only the files important for mergemagster. 
Applying filters to the whole repository incredibly slows it down.
So far I found the reasonable subset of filtered files looking like this:

etc/*
etc/*/*
libexec/rc/*
libexec/rc/rc.d/*
*.conf
dot.??*
lib/libc/gen/shells
lib/libc/net/hosts
lib/libpam/pam.d/*
usr.sbin/cron/cron/crontab
crypto/openssh/ssh*_config


[1]https://git-scm.com/book/en/v2/Customizing-Git-Git-Attributes

Regards,

--
Marek Zarychta


___
freebsd-stable@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/freebsd-stable
To unsubscribe, send any mail to "freebsd-stable-unsubscr...@freebsd.org"


Re: HEADS UP: FreeBSD src repo transitioning to git this weekend

2020-12-24 Thread Mamontov Roman

> Greetings,

> The FreeBSD project will be moving it's source repo from subversion to git
> starting this this weekend. The docs repo was moved 2 weeks ago. The ports
> repo will move at the end of March, 2021 due to timing issues.

> The short version is that we're switching the version control we're using.
> This switch will preserve much of the current FreeBSD development workflow.
> After the switch, the subversion repo will become almost read-only. All
> future work will be done in git, however as a transition aide we'll be
> replaying the MFCs to stable/11, stable/12 and the related releng branches
> for the life of those branches.

> For more detailed information, please see
> https://github.com/bsdimp/freebsd-git-docs/ for the current documentation.

> Please see https://wiki.freebsd.org/git for the latest detailed schedule
> (please note that this schedule is subject to change).

Maybe my question is not directly linked with Git transition:
 earlier I can track commits to src tree via mailman list (svn-src-stable-12 
for example)
and select important commits to some parts of system or author of commit:
svn commit: r368642 - stable/12/sys/amd64/vmm/io   John Baldwin
Now in dev-commits-src-branches list (is there a separate list for stable-12 
branch for
example?) I see hash and log message from commit:
git: d16dac42b641 - Apply upstream fix 
08968baec1122a58bb90d8f97ad948a75f8a5d69:   Xin LI 
May change in list commit message to system part of commit, as it be ealier?

___
freebsd-stable@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/freebsd-stable
To unsubscribe, send any mail to "freebsd-stable-unsubscr...@freebsd.org"


Re: HEADS UP: FreeBSD src repo transitioning to git this weekend

2020-12-23 Thread Rainer Hurling
Am 23.12.20 um 21:55 schrieb Ulrich Spörlein:
> On Wed, 2020-12-23 at 12:19:47 -0800, John Kennedy wrote:
>> On Mon, Dec 21, 2020 at 12:47:38PM -0800, John Kennedy wrote:
>>> On Wed, Dec 16, 2020 at 05:46:35PM -0700, Warner Losh wrote:
>>> > The FreeBSD project will be moving it's source repo from subversion
>>> to git
>>> > starting this this weekend. The docs repo was moved 2 weeks ago.
>>> The ports
>>> > repo will move at the end of March, 2021 due to timing issues. ...
>>>
>>>   I filed Bug 252028 (sys/conf/newvers.sh: git "-dirty" even when
>>> clean),
>>> but that's just a trivial issue with my source tree being marked -dirty
>>> when it isn't, and that would have been part of r368709 anyway.  All my
>>> other git nits have been my own (refs/notes and origin name).
>>
>>  Warner/others, up to r368820, we had log entries that looked like this:
>>
>> commit 3cc0c0d66a065554459bd2f9b4f80cc07426464a
>> Author: Li-Wen Hsu 
>> Date:   Sun Dec 20 02:59:44 2020 +
>> 
>>     Mark the repository as being converted to Git.
>> 
>>     This is the last Subversion commit to src.
>> 
>>     Sponsored by:   The FreeBSD Foundation
>> 
>> Notes:
>>     svn path=/head/; revision=368820
>>
>>  Now, our git logs look like this:
>>
>> commit 17eba5e32a2cf7a217bb9f1e5dcca351f2b71cfc
>> Author: Ed Maste 
>> Date:   Tue Dec 22 23:31:15 2020 -0500
>> 
>>     newvers.sh: fix sense of git dirty check
>> 
>>     Previously we reported -dirty for an unmodified tree, and no
>> -dirty if
>>     there were changes.
>> 
>>     PR: 252028
>>     Reported by:    John Kennedy
>>
>>  (Specifically, no Notes: with revision= value)
> 
> Yes, these notes are merely pointers to the SVN revisions. Without SVN,
> we will of course not get any new notes.
> 
>>  For the kernel I compiled today, the uname output dumps out:
>>
>> FreeBSD 13.0-CURRENT #245 r368820+878d53410f75-c255274(main): ...
>>
>>  Last kernel was (-dirty since fixed):
>>
>> FreeBSD 13.0-CURRENT #244
>> r368820+3cc0c0d66a06-c255241(main)-dirty: ...
>>
>>  So, the r368820-value isn't being updated for it to find anymore. 
>> The middle
>> value corresponds to the git commit and does have value (878d53410f75
>> is your
>> "UPDATING: Announce git transition", 3cc0c0d66a06 was the "Mark the
>> repository
>> as being converted to Git" r368820 commit).
> 
> Yeah, that's a bug in newvers.sh, thanks for pointing that out. It finds
> "some" note in the last 10k revs and then uses that, instead of properly
> falling back to counting from HEAD, which would result in -c255126 or
> something around that.

I built HEAD this afternoon and got 'FreeBSD 13.0-CURRENT #0
92be2847e84-c255272(main): Wed Dec 23 17:39:31 CET 2020'. The counting
seems more correct here?

> We'll fix it ...
> 
> Cheers
> Uli
___
freebsd-stable@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/freebsd-stable
To unsubscribe, send any mail to "freebsd-stable-unsubscr...@freebsd.org"


Re: HEADS UP: FreeBSD src repo transitioning to git this weekend

2020-12-23 Thread Ulrich Spörlein

On Wed, 2020-12-23 at 12:19:47 -0800, John Kennedy wrote:

On Mon, Dec 21, 2020 at 12:47:38PM -0800, John Kennedy wrote:

On Wed, Dec 16, 2020 at 05:46:35PM -0700, Warner Losh wrote:
> The FreeBSD project will be moving it's source repo from subversion to git
> starting this this weekend. The docs repo was moved 2 weeks ago. The ports
> repo will move at the end of March, 2021 due to timing issues. ...

  I filed Bug 252028 (sys/conf/newvers.sh: git "-dirty" even when clean),
but that's just a trivial issue with my source tree being marked -dirty
when it isn't, and that would have been part of r368709 anyway.  All my
other git nits have been my own (refs/notes and origin name).


 Warner/others, up to r368820, we had log entries that looked like this:

commit 3cc0c0d66a065554459bd2f9b4f80cc07426464a
Author: Li-Wen Hsu 
Date:   Sun Dec 20 02:59:44 2020 +

Mark the repository as being converted to Git.

This is the last Subversion commit to src.

Sponsored by:   The FreeBSD Foundation

Notes:
svn path=/head/; revision=368820

 Now, our git logs look like this:

commit 17eba5e32a2cf7a217bb9f1e5dcca351f2b71cfc
Author: Ed Maste 
Date:   Tue Dec 22 23:31:15 2020 -0500

newvers.sh: fix sense of git dirty check

Previously we reported -dirty for an unmodified tree, and no -dirty 
if
there were changes.

PR: 252028
Reported by:John Kennedy

 (Specifically, no Notes: with revision= value)


Yes, these notes are merely pointers to the SVN revisions. Without SVN, 
we will of course not get any new notes.



 For the kernel I compiled today, the uname output dumps out:

FreeBSD 13.0-CURRENT #245 r368820+878d53410f75-c255274(main): ...

 Last kernel was (-dirty since fixed):

FreeBSD 13.0-CURRENT #244 r368820+3cc0c0d66a06-c255241(main)-dirty: ...

 So, the r368820-value isn't being updated for it to find anymore.  The middle
value corresponds to the git commit and does have value (878d53410f75 is your
"UPDATING: Announce git transition", 3cc0c0d66a06 was the "Mark the repository
as being converted to Git" r368820 commit).


Yeah, that's a bug in newvers.sh, thanks for pointing that out. It finds 
"some" note in the last 10k revs and then uses that, instead of properly 
falling back to counting from HEAD, which would result in -c255126 or 
something around that.


We'll fix it ...

Cheers
Uli
___
freebsd-stable@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/freebsd-stable
To unsubscribe, send any mail to "freebsd-stable-unsubscr...@freebsd.org"


Re: HEADS UP: FreeBSD src repo transitioning to git this weekend

2020-12-23 Thread John Kennedy
On Mon, Dec 21, 2020 at 12:47:38PM -0800, John Kennedy wrote:
> On Wed, Dec 16, 2020 at 05:46:35PM -0700, Warner Losh wrote:
> > The FreeBSD project will be moving it's source repo from subversion to git
> > starting this this weekend. The docs repo was moved 2 weeks ago. The ports
> > repo will move at the end of March, 2021 due to timing issues. ...
> 
>   I filed Bug 252028 (sys/conf/newvers.sh: git "-dirty" even when clean),
> but that's just a trivial issue with my source tree being marked -dirty
> when it isn't, and that would have been part of r368709 anyway.  All my
> other git nits have been my own (refs/notes and origin name).

  Warner/others, up to r368820, we had log entries that looked like this:

commit 3cc0c0d66a065554459bd2f9b4f80cc07426464a
Author: Li-Wen Hsu 
Date:   Sun Dec 20 02:59:44 2020 +

Mark the repository as being converted to Git.

This is the last Subversion commit to src.

Sponsored by:   The FreeBSD Foundation

Notes:
svn path=/head/; revision=368820

  Now, our git logs look like this:

commit 17eba5e32a2cf7a217bb9f1e5dcca351f2b71cfc
Author: Ed Maste 
Date:   Tue Dec 22 23:31:15 2020 -0500

newvers.sh: fix sense of git dirty check

Previously we reported -dirty for an unmodified tree, and no -dirty 
if
there were changes.

PR: 252028
Reported by:John Kennedy

  (Specifically, no Notes: with revision= value)

  For the kernel I compiled today, the uname output dumps out:

FreeBSD 13.0-CURRENT #245 r368820+878d53410f75-c255274(main): ...

  Last kernel was (-dirty since fixed):

FreeBSD 13.0-CURRENT #244 r368820+3cc0c0d66a06-c255241(main)-dirty: ...

  So, the r368820-value isn't being updated for it to find anymore.  The middle
value corresponds to the git commit and does have value (878d53410f75 is your
"UPDATING: Announce git transition", 3cc0c0d66a06 was the "Mark the repository
as being converted to Git" r368820 commit).

  How do you plan on referencing distinct patches now?  If the revision number
is going away, we might as well yank it out since it'll be r368820 forever.

  For my git projects, I often use a "git tag -a" (annotated) commit at useful
milestones, but I'm not sure what you're using it for:

[git describe]
vendor/bc/3.2.3-255270-g3f3cc995a35a

___
freebsd-stable@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/freebsd-stable
To unsubscribe, send any mail to "freebsd-stable-unsubscr...@freebsd.org"


Re: HEADS UP: FreeBSD src repo transitioning to git this weekend

2020-12-23 Thread Michael Grimm
Renato Botelho  wrote:

> If you want to switch to a different already existing branch, as svn switch 
> does, you should look at git-checkout.
> 
> It can be a bit expensive due to the size of src repository so if you do work 
> on multiple branches too often you can improve it using git-worktree.

If I understand git-worktree(1) correctly I will most probably not need it, 
because I will only follow one single branch stable/12, and soon stable/13. Or 
do I miss something important?

Thanks and regards,
Michael
 
___
freebsd-stable@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/freebsd-stable
To unsubscribe, send any mail to "freebsd-stable-unsubscr...@freebsd.org"


Re: HEADS UP: FreeBSD src repo transitioning to git this weekend

2020-12-23 Thread Michael Grimm
Warner Losh  wrote:
> On Wed, Dec 23, 2020 at 7:32 AM Michael Grimm  wrote:

>> With svn I used:
>>svn switch svn://svn.freebsd.org/base/stable/NEW /usr/src
>> 
>> For git I found:
>>git branch -m stable/OLD stable/NEW
>>or
>>git branch -M stable/OLD stable/NEW
> 
> I think the answer is a simple "git checkout NEW". This will replace the
> current tree at branch OLD with the contents of branch NEW.


Thanks to all of you pointing me away from renaming a branch instead of simply 
checking out the branch of interest.


> git branch -m is different and changes what the branch means. If you did
> what you suggested then you'd be renaming the OLD brnach to NEW, which
> isn't what I think you're asking about.

No, I will not apply anything before having it understood. In this case I 
looked into git-branch(1) because I believed this the command to be. Haven't 
found git-checkout(1) :-( Sorry for the noise.

Now, stable/13 may come, I am ready to switch ;-)

Thanks again and regards,
Michael
___
freebsd-stable@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/freebsd-stable
To unsubscribe, send any mail to "freebsd-stable-unsubscr...@freebsd.org"


Re: HEADS UP: FreeBSD src repo transitioning to git this weekend

2020-12-23 Thread Karl Denninger


On 12/23/2020 12:01, Warner Losh wrote:

On Wed, Dec 23, 2020 at 7:32 AM Michael Grimm  wrote:


Hi,

Warner Losh  wrote:


The FreeBSD project will be moving it's source repo from subversion to

git

starting this this weekend.

First of all I'd like to thank all those involved in this for their
efforts.

Following
https://github.com/bsdimp/freebsd-git-docs/blob/main/mini-primer.md form
your other mail I was able to migrate from svn to git without running into
any issues.

Right now I am learning how to use git the way I sed svn before. I am just
following 12-STABLE in order to build world and kernel. I am not
developing, neither am I committing.

I wonder how one would switch from a currently used branch (OLD) to
another branch (NEW).

With svn I used:
 svn switch svn://svn.freebsd.org/base/stable/NEW /usr/src

For git I found:
 git branch -m stable/OLD stable/NEW
 or
 git branch -M stable/OLD stable/NEW

git-branch(1):
With a -m or -M option,  will be renamed to .
If
 had a corresponding reflog, it is renamed to match
, and a reflog entry is created to remember the branch
renaming. If  exists, -M must be used to force the
rename to
happen.

I don't understand that text completely, because I don't know what a
reflog is, yet ;-)

Thus: Should I use "-m" or "-M" in my scenario when switching from
stable/12 to stable/13 in the near future?


I think the answer is a simple "git checkout NEW". This will replace the
current tree at branch OLD with the contents of branch NEW.

git branch -m is different and changes what the branch means. If you did
what you suggested then you'd be renaming the OLD brnach to NEW, which
isn't what I think you're asking about.


Correct -- "git checkout NEW" where "new" is the desired branch you wish 
to have "active."


If you have made local changes it will tell you to act on that first; 
the usual is "git stash" to save them.  You can then apply them with 
"git stash apply" to the *new* branch, assuming that makes sense to do 
(e.g. a kernel configuration file, etc.) "Stash" maintains a stack which 
can be manipulated as well (so a "stash" if you already "stash"ed and 
did not drop it creates a second one, aka "stash@(0) and stash@(1)".


--
Karl Denninger
k...@denninger.net 
/The Market Ticker/
/[S/MIME encrypted email preferred]/


smime.p7s
Description: S/MIME Cryptographic Signature


Re: HEADS UP: FreeBSD src repo transitioning to git this weekend

2020-12-23 Thread Warner Losh
On Wed, Dec 23, 2020 at 7:32 AM Michael Grimm  wrote:

> Hi,
>
> Warner Losh  wrote:
>
> > The FreeBSD project will be moving it's source repo from subversion to
> git
> > starting this this weekend.
>
> First of all I'd like to thank all those involved in this for their
> efforts.
>
> Following
> https://github.com/bsdimp/freebsd-git-docs/blob/main/mini-primer.md form
> your other mail I was able to migrate from svn to git without running into
> any issues.
>
> Right now I am learning how to use git the way I sed svn before. I am just
> following 12-STABLE in order to build world and kernel. I am not
> developing, neither am I committing.
>
> I wonder how one would switch from a currently used branch (OLD) to
> another branch (NEW).
>
> With svn I used:
> svn switch svn://svn.freebsd.org/base/stable/NEW /usr/src
>
> For git I found:
> git branch -m stable/OLD stable/NEW
> or
> git branch -M stable/OLD stable/NEW
>
> git-branch(1):
>With a -m or -M option,  will be renamed to .
> If
> had a corresponding reflog, it is renamed to match
>, and a reflog entry is created to remember the branch
>renaming. If  exists, -M must be used to force the
> rename to
>happen.
>
> I don't understand that text completely, because I don't know what a
> reflog is, yet ;-)
>
> Thus: Should I use "-m" or "-M" in my scenario when switching from
> stable/12 to stable/13 in the near future?
>

I think the answer is a simple "git checkout NEW". This will replace the
current tree at branch OLD with the contents of branch NEW.

git branch -m is different and changes what the branch means. If you did
what you suggested then you'd be renaming the OLD brnach to NEW, which
isn't what I think you're asking about.

Warner
___
freebsd-stable@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/freebsd-stable
To unsubscribe, send any mail to "freebsd-stable-unsubscr...@freebsd.org"


Re: HEADS UP: FreeBSD src repo transitioning to git this weekend

2020-12-23 Thread Warner Losh
On Wed, Dec 23, 2020 at 3:35 AM Marek Zarychta <
zarych...@plan-b.pwste.edu.pl> wrote:

> W dniu 17.12.2020 o 01:46, Warner Losh pisze:
> > Greetings,
> >
> > The FreeBSD project will be moving it's source repo from subversion to
> git
> > starting this this weekend. The docs repo was moved 2 weeks ago. The
> ports
> > repo will move at the end of March, 2021 due to timing issues.
> >
> > The short version is that we're switching the version control we're
> using.
> > This switch will preserve much of the current FreeBSD development
> workflow.
> > After the switch, the subversion repo will become almost read-only. All
> > future work will be done in git, however as a transition aide we'll be
> > replaying the MFCs to stable/11, stable/12 and the related releng
> branches
> > for the life of those branches.
> >
> > For more detailed information, please see
> > https://github.com/bsdimp/freebsd-git-docs/ for the current
> documentation.
> >
> > Please see https://wiki.freebsd.org/git for the latest detailed schedule
> > (please note that this schedule is subject to change).
> >
> > Warner
> > ___
> > freebsd-curr...@freebsd.org mailing list
> > https://lists.freebsd.org/mailman/listinfo/freebsd-current
> > To unsubscribe, send any mail to "
> freebsd-current-unsubscr...@freebsd.org"
> >
>
> Will the project utilize gitatributes(5) to support ident as $Id:$ in
> git repository?
>

There are no plans. $Id$, as implemented in git, records the wrong
information. Rather than a commit hash, it's the blob object hash which can
be hard to puzzle out. It would cause way more confusion were we to use it.
Plus, when I did experiments with it, it was slow and difficult to work
with. Given these issues, we've opted to not use it. Plus there's no
documented way to change $Id$ to $FreeBSD$ in an easy way, and the
filtering stuff looked extra fragile.


> In file header, we have now only $FreeBSD$ since svn tags disappeared
> after the transition. Adding ident tags to certain files which are
> updated by mergemaster(8) or etcupdated(8) would be appreciated.
>

mergemaster and etcupdate can cope without them.

Warner
___
freebsd-stable@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/freebsd-stable
To unsubscribe, send any mail to "freebsd-stable-unsubscr...@freebsd.org"


Re: HEADS UP: FreeBSD src repo transitioning to git this weekend

2020-12-23 Thread Lev Serebryakov

On 23.12.2020 18:04, Lev Serebryakov wrote:

On 23.12.2020 17:32, Michael Grimm wrote:


git-branch(1):
    With a -m or -M option,  will    be renamed to . 
If

==

     had a corresponding reflog, it is renamed to    match
    , and    a reflog entry is created to remember the branch
    renaming. If     exists,    -M must    be used    to force 
the rename to
    happen.

I don't understand that text completely, because I don't know what a reflog is, 
yet ;-)

Thus: Should I use "-m" or "-M" in my scenario when switching from stable/12 to 
stable/13 in the near future?

You should not use any options if you want to switch your working copy to new 
branch. `-m` and `-M` *renames* branch!

 I'm idiot today, it is `git checkout ` of course.

--
// Lev Serebryakov
___
freebsd-stable@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/freebsd-stable
To unsubscribe, send any mail to "freebsd-stable-unsubscr...@freebsd.org"


Re: HEADS UP: FreeBSD src repo transitioning to git this weekend

2020-12-23 Thread Lev Serebryakov

On 23.12.2020 17:32, Michael Grimm wrote:


git-branch(1):
With a -m or -M option,  will  be renamed to . If

==

 had a corresponding reflog, it is renamed to  match
, and  a reflog entry is created to remember the branch
renaming. If   exists, -M must be used to force the rename to
happen.

I don't understand that text completely, because I don't know what a reflog is, 
yet ;-)

Thus: Should I use "-m" or "-M" in my scenario when switching from stable/12 to 
stable/13 in the near future?

You should not use any options if you want to switch your working copy to new 
branch. `-m` and `-M` *renames* branch!

--
// Lev Serebryakov
___
freebsd-stable@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/freebsd-stable
To unsubscribe, send any mail to "freebsd-stable-unsubscr...@freebsd.org"


Re: HEADS UP: FreeBSD src repo transitioning to git this weekend

2020-12-23 Thread Michael Grimm
Hi,

Warner Losh  wrote:

> The FreeBSD project will be moving it's source repo from subversion to git
> starting this this weekend. 

First of all I'd like to thank all those involved in this for their efforts.

Following https://github.com/bsdimp/freebsd-git-docs/blob/main/mini-primer.md 
form your other mail I was able to migrate from svn to git without running into 
any issues.

Right now I am learning how to use git the way I sed svn before. I am just 
following 12-STABLE in order to build world and kernel. I am not developing, 
neither am I committing.

I wonder how one would switch from a currently used branch (OLD) to another 
branch (NEW).

With svn I used:
svn switch svn://svn.freebsd.org/base/stable/NEW /usr/src

For git I found:
git branch -m stable/OLD stable/NEW
or
git branch -M stable/OLD stable/NEW

git-branch(1):
   With a -m or -M option,  will be renamed to . If
had a corresponding reflog, it is renamed to match
   , and a reflog entry is created to remember the branch
   renaming. If  exists, -M must be used to force the rename to
   happen.

I don't understand that text completely, because I don't know what a reflog is, 
yet ;-)

Thus: Should I use "-m" or "-M" in my scenario when switching from stable/12 to 
stable/13 in the near future?

Thanks and regards,
Michael

___
freebsd-stable@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/freebsd-stable
To unsubscribe, send any mail to "freebsd-stable-unsubscr...@freebsd.org"


Re: HEADS UP: FreeBSD src repo transitioning to git this weekend

2020-12-23 Thread Marek Zarychta
W dniu 17.12.2020 o 01:46, Warner Losh pisze:
> Greetings,
> 
> The FreeBSD project will be moving it's source repo from subversion to git
> starting this this weekend. The docs repo was moved 2 weeks ago. The ports
> repo will move at the end of March, 2021 due to timing issues.
> 
> The short version is that we're switching the version control we're using.
> This switch will preserve much of the current FreeBSD development workflow.
> After the switch, the subversion repo will become almost read-only. All
> future work will be done in git, however as a transition aide we'll be
> replaying the MFCs to stable/11, stable/12 and the related releng branches
> for the life of those branches.
> 
> For more detailed information, please see
> https://github.com/bsdimp/freebsd-git-docs/ for the current documentation.
> 
> Please see https://wiki.freebsd.org/git for the latest detailed schedule
> (please note that this schedule is subject to change).
> 
> Warner
> ___
> freebsd-curr...@freebsd.org mailing list
> https://lists.freebsd.org/mailman/listinfo/freebsd-current
> To unsubscribe, send any mail to "freebsd-current-unsubscr...@freebsd.org"
> 

Will the project utilize gitatributes(5) to support ident as $Id:$ in
git repository?

In file header, we have now only $FreeBSD$ since svn tags disappeared
after the transition. Adding ident tags to certain files which are
updated by mergemaster(8) or etcupdated(8) would be appreciated.

Best regards,
-- 
Marek Zarychta
___
freebsd-stable@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/freebsd-stable
To unsubscribe, send any mail to "freebsd-stable-unsubscr...@freebsd.org"


Re: HEADS UP: FreeBSD src repo transitioning to git this weekend

2020-12-21 Thread John Kennedy
On Wed, Dec 16, 2020 at 05:46:35PM -0700, Warner Losh wrote:
> The FreeBSD project will be moving it's source repo from subversion to git
> starting this this weekend. The docs repo was moved 2 weeks ago. The ports
> repo will move at the end of March, 2021 due to timing issues. ...

  I filed Bug 252028 (sys/conf/newvers.sh: git "-dirty" even when clean),
but that's just a trivial issue with my source tree being marked -dirty
when it isn't, and that would have been part of r368709 anyway.  All my
other git nits have been my own (refs/notes and origin name).

___
freebsd-stable@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/freebsd-stable
To unsubscribe, send any mail to "freebsd-stable-unsubscr...@freebsd.org"