You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@mynewt.apache.org by Neilh <ne...@biomonitors.com> on 2017/02/01 17:36:14 UTC

git for all next directories

Hi

Just got a dumb question to ask - I'm working through the tutorials and 
its well explained the standard SCM/git is on

"myproj/repos/apache-mynewt-core ((mynewt_1_0_0_b1_tag))]$"

However, after the basic tutorial, with a working "newt" environment, I 
need to have the whole sandbox from "myproj" be under SCM. Then with all 
those text files, if something stops working I can trace back.  Also, it 
seems like as a project matures I could have apps be a separate 
repository - this is starting to look quite complex - and would also 
need to be integrated into creating a signed image
"newt create-image <app> 1.0.0" . 
https://mynewt.apache.org/latest/newt/command_list/newt_create_image/

Seems the simplest scenario to begin with is setting up a top level git 
from "myproj", and at least have the capability to snapshot it from there.

Are there any thoughts/linkages/tutorial on doing this?

-- 
Neil Hancock


Re: git for all next directories

Posted by Simon Ratner <si...@proxy.co>.
> In project.yml you specify what git tag to use when you’re pulling in
from those

Related request, being able to specify a commit hash, rather than just
tags, in project.yml. Useful for the mynewt-core repo when test bleeding
edge on develop, but would also come in very handy for my own repos.

Filed https://issues.apache.org/jira/browse/MYNEWT-583



On Wed, Feb 1, 2017 at 11:09 AM, marko kiiskila <ma...@runtime.io> wrote:

> I would recommend doing what David does.
>
> I see you having 2 options for dealing with stuff under repos:
> 1. freeze your project.yml, and check it in to you SCM, along with other
> packages
>     you’ve created.
>    In project.yml you specify what git tag to use when you’re pulling in
> from those other,
>    external, repositories.
>    - pros: you can easily test whether you can move forward in versions
> with external
>      repositories, you have file history available for everything under
> there, you don’t
>      need to track these files under your SCM
> 2. remove the .git directory from external repos that you fetched, and
> then check
>     everything to your SCM
>    - pros; you have a copy of all the files
>
> If you want to commit deeper, you can maintain your own repository in way
> similar
> to we do with apache-mynewt-core/mynewt_arduino_zero/nordic SDK repo. And
> then use newt to pull your code under a different directory under repos/.
> But this
> is by no means necessary; but makes sense if you want to maintain packages
> which
> you want to share with other mynewt users.
>
> At the moment newt only supports git as backend, but if you’re using some
> other SCM,
> that support can be added. We do appreciate contributions!
>
> > On Feb 1, 2017, at 10:50 AM, David G. Simmons <sa...@mac.com> wrote:
> >
> > I'm no git expert, as anyone on this list can attest to, but here's one
> of the ways I have dealt with this issue:
> >
> > The repos/ directory contains repos that are already under git, and that
> (for the most part) I'm not making changes to. Where MY changes happen is
> under the 'apps', 'targets' and my own 'libs' directories in 'myproj'
> >
> > For most of the stuff I have done, so far, I can simply make a git
> repository of the targets/<app-name> directory and/or the apps/<app-name>
> directory and be done. If I knew more about git, I'd probably be able to
> make a git repository that had the targets/<app-name> and apps/<app-name>
> directories in one repository, but I'm not. :-) And also add in the
> libs/my_driver/<driver name> stuff as well.
> >
> > dg
> >
> >> On Feb 1, 2017, at 12:36 PM, Neilh <neilh20@biomonitors.com <mailto:
> neilh20@biomonitors.com>> wrote:
> >>
> >> Hi
> >>
> >> Just got a dumb question to ask - I'm working through the tutorials and
> its well explained the standard SCM/git is on
> >>
> >> "myproj/repos/apache-mynewt-core ((mynewt_1_0_0_b1_tag))]$"
> >>
> >> However, after the basic tutorial, with a working "newt" environment, I
> need to have the whole sandbox from "myproj" be under SCM. Then with all
> those text files, if something stops working I can trace back.  Also, it
> seems like as a project matures I could have apps be a separate repository
> - this is starting to look quite complex - and would also need to be
> integrated into creating a signed image
> >> "newt create-image <app> 1.0.0" . https://mynewt.apache.org/
> latest/newt/command_list/newt_create_image/ <https://mynewt.apache.org/
> latest/newt/command_list/newt_create_image/>
> >>
> >> Seems the simplest scenario to begin with is setting up a top level git
> from "myproj", and at least have the capability to snapshot it from there.
> >>
> >> Are there any thoughts/linkages/tutorial on doing this?
> >>
> >> --
> >> Neil Hancock
> >>
> >
> > --
> > David G. Simmons
> > (919) 534-5099
> > Web <https://davidgs.com/> • Blog <https://davidgs.com/davidgs_blog> •
> Linkedin <http://linkedin.com/in/davidgsimmons> • Twitter <
> http://twitter.com/TechEvangelist1> • GitHub <http://github.com/davidgs>
> > /** Message digitally signed for security and authenticity.
> > * If you cannot read the PGP.sig attachment, please go to
> >  * http://www.gnupg.com/ <http://www.gnupg.com/> Secure your email!!!
> >  * Public key available at keyserver.pgp.com <http://keyserver.pgp.com/>
> > **/
> > ♺ This email uses 100% recycled electrons. Don't blow it by printing!
> >
> > There are only 2 hard things in computer science: Cache invalidation,
> naming things, and off-by-one errors.
> >
> >
>
>

