Go to Post You can never have enough figurative language. - Travis Hoffman [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, 04:37
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
Keeping the tree in sync

Our team is using Mercurial for version control (but this should apply to any vcs) and I am running into issues with Windriver/Eclipse's workspace tree management.

It seems even the smallest of change causes the ".metadata\.plugins\org.eclipse.core.resources \" directories to change completely. Which would not be aweful except they are binary files instead of nice XML files. I'm worried about needless merge conflicts coming from these files, but they are what powers the file structure in the project view. It also seems there is no way to properly add existing files to an already-existing project, so asking people to manually update there trees is not an option either.

There are VCS plugins for eclipse, but we already spent a lot of time getting everyone command-line savvy and I'd rather not stray far from what we already know.

How have other teams gotten around this problem? Is there a way to export the project tree as a pretty little XML file? (Like MSVC natively does.)

~David
Reply With Quote
  #2   Spotlight this post!  
Unread 20-01-2011, 06:54
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

We use Mercurial too but we don't check in anything in the .metadata tree. In fact, all we check in are the real source code and the four .*project files and nothing from the PPC603gnu directory either. The PPC603gnu directory mainly contains the compiled binaries. So you don't want it to check in a new version of the binaries just because you compile it.
__________________
Reply With Quote
  #3   Spotlight this post!  
Unread 20-01-2011, 07:17
perlgerl perlgerl is offline
Michelle
FRC #0781 (Kinetic Knights)
Team Role: Mentor
 
Join Date: May 2010
Rookie Year: 2010
Location: Kincardine
Posts: 38
perlgerl is just really niceperlgerl is just really niceperlgerl is just really niceperlgerl is just really nice
Re: Keeping the tree in sync

Modify your .hgignore file appropriately.
Reply With Quote
  #4   Spotlight this post!  
Unread 20-01-2011, 08:37
davidalln's Avatar
davidalln davidalln is offline
World's Worst Coder
AKA: David Allen
FRC #2415 (The Westminster Wiredcats)
Team Role: Programmer
 
Join Date: Mar 2009
Rookie Year: 2008
Location: Atlanta, GA
Posts: 108
davidalln is on a distinguished road
Send a message via AIM to davidalln
Re: Keeping the tree in sync

For my repository, I shamelessly copied 166's .hgignore file (and edited it to match our project and work for git). It makes sure that there are no continuity issues over multiple computers, as the binaries stay separate. I would suggest that you copy this file to the base of your repository.

http://code.google.com/p/framework16...owse/.hgignore
__________________
SANTOSH ANDREW DECKER RICK WYNNIE SEAN DEREK MATT
(alamo (semis), p'tree (CHAMPS!), nc (CHAMPS!), newton (quarters))


Best four years of my life. Thanks to everyone who made it happen.
Reply With Quote
  #5   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
  #6   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
  #7   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
  #8   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
  #9   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
  #10   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
  #11   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
  #12   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
  #13   Spotlight this post!  
Unread 20-01-2011, 18:59
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

We ended up going with the "Store the project folder and import it" approach, and things seem to be going great so far. Since all of us are developing in VirtualBox VM's and have identical environments for the most part, I don't think syncing the build settings will become an issue. Thank you everyone for your suggestions.

~David
Reply With Quote
  #14   Spotlight this post!  
Unread 20-01-2011, 19:00
demosthenes2k8's Avatar
demosthenes2k8 demosthenes2k8 is offline
Graduated but not gone
AKA: Matt Soucy
FRC #0166 (Chop Shop 166)
Team Role: Mentor
 
Join Date: Jan 2009
Rookie Year: 2007
Location: Merrimack, NH
Posts: 589
demosthenes2k8 is a splendid one to beholddemosthenes2k8 is a splendid one to beholddemosthenes2k8 is a splendid one to beholddemosthenes2k8 is a splendid one to beholddemosthenes2k8 is a splendid one to beholddemosthenes2k8 is a splendid one to beholddemosthenes2k8 is a splendid one to beholddemosthenes2k8 is a splendid one to behold
Send a message via AIM to demosthenes2k8 Send a message via Yahoo to demosthenes2k8
Re: Keeping the tree in sync

Oh wow. Using Virtualbox is a really good idea!
__________________


GSR Dean's List Finalist 2011
Reply With Quote
  #15   Spotlight this post!  
Unread 20-01-2011, 19:39
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

It works great, I just install it once and we deploy it to several school laptops. No issues with school laptop user rights, and if something goes wrong with one, we just open another, "hg clone" and bam! Very little time lost. Plus, over a Giagabit connection (HINT: The Linksys routers they gave veterans pervious years are Giagabit) it takes about 2 minutes and 43 seconds to transfer our 12 GB virtual hard disk image.

~David
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