I am almost done with the revlog and other stuff, and started working on
wireprotocol. I sent some patches to the list. That was my basic idea to
implement. But I was told I am heading in wrong direction. *
*1)* *Query the server if it is capable of sending parentdelta'ed
2) Figure out which is most efficient method to add changegroup.
3) Request the chagegroup.
To carry out this process what I previously did was find capabilities of
remote server, if the server is new then request a changegroup with parent
deltas. It was done like this: (before unification)
return self.do_cmd("changegroup", roots=n,
return self.do_cmd("changegroup", roots=n)
and server responds as below:
pdelta = 'parentdelta' in req.form
return repo.changegroup(nodes, 'serve', pdelta)
I had to send a weird "parentdelta='parentdelta'" cause I just want to make
the server aware that I want parentdelta'd changegroup. In the end it turns
out to be the wrong way to implement.
After little bit of thinking I realized adding a new command is more safe
and gives better functionality.
So now it looks like:
1) Query server's capabilities
2) If capable of parentdelta:
Send the command "parentdelta" notifying type of repo client
has(Old/New) and server replies with type of repo
3) Ask server for appropriate changegroup.
This is the idea currently I have in my mind. Any kind of improvements, new
way of implementation, suggestions are welcome.