Gettings started as developer

Started by Strahlex, September 26, 2012, 07:12:54 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

Pelican

Quote from: a1ex on October 13, 2012, 11:23:36 PM
2: if you change something, you can create your own fork, and submit pull requests (recommended method - you also get proper credit on the repo).
Thank you.
- I've made my fork, and clone it with hg clone https://[email protected]/Pelican/magic-lantern-pel
to my computer but I've got the original ML source even if I set Fork at: unified
then get  with hg clone -r unified https://[email protected]/Pelican/magic-lantern-pel
- edit platform/7D.203/misc.c
- make autoexec.bin, checked in my camera, it was OK
- hg push: it says no changes found
What am I doing wrong? How to push my changes?
EOS 7D Mark II, EOS 7D, EOS 5, EOS 100 + lenses (10mm to 300mm), 600EX, 550EX, YN600EX x 3
EOScard, EOS DSLR firmwares, ARMu, NiControl, etc.: http://pel.hu/down

a1ex


Pelican

EOS 7D Mark II, EOS 7D, EOS 5, EOS 100 + lenses (10mm to 300mm), 600EX, 550EX, YN600EX x 3
EOScard, EOS DSLR firmwares, ARMu, NiControl, etc.: http://pel.hu/down

Pelican

There was a property change monitor in an older ML version.

How can I activate that function in my fork?
I want to know the AF points values.
Edit: I've got it. I changed a wrong source until now... ::) 
EOS 7D Mark II, EOS 7D, EOS 5, EOS 100 + lenses (10mm to 300mm), 600EX, 550EX, YN600EX x 3
EOScard, EOS DSLR firmwares, ARMu, NiControl, etc.: http://pel.hu/down

Pelican

Can I undo commit?
I forgot to remove the debug messages at first...
EOS 7D Mark II, EOS 7D, EOS 5, EOS 100 + lenses (10mm to 300mm), 600EX, 550EX, YN600EX x 3
EOScard, EOS DSLR firmwares, ARMu, NiControl, etc.: http://pel.hu/down

g3gg0

you cann 'rollback' the last commit you made to your local repository.
if that doesnt work anymore, just commit the reverted file afterwards.
Help us with datasheets - Help us with register dumps
magic lantern: 1Magic9991E1eWbGvrsx186GovYCXFbppY, server expenses: [email protected]
ONLY donate for things we have done, not for things you expect!

g3gg0

nice changes!

btw i recommend *not* to alter that spaces in blank lines.
some text editors treat it this, others the other way.

so we would change it forth and back all the time :)
and this makes the patches unreadable.
Help us with datasheets - Help us with register dumps
magic lantern: 1Magic9991E1eWbGvrsx186GovYCXFbppY, server expenses: [email protected]
ONLY donate for things we have done, not for things you expect!

nanomad

As an unwritten rule, ML uses 4 spaces soft-tab indenting (except for Makefiles), so no real tab characters. Remove any trailing white-spaces if you find any :P
EOS 1100D | EOS 650 (No, I didn't forget the D) | Ye Olde Canon EF Lenses ('87): 50 f/1.8 - 28 f/2.8 - 70-210 f/4 | EF-S 18-55 f/3.5-5.6 | Metz 36 AF-5

g3gg0

Quote from: nanomad on October 14, 2012, 04:14:47 PM
As an unwritten rule, ML uses 4 spaces soft-tab indenting (except for Makefiles), so no real tab characters. Remove any trailing white-spaces if you find any :P

basically true, but i would not mix that with code changes in one commit, as it will make merging harder.
Help us with datasheets - Help us with register dumps
magic lantern: 1Magic9991E1eWbGvrsx186GovYCXFbppY, server expenses: [email protected]
ONLY donate for things we have done, not for things you expect!

Pelican

I've made a mess, so I've created another fork and start over. I think I can survive now.
My editor deleted all the trailing spaces but I agree with g3gg0, it's hard to follow the changes if every line changed...

Maybe we can do a big cleaning, just to remove all of them.
EOS 7D Mark II, EOS 7D, EOS 5, EOS 100 + lenses (10mm to 300mm), 600EX, 550EX, YN600EX x 3
EOScard, EOS DSLR firmwares, ARMu, NiControl, etc.: http://pel.hu/down

nanomad

EOS 1100D | EOS 650 (No, I didn't forget the D) | Ye Olde Canon EF Lenses ('87): 50 f/1.8 - 28 f/2.8 - 70-210 f/4 | EF-S 18-55 f/3.5-5.6 | Metz 36 AF-5

Pelican

I can do that if everybody agree...


One thing is still not so clear for me.
If I have a fork and during I change something in my code somebody else commit a change to the main repository then what should I do?
I tried to merge the change but the mercurial treated that as my developing and when I commit it put as my change.
EOS 7D Mark II, EOS 7D, EOS 5, EOS 100 + lenses (10mm to 300mm), 600EX, 550EX, YN600EX x 3
EOScard, EOS DSLR firmwares, ARMu, NiControl, etc.: http://pel.hu/down

