Presentation Screenshots Download Support Development Forum    
   

Welcome to the Community Forum.

Here you can discuss with other users or with the author, suggest new features, report bugs, ask for filters creation or correction, etc. Select the forum you wish to read or post below :

Forum
Forum > Development & Bug report > How to use SVN to test any revision ?

Pages : [1] Add a reply
User info How to use SVN to test any revision ?
Cyan
Avatar
Jan 27 2010, 1:29 pm
All the changes I made to the source code is publicly available to users.
Everyone can see and help improving Automatic Save Folder.

The source code is available on google code :
http://code.google.com/p/automatic-save-folder/source/checkout

Google code use the Subversion (SVN) format to store every changes I made. You can compare which line was added, deleted, corrected, etc. from one revision to another, like you can check changes from one version to another on Wikipedia history tab.

--------------

On the Google-code's "Source" tab, you have 3 choices :


1 - Checkout : gives you an URL to synchronize SVN with your computer, using an SVN software.
2 - Browse : You can see the current (last revision) source code online.
Look in the "Trunk" folder to start at the root of Automatic Save Folder.
Branches are for sub-project, using a trunk revision as a start.
Tags are copy of a trunk revision, for quick access, for example : every Final version.
3 - Changes : Here you can see every submission I made, from one revision to another, like wikipedia.

--------------

There are now 2 solution to test a revision, either manual update (replace every changed file one by one), or use an SVN synchronizing software which let you select the revision you want to switch to.

Solution 1 : Manual update (can be a very long process)

a) Download the latest beta version from this website. right click on the link and choose "save link as..." to store it on your computer.
b) rename the extension .xpi to .zip
c) extract the archive to a folder of your choice.
You will see the file and folder structure is the same as the Google-code "browse"'s tab structure.



Go to the "changes" tab and find a revision, and click on it. Inside there's updated files. click on a file, and you will see it's content. At the bottom of the right menu, you can see "View raw file".
Click on View raw file, and choose "file/save as (Ctrl+S)" to save the current file to Automatic save folder directory you created before and overwrite the existing file.

Do this for every file for each releases since the last beta you are using.

d) re-zip your folder
e) rename extension .zip to .xpi
f) drag & drop .xpi to firefox to install the new version.

This can be really long a hard process, subject to errors. It's fine if there's only few changed file, from one to another revision only.



Solution 2 : SVN software (Automatic synchronizing to source code)

This solution is the best and easiest.
I don't know any similar Linux or Mac software's name, but Linux has an svn command natively, and Mac should have some too.

INSTALLATION :
a) For windows users only then :
download and install Tortoise SVN from here : http://tortoisesvn.net/
This is a graphical and integrated to Windows Explorer SVN software.

b) Create a new folder on your computer, name it for example "Automatic Save Folder" (what a random name !).

c) go inside this folder, right-click and chose "SVN Checkout"

d) in the "URL of repository" field, input the checkout link (only the link) given by google code :


e) accept, and it will re-create the folder structure from google-code trunk.

Installation is finished.



UPDATE
a) if you want to change the version present in "Automatic save Folder" directory, you can right-click and select Tortoise SVN> Update to revision...

b) Select "HEAD" if you want the latest revision, or Select "Revision" (and choose a revision number from the "changes" tab on google code) to go back to a previous revision.



c)
Now that all the files are updated to the desired revision number, you can pack the "automatic Save Folder" directory in a .zip archive.

d) rename extension .zip to .xpi, and install to Firefox.



The "UPDATE" part is not a proper way of doing it, because there are a lot of hidden .svn folder which store the data of the current and previous svn changes. they are not needed and take un-needed space in the .zip

I'll post bellow how you can do it properly.
Post #1
Edit
Cyan
Avatar
Jan 27 2010, 5:58 pm
Ok, we saw how to install and use the svn software "Tortoise svn".
There are few things to know :

1- Tortoise SVN is always checking in background process if the files were modified or not.
Sometime, it may even crash explorer, because Tortoise is not only checking the "Automatic Save Folder" but all your hard drive.

You will have to tell him to stop looking on un-needed folder.
right click on an explorer window, select Tortoise svn>Settings>Icon overlay



on exclude paths, add all your drives letter, ex.
C:\*
D:\*
E:\*

on include paths, add the "automatic save folder" path
D:\here\is\svn folder\Automatic Save Folder\*

Apply and quit the settings. on next windows restart (or Kill TSVNcache.exe in task manager) it will look only on the specified folder, and prevent Windows to hang too often.



2 -
To create the .xpi package, go to google code, Download tab, and download the "pack_to_xpi.bat".
put the file inside the current ASF root folder (trunk)
Download and install 7zip.exe (from 7zip website)
run the batch to create the .xpi



3 -
you can make firefox works with the svn folder instead of packing the xpi and restarting every time.

Create a text file with :
D:\path\to\svn folder\ (don't forget the last backslash)

Rename the file to :
asf@mangaheart.org

In firefox, go to about:config and search for (or add new>boolean if not present) :
name = nglayout.debug.disable_xul_cache
value = true

Uninstall ASF and restart firefox.

Copy asf@mangaheart.org file to
C:/Users/User/AppData/<username>/Mozilla/Firefox/Profiles/xxxxx.default/extensions/
or
C:\Documents and Settings\<username>\Application Data\Firefox\Profiles\xxxxx.default\extensions\

Restart Firefox.

You can now work on the source and test it immediately without restarting Firefox (and stay up to date with svn revision easily), just close ASF window and open it again.


For more information on how to define a development environment, check this URL :
https://developer.mozilla.org/en/Setting_up_extension_development_environment
Post #2
Edit / Delete
Pages : [1] Add a reply

Return to top