Author Topic: Using subversion with LPC  (Read 5099 times)

Offline Wizbyt

  • Acquaintance
  • *
  • Posts: 14
    • View Profile
Using subversion with LPC
« on: October 21, 2007, 10:43:28 am »
Hi all.

I'm fairly new to LPC coding but not coding in general. What I've been looking at is using subversion for storing all my LPC code for the mud that I'm about to start. I'm going to be tweaking more than just the rooms and stuff so using subversion seems like the way forward for me.

I tend to use my laptop and vi to do all my editing (can't really get on with ed even though I've been using linux for years) and then when the code is tested check it into subversion, then check it out on the real mud.

Does anyone else do this? I haven't got the subversion for the LPC code set up yet as some of the objects needed to check out a stock mud require ".o" objects (in particular the races.o file in Dead Souls). I know subversion can handle .o files, just wondered if anyone uses this approach and how they handle it?

Offline mactorg

  • Acquaintance
  • *
  • Posts: 30
    • View Profile
    • DarkeMUD
Re: Using subversion with LPC
« Reply #1 on: October 22, 2007, 03:40:28 pm »
Hello wizbit,

 I have been looking into getting subversion going on our test lib and then have our live lib pull from the subversion at each reboot. but at this point havn't gotten very far at all but still planning things out on paper on how to do pushes of changes and or having a script look for a file of changes then processing them.

it is hard todo this when wizards can code right online as needed.  and to pull from the subversion to update the test lib.  then when to pull it in to the live lib.

if you find any good information or ideas post them up if you can.

MacTORG
MacTORG
to live is to learn, to die is to graduate.

http://www.darkemud.com

Offline mactorg

  • Acquaintance
  • *
  • Posts: 30
    • View Profile
    • DarkeMUD
Re: Using subversion with LPC
« Reply #2 on: October 22, 2007, 03:45:16 pm »
Found this guy using subversion for his sources but he is using DGD:

http://phantasmal.sourceforge.net/DGD/Skotos/
MacTORG
to live is to learn, to die is to graduate.

http://www.darkemud.com

Offline Tacitus

  • Acquaintance
  • *
  • Posts: 21
    • View Profile
Re: Using subversion with LPC
« Reply #3 on: November 14, 2007, 02:49:08 pm »
We use bazaar-vcs but we aren't dealing with a live mud but when we want to test something, we just
Quote
bzr export ../test-mud
and than go from there. I even sometimes setup a neat little system with symlinks to edit both at once.

Offline Alecksy

  • Acquaintance
  • *
  • Posts: 21
    • View Profile
    • BucketMUD
Re: Using subversion with LPC
« Reply #4 on: December 20, 2007, 04:02:05 pm »
I've been using subversion with Dead Souls for about a month now, and I've just written up a blog post detailing some of the issues I've encountered and how I've dealt with them. Feel free to check it out here.
Chil@BucketMUD
www.bucketmud.tk

Offline Wizbyt

  • Acquaintance
  • *
  • Posts: 14
    • View Profile
Re: Using subversion with LPC
« Reply #5 on: January 08, 2008, 03:11:59 am »
Alecksy:

Had a read through your subversion article and I've implemented something similar on my server.

Can you post the snippet of code that hides the .svn directories that you put in lib/secure/daemon/master.c
Your trac installation is secured and I'd like to see what changes you made to that file.

Thanks.

Offline Archaegeo

  • Acquaintance
  • *
  • Posts: 33
    • View Profile
Re: Using subversion with LPC
« Reply #6 on: January 08, 2008, 06:10:27 am »
We now have subversion running internally to the mud with external command support.
Mactorg should be posting the howto in a couple of days.

You can
svnadd <filename> - to add a file to your revision
svnci <reason> <path> - to commit back to the repository
svnup <filename> - to checkout a file from the repository into the mud

This will let you use things like RapidSVN or TortoiseSVN (we've tried both) to edit files then use svnup to pull the edited file into the mud. Or you can edit in the mud via ed or ftp and then use svnci to push to the repository.

Its working fairly well so far. He just wants to make sure its clean and documented before releasing a full how-to

Offline Alecksy

  • Acquaintance
  • *
  • Posts: 21
    • View Profile
    • BucketMUD
Re: Using subversion with LPC
« Reply #7 on: January 08, 2008, 10:51:18 am »
Alecksy:

Had a read through your subversion article and I've implemented something similar on my server.

Can you post the snippet of code that hides the .svn directories that you put in lib/secure/daemon/master.c
Your trac installation is secured and I'd like to see what changes you made to that file.

Thanks.

The trac site should be accessible again.  The master.c patch is a first-pass quick hack at the problem, and simply disallows read and write access to anything with ".svn" in the pathname. It needs to be revised with some proper path logic to deny access only to ".svn" directories. Also, this is only a partial solution since it doesn't 'hide' the directories, it just prevents reading/writing them. For a more complete solution you'll want to take care of things like overriding the get_dir() and stat() efuns with sefuns that remove the subversion directories from returned listings, etc. Otherwise, you'll likely have minor weirdness throughout the lib (.svn showing up in help indexes on DS, e.g.).
Chil@BucketMUD
www.bucketmud.tk

Offline Archaegeo

  • Acquaintance
  • *
  • Posts: 33
    • View Profile
Re: Using subversion with LPC
« Reply #8 on: January 08, 2008, 11:04:48 am »
Yeah, we caught some of that today when liveupgrade rename'd the dir containing .svn which broke svnup for a moment, had to patch that too to copy .svn/ back to /secure/upgrades/files/