Re: git for all next directories

Posted by aditi hilbert <ad...@runtime.io>.
BTW, there is a tutorial on converting projects into a repo:
https://mynewt.apache.org/latest/os/tutorials/repo/create_repo/

I’d encourage you to take a look at it.

thanks,
aditi

> On Feb 1, 2017, at 11:09 AM, marko kiiskila <ma...@runtime.io> wrote:
> 
> I would recommend doing what David does.
> 
> I see you having 2 options for dealing with stuff under repos:
> 1. freeze your project.yml, and check it in to you SCM, along with other packages
>    you’ve created.
>   In project.yml you specify what git tag to use when you’re pulling in from those other,
>   external, repositories.
>   - pros: you can easily test whether you can move forward in versions with external
>     repositories, you have file history available for everything under there, you don’t
>     need to track these files under your SCM
> 2. remove the .git directory from external repos that you fetched, and then check
>    everything to your SCM
>   - pros; you have a copy of all the files
> 
> If you want to commit deeper, you can maintain your own repository in way similar
> to we do with apache-mynewt-core/mynewt_arduino_zero/nordic SDK repo. And
> then use newt to pull your code under a different directory under repos/. But this
> is by no means necessary; but makes sense if you want to maintain packages which
> you want to share with other mynewt users.
> 
> At the moment newt only supports git as backend, but if you’re using some other SCM,
> that support can be added. We do appreciate contributions!
> 
>> On Feb 1, 2017, at 10:50 AM, David G. Simmons <sa...@mac.com> wrote:
>> 
>> I'm no git expert, as anyone on this list can attest to, but here's one of the ways I have dealt with this issue:
>> 
>> The repos/ directory contains repos that are already under git, and that (for the most part) I'm not making changes to. Where MY changes happen is under the 'apps', 'targets' and my own 'libs' directories in 'myproj'
>> 
>> For most of the stuff I have done, so far, I can simply make a git repository of the targets/<app-name> directory and/or the apps/<app-name> directory and be done. If I knew more about git, I'd probably be able to make a git repository that had the targets/<app-name> and apps/<app-name> directories in one repository, but I'm not. :-) And also add in the libs/my_driver/<driver name> stuff as well.
>> 
>> dg
>> 
>>> On Feb 1, 2017, at 12:36 PM, Neilh <neilh20@biomonitors.com <ma...@biomonitors.com>> wrote:
>>> 
>>> Hi
>>> 
>>> Just got a dumb question to ask - I'm working through the tutorials and its well explained the standard SCM/git is on
>>> 
>>> "myproj/repos/apache-mynewt-core ((mynewt_1_0_0_b1_tag))]$"
>>> 
>>> However, after the basic tutorial, with a working "newt" environment, I need to have the whole sandbox from "myproj" be under SCM. Then with all those text files, if something stops working I can trace back.  Also, it seems like as a project matures I could have apps be a separate repository - this is starting to look quite complex - and would also need to be integrated into creating a signed image
>>> "newt create-image <app> 1.0.0" . https://mynewt.apache.org/latest/newt/command_list/newt_create_image/ <https://mynewt.apache.org/latest/newt/command_list/newt_create_image/>
>>> 
>>> Seems the simplest scenario to begin with is setting up a top level git from "myproj", and at least have the capability to snapshot it from there.
>>> 
>>> Are there any thoughts/linkages/tutorial on doing this?
>>> 
>>> -- 
>>> Neil Hancock
>>> 
>> 
>> --
>> David G. Simmons
>> (919) 534-5099
>> Web <https://davidgs.com/> • Blog <https://davidgs.com/davidgs_blog> • Linkedin <http://linkedin.com/in/davidgsimmons> • Twitter <http://twitter.com/TechEvangelist1> • GitHub <http://github.com/davidgs>
>> /** Message digitally signed for security and authenticity.  
>> * If you cannot read the PGP.sig attachment, please go to 
>> * http://www.gnupg.com/ <http://www.gnupg.com/> Secure your email!!!
>> * Public key available at keyserver.pgp.com <http://keyserver.pgp.com/>
>> **/
>> ♺ This email uses 100% recycled electrons. Don't blow it by printing!
>> 
>> There are only 2 hard things in computer science: Cache invalidation, naming things, and off-by-one errors.
>> 
>> 
> 