nanomad

That's how it works, every time you merge, you commit because you arrived "late"
EOS 1100D | EOS 650 (No, I didn't forget the D) | Ye Olde Canon EF Lenses ('87): 50 f/1.8 - 28 f/2.8 - 70-210 f/4 | EF-S 18-55 f/3.5-5.6 | Metz 36 AF-5

a1ex

To avoid those merges, you need to remember to pull the latest changes before you commit anything.

ilguercio

Giovanni@Giovanni-PC ~/magic-lantern
$ make 50D
make -C /home/Giovanni/magic-lantern/platform/50D.109
make[1]: ingresso nella directory "/home/Giovanni/magic-lantern/platform/50D.109                                                                                                    "
[ VERSION  ]   ../../platform/50D.109/version.c
[ CC       ]   version.o
cd ../../doc; python2.6  menuindex.py
Could not open menuindex.txt, will not rewrite help index files
[ CC       ]   menuindex.o
[ LD       ]   magiclantern
boot-hack.o: In function `my_big_init_task':
boot-hack.c:(.text+0x36c): undefined reference to `_init_funcs_start'
boot-hack.c:(.text+0x370): undefined reference to `_init_funcs_end'
boot-hack.c:(.text+0x37c): undefined reference to `_tasks_start'
boot-hack.c:(.text+0x380): undefined reference to `_tasks_end'
boot-hack.o: In function `my_task_dispatch_hook':
boot-hack.c:(.text+0x3f0): undefined reference to `_task_overrides_end'
boot-hack.c:(.text+0x3f4): undefined reference to `_task_overrides_start'
boot-hack.o: In function `copy_and_restart':
boot-hack.c:(.text+0x514): undefined reference to `_bss_end'
boot-hack.c:(.text+0x518): undefined reference to `_bss_start'
config.o: In function `config_save_file':
config.c:(.text+0x218): undefined reference to `_config_vars_start'
config.c:(.text+0x21c): undefined reference to `_config_vars_end'
config.o: In function `config_parse':
config.c:(.text+0x4f4): undefined reference to `_config_vars_end'
config.c:(.text+0x4f8): undefined reference to `_config_vars_start'
config.o: In function `get_config_vars_start':
config.c:(.text+0x5a4): undefined reference to `_config_vars_start'
config.o: In function `get_config_vars_end':
config.c:(.text+0x5b0): undefined reference to `_config_vars_end'
property.o: In function `prop_init':
property.c:(.text+0xc8): undefined reference to `_prop_handlers_start'
property.c:(.text+0xcc): undefined reference to `_prop_handlers_end'
property.o: In function `global_property_handler':
property.c:(.text+0x160): undefined reference to `_prop_handlers_start'
property.c:(.text+0x164): undefined reference to `_prop_handlers_end'
collect2: ld returned 1 exit status
../../Makefile.inc:266: recipe for target `magiclantern' failed
make[1]: *** [magiclantern] Error 1
make[1]: uscita dalla directory "/home/Giovanni/magic-lantern/platform/50D.109"
Makefile:44: recipe for target `50D' failed
make: *** [50D] Error 2

Same old makefile, i have just pulled the latest changesets and now i can't compile anymore.
Why?
Usual cygwin on 7 x64.
Canon EOS 6D, 60D, 50D.
Sigma 70-200 EX OS HSM, Sigma 70-200 Apo EX HSM, Samyang 14 2.8, Samyang 35 1.4, Samyang 85 1.4.
Proud supporter of Magic Lantern.

nanomad

Have tried doing a make clean + make again?
EOS 1100D | EOS 650 (No, I didn't forget the D) | Ye Olde Canon EF Lenses ('87): 50 f/1.8 - 28 f/2.8 - 70-210 f/4 | EF-S 18-55 f/3.5-5.6 | Metz 36 AF-5

ilguercio

Quote from: nanomad on November 08, 2012, 06:56:17 PM
Have tried doing a make clean + make again?
Uhm, i did that yesterday and didn't help.
Now it seems to be working. Sorry boys.
:-\
Just a question, since you're here. If i happen to make any change to code on my copy of source and later i want to pull the changesets from the repo what should i do? I will be encountering conflicts and it tells me to just hg resolve -- mark.
Is that enough?
Also, now:
Giovanni@Giovanni-PC ~/magic-lantern
$ make 50D
make -C /home/Giovanni/magic-lantern/platform/50D.109
make[1]: ingresso nella directory "/home/Giovanni/magic-lantern/platform/50D.109"
../../Makefile.inc:145: *** separatore  mancante.  Arresto.
make[1]: uscita dalla directory "/home/Giovanni/magic-lantern/platform/50D.109"
Makefile:44: recipe for target `50D' failed
make: *** [50D] Error 2
Canon EOS 6D, 60D, 50D.
Sigma 70-200 EX OS HSM, Sigma 70-200 Apo EX HSM, Samyang 14 2.8, Samyang 35 1.4, Samyang 85 1.4.
Proud supporter of Magic Lantern.

