You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@subversion.apache.org by Geoff Hoffman <gh...@cardinalpath.com> on 2011/09/01 20:52:09 UTC

Changes are getting clobbered when working on remote svn files

We have a mixed development environment (Mac, Win, Linux).
We have an SVN 1.6 repo on the LAN (Ubuntu server 10.04 LTS).
We have a development server on the LAN (Ubuntu server 10.04 LTS).
(I don't think any of the hardware or software matters in this case, but
here it is anyway)

Most of us are running fully-local checkout working copies, editing hosts
file, NameVirtualHost on, using Netbeans, Textmate (Mac), Notepad++ on Win.

One of our developers "A" is storing his working copy checked out onto the
dev server and uses netbeans FTP to work on the files.

What we found is that he is somehow able to overwrite newer files in the
repository if he edits the same file.

In other words, if developer "B" changes file x/y.php at -r 400 and dev "A"
has checked out and is working on file x/y.php at -r 395 then when dev "A"
commits x/y.php at -r 405 it does not include "B"'s changes from -r 400.

We are guessing that either:
- he didn't svn up on the dev server; (claims he always does, of course)
- he didn't 'refresh folder' to grab the latest stuff from his
checkout/update
- he has a "local cached copy" he downloaded from the dev server to edit -
and somehow his IDE (NetBeans 6.9) is not realizing that the remote files
have changed.

or some combination thereof.

One would assume that remote server development and version control would
have been sorted out long ago and developer "A" should be getting a conflict
on commit, or a merge event at commit time, but this isn't the case.

What we now believe is that:

When saving to a remote project, FTP is overwriting the file, even if it has
been svn updated manually, and upon commit, it just sees the ftp-overwritten
file as the newest regardless of the change at -r 400.

I thought I would send this to the list to see if others have experienced
similar issues; and as a warning to look out for this scenario.

Cheers -
Geoff

Re: Changes are getting clobbered when working on remote svn files

Posted by Geoff Hoffman <gh...@cardinalpath.com>.
On Thu, Sep 1, 2011 at 1:38 PM, Ryan Schmidt <
subversion-2011a@ryandesign.com> wrote:

> On Sep 1, 2011, at 13:52, Geoff Hoffman wrote:
>
> > I thought I would send this to the list to see if others have experienced
> similar issues; and as a warning to look out for this scenario.
>
> What this should serve as is a reminder to all developers to use "svn diff"
> (or GUI equivalent) every time before you commit, to make sure the changes
> you're about to commit are actually the ones you intended to make. I'm
> almost certain your developer is overwriting a newer file with an older file
> via his FTP client or IDE, and is not noticing because he's not checking the
> diff.
>
>
The trouble here is that, the IDE is pushing a new version back to the
remote server where svn is running, which is where the changes are are being
lost. I think a solution isn't possible. What needs to happen is that when
you save a local version, the IDE should issue svn up on the remote server
to check for conflicts but it can't because it has only an FTP connection
available to it. Even if he logs in via SSH to the server and issues svn up
on the remote files (getting -r 400 of x/y.php correctly on the remote box),
the IDE with his changes to -r395 isn't smart enough to know that the file
has changed remotely (although it should, IMO, download a tmp copy to check
before ftp sync).

There is most certainly a method to operate in this fashion safely, however
it requires more manual steps to be followed meticulously. It's probably
safe to say that creating and working on a "remote project" is best suited
for a single developer (with svn running locally on the downloaded project
files) versus running svn on the remote machine.

We also had the idea to mount the project via Go -> Connect to Server... and
use svn "locally" on /Volumes/devserver/project but this is untested.

Re: Changes are getting clobbered when working on remote svn files

Posted by Ryan Schmidt <su...@ryandesign.com>.
On Sep 1, 2011, at 13:52, Geoff Hoffman wrote:

> I thought I would send this to the list to see if others have experienced similar issues; and as a warning to look out for this scenario.

What this should serve as is a reminder to all developers to use "svn diff" (or GUI equivalent) every time before you commit, to make sure the changes you're about to commit are actually the ones you intended to make. I'm almost certain your developer is overwriting a newer file with an older file via his FTP client or IDE, and is not noticing because he's not checking the diff.





AW: Changes are getting clobbered when working on remote svn files

Posted by Markus Schaber <m....@3s-software.com>.
Hi, Georg,

> It's due to - he has PHP 5.2x on his local and doesn't want to upgrade it (for supporting another older PHP4x site with certain config) and we have PHP 5.3x with some required other extensions on the dev server - so that's the reason for doing it this way in only his case.

Maybe he should install both PHP versions in parallel locally.

And even the need to synchronize his directory to the server to execute it in PHP there does not force him to have the working copy there.

He could have his working copy locally, so he can update and commit there in the normal way, and use some script (maybe using rsync, or ftp) to synchronize it to the dev server just for execution.

This even saves him the step to re-synchronize it back to his local machine after update.


Mit freundlichen Grüßen

Markus Schaber

___________________________
We software Automation.

3S-Smart Software Solutions GmbH
Markus Schaber | Entwicklung
Memminger Str. 151 | 87439 Kempten | Tel. +49-831-54031-0 | Fax +49-831-54031-50

Email: m.schaber@3s-software.com | Web: http://www.3s-software.com 
CoDeSys Internet-Forum: http://forum.3s-software.com

Geschäftsführer: Dipl.Inf. Dieter Hess, Dipl.Inf. Manfred Werner | Handelsregister: Kempten HRB 6186 | USt-IDNr.: DE 167014915

