Hi David,

Thanks for your help. Yes, I did sage -clone myclone, which returned an 
error message, so I changed back to main (sage -b main), started sage, 
tried to apply the same patch in main without success and then I thought 
I should revert to the original by typing  hg_sage.revert('--all')
- without success, as described before.

Here is an attempt to reconstruct in more detail what I did:

Following the instructions at 
http://www.sagemath.org/doc/developer/producing_patches.html, I did: 
hg_sage.patch('trac-5448-matplotlib-axes-gridlines.patch')

However, this launched me straight into editing the patch, which I was 
not really up to. Exiting the editors led to the following message:

RuntimeError?: Refusing to do operation since you still have unrecorded 
changes. You must check in all changes in your working repository first.


I then tried out instrutions by Jason:

$ sage -sh
$ cd $SAGE_ROOT/devel/sage/sage/
$ hg qimport 
http://trac.sagemath.org/sage_trac/raw-attachment/ticket/5448/trac-5448-matplotlib-axes-gridlines.patch

hg: unknown command 'qimport'


Doing hg revert --all and hg_sage.patch(...) from within sage took me a 
few steps further until:

patching file sage/plot/matrix_plot.py Hunk #1 FAILED at 155 1 out of 1 
hunks FAILED -- saving rejects to file sage/plot/matrix_plot.py.rej 
patching file sage/plot/plot.py Hunk #6 FAILED at 1222 Hunk #10 FAILED 
at 1770 Hunk #11 FAILED at 1812 3 out of 14 hunks FAILED -- saving 
rejects to file sage/plot/plot.py.rej abort: patch failed to apply

Since then, I have been trying to do hg_sage.revert('--all') from within 
sage using the main branch and running into the message "abort: 
uncommitted merge - please provide a specific revision".

By the way, I can reproduce the error message caused by sage -clone myclone:
...
___gmpz_tdiv_r_2exp referenced from libmpfr expected to be defined in 
/Users/sschym/Programs/sage-4.0.2/local/lib/libgmp.3.dylib
collect2: ld returned 1 exit status
error: command 'gcc' failed with exit status 1
sage: There was an error installing modified sage library code.


real    0m44.194s
user    0m33.997s
sys     0m4.820s
Error building Sage
*** WARNING ***
If you are cloning a previous revision or have uncommitted changes to
cython files do
    sage -ba
Otherwise Sage might build using the wrong .c files !!

I only now noticed that sage was looking for something in my sage-4.0.2 
folder, which does not exist any more. Does this imply that my previous 
sage -upgrade did not work?

Maybe I should recompile from scratch (?). Or just do sage -ba as 
suggested in the error message? Sorry about the mess.

Cheers,
Stan

David Joyner wrote:
> On Tue, Sep 1, 2009 at 6:03 AM, Stan Schymanski<schym...@gmail.com> wrote:
>   
>> Dear all,
>>
>>     
> ...
>   
>> I tried different ways of applying a patch with the only success that
>> I probably made a bit of a
>> mess in my repository. Is there a way to revert it back to a clean
>> 4.1.1
>> install?
>>     
>
> I'm not sure what you did to create the new repo.Can you provide details?
>
> For example, if you started with a new install of Sage, then did
> sage -clone myclone
> and then applied patched in myclone, you can
> "clean it up" and start afresh by typing
> sage -b main
> sage -clone myclone2
>
> Is that what you want?
>
>
>   
>> Thanks for your help!
>>
>> Stan
>>     
>
> >
>   


--~--~---------~--~----~------------~-------~--~----~
To post to this group, send an email to sage-devel@googlegroups.com
To unsubscribe from this group, send an email to 
sage-devel-unsubscr...@googlegroups.com
For more options, visit this group at http://groups.google.com/group/sage-devel
URLs: http://www.sagemath.org
-~----------~----~----~----~------~----~------~--~---

Reply via email to