Re: git for all next directories

Posted by marko kiiskila <ma...@runtime.io>.
I would recommend doing what David does.

I see you having 2 options for dealing with stuff under repos:
1. freeze your project.yml, and check it in to you SCM, along with other packages
    you’ve created.
   In project.yml you specify what git tag to use when you’re pulling in from those other,
   external, repositories.
   - pros: you can easily test whether you can move forward in versions with external
     repositories, you have file history available for everything under there, you don’t
     need to track these files under your SCM
2. remove the .git directory from external repos that you fetched, and then check
    everything to your SCM
   - pros; you have a copy of all the files

If you want to commit deeper, you can maintain your own repository in way similar
to we do with apache-mynewt-core/mynewt_arduino_zero/nordic SDK repo. And
then use newt to pull your code under a different directory under repos/. But this
is by no means necessary; but makes sense if you want to maintain packages which
you want to share with other mynewt users.

At the moment newt only supports git as backend, but if you’re using some other SCM,
that support can be added. We do appreciate contributions!

> On Feb 1, 2017, at 10:50 AM, David G. Simmons <sa...@mac.com> wrote:
> 
> I'm no git expert, as anyone on this list can attest to, but here's one of the ways I have dealt with this issue:
> 
> The repos/ directory contains repos that are already under git, and that (for the most part) I'm not making changes to. Where MY changes happen is under the 'apps', 'targets' and my own 'libs' directories in 'myproj'
> 
> For most of the stuff I have done, so far, I can simply make a git repository of the targets/<app-name> directory and/or the apps/<app-name> directory and be done. If I knew more about git, I'd probably be able to make a git repository that had the targets/<app-name> and apps/<app-name> directories in one repository, but I'm not. :-) And also add in the libs/my_driver/<driver name> stuff as well.
> 
> dg
> 
>> On Feb 1, 2017, at 12:36 PM, Neilh <neilh20@biomonitors.com <ma...@biomonitors.com>> wrote:
>> 
>> Hi
>> 
>> Just got a dumb question to ask - I'm working through the tutorials and its well explained the standard SCM/git is on
>> 
>> "myproj/repos/apache-mynewt-core ((mynewt_1_0_0_b1_tag))]$"
>> 
>> However, after the basic tutorial, with a working "newt" environment, I need to have the whole sandbox from "myproj" be under SCM. Then with all those text files, if something stops working I can trace back.  Also, it seems like as a project matures I could have apps be a separate repository - this is starting to look quite complex - and would also need to be integrated into creating a signed image
>> "newt create-image <app> 1.0.0" . https://mynewt.apache.org/latest/newt/command_list/newt_create_image/ <https://mynewt.apache.org/latest/newt/command_list/newt_create_image/>
>> 
>> Seems the simplest scenario to begin with is setting up a top level git from "myproj", and at least have the capability to snapshot it from there.
>> 
>> Are there any thoughts/linkages/tutorial on doing this?
>> 
>> -- 
>> Neil Hancock
>> 
> 
> --
> David G. Simmons
> (919) 534-5099
> Web <https://davidgs.com/> • Blog <https://davidgs.com/davidgs_blog> • Linkedin <http://linkedin.com/in/davidgsimmons> • Twitter <http://twitter.com/TechEvangelist1> • GitHub <http://github.com/davidgs>
> /** Message digitally signed for security and authenticity.  
> * If you cannot read the PGP.sig attachment, please go to 
>  * http://www.gnupg.com/ <http://www.gnupg.com/> Secure your email!!!
>  * Public key available at keyserver.pgp.com <http://keyserver.pgp.com/>
> **/
> ♺ This email uses 100% recycled electrons. Don't blow it by printing!
> 
> There are only 2 hard things in computer science: Cache invalidation, naming things, and off-by-one errors.
> 
> 


Re: git for all next directories

Posted by "David G. Simmons" <sa...@mac.com>.
I'm no git expert, as anyone on this list can attest to, but here's one of the ways I have dealt with this issue:

The repos/ directory contains repos that are already under git, and that (for the most part) I'm not making changes to. Where MY changes happen is under the 'apps', 'targets' and my own 'libs' directories in 'myproj'

For most of the stuff I have done, so far, I can simply make a git repository of the targets/<app-name> directory and/or the apps/<app-name> directory and be done. If I knew more about git, I'd probably be able to make a git repository that had the targets/<app-name> and apps/<app-name> directories in one repository, but I'm not. :-) And also add in the libs/my_driver/<driver name> stuff as well.

dg

