Source Code Synchronization

Support for the latest build of L2J Server, get help here with installations, upgrades, problems.
Do not post bugs reports here, use viewforum.php?f=77 instead.
There is no support for other server builds than the official provided by l2jserver.com
Forum rules
READ NOW: L2j Forums Rules of Conduct
Post Reply
igoooor
Posts: 31
Joined: Fri Aug 03, 2007 11:40 am

Source Code Synchronization

Post 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 ^^ ?
nimeni
Posts: 19
Joined: Fri Jun 15, 2007 7:43 pm

Re: Source Code Synchronization

Post by nimeni »

try

Compare With: Latest from Repository
Save your workspace directory before:)
Last edited by nimeni on Fri Apr 01, 2011 10:52 am, edited 1 time in total.
User avatar
jurchiks
Posts: 6769
Joined: Sat Sep 19, 2009 4:16 pm
Location: Eastern Europe

Re: Source Code Synchronization

Post 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.
If you have problems, FIRST TRY SOLVING THEM YOURSELF, and if you get errors, TRY TO ANALYZE THEM, and ONLY if you can't help it, THEN ask here.
Otherwise you will never learn anything if all you do is copy-paste!
Discussion breeds innovation.
igoooor
Posts: 31
Joined: Fri Aug 03, 2007 11:40 am

Re: Source Code Synchronization

Post by igoooor »

Ok I will try xD
igoooor
Posts: 31
Joined: Fri Aug 03, 2007 11:40 am

Re: Source Code Synchronization

Post 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 ^^ ?
nimeni
Posts: 19
Joined: Fri Jun 15, 2007 7:43 pm

Re: Source Code Synchronization

Post 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:)
igoooor
Posts: 31
Joined: Fri Aug 03, 2007 11:40 am

Re: Source Code Synchronization

Post 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.
nimeni
Posts: 19
Joined: Fri Jun 15, 2007 7:43 pm

Re: Source Code Synchronization

Post 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:)
igoooor
Posts: 31
Joined: Fri Aug 03, 2007 11:40 am

Re: Source Code Synchronization

Post 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 !
nimeni
Posts: 19
Joined: Fri Jun 15, 2007 7:43 pm

Re: Source Code Synchronization

Post 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!
Sylar88
Posts: 113
Joined: Sun Feb 06, 2011 6:34 pm

Re: Source Code Synchronization

Post 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.
Someone who didnt bother reading the svn or ant manual and just waited for you to make him a visual guide for eclipse is not a guy that is willing to learn ... He is the definition of the leecher.
User avatar
jurchiks
Posts: 6769
Joined: Sat Sep 19, 2009 4:16 pm
Location: Eastern Europe

Re: Source Code Synchronization

Post by jurchiks »

That's not for everyday programmer and it shouldn't be used like that, just to avoid syncing code.
If you have problems, FIRST TRY SOLVING THEM YOURSELF, and if you get errors, TRY TO ANALYZE THEM, and ONLY if you can't help it, THEN ask here.
Otherwise you will never learn anything if all you do is copy-paste!
Discussion breeds innovation.
Post Reply