Reply New Topic
2007/12/5 6:51:59
#1
Offline
Home away from home

Not commiting my own mainfile - Please help me !!!

Hey guys,

I really suck at NOT committing my own mainfile. Can you help me here. What is the best way to avoid that ?

Also, do you guys have some problems sometimes with the cache folder when SVN updating or SVN commiting.

Thanks !


2007/12/5 7:14:22
#2
Offline
Home away from home

Re: Not commiting my own mainfile - Please help me !!!

I suspect this section of the SVN book may help, but I'm not sure how to apply it: Ignoring Unversioned Items


2007/12/5 15:51:07
#3
Offline
Home away from home

Re: Not commiting my own mainfile - Please help me !!!

From the Tortoise SVN help

Quote:


B.8. Ignore files which are already versioned
If you accidentally added some files which should have been ignored, how do you get them out of version control without losing them? Maybe you have your own IDE configuration file which is not part of the project, but which took you a long time to set up just the way you like it.

If you have not yet committed the add, then all you have to do is use TortoiseSVN → Revert... to undo the add. You should then add the file(s) to the ignore list so they don't get added again later by mistake.

If the files are already in the repository, you have to do a little more work.

Move the file to somewhere safe, not inside your working copy.

TortoiseSVN → Commit the parent folder. TortoiseSVN will see that the file is missing and you can mark it for deletion from the repository.

Move the file back to its original location.

Add the file to the ignore list so you don't get into the same trouble again.


If you need to remove a whole folder/hierarchy from version control, the procedure is different again.

TortoiseSVN → Export the folder to somewhere safe, not inside your working copy.

TortoiseSVN → Delete the folder from your working copy.

TortoiseSVN → Commit the deleted folder to remove it from the repository.

Move the exported folder back to its original location in your working copy.

Add the folder to the ignore list so you don't get into the same trouble again



I have only worked with SVN/CVS a little, so I export a copy of my sandbox to my local server for testing. When I'm happy with it, I merge the changes into my sandbox copy, then commit to the repository.

_________________
Christian Web Resources
Facebook

2007/12/5 19:16:58
#4
Offline
Home away from home

Re: Not commiting my own mainfile - Please help me !!!

The problem with mainfile.php is that is is a file that NEED to be versionned. It's easy to ignore file that ARE NOT versionned. But it is not the case with mainfile.php.

If I follow the previous comment, then I would need to do an SVN REMOVE on mainfile.php so then I could add it to ignore list. But then the mainfile.php would no more be present on the SVN. So this is not working.

The only thing I see is to always remember to uncheck that file for commit when we are doing an SVN commit at the root of the project....

Or am I missing something ?

_________________
Marc-André Lanciault
Founder and CEO INBOX International inc.
Co-Founder ImpressCMS

2007/12/6 3:54:17
#5
Offline
Home away from home

Re: Not commiting my own mainfile - Please help me !!!

Maybe Steve's method is the only way of doing it. That's my method too. It also solves the issue of temporary changes for testing and debugging.

Another approach could be to not include a mainfile.php in the distribution package; the file would be created during installation. But that introduces another complication: the directory containing mainfile.php would have to be writable.


2007/12/6 4:01:05
#6
Offline
Home away from home

Re: Not commiting my own mainfile - Please help me !!!

Quote:


Dave_L wrote:
Another approach could be to not include a mainfile.php in the distribution package; the file would be created during installation. But that introduces another complication: the directory containing mainfile.php would have to be writable.



That kind of approach is rather commonplace among my systems and the directory would have to be writable anyways in order to write to cache and templates_c.

Not including mainfile.php and generating it during install sounds pretty logical.

_________________
JMorris (aka James Morris)
ImpressCMS Professional Services: INBOX International inc.
James Morris Online | Frolicking on the playground that is the Internet...

2007/12/6 4:09:59
#7
Offline
Home away from home

Re: Not commiting my own mainfile - Please help me !!!

Quote:

I have only worked with SVN/CVS a little, so I export a copy of my sandbox to my local server for testing. When I'm happy with it, I merge the changes into my sandbox copy, then commit to the repository.


I personally cannot work like that as I usually practically test my changes after each line... So I would not export it every time.

So creating mainfile at installation can be an idea. But the permissions are an issue I think...

So the best thing is probably to accept that our mainfile on the SVN will get changed from time to time, but we can live with it. We can always revert the changes, it's no big deal...

_________________
Marc-André Lanciault
Founder and CEO INBOX International inc.
Co-Founder ImpressCMS

2007/12/6 4:17:18
#8
Offline
Home away from home

Re: Not commiting my own mainfile - Please help me !!!

Just have to try and remember ... just like I need to remember to comment any changes


2007/12/6 4:54:42
#9
Offline
Home away from home

Re: Not commiting my own mainfile - Please help me !!!

marcan - I only export to another directory when I start, not for every edit. I make changes and test in my copy and when I am satisfied, I make the changes to the sandbox copy and commit.

Leaving the mainfile out of the distribution is OK with me, as long as the installation processes still work.

_________________
Christian Web Resources
Facebook

2007/12/6 6:15:17
#10
Offline
Home away from home

Re: Not commiting my own mainfile - Please help me !!!

Oh I understand now steve. Yes this could work.

Anyway, again :
Quote:

So the best thing is probably to accept that our mainfile on the SVN will get changed from time to time, but we can live with it. We can always revert the changes, it's no big deal...



_________________
Marc-André Lanciault
Founder and CEO INBOX International inc.
Co-Founder ImpressCMS

Reply New Topic extras
 Previous Topic   Next Topic
You can view topic.
You can start a new topic.
You can reply to posts.
You cannot edit your posts.
You cannot delete your posts.
You cannot add new polls.
You cannot vote in polls.
You cannot attach files to posts.
You can post without approval.