> On Feb 1, 2017, at 12:36 PM, Neilh <ne...@biomonitors.com> wrote:
> 
> Hi
> 
> Just got a dumb question to ask - I'm working through the tutorials and its well explained the standard SCM/git is on
> 
> "myproj/repos/apache-mynewt-core ((mynewt_1_0_0_b1_tag))]$"
> 
> However, after the basic tutorial, with a working "newt" environment, I need to have the whole sandbox from "myproj" be under SCM. Then with all those text files, if something stops working I can trace back.  Also, it seems like as a project matures I could have apps be a separate repository - this is starting to look quite complex - and would also need to be integrated into creating a signed image
> "newt create-image <app> 1.0.0" . https://mynewt.apache.org/latest/newt/command_list/newt_create_image/
> 
> Seems the simplest scenario to begin with is setting up a top level git from "myproj", and at least have the capability to snapshot it from there.
> 
> Are there any thoughts/linkages/tutorial on doing this?
> 
> --
> Neil Hancock
> 

--
David G. Simmons
(919) 534-5099
Web <https://davidgs.com/> • Blog <https://davidgs.com/davidgs_blog> • Linkedin <http://linkedin.com/in/davidgsimmons> • Twitter <http://twitter.com/TechEvangelist1> • GitHub <http://github.com/davidgs>
/** Message digitally signed for security and authenticity.
* If you cannot read the PGP.sig attachment, please go to
 * http://www.gnupg.com/ <http://www.gnupg.com/> Secure your email!!!
 * Public key available at keyserver.pgp.com <http://keyserver.pgp.com/>
**/
♺ This email uses 100% recycled electrons. Don't blow it by printing!

There are only 2 hard things in computer science: Cache invalidation, naming things, and off-by-one errors.



Re: git for all next directories

Posted by Neilh <ne...@biomonitors.com>.
Yes it can, and it can be un-needlesly complicated if not done right   - 
and so that's why I floated the question, as it seems that it is 
implicit in the design of the way that newt produces a software part 
that it should be traceable.  I would think, it needs the specific git 
commands - the "magic recipe" to be documented in a tutorial.

Personally I'm not going to write any software outside of a sandbox, as 
if/when things go wrong - which they do in embedded software very easily 
- a git environment makes recovery relatively easy .

Neil

On 2/1/2017 10:27 AM, Alan Graves wrote:
> I certainly struggle to understand git all the time and I'm likely to be wrong here, but can't a git repository have sub-projects within the larger super-project?
>
> ALan
>
> -----Original Message-----
> From: Neilh [mailto:neilh20@biomonitors.com]
> Sent: Wednesday, February 01, 2017 9:36 AM
> To: dev@mynewt.incubator.apache.org
> Subject: git for all next directories
>
> Hi
>
> Just got a dumb question to ask - I'm working through the tutorials and its well explained the standard SCM/git is on
>
> "myproj/repos/apache-mynewt-core ((mynewt_1_0_0_b1_tag))]$"
>
> However, after the basic tutorial, with a working "newt" environment, I need to have the whole sandbox from "myproj" be under SCM. Then with all those text files, if something stops working I can trace back.  Also, it seems like as a project matures I could have apps be a separate repository - this is starting to look quite complex - and would also need to be integrated into creating a signed image "newt create-image <app> 1.0.0" .
> https://mynewt.apache.org/latest/newt/command_list/newt_create_image/
>
> Seems the simplest scenario to begin with is setting up a top level git from "myproj", and at least have the capability to snapshot it from there.
>
> Are there any thoughts/linkages/tutorial on doing this?
>
> --
> Neil Hancock
>
>
>


RE: git for all next directories

Posted by Alan Graves <ag...@deltacontrols.com>.
I certainly struggle to understand git all the time and I'm likely to be wrong here, but can't a git repository have sub-projects within the larger super-project? 

ALan

-----Original Message-----
From: Neilh [mailto:neilh20@biomonitors.com] 
Sent: Wednesday, February 01, 2017 9:36 AM
To: dev@mynewt.incubator.apache.org
Subject: git for all next directories

Hi

Just got a dumb question to ask - I'm working through the tutorials and its well explained the standard SCM/git is on

"myproj/repos/apache-mynewt-core ((mynewt_1_0_0_b1_tag))]$"

However, after the basic tutorial, with a working "newt" environment, I need to have the whole sandbox from "myproj" be under SCM. Then with all those text files, if something stops working I can trace back.  Also, it seems like as a project matures I could have apps be a separate repository - this is starting to look quite complex - and would also need to be integrated into creating a signed image "newt create-image <app> 1.0.0" . 
https://mynewt.apache.org/latest/newt/command_list/newt_create_image/

Seems the simplest scenario to begin with is setting up a top level git from "myproj", and at least have the capability to snapshot it from there.

Are there any thoughts/linkages/tutorial on doing this?

--
Neil Hancock