Go to Post It doesn't matter if you write a thousand lines of code for a robot, if you didn't teach and/or inspire the HS students as you did it then you are not a mentor. - JamesBrown [more]
Home
Go Back   Chief Delphi > Technical > Programming > C/C++
CD-Media   CD-Spy  
portal register members calendar search Today's Posts Mark Forums Read FAQ rules

 
Reply
 
Thread Tools Rate Thread Display Modes
  #1   Spotlight this post!  
Unread 20-01-2011, 11:28
DtD's Avatar
DtD DtD is offline
I hope the watchdog starves!
AKA: Pathogen David
FRC #2410 (The Metal Mustangs (Merged from 2334, Hazmat Robotics))
Team Role: Programmer
 
Join Date: Jan 2008
Rookie Year: 2008
Location: Kansas
Posts: 86
DtD will become famous soon enoughDtD will become famous soon enough
Re: Keeping the tree in sync

Both are pretty much what we have done in the past, but it seems that if you do that the code tree (Like which files are part of a project) does not get synced, looking at some of the files in .metadata suggests the tree is stored there instead of with the project its self. Our .hgignore currently looks like http://pastebin.com/D13gKtFq I made it after experimenting with removing everything that looks like user preferences and other rapidly changing, useless files. However, org.eclipse.core.resources seems to be unable to strip down anymore than I already have or the project breaks.

EDIT: DOH! I just found out that you can have Windriver "Use Existing Project" the just a standalone project and it worked great. I guess the org.eclipse.core.resources folder is only like a cache or something. Kinda weird it ignores the project folder if it exists but expects org.eclipse.core.resources. Thank you both!

Last edited by DtD : 20-01-2011 at 11:37.
Reply With Quote
  #2   Spotlight this post!  
Unread 20-01-2011, 13:30
Mike Soukup's Avatar
Mike Soukup Mike Soukup is offline
Software guy
FRC #0111 (Wildstang)
Team Role: Engineer
 
Join Date: May 2001
Rookie Year: 1996
Location: Schaumburg, IL
Posts: 797
Mike Soukup has a reputation beyond reputeMike Soukup has a reputation beyond reputeMike Soukup has a reputation beyond reputeMike Soukup has a reputation beyond reputeMike Soukup has a reputation beyond reputeMike Soukup has a reputation beyond reputeMike Soukup has a reputation beyond reputeMike Soukup has a reputation beyond reputeMike Soukup has a reputation beyond reputeMike Soukup has a reputation beyond reputeMike Soukup has a reputation beyond repute
Re: Keeping the tree in sync

Here's what we do; we've been quite happy with it.

We keep all our code since 1998, including a bunch of test and prototype code, on an SVN server. We only put the source files there (plus makefiles for the old IFI years). No .project, no .wr* files, no objects. Nothing but .h & .cpp. Then in workbench we create a new project based on one of the FRC examples, delete all the .cpp & .h files that it created in the project, and add the folder that has all our files to the project (Right click on project -> New -> Folder. Click "Advanced", select "Link to folder in the file system", and browse to the folder). That way our code repository isn't cluttered with any of the junk that the IDE creates.
Reply With Quote
  #3   Spotlight this post!  
Unread 20-01-2011, 13:39
basicxman basicxman is offline
Emily Horsman
FRC #2200 (MMRambotics)
Team Role: Programmer
 
Join Date: Oct 2007
Rookie Year: 2007
Location: Burlington, Ontario
Posts: 971
basicxman has a brilliant futurebasicxman has a brilliant futurebasicxman has a brilliant futurebasicxman has a brilliant futurebasicxman has a brilliant futurebasicxman has a brilliant futurebasicxman has a brilliant futurebasicxman has a brilliant futurebasicxman has a brilliant futurebasicxman has a brilliant futurebasicxman has a brilliant future
Send a message via AIM to basicxman Send a message via MSN to basicxman Send a message via Yahoo to basicxman
Re: Keeping the tree in sync

Quote:
Originally Posted by Mike Soukup View Post
No .project, no .wr* files, no objects. Nothing but .h & .cpp.
We too do it like this, except using a much superior version control system (okay that is open to opinion of course), Git.

Sample .gitignore file:
Code:
*~
*.bak
*.cproject
*.project
*.wrmakefile
*.wrproject
Makefile
*.c
*.o
*.d
*.a
Quote:
Originally Posted by Mike Soukup View Post
Then in workbench we create a new project based on one of the FRC examples, delete all the .cpp & .h files that it created in the project, and add the folder that has all our files to the project (Right click on project -> New -> Folder. Click "Advanced", select "Link to folder in the file system", and browse to the folder).
Why not set default build properties for vxWorks Downloadable Kernel Module projects and simply create a new project?

Last edited by basicxman : 20-01-2011 at 13:41.
Reply With Quote
  #4   Spotlight this post!  
Unread 20-01-2011, 13:42
mikets's Avatar
mikets mikets is offline
Software Engineer
FRC #0492 (Titan Robotics)
Team Role: Mentor
 
