wf49670 / ppgen

Post-processing generator for DP
6 stars 4 forks source link

two parameter drop cap spec #68

Closed ghost closed 9 years ago

ghost commented 9 years ago

pull request to merge feature-drop-cap into develop. Drop cap spec can take three numbers (legacy) or just two, for height and adjustment.

wf49670 commented 9 years ago

Very strange. It seems that that Pull will overwrite some of my footnote changes that you last merged into develop.

I'm not sure what went wrong...

 Walt

On 11/20/2014 9:04 PM, rfrank wrote:

pull request to merge feature-drop-cap into develop. Drop cap spec can take three numbers (legacy) or just two, for height and adjustment.


    You can merge this Pull Request by running

git pull https://github.com/rfrank/ppgen feature-drop-cap

Or view, comment on, or merge it at:

https://github.com/rfrank/ppgen/pull/68

    Commit Summary

— Reply to this email directly or view it on GitHub https://github.com/rfrank/ppgen/pull/68.

ghost commented 9 years ago

Maybe I should close this pull request (not merge it) and do it the way I used to, by checking out develop and making the edits there and just pushing it back? Wish I understood git a little better.

wf49670 commented 9 years ago

On 11/21/2014 6:34 AM, rfrank wrote:

Maybe I should close this pull request (not merge it) and do it the way I used to, by checking out develop and making the edits there and just pushing it back? Wish I understood git a little better.

We should be able to make it work, but it will take a bit of figuring out, I think.

The only think I can figure out is that perhaps a sequence like this happened: (1) You merged my pull request #66 into develop at GitHub. (2) Locally, on your PC, you did NOT do a "fetch origin" + "merge", so your local copy is then 1 commit downlevel. (3) Locally, on your PC, you created the branch, and let it base on top of your down-level local copy of develop.

If that's what happened, I think that you could do the following to fix it, and your existing Pull request will be good: (a) save your new feature under a different file name (just to be safe); (b) checkout develop; (c) fetch from origin develop and merge it so develop is up-to-date (d) checkout the new feature (e) merge into it from develop, which should be possible automatically without any conflicts

(As I normally use the Windows Git GUI I don't know all the Git native commands and parameters to do all that. Sorry.)

At that point everything should be good locally. You would then (still with the new feature checked out) push it to origin, which updates the copy on GitHub.

Regards, Walt

ghost commented 9 years ago

Walt, I think this worked. I use the command line but I expect you can follow it:

rm -rf ppgen deleted entire ppgen local repository git clone https://github.com/rfrank/ppgen.git cloned it back (with my account on github sitting on develop) cd ppgen go into the repository git branch “develop” good. a fresh copy of develop git branch dropcap make my local branch git checkout dropcap switch to it bbedit ppgen.py edit in the change for variable argument drop caps git commit -am "drop cap variable argcount” commit my changes to local git push origin dropcap send a copy to github git push origin --delete feature-drop-cap delete the old, incorrect branch that overwrote your earlier work.

Now I believe you can review “dropcap” and merge it into develop and it won’t overwrite any of your earlier commits.

—Roger

wf49670 commented 9 years ago

On 11/21/2014 5:24 PM, rfrank wrote:

Walt, I think this worked. I use the command line but I expect you can follow it:

rm -rf ppgen deleted entire ppgen local repository git clone https://github.com/rfrank/ppgen.git cloned it back (with my account on github sitting on develop) cd ppgen go into the repository git branch “develop” good. a fresh copy of develop git branch dropcap make my local branch git checkout dropcap switch to it bbedit ppgen.py edit in the change for variable argument drop caps git commit -am "drop cap variable argcount” commit my changes to local git push origin dropcap send a copy to github git push origin --delete feature-drop-cap delete the old, incorrect branch that overwrote your earlier work.

Now I believe you can review “dropcap” and merge it into develop and it won’t overwrite any of your earlier commits.

Thanks, Roger. That does look like it includes all the other changes from develop.

I think you have an indentation problem, though. It's in the if and else blocks near line 4419, which read: if self.pindent: s0 = re.sub("em", "", self.nregs["psi"]) # drop the "em" s1 = int(float(s0)_100.0) # in tenths of ems s2 = (s1//2)/100 # forces one decimal place else: s0 = re.sub("em", "", self.nregs["psb"]) # drop the "em" s1 = int(float(s0)_100.0) # in tenths of ems s2 = (s1//2)/100 # forces one decimal place

As the lines under the if and else are not indented I have my doubts that the code will work correctly, at least for the case of indented paragraphs, as the second set of assignments to s0/1/2 should always occur and override the first set (which I think will also always occur).

Other than that it looks good.

Walt