viklikesfic: "There are only two mistakes one can make along the road to truth: not going all the way and not starting" (productive buddha)
viklikesfic ([personal profile] viklikesfic) wrote in [site community profile] dw_dev_training2011-10-01 07:45 pm

What's Old Is New Again: How to Understand the Code Structure?

I'm kind of terrified that this question has been asked and I'm going to have bananas thrown at me, but I couldn't find it and I'm feeling discouraged on my second try at the great hulking thing which is Understanding Dreamwidth Development. So if this is repetitive, please point me at the appropriate post and pardon me.

I assigned myself a minor effort bug that looked do-able, namely a request to add a give access link to the e-mail that goes out when a new person has subscribed to you. The problem is, I can't for the life of me find the code that deals with e-mail notifications. I tried the trick that's described in the wiki where you can search for a term, but I didn't find what I was looking for. Nor was I able to browse the code. So I'm pretty stuck. Would anyone be willing to at least give me a directory to start from for looking for this file? Once I find it, I feel pretty comfortable I can handle the coding end. I'm just so used to downloading entire sites to my machine via FTP, editing in TextWrangler, and re-uploading to the server that this Terminal/nano thing has me spooked.
foxfirefey: A guy looking ridiculous by doing a fashionable posing with a mouse, slinging the cord over his shoulders. (geek)

[personal profile] foxfirefey 2011-10-02 12:18 am (UTC)(link)
First step: calming! No bananas will be thrown.

Now, what is the minor bug you are looking at? We will help you!
sophie: A cartoon-like representation of a girl standing on a hill, with brown hair, blue eyes, a flowery top, and blue skirt. ☀ (Default)

[personal profile] sophie 2011-10-02 01:32 am (UTC)(link)
You don't have to use nano, for the record! I know people who use Dreamhacks the way you describe - downloading the files, editing in TextWrangler, and re-uploading them.

You'll need a program that's capable of doing SFTP for it to work; plain FTP won't work. There's a chance that your FTP program might support SFTP, however; take a look and see if there's an option for it!

[edit: Forgot to say - you'll still need to use the Terminal for *some* things, like starting/stopping Apache, updating the Dreamhack, and making patches, but editing files can be done using TextWrangler if you so prefer. :D]
Edited 2011-10-02 01:34 (UTC)
foxfirefey: A guy looking ridiculous by doing a fashionable posing with a mouse, slinging the cord over his shoulders. (geek)

[personal profile] foxfirefey 2011-10-02 01:34 am (UTC)(link)
Since they are using TextWrangler, it supports editing files directly over SFTP! Use the "Open from FTP/SFTP Server..." in the File menu.
ninetydegrees: Drawing: a girl's face, with a yellow and green stripe over one eye (Default)

[personal profile] ninetydegrees 2011-10-02 06:51 am (UTC)(link)
I think it's in /cgi-bin/LJ/Event/AddedToCircle.pm but I'm not sure. You can see the current file at the repo: http://hg.dwscoalition.org/dw-free/file/8664015de23e/cgi-bin/LJ/Event/AddedToCircle.pm.
pauamma: Cartooney crab holding drink (Default)

[personal profile] pauamma 2011-10-02 04:29 pm (UTC)(link)
That's correct, and http://wiki.dwscoalition.org/notes/ESN#Events now has a description of the methods in that class they'd need to change. (To the OP: don't worry if you didn't find it when you searched, I saw your question and added it.)

One thing, though: a link such as the one you gave points to a specific version of the file, which is usually not what you want. To point to the latest version committed, use "tip" instead of the version ID: http://hg.dwscoalition.org/dw-free/file/tip/cgi-bin/LJ/Event/AddedToCircle.pm
ninetydegrees: Drawing: a girl's face, with a yellow and green stripe over one eye (Default)

[personal profile] ninetydegrees 2011-10-02 05:31 pm (UTC)(link)
Oh, thanks Pau. I've always wondered how you could get such a link. Is there somewhere you can click to get it or is it a 'trick' one needs to know?
pauamma: Cartooney crab holding drink (Default)

[personal profile] pauamma 2011-10-02 05:55 pm (UTC)(link)
The latter, I'm afraid. At least, I've never seen a "click for latest version" link anywhere.
ninetydegrees: Drawing: a girl's face, with a yellow and green stripe over one eye (Default)

[personal profile] ninetydegrees 2011-10-02 05:56 pm (UTC)(link)
Too bad. Thanks again for telling me then! :)
azurelunatic: A glittery black pin badge with a blue holographic star in the middle. (Default)

[personal profile] azurelunatic 2011-10-03 09:31 am (UTC)(link)
Do we have this tip documented?
pauamma: Cartooney crab holding drink (Default)

[personal profile] pauamma 2011-10-03 12:56 pm (UTC)(link)
Not really. I don't think one use in http://wiki.dwscoalition.org/notes/Dev_Version_Control#Checking_out_the_code qualifies as "documenting it". http://mercurial.selenic.com/wiki/TipsAndTricks#Create_links_to_snapshots_of_files_and_tarballs is probably a good starting point, but use "file" instead of "raw-file". ("file" gives you navigating chrome, "raw-file" is just the file's content.)