Discussion:
lyx-collaborate-v5 made it work!
Tommaso Cucinotta
2014-05-06 22:57:36 UTC
Permalink
Hi Tommaso,
Hi,
I made the patch work, I have uploaded the patch through git, please do check it out if you get time
https://gist.github.com/HotSushi/75ed590070e293f1b563
Its only specific to Interactive Lyx and does not include chat feature.
Great news :-)! I'll have a look ASAP.
------------------------------------------------------------------------------------------------------------------------------------------
Be aware of its embedded debugging feature: 'lyx -dbg this,that,whatever' will enable debugging >on the terminal of those comma-separated list of components.
How do I debug, lets say I want to track the flow of your patch, how do I do it? Should I sprinkle some printfs or LYXERRORs or logsyserr() so that I know whats going on?
I tried doing ' lyx -dbg ' and saw its working, Is there a method to trigger a debug message?
You can try

lyx -dbg any

that simply dumps all the LYXERR(...) debugging messages. Using "-dbg gui" should give you plenty of messages related to the GUI. However, I'm seeing from the patch that I used for who know what reason LYXERR(Debug::ACTION, ....), so I guess "-dbg action" should give you back those messages.
And, if you need to add more, you can try LYXERR(Debug::PICK_ANY_THAT_SEEMS_RELEVANT, ...);
------------------------------------------------------------------------------------------------------------------------------------------
are you accessing the repo in read-only / anonymous mode, or did you clone with your own R/W >access to the gsoc repo ? (Vincent should have granted you R/W access, right?)
So how do I push,
I have a branch called patch on which I worked on the patch! btw I think I created a remote called "gsoc"
compile
interactive
master
* patch
if i do
will it work?
but my work is in 'patch' branch.
Vincent, can you help here ?
--------------------------------------------------------------------------------------------------------------------------------------------
How will the pushing work? will it copy all of my branches remotely?
git push gsoc interactive
|http://wiki.lyx.org/Devel/LyXGit
|
How will it be useful?
lets say I created a separate playground branch called gsoc/sushant like how you did.
and say I have multiple local branches ( several I finished working with)
b1 <finished>
b2 <finished>
b3
so, what can I do with this branches. Does pushing allow me to publish those branches?like gsoc/sushant/b1
gsoc/sushant/b2
I am basically trying to ask is How do I make my branches (b1,b2) remote, preferably grouped together (gsoc/sushant) as shown above? and what is the use of pushing except that it will stay safe and can been made public?
Branches are generally useful to try realizing a new feature in a branch, for later merging it with the master. A playground branch may be useful to try out some change to LyX without discarding it afterwards, i.e., you would commit those changes to the playground branch. Later you can cherry-pick that commit from any other branch, if you realize it was useful. Remote branches can be made public, so you can share them with us.

You don't need to work on multiple branches. It is sufficient that you work on your own local branch, and that you make it accessible to us (pushing it to a remote) whenever you want to share it. If getting push to the LyX gsoc repo to work is not immediate, we can use github as well. The important thing is get going.
_________________________________________________________________________________
I have been going through the code last couple of days, I understood the patch thoroughly! I have been through the coding rules 'lyx/development/coding'.
Very good start! And, posting your questions and thoughts, as below, is just extremely good...
A simple question: Instead of polling for the incoming lfuns was it not possible to have a separate listening thread for each remote BufferVIew all together? Does lyx architecture provide thread functionality?
LyX is internally non-threaded when it's about manipulating the internal document model, so that's why the polling: I used sockets without any blocking call! That way, any incoming LFUN can be dispatched within the same thread that dispatches other LFUNs. The outcome of different threads dispatching LFUNs concurrently on the same Buffer might be catastrophic (AFAIK). Threads and processes are used, instead, for external tools that need to convert images and other external material, compile the document with latex et al., etc... Also, there's an experimental Advanced Find & Replace patch of mine somewhere using multiple threads to accelerate the search.
I was thinking of playing with CursorSlice, BufferView, Buffer next, so that I get their working.
Please, detail, I'm curious to hear...
_________________________________________________________________________________
P.S. wow! this email turned out big. :-)
No prob at all... keep asking pls.

T.
Vincent van Ravesteijn
2014-05-07 08:58:42 UTC
Permalink
Post by Tommaso Cucinotta
Be aware of its embedded debugging feature: 'lyx -dbg
this,that,whatever' will enable debugging >on the terminal of those
comma-separated list of components.
How do I debug, lets say I want to track the flow of your patch, how
do I do it? Should I sprinkle some printfs or LYXERRORs or
logsyserr() so that I know whats going on?
I tried doing ' lyx -dbg ' and saw its working, Is there a method to
trigger a debug message?
Or use QtCreator to debug in a proper way.
Post by Tommaso Cucinotta
are you accessing the repo in read-only / anonymous mode, or did you
clone with your own R/W >access to the gsoc repo ? (Vincent should
have granted you R/W access, right?)
but it was asking for password, when I asked on the mailing
list they told me to instead clone git://git.lyx.org/lyx.git
<http://git.lyx.org/lyx.git> . Which I think is anonymous, Vincent
then asked for my ssh key, which I provided! he said he added the key.
So how do I push,
I have a branch called patch on which I worked on the patch! btw I
think I created a remote called "gsoc"
compile
interactive
master
* patch
if i do
will it work?
but my work is in 'patch' branch.
Vincent, can you help here ?
First set the remote to push to back to the non-anonymous url:

$ git remote set-url --push gsoc ***@git.lyx.org:gsoc.git

Then push your local branch pathc to the remote branch interactive using:

$ git push gsoc patch:interactive

But if you treat the interactive branch as the integration branch (that
means you only push to this branch if it has been reviewed and if it is
considered finished), then you might want to push to a separate branch
first (Tommaso called this the playground branch). Then, have your
mentors look at it, rework it maybe a few times, and then push it to
interactive. In that case you can:

$ git push gsoc patch:interactive/<description of the work>
Post by Tommaso Cucinotta
--------------------------------------------------------------------------------------------------------------------------------------------
How will the pushing work? will it copy all of my branches remotely?
Depending on the exact version of git, the default is to either:

push all branches that you've have both in your local as in the remote
repository,

or,

push the branch you're on if it has a matching branch in the remote.

Vincent

Loading...