Von: Geoff Hoffman [mailto:ghoffman@cardinalpath.com] 
Gesendet: Donnerstag, 1. September 2011 22:40
An: Konstantin Kolinko
Cc: users@subversion.apache.org
Betreff: Re: Changes are getting clobbered when working on remote svn files


Re: Changes are getting clobbered when working on remote svn files

Posted by Geoff Hoffman <gh...@cardinalpath.com>.
On Thu, Sep 1, 2011 at 12:24 PM, Konstantin Kolinko
<kn...@gmail.com>wrote:

> 2011/9/1 Geoff Hoffman <gh...@cardinalpath.com>:
> > We have a mixed development environment (Mac, Win, Linux).
> > We have an SVN 1.6 repo on the LAN (Ubuntu server 10.04 LTS).
> > We have a development server on the LAN (Ubuntu server 10.04 LTS).
> > (I don't think any of the hardware or software matters in this case, but
> > here it is anyway)
> > Most of us are running fully-local checkout working copies, editing hosts
> > file, NameVirtualHost on, using Netbeans, Textmate (Mac), Notepad++ on
> Win.
> > One of our developers "A" is storing his working copy checked out onto
> the
> > dev server and uses netbeans FTP to work on the files.
> > What we found is that he is somehow able to overwrite newer files in the
> > repository if he edits the same file.
> > In other words, if developer "B" changes file x/y.php at -r 400 and dev
> "A"
> > has checked out and is working on file x/y.php at -r 395 then when dev
> "A"
> > commits x/y.php at -r 405 it does not include "B"'s changes from -r 400.
> > We are guessing that either:
> > - he didn't svn up on the dev server; (claims he always does, of course)
>
> If you had access logs enabled on your server, you could verify it.
>
> > - he didn't 'refresh folder' to grab the latest stuff from his
> > checkout/update
> > - he has a "local cached copy" he downloaded from the dev server to edit
> -
> > and somehow his IDE (NetBeans 6.9) is not realizing that the remote files
> > have changed.
> > or some combination thereof.
> > One would assume that remote server development and version control would
> > have been sorted out long ago and developer "A" should be getting a
> conflict
> > on commit, or a merge event at commit time, but this isn't the case.
> > What we now believe is that:
> > When saving to a remote project, FTP is overwriting the file, even if it
> has
> > been svn updated manually,
>
> That is very likely to happen. If you just transfer a file it will
> likely to overwrite remote one, regardless of what changes have been
> there.
>


Yes it's almost certainly a problem with either FTP or the IDEs
implementation of that, not SVN.


> Why your developer is editing the file remotely if you have svn?
> Check it out locally, edit locally, commit locally and then go to
> remote server and svn up there.
>


It's due to - he has PHP 5.2x on his local and doesn't want to upgrade it
(for supporting another older PHP4x site with certain config) and we have
PHP 5.3x with some required other extensions on the dev server - so that's
the reason for doing it this way in only his case.



>
> BTW, you may ask on NetBeans forums, how the tool behaves.
>
>

I think I will - I had thought of that, it maybe a bug in NetBeans (or a
feature improvement request) although another developer here tried something
similar with Coda and the same thing happens.



> > and upon commit, it just sees the ftp-overwritten
> > file as the newest regardless of the change at -r 400.
> > I thought I would send this to the list to see if others have experienced
> > similar issues; and as a warning to look out for this scenario.
>
> Best regards,
> Konstantin Kolinko
>

Re: Changes are getting clobbered when working on remote svn files

Posted by Konstantin Kolinko <kn...@gmail.com>.
2011/9/1 Geoff Hoffman <gh...@cardinalpath.com>:
> We have a mixed development environment (Mac, Win, Linux).
> We have an SVN 1.6 repo on the LAN (Ubuntu server 10.04 LTS).
> We have a development server on the LAN (Ubuntu server 10.04 LTS).
> (I don't think any of the hardware or software matters in this case, but
> here it is anyway)
> Most of us are running fully-local checkout working copies, editing hosts
> file, NameVirtualHost on, using Netbeans, Textmate (Mac), Notepad++ on Win.
> One of our developers "A" is storing his working copy checked out onto the
> dev server and uses netbeans FTP to work on the files.
> What we found is that he is somehow able to overwrite newer files in the
> repository if he edits the same file.
> In other words, if developer "B" changes file x/y.php at -r 400 and dev "A"
> has checked out and is working on file x/y.php at -r 395 then when dev "A"
> commits x/y.php at -r 405 it does not include "B"'s changes from -r 400.
> We are guessing that either:
> - he didn't svn up on the dev server; (claims he always does, of course)

If you had access logs enabled on your server, you could verify it.

> - he didn't 'refresh folder' to grab the latest stuff from his
> checkout/update
> - he has a "local cached copy" he downloaded from the dev server to edit -
> and somehow his IDE (NetBeans 6.9) is not realizing that the remote files
> have changed.
> or some combination thereof.
> One would assume that remote server development and version control would
> have been sorted out long ago and developer "A" should be getting a conflict
> on commit, or a merge event at commit time, but this isn't the case.
> What we now believe is that:
> When saving to a remote project, FTP is overwriting the file, even if it has
> been svn updated manually,

That is very likely to happen. If you just transfer a file it will
likely to overwrite remote one, regardless of what changes have been
there.


Why your developer is editing the file remotely if you have svn?
Check it out locally, edit locally, commit locally and then go to
remote server and svn up there.

BTW, you may ask on NetBeans forums, how the tool behaves.

> and upon commit, it just sees the ftp-overwritten
> file as the newest regardless of the change at -r 400.
> I thought I would send this to the list to see if others have experienced
> similar issues; and as a warning to look out for this scenario.

Best regards,
Konstantin Kolinko