Join Date: Jan 2010
Rookie Year: 2008
Location: Bellevue, WA
Posts: 667
mikets is a glorious beacon of lightmikets is a glorious beacon of lightmikets is a glorious beacon of lightmikets is a glorious beacon of lightmikets is a glorious beacon of lightmikets is a glorious beacon of light
Re: Keeping the tree in sync

Well, the .*project files contains the Wind River build environment preferences. If you don't check them in, every programmer in your team has to recreate the build environment. For example, we hit a limitation last year with our code that it got big and exceeding the "short call" distance. So I had to add -mlongcall to the build option. That modified .wrproject. If I didn't check it in, all the other programmers had to do the same to their build option. If I check them in, all they have to do is to sync the files.
The .*project files are like makefile. They are part of the project. If they are not checked in, it will be more steps for each programmers to add/remove/rename a file to the project.
__________________

Last edited by mikets : 20-01-2011 at 13:45.
Reply With Quote
  #5   Spotlight this post!  
Unread 20-01-2011, 13:45
basicxman basicxman is offline
Emily Horsman
FRC #2200 (MMRambotics)
Team Role: Programmer
 
Join Date: Oct 2007
Rookie Year: 2007
Location: Burlington, Ontario
Posts: 971
basicxman has a brilliant futurebasicxman has a brilliant futurebasicxman has a brilliant futurebasicxman has a brilliant futurebasicxman has a brilliant futurebasicxman has a brilliant futurebasicxman has a brilliant futurebasicxman has a brilliant futurebasicxman has a brilliant futurebasicxman has a brilliant futurebasicxman has a brilliant future
Send a message via AIM to basicxman Send a message via MSN to basicxman Send a message via Yahoo to basicxman
Re: Keeping the tree in sync

Quote:
Originally Posted by mikets View Post
Well, the .*project files contains the Wind River build environment preferences. If you don't check them in, every programmer in your team has to recreate the build environment.
Good point, however we have in-house documentation (to be released to the public) on how to set up a proper WindRiver environment. Given that most project files look the same, they are put in the ignore file. If there is something unique about a specific project, it can simply be tracked for that project.
Reply With Quote
  #6   Spotlight this post!  
Unread 20-01-2011, 13:52
mikets's Avatar
mikets mikets is offline
Software Engineer
FRC #0492 (Titan Robotics)
Team Role: Mentor
 
Join Date: Jan 2010
Rookie Year: 2008
Location: Bellevue, WA
Posts: 667
mikets is a glorious beacon of lightmikets is a glorious beacon of lightmikets is a glorious beacon of lightmikets is a glorious beacon of lightmikets is a glorious beacon of lightmikets is a glorious beacon of light
Re: Keeping the tree in sync

But the basic question is: why not check them in? These files do not change unless you change the build environment, add/remove/rename a file etc. So they are not files that will be changed on every compile. So I don't see the disadvantage of checking them in. If they changed, other programmers should get that change anyway.
__________________
Reply With Quote
  #7   Spotlight this post!  
Unread 20-01-2011, 14:00
basicxman basicxman is offline
Emily Horsman
FRC #2200 (MMRambotics)
Team Role: Programmer
 
Join Date: Oct 2007
Rookie Year: 2007
Location: Burlington, Ontario
Posts: 971
basicxman has a brilliant futurebasicxman has a brilliant futurebasicxman has a brilliant futurebasicxman has a brilliant futurebasicxman has a brilliant futurebasicxman has a brilliant futurebasicxman has a brilliant futurebasicxman has a brilliant futurebasicxman has a brilliant futurebasicxman has a brilliant futurebasicxman has a brilliant future
Send a message via AIM to basicxman Send a message via MSN to basicxman Send a message via Yahoo to basicxman
Re: Keeping the tree in sync

Quote:
Originally Posted by mikets View Post
So they are not files that will be changed on every compile. So I don't see the disadvantage of checking them in. If they changed, other programmers should get that change anyway.
So in a normal situation, it defeats the point of version control. If it's changed, simply track it.
Reply With Quote
  #8   Spotlight this post!  
Unread 20-01-2011, 13:54
Bot190's Avatar
Bot190 Bot190 is offline
Registered User
FRC #0166 (ChopShop)
Team Role: Programmer
 
Join Date: Sep 2009
Rookie Year: 2009
Location: Merrimack NH
Posts: 105
Bot190 will become famous soon enough
Re: Keeping the tree in sync

As has been noted, My team uses .hgignore so that none of the build files are added to our repository. This helps keep the size down, and prevents conflicts.

There are upsides and downsides to not checking in the .*project files.
On one hand, if someone has their workspace setup differently, you don't have to worry about windriver not knowing where stuff is. On the other hand, as has been said, build properties have to be changed on each computer.
__________________

Reply With Quote
Reply


Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump


All times are GMT -5. The time now is 14:18.

The Chief Delphi Forums are sponsored by Innovation First International, Inc.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
Copyright © Chief Delphi