nanomad

You need to merge the changes (hg merge after update)
EOS 1100D | EOS 650 (No, I didn't forget the D) | Ye Olde Canon EF Lenses ('87): 50 f/1.8 - 28 f/2.8 - 70-210 f/4 | EF-S 18-55 f/3.5-5.6 | Metz 36 AF-5

ilguercio

Quote from: nanomad on November 08, 2012, 07:13:47 PM
You need to merge the changes (hg merge after update)
$ hg merge
abortito: branch 'unified' has one head - please merge with an explicit rev
(run 'hg heads' to see all heads)

I know you're hating me, i will understand a bit more after this.
:D
Canon EOS 6D, 60D, 50D.
Sigma 70-200 EX OS HSM, Sigma 70-200 Apo EX HSM, Samyang 14 2.8, Samyang 35 1.4, Samyang 85 1.4.
Proud supporter of Magic Lantern.

nanomad

Yeah because you already marked conflicts as resolved without resolving them...which probably means you screwed up your local copy
EOS 1100D | EOS 650 (No, I didn't forget the D) | Ye Olde Canon EF Lenses ('87): 50 f/1.8 - 28 f/2.8 - 70-210 f/4 | EF-S 18-55 f/3.5-5.6 | Metz 36 AF-5

a1ex

Maybe you could export your changes as a patch (hg diff > my.patch) and then apply them on a fresh clone (patch -p1 < my.patch).

ilguercio

Quote from: nanomad on November 08, 2012, 07:29:28 PM
Yeah because you already marked conflicts as resolved without resolving them...which probably means you screwed up your local copy
Did everything from scratch again.
Nice suggestion a1ex, i'm starting to understand the whole thing bit by bit and i guess eventually i will have a decent amount of control over it.
Thanks to you all for the help, i know i'm being the black sheep working on Windows 7 :D
Canon EOS 6D, 60D, 50D.
Sigma 70-200 EX OS HSM, Sigma 70-200 Apo EX HSM, Samyang 14 2.8, Samyang 35 1.4, Samyang 85 1.4.
Proud supporter of Magic Lantern.

scrax

I'm used to always compile my test with:
make clean; make 600D; cp ~/magic-lantern/platform/600D.102/autoexec.bin /Volumes/EOS_DIGITAL ; hdiutil unmount /Volumes/EOS_DIGITAL/

can someone, please, explain me when just use:
make 600;
instead of
make clean; make 600D;
I'm using ML2.3 for photography with:
EOS 600DML | EOS 400Dplus | EOS 5D MLbeta5- EF 100mm f/2.8 USM Macro  - EF-S 17-85mm f4-5.6 IS USM - EF 70-200mm f/4 L USM - 580EXII - OsX, PS, LR, RawTherapee, LightZone -no video experience-

nanomad

Clean deletes object files (.o) and starts from scratch while make alone tries to compile only the .c files that were modified since the last make was run. It's always best to run make clean when you pull a new revision or when you edit a file that's not a .c one
EOS 1100D | EOS 650 (No, I didn't forget the D) | Ye Olde Canon EF Lenses ('87): 50 f/1.8 - 28 f/2.8 - 70-210 f/4 | EF-S 18-55 f/3.5-5.6 | Metz 36 AF-5

Pelican

Until now I can use my fork to develop but now when my commits merged manually to the main repo I've lost.
I've just started a new fork, because cannot fix the old one.
Could somebody write here the whole process of mercurial?
I'm starting with how I did until now and I will update this reply with your comments to make a tutorial for beginners (like me).
----------------------
Step 1. Get your fork to your local folder (don't forget "-r unified" and go to your personal folder first)
hg clone -r unified https://"USERNAME"@bitbucket.org/"USERNAME"/"FORKNAME"
(obviously write your username and forkname instead of "USERNAME" and "FORKNAME")
(maybe you can use https://bitbucket.org/"USERNAME"/"FORKNAME", I'm not sure)
Step 2. Develop the code

Step 3. Get the latest changes

hg pull -r unified https://bitbucket.org/hudson/magic-lantern
hg update
If any conflicts there you should fix that first.  (Is there an easy way?)
Step 4. Commit your changes

hg commit -u "USERNAME" -m "Short description about your changes"
Step 5. Update your fork with your commited changes

hg push -r unified https://bitbucket.org/"USERNAME"/"FORKNAME"
It will ask your username and password.


Until now I can work with these commands but now I couldn't push my changes.
There is a command, hg merge which I never used. When I should use it?
EOS 7D Mark II, EOS 7D, EOS 5, EOS 100 + lenses (10mm to 300mm), 600EX, 550EX, YN600EX x 3
EOScard, EOS DSLR firmwares, ARMu, NiControl, etc.: http://pel.hu/down