How To Use Trunk Version?

Development-related discussion, including bundled plugins
miked333
Bear Rating Trainee
Bear Rating Trainee
Posts: 3
Joined: 28 Mar 2013, 06:52

How To Use Trunk Version?

Postby miked333 » 04 Apr 2013, 00:16

I'm interested in using trunk but have no experience with that sort of thing. Here's how I think I can do that, if someone could let me know if this is correct I would appreciate it.

I go to github here: https://github.com/gothfox/Tiny-Tiny-RSS

I download a zip file while viewing the "Master" branch.

I unzip the files, configure the config.php and upload them to my server, replacing the existing files.

Is that all there is to it?

Thanks!

User avatar
fox
^ me reading your posts ^
Posts: 6318
Joined: 27 Aug 2005, 22:53
Location: Saint-Petersburg, Russia
Contact:

Re: How To Use Trunk Version?

Postby fox » 04 Apr 2013, 00:17

Don't download zips, that's way too complicated. Read a basic git tutorial of which there's a million on the internet, learn about git clone, use it, and do git pulls from then on.

craywolf
Mr. Awesome
Posts: 97
Joined: 19 Mar 2013, 18:07

Re: How To Use Trunk Version?

Postby craywolf » 04 Apr 2013, 00:27

See "Cloning an Existing Repository":

xtaz
Bear Rating Master
Bear Rating Master
Posts: 174
Joined: 24 Dec 2009, 16:48

Re: How To Use Trunk Version?

Postby xtaz » 04 Apr 2013, 01:04


shabble
Bear Rating Trainee
Bear Rating Trainee
Posts: 33
Joined: 18 Mar 2013, 23:40

Re: How To Use Trunk Version?

Postby shabble » 04 Apr 2013, 05:34


User avatar
fox
^ me reading your posts ^
Posts: 6318
Joined: 27 Aug 2005, 22:53
Location: Saint-Petersburg, Russia
Contact:

Re: How To Use Trunk Version?

Postby fox » 04 Apr 2013, 08:51

>You do run the risk of one of the git updates involving an update to the database

You can add a post-merge hook which would dump your database into a (for example, timestamped) file before each pull.

>What I'm not sure about is if that revert command is the correct way of going back to the previous version in case of problems.

You will run into problems with getting new code later.

Either create a local branch and revert in there, or go to an older changeset manually using git checkout (which would put the work directory in the detached state, which for this situation is mostly the same thing as a branch). Use git log, select the commit before I broke thing, and do git checkout xxxxxxxxx.

Then to return to master using git checkout master and update using git pull etc.

Edit 2: I'll move this thread to Development and sticky it.

xtaz
Bear Rating Master
Bear Rating Master
Posts: 174
Joined: 24 Dec 2009, 16:48

Re: How To Use Trunk Version?

Postby xtaz » 04 Apr 2013, 12:43


Athanasius
Bear Rating Trainee
Bear Rating Trainee
Posts: 38
Joined: 02 Apr 2013, 21:01

Re: How To Use Trunk Version?

Postby Athanasius » 04 Apr 2013, 14:03

For what it's worth I've started using the git trunk and maintaining a local branch in order to preserve any local changes (certainly things like non-trunk plugins):

1) git clone to get started
2) git checkout -b <local branch name>
3) Get it all running
4) When you feel it's time to update:
4a) Just in case, stop the feed update daemon if you have it running
4b) git checkout master (so we pull to there first, rather than directly over local branch)
4c) git pull (as this is to master there shouldn't ever be any conflicts)
4d) git checkout <local branch name>
4e) git merge master (and pay attention to output in case of conflicts)
4f) Double-check no file permissions went screwy.
4g) Login as 'admin' in tt-rss in case of any DB updates.
4h) Restart feed update daemon if needed.

Obviously if you actually make any local edits to trunk code in your local branch you're more likely to get conflicts on the merge and will have to sort them out yourself. I'd also advise doing a 'git tag -a <some local tag with a date>' each time after the merge so you can hop between local versions if testing some issue. It's that or remembering the hashtags for the HEAD at the time.

Athanasius
Bear Rating Trainee
Bear Rating Trainee
Posts: 38
Joined: 02 Apr 2013, 21:01

Re: How To Use Trunk Version?

Postby Athanasius » 04 Apr 2013, 14:07

Oh and I should add that using such a local branch means that you can do things like the following.

Grab the tweet.zip download and whilst the local branch is checked out unzip it to plugins/, now you can:

git add tweet/
git commit

And you have the tweet plugin in your local branch with any changes tracked (assuming you check them in!). Rather than having to remember to unzip a copy on every "git pull".

xtaz
Bear Rating Master
Bear Rating Master
Posts: 174
Joined: 24 Dec 2009, 16:48

Re: How To Use Trunk Version?

Postby xtaz » 04 Apr 2013, 14:53


User avatar
fox
^ me reading your posts ^
Posts: 6318
Joined: 27 Aug 2005, 22:53
Location: Saint-Petersburg, Russia
Contact:

Re: How To Use Trunk Version?

Postby fox » 04 Apr 2013, 14:54

Yeah it's way overkill, you can just keep things which are not in origin/master without any special branches and stuff. Pull is not going to complain about them.

Athanasius
Bear Rating Trainee
Bear Rating Trainee
Posts: 38
Joined: 02 Apr 2013, 21:01

Re: How To Use Trunk Version?

Postby Athanasius » 04 Apr 2013, 17:08

It does give me an easy way to switch to pure master for testing if an update seems to be buggy, so as to rule out it being an issue with my local additions. Without the local branch I'd have to delete/disable all the local-only content, retest, and put it back after if it made no difference (or once a fix was in place).

That and I like to keep track of the local only files as well, especially when I'll inevitably update one of those local-only plugins and it breaks something. So much easier to roll back with git than hoping I remembered to keep the old copy around.

dewman
Bear Rating Trainee
Bear Rating Trainee
Posts: 2
Joined: 06 Apr 2013, 06:52

Re: How To Use Trunk Version?

Postby dewman » 06 Apr 2013, 07:05

I used this guide to install tt-rss using git twice, both times when I did git pull i get this

tt-rss$ git pull
remote: Counting objects: 61, done.
remote: Compressing objects: 100% (23/23), done.
remote: Total 41 (delta 27), reused 31 (delta 17)
Unpacking objects: 100% (41/41), done.
From https://github.com/gothfox/Tiny-Tiny-RSS
1e2ce29..b87bd8e master -> origin/master
Updating 1e2ce29..b87bd8e
error: Your local changes to the following files would be overwritten by merge:
classes/pref/feeds.php
classes/pref/prefs.php
include/functions.php
js/prefs.js
plugins/embed_original/init.js
plugins/googlereaderimport/init.php
Please, commit your changes or stash them before you can merge.
Aborting

i didn't change any of these files. Is this normal, if so how do I get past this?

Awesome piece of software

Thanks
John

Vassius
Bear Rating Trainee
Bear Rating Trainee
Posts: 6
Joined: 01 Apr 2013, 16:53

Re: How To Use Trunk Version?

Postby Vassius » 06 Apr 2013, 11:50


dewman
Bear Rating Trainee
Bear Rating Trainee
Posts: 2
Joined: 06 Apr 2013, 06:52

Re: How To Use Trunk Version?

Postby dewman » 06 Apr 2013, 18:28

Thanks You. like I said I didn't make any of the changes. unless the software itself changes them.

Thanks for the quick and understandable reply.


Return to “Development”

Who is online

Users browsing this forum: No registered users and 3 guests