Project Home
Project Home
Trackers
Trackers
Documents
Documents
Wiki
Wiki
Discussion Forums
Discussions
Project Information
Project Info
Forum Topic - Which files (other than source files) to check-in / commit / submit into revision control / Subversion / Perforce?: (3 Items)
   
Which files (other than source files) to check-in / commit / submit into revision control / Subversion / Perforce?  
Hello,

I'm wondering which Eclipse files to check-in to revision control?

Terminology: For Subversion it's 'Commit', for Perforce it's 'Submit'; anyway, I'll use check-in in here.

------------------

When I was using command-line tools, it was simple: 

1. Check-in all files that I manually create (*.c, *.h, *.cpp, *.jam, *.mak, *.mk, ...).  Any files generated as part of
 the build (*.o, *.so, *.lib, ...) were not checked-in.

2. Before every check-in, do a 'make clean'.

3. The remaining files are files that either:
(a) Are in the repository, but not checked-out: do nothing
(b) Are in the repository, and checked-out: check them in
(c) Are not in the repository, i.e. newly created source files: add them and check them in
(d) Are not in the repository, but were temp files that are not needed.  Delete them.

Now, my workspace is *identical* to the repository.  Another user can check-out and 'make' - they will get identical 
results to me.

----------------------------

Currently, we're using Momentics 6.4.0.  Specifically, I have imported the i.MX35-3DS BSP, bsp-nto640-freescale-i.mx35-
3ds-trunk.zip, into the IDE.

I would like to know which files to check-in, and which files to leave out?
Please answer for both Perforce, Subversion, or any other SCM tool if you have experience with any of them.

Perforce has a plug-in called P4WSAD: http://www.perforce.com/perforce/products/p4wsad.html which claims to "know" which
 files to check-in by reading your project metadata, in addition, you can tell it which files to exclude using a .
p4ignore file similar to .cvsignore.  *BUT* this plug-in is for the CDT, so I don't know if Momentics creates additional
 files that might not be recognized by Perforce.

For Subversion, any suggestions for which plug-in to use that would help with recognizing which files to check-in? 

==================

Another problem I have is the way the IDE imports the BSP.  If I simply unzip the BSP, I get a different directory tree 
than when I import it with the IDE.  My colleague upgraded the IDE to 4.6, and now when he imports the BSP, he gets yet 
another directory tree.  Is there any way that someone has discovered to keep these trees consistent with the repository
?

Why does QNX keep changing the directory tree? The manuals refer to the unzipped tree, but the IDE changes things on us.


Thanks!
Alain.
Re: Which files (other than source files) to check-in / commit / submit into revision control / Subversion / Perforce?  
What kind of files to check-in to your revision control repository is up 
to your project definition and the use of your repository. You already 
figured out the command type of source files. Besides source file some 
people would like to check in project metadata or even some binary files.

For Subversion there is a "svn:ignore" property which you can apply to 
different file type. By using this property you teach Subversion to 
ignore certain file types so that they will not be accidentally checked in.

In terms of the IDE bsp import. In IDE 4.6 there was a change to the way 
BSP was imported. Before IDE 4.6 you got many projects per BSP import 
and each project corresponded to one binary/module. In IDE 4.6, there 
are now only two projects created - one is the source project the other 
is the system builder project. The source project layout should be 
identical to when you just unzip the bsp (you will see "src", 
"prebuilt", "images" directories and the same other files). This changed 
was to simplify project management in IDE and support direct checkout 
from QNX foundry27 repository.

Thank,
Andy

Alain Achkar wrote:
> Hello,
>
> I'm wondering which Eclipse files to check-in to revision control?
>
> Terminology: For Subversion it's 'Commit', for Perforce it's 'Submit'; anyway, I'll use check-in in here.
>
> ------------------
>
> When I was using command-line tools, it was simple: 
>
> 1. Check-in all files that I manually create (*.c, *.h, *.cpp, *.jam, *.mak, *.mk, ...).  Any files generated as part 
of the build (*.o, *.so, *.lib, ...) were not checked-in.
>
> 2. Before every check-in, do a 'make clean'.
>
> 3. The remaining files are files that either:
> (a) Are in the repository, but not checked-out: do nothing
> (b) Are in the repository, and checked-out: check them in
> (c) Are not in the repository, i.e. newly created source files: add them and check them in
> (d) Are not in the repository, but were temp files that are not needed.  Delete them.
>
> Now, my workspace is *identical* to the repository.  Another user can check-out and 'make' - they will get identical 
results to me.
>
> ----------------------------
>
> Currently, we're using Momentics 6.4.0.  Specifically, I have imported the i.MX35-3DS BSP, bsp-nto640-freescale-i.mx35
-3ds-trunk.zip, into the IDE.
>
> I would like to know which files to check-in, and which files to leave out?
> Please answer for both Perforce, Subversion, or any other SCM tool if you have experience with any of them.
>
> Perforce has a plug-in called P4WSAD: http://www.perforce.com/perforce/products/p4wsad.html which claims to "know" 
which files to check-in by reading your project metadata, in addition, you can tell it which files to exclude using a .
p4ignore file similar to .cvsignore.  *BUT* this plug-in is for the CDT, so I don't know if Momentics creates additional
 files that might not be recognized by Perforce.
>
> For Subversion, any suggestions for which plug-in to use that would help with recognizing which files to check-in? 
>
> ==================
>
> Another problem I have is the way the IDE imports the BSP.  If I simply unzip the BSP, I get a different directory 
tree than when I import it with the IDE.  My colleague upgraded the IDE to 4.6, and now when he imports the BSP, he gets
 yet another directory tree.  Is there any way that someone has discovered to keep these trees consistent with the 
repository?
>
> Why does QNX keep changing the directory tree? The manuals refer to the unzipped tree, but the IDE changes things on 
us.
>
> Thanks!
> Alain.
>
>
>
> _______________________________________________
>
> General
> http://community.qnx.com/sf/go/post34351
>
>   
Re: Which files (other than source files) to check-in / commit / submit into revision control / Subversion / Perforce?  
Thanks Andy.

Sorry my subject line might have been misleading.

The reason I explained how I did things on the command-line is to clarify that this is not a question about whether to 
check-in object and binary files or not.  This can be controversial or philosophical.  This is more to understand how 
the IDE behaves from a practical point of view: which files are source files that cannot be generated, and which files 
can be generated simply by doing a build:

1) What is practical?
2) How the IDE and its plug-ins behave?
3) When the IDE adds so much extra files, how to distinguish what is necessary from what is not?

For example, if I choose to check-in the object files (*.o), they become read-only.  Then I expect that every time I 
build, I need to check them out, so that the IDE can overwrite them.  In my opinion, this is NOT practical - I only 
checkout the files that I actually edit.  Now, some people might prefer to check-in object files; this is perfectly fine
 if they want to keep checking them out every time there's a change.  So, given 2 people with different requirements, 
there is a way to implement these requirements.

On the otherhand, I have no idea which files are changed by the IDE and which files are generated (example: .project, .
cproject, .qnx_interal.mk, ...)

So, having made the decision not to check-in generated files, how do I practically implement this decision using the IDE
 and the Perforce/Subversion plugins?

Another problem is the following:

I just checked-in the file project.bld, and it became read-only.  I double-clicked on project.bld, changed a property, 
and saved project.bld.  The IDE silently changed it from read-only to read-write, and saved it.
The behavior is different for a .c file: when I edited it, and saved it, the Perforce plug-in now shows it opened for 
edit in the default changelist.

Thanks,
Alain.