Sign in Join

Live chat for Free Pascal, Lazarus, Delphi and every Pascal programmer.

Mailing lists / lazarus / 2009-02

Problem using the SVN program: source files "mutilated"

7 messages · 5 people · –

Reply by email Subscribe to this list Your subscription

Read-only archive. Use j and k to move between messages.

Bart

Hi,

I'm experiencing a problem using SVN.
When I have written patches for Lazarus, then do an svn update (after the patches have been committed), the sourcefiles that I have altered are not updated correctly.

For instance. I recently made changes to lcl\include\dbedit.inc These changes have been committed.
Today I did an svn update.

In lcl\include\dbedit.inc SVN has inserted lines like:

<<<<<<<<<<<<<<.mine
procedure TDBEdit.KeyPress(var Key: char);
  function CanAcceptKey: boolean;

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

(^^ this line above is also inserted)

(And yes, this is exactly the procedure I changed)

Now of course make fails on that line.

I'm using the commandline SVN (not the tortoisesvn windows client) on Win9x.

F:\LazarusProjecten>svn --version
svn, version 1.4.3 (r23084)
compiled Jan 18 2007, 07:47:40

Copyright (C) 2000-2006 CollabNet.
Subversion is open source software, see http://subversion.tigris.org/ This product includes software developed by CollabNet (http://www.Collab.Net/).

I have done a svn cleanup, but that made no difference.

Has anyone any idea why this happens, and how I can cure this?

Bart

Reply by email

Vincent Snijders
to Bart
Bart wrote 31 lines
Hi, I'm experiencing a problem using SVN. When I have written patches for Lazarus, then do an svn update (after the patches have been committed), the sourcefiles that I have altered are not updated correctly. For instance. I recently made changes to lcl\include\dbedit.inc These changes have been committed. Today I did an svn update. In lcl\include\dbedit.inc SVN has inserted lines like: <<<<<<<<<<<<<<.mine procedure TDBEdit.KeyPress(var Key: char); function CanAcceptKey: boolean; ================ (^^ this line above is also inserted) (And yes, this is exactly the procedure I changed) Now of course make fails on that line. I'm using the commandline SVN (not the tortoisesvn windows client) on Win9x. I have done a svn cleanup, but that made no difference.

You may try svn revert to remove you local changes.

Has anyone any idea why this happens, and how I can cure this?

Sure, see http://svnbook.red-bean.com/en/1.1/ch03s05.html Resolve Conflicts (Merging Others' Changes)

Vincent

Reply by email

Martin Friebe
to Bart: I'm experiencing a problem using SVN. When I have written patches for Lazarus, then do an…
Bart wrote 27 lines
Hi, I'm experiencing a problem using SVN. When I have written patches for Lazarus, then do an svn update (after the patches have been committed), the sourcefiles that I have altered are not updated correctly. For instance. I recently made changes to lcl\include\dbedit.inc These changes have been committed. Today I did an svn update. In lcl\include\dbedit.inc SVN has inserted lines like: <<<<<<<<<<<<<<.mine procedure TDBEdit.KeyPress(var Key: char); function CanAcceptKey: boolean; ================ (^^ this line above is also inserted) (And yes, this is exactly the procedure I changed)

To make sure I understood correctly:

You write a patch, submit it (mantis or otherwise), some one else is adding the patch to SVN.
Then you download upgrade you source (containing the patch to the version of SVN that contains the (same) patch committed by that some one else?

Then it will depend: If the commit to SVN was 100% identical (probably including spaces, white char, newline) SVN should recognize this, and silently merge it.

But, if whoever committed it to SVN did make changes (spaces?) then merging may fail resulting in the above. Because the code you have differs from the code in SVN and the SVN software does not know which version you like to keep.
If you have no other changes in your file, you can simply "revert" it.

Show quoted text 22 lines
Now of course make fails on that line. I'm using the commandline SVN (not the tortoisesvn windows client) on Win9x. F:\LazarusProjecten>svn --version svn, version 1.4.3 (r23084) compiled Jan 18 2007, 07:47:40 Copyright (C) 2000-2006 CollabNet. Subversion is open source software, see http://subversion.tigris.org/ This product includes software developed by CollabNet (http://www.Collab.Net/). I have done a svn cleanup, but that made no difference. Has anyone any idea why this happens, and how I can cure this? Bart _______________________________________________ Lazarus mailing list http://www.lazarus.freepascal.org/mailman/listinfo/lazarus

Reply by email

Graeme Geldenhuys
to Bart
Bart wrote
So I should now do svn revert

If you are in the root directory of Lazarus and you do the following, it will revert (undo) all local changes recursively.

svn revert -R .

To only revert changes in the current directory, but NOT recursively:

svn revert .

To revert changes to a "languages" directory recursively:

svn revert -R languages/

To revert a specific file or files (like the ones in your patch):

svn revert lcl/widgetset/wsarrow.pp <<-- one file only or
svn revert lcl/widgetset/wsarrow.pp lcl/arrow.pp <<-- two files

For more information:

svn help revert

svn update and I get my own patch back in the proper way?

Correct.

Regards,
- Graeme -

_______________________________________________
fpGUI - a cross-platform Free Pascal GUI toolkit
http://opensoft.homeip.net/fpgui/

Reply by email

Hans-Peter Diettrich
to Bart: So I should now do svn revert this will undo all changes I made. and after that svn update
Show quoted text 8 lines
So I should now do svn revert this will undo all changes I made. and after that svn update and I get my own patch back in the proper way?

Or you fix the marked conflicts in the source code. This is what the markers are good for - prevent compilation of code, where SVN merge couldn't find a unique solution.

On Windows you can use TortoiseSVN, with many GUI and explorer extensions, to locate, compare and fix conflicts.

DoDi

Reply by email