So, it sounds like you are saying that either should work, right?

I may be the cause of my own problem.  It seems that my inline branch also
includes the mainvar branch:

ryan|04:59 PM|~/git_temp/sympy (temp_inline)$ git diff github/mainvar
github/inline
diff --git a/sympy/printing/latex.py b/sympy/printing/latex.py
index f7e6b09..5e20c8f 100644
--- a/sympy/printing/latex.py
+++ b/sympy/printing/latex.py
@@ -43,7 +43,9 @@ class LatexPrinter(Printer):
     def doprint(self, expr):
diff --git a/sympy/printing/latex.py b/sympy/printing/latex.py
index f7e6b09..5e20c8f 100644
--- a/sympy/printing/latex.py
+++ b/sympy/printing/latex.py
@@ -43,7 +43,9 @@ class LatexPrinter(Printer):
     def doprint(self, expr):
         tex = Printer.doprint(self, expr)

-        if self._settings['inline']:
+        if self._settings['inline'] is None:
+            return "%s" % tex
+        elif self._settings['inline']:
             return r"$%s$" % tex
         else:
             return r"\begin{equation*}%s\end{equation*}" % tex
diff --git a/sympy/printing/tests/test_latex.py
b/sympy/printing/tests/test_late
index 0415fd1..b9eb43d 100644
--- a/sympy/printing/tests/test_latex.py
+++ b/sympy/printing/tests/test_latex.py
@@ -177,3 +177,9 @@ def test_mainvar():
     assert latex(expr, profile_y) == '$y^{4} + 3 x y^{3} + y x^{2} +
x^{3}$'
     profile_x['descending'] = True
     assert latex(expr, profile_x) == '$x^{3} + y x^{2} + 3 x y^{3} +
y^{4}$'
+
+def test_inline():
+    expr = x+y
+    assert latex(expr) == '$x + y$'
+    assert latex(expr, inline=None) == 'x + y'
+    assert latex(expr, inline=False)== '\\begin{equation*}x +
y\\end{equation*}
(END)

i.e. the only differences in the branches are additions to create the inline
functionality.

So, is there an easy way to get a tree structure to print from the command
line, or gitk my only option?  I guess I needed to co the master before I
created inline instead of it being a branch from mainvar.

Ryan


On Wed, Jun 24, 2009 at 5:05 PM, Ondrej Certik <ond...@certik.cz> wrote:

>
> On Wed, Jun 24, 2009 at 3:50 PM, Ryan Krauss<ryanli...@gmail.com> wrote:
> > So, with Aaron's help, I am almost getting my mind around this.  Maybe I
> am
> > creating my branches correctly and I just don't know how to test merging
> two
> > of them in a row into a test branch or on another machine or in a new
> > directory.  If I can understand this, I think I am well on my way.
> >
> > Here is my situation that I am trying to test.  I have two branches in my
> > github that are useful (I think).  They are related but I think
> > independent.  The first is called mainvar and the second is inline.  I
> want
> > to test putting them together in a new branch
> >
> > This works:
> >
> > git co -b temp github/mainvar
> > git rebase master
> > git co -b tempinline github/inline
> > git rebase master
> > git diff master
> >
> > and leaves the new branches tempinline and temp exactly as I would
> expect.
> >
> > This doesn't work and results in a conflict:
> >
> > git co -b temp2
> > git pull github mainvar
> > git rebase master
> > git pull github inline
> >
> > Is the idea of pulling a remote branch into a sub-branch a bad idea?  Why
> > does it work with the first pull but not the second?
> >
> > Here is the conflict:
> >
> > def test_mainvar():
> >     expr = 3*x*y**3+x**2*y+x**3+y**4
> >     profile_y = {'mainvar' : y}
> >     assert latex(expr, profile_y) == '$x^{3} + y x^{2} + 3 x y^{3} +
> y^{4}$'
> >     profile_x = {'mainvar' : x}
> >     assert latex(expr, profile_x) == '$y^{4} + 3 x y^{3} + y x^{2} +
> x^{3}$'
> >     profile_y['descending'] = True
> >     assert latex(expr, profile_y) == '$y^{4} + 3 x y^{3} + y x^{2} +
> x^{3}$'
> >     profile_x['descending'] = True
> >     assert latex(expr, profile_x) == '$x^{3} + y x^{2} + 3 x y^{3} +
> y^{4}$'
> > <<<<<<< HEAD:sympy/printing/tests/test_latex.py
> > =======
> >
> > def test_inline():
> >     expr = x+y
> >     assert latex(expr) == '$x + y$'
> >     assert latex(expr, inline=None) == 'x + y'
> >     assert latex(expr, inline=False)== '\\begin{equation*}x +
> > y\\end{equation*}'
> >>>>>>>>
> >>>>>>>>
> a66e0937464156e8abc6d48e8484f6ec855d36c5:sympy/printing/tests/test_latex.py
> >
> > which seems trivial to me.
> >
> > If the answer is, "don't use pull in that way", then that is fine and I
> am
> > good.  If there is something else going on, I would like to learn about
> it.
> >
> > Or, is there a better way to do this?
>
> I think the only difference is that in the first case you are using
> rebase to actually do the "merge" and rebase the patches, while in the
> second case you are using the commad merge (because pull = fetch +
> merge).
>
> Looking at the "git help rebase" and "git help merge", both shows lots
> of different merge strategies, while "recursive" is the default, so
> the actual conflict resolution algorithm seems to be the same.
>
> The big difference is that rebase rebases all your patches on top of
> master (e.g. you endup with a linear history), while merge keeps the
> branched history and just merges the two heads, so it may need some
> help with deciding which HEAD to keep. In the case above I guess it
> could be more clever to do the merge for you, but even if it does, you
> will endup with a branched history, which may or may not be what you
> want.
>
> Ondrej
>
> >
>

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"sympy-patches" group.
To post to this group, send email to sympy-patches@googlegroups.com
To unsubscribe from this group, send email to 
sympy-patches+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/sympy-patches?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to