Page 1 of 1

Source Code Synchronization

Posted: Fri Apr 01, 2011 9:59 am
by igoooor
If you want to receive support we need this info to help you properly.
ยป Find Revision
L2J Revision 4534:
L2JDP Revision 7852:

Hi all ! I have one question. I have a lot of custom codes in my server (added with eclipse), and yesterday i did a Source Code Synchronization to update my server to last l2j updates (1 month i did not update it). So now I know that my server is in this revisions :

L2J Revision 4534
L2JDP Revision 7852

(because i did the changes with Source Code Synchronization), but eclipse always thinks that my server is in :

L2J Revision 4502
L2JDP Revision 7794

the last time I did "Update to HEAD", so is there any way to tell to eclipse, hey i changed the revision ^^ ?

Re: Source Code Synchronization

Posted: Fri Apr 01, 2011 10:14 am
by nimeni
try

Compare With: Latest from Repository
Save your workspace directory before:)

Re: Source Code Synchronization

Posted: Fri Apr 01, 2011 10:36 am
by jurchiks
DON'T do Replace! It will remove all your code and replace it with fresh from repository.
Also, Update to HEAD is NOT Synchronize with Repository.
Anyway, what do you care about the local revisions, it's just a number.

Re: Source Code Synchronization

Posted: Fri Apr 01, 2011 10:37 am
by igoooor
Ok I will try xD

Re: Source Code Synchronization

Posted: Fri Apr 01, 2011 10:50 am
by igoooor
Of course i know Update to HEAD is not a Synchronize with Repository.
As i said I did a code source synchronize yesterday, and a Update to HEAD about 1 month ago.
So there is no way to change this number ^^ ?

Re: Source Code Synchronization

Posted: Fri Apr 01, 2011 11:09 am
by nimeni
1: save your workspace directory.
2: create patch (keep a copy of your patch)
3: replace with: latest from repository
4: try apply patch (check errors, don't apply)
5: if you found some errors then drop file from patch with errors and apply patch w/o errors
6: files with error apply manually:)
it's a suggestion, Good Luck:)

Re: Source Code Synchronization

Posted: Fri Apr 01, 2011 12:01 pm
by igoooor
Yes that's exactly what i thought to do, but i found a problem when i create a patch, all files i modified are not in the patch oO

that's how i do the patch :
Right click on the root directory, Team / Create patch, but look I took screenshot to explain ^^
So on that screenshot, i tried to make the patch from right click on the root directory (for L2J_Datapack)

Image

You see for the BossRespawn directory, all files are not included oO, but if i right click on BossRespawn directory and create a patch, this time, the 3 files are in the patch.

Re: Source Code Synchronization

Posted: Fri Apr 01, 2011 1:51 pm
by nimeni
it's very easy, you have many options:)

A - using copy/paste

1: select folder (in your case - BossRespawn folder)
2: copy folder and save on your desktop
3: delete folder (BossRespawn - eclipse)
4: copy folder from desktop
5: select root directory (in your case - custom folder)
6: paste
understand?:)

B - using import

1: select folder (in your case - BossRespawn folder)
2: copy folder and save on your desktop
3: right click on BossRespawn (desktop) + add archive (select zip)
4: delete folder (BossRespawn - eclipse)
5: back to eclipse
6: select custom folder: L2J_DataPack\data\scripts\custom
7: right click - import - Select - General - Archive File - next - browser and select your zip archive BossRespawn.zip from desktop + ok + select folder (left) + finish
8: not hard:)

Re: Source Code Synchronization

Posted: Fri Apr 01, 2011 2:40 pm
by igoooor
nimeni I love you ^^ your B method works fine ! Actually I did it once and still same problem, then I delete .svn folder from archive before import, and now all the files are include in patch.
Well I just have to check all my custom files if they are in the create patch or not and do this again.

Thanks !

Re: Source Code Synchronization

Posted: Fri Apr 01, 2011 3:06 pm
by nimeni
Well, as I said first time "save your directory (keep a copy - workspace)"
If you have a problem with workspace or datapack/server/communityboard use this method

1: add archive (backup - workspace directory)
2: detele current workspace directory
3: extract workspace zip/rar archive (where you want)
4: open eclipse
5: File - Switch Workspace - Other (select workspace directory "extract location")
6: or delete current workspace directory and extract backup workspace zip/rar archive in the same place
Good Luck!

Re: Source Code Synchronization

Posted: Mon Apr 04, 2011 1:48 am
by Sylar88
Use javassist to inject directly to bytecode. This way you implement the callback in java. Its been like a month now that im using it and i no more care about sync issues as long as function and class names stay the same revision after revision.

Re: Source Code Synchronization

Posted: Mon Apr 04, 2011 11:04 am
by jurchiks
That's not for everyday programmer and it shouldn't be used like that, just to avoid syncing code.