[sage-devel] Re: How do I apply a patch or clean up a repository?
Sorry, please disregard my previous message. I just found the following plastered all over my terminal window: WARNING: Make sure to create a ~/.hgrc file: -- [ui] username = William Stein -- I suppose this answers it. :-) Cheers, Stan Jason Grout wrote: > John Cremona wrote: > >> You may need to recompile from scratch. I would *never* apply a patch >> to the mai nbranch, for this reason! >> >> The reason the hg qimport failed is probably because i nyour .hgrc >> file you need to alert hg to the fact that you will be using wueues. >> Mine looks like this: >> >> [ui] >> username = John Cremona >> [extensions] >> hgext.mq = >> >> > > > My file also has the following, in case it's helpful to others too: > > > [extensions] > record= > hgext.mq= > > > The "record=" enables hg record and hg qrecord, which lets me select > parts of a file to include in a commit or patch. It's very handy in the > case that I didn't commit often enough and several changes are mushed > together in my source files. > > Jason > > > > > --~--~-~--~~~---~--~~ 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 -~--~~~~--~~--~--~---
[sage-devel] Re: How do I apply a patch or clean up a repository?
I don't seem to have an .hgrc file. I only have an .hg file in /sage/devel/sage-myclone. Did I failed to install something crucial? Cheers, Stan Jason Grout wrote: > John Cremona wrote: > >> You may need to recompile from scratch. I would *never* apply a patch >> to the mai nbranch, for this reason! >> >> The reason the hg qimport failed is probably because i nyour .hgrc >> file you need to alert hg to the fact that you will be using wueues. >> Mine looks like this: >> >> [ui] >> username = John Cremona >> [extensions] >> hgext.mq = >> >> > > > My file also has the following, in case it's helpful to others too: > > > [extensions] > record= > hgext.mq= > > > The "record=" enables hg record and hg qrecord, which lets me select > parts of a file to include in a commit or patch. It's very handy in the > case that I didn't commit often enough and several changes are mushed > together in my source files. > > Jason > > > > > --~--~-~--~~~---~--~~ 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 -~--~~~~--~~--~--~---
[sage-devel] Re: How do I apply a patch or clean up a repository?
Hi Stan, On Tue, Sep 1, 2009 at 10:38 PM, Stan Schymanski wrote: > > Thanks, John! > > Is there a simple step-by-step guide to safely applying patches > somewhere? Everyone seems to do it differently. I found the following > thread helpful, but it would be good to summarise it somewhere: > http://groups.google.com/group/sage-devel/browse_thread/thread/6f9b59faccaafc12/300bca141f731323?lnk=gst&q=patch#300bca141f731323 Writing such a tutorial is on my todo list. I'm rather busy with release management and teaching at the moment, so it would be some time before there is anything to read. In the meantime, feel free to open a trac ticket for this issue and CC me on it. -- Regards Minh Van Nguyen --~--~-~--~~~---~--~~ 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 -~--~~~~--~~--~--~---
[sage-devel] Re: How do I apply a patch or clean up a repository?
John Cremona wrote: > You may need to recompile from scratch. I would *never* apply a patch > to the mai nbranch, for this reason! > > The reason the hg qimport failed is probably because i nyour .hgrc > file you need to alert hg to the fact that you will be using wueues. > Mine looks like this: > > [ui] > username = John Cremona > [extensions] > hgext.mq = > My file also has the following, in case it's helpful to others too: [extensions] record= hgext.mq= The "record=" enables hg record and hg qrecord, which lets me select parts of a file to include in a commit or patch. It's very handy in the case that I didn't commit often enough and several changes are mushed together in my source files. Jason -- Jason Grout --~--~-~--~~~---~--~~ 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 -~--~~~~--~~--~--~---
[sage-devel] Re: How do I apply a patch or clean up a repository?
Thanks, John! Is there a simple step-by-step guide to safely applying patches somewhere? Everyone seems to do it differently. I found the following thread helpful, but it would be good to summarise it somewhere: http://groups.google.com/group/sage-devel/browse_thread/thread/6f9b59faccaafc12/300bca141f731323?lnk=gst&q=patch#300bca141f731323 By the way, there was an error in my upgrade because I just went into the original folder where I did the upgrade and tried a ./sage -clone myclone yielding the same error messages. Cheers, Stan John Cremona wrote: > You may need to recompile from scratch. I would *never* apply a patch > to the mai nbranch, for this reason! > > The reason the hg qimport failed is probably because i nyour .hgrc > file you need to alert hg to the fact that you will be using wueues. > Mine looks like this: > > [ui] > username = John Cremona > [extensions] > hgext.mq = > > By the way, if you find that your system has an older version of hg > which does not support queues then use "sage -hg" instead of hg. > > John > > 2009/9/1 Stan Schymanski : > --~--~-~--~~~---~--~~ 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 -~--~~~~--~~--~--~---
[sage-devel] Re: How do I apply a patch or clean up a repository?
OK, thanks! It's a mystery to me how people manage to do upgrade after upgrade without running into problems. So far, I have always ended up recompiling from source, earlier or later. Maybe the problems are caused by moving the sage install directory after upgrading. I don't know. Anyway, thanks for your help! Cheers, Stan David Joyner wrote: > On Tue, Sep 1, 2009 at 8:03 AM, Stan Schymanski wrote: > >> 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. >> >> > > ... > > >> 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. >> > > > Yes, I would create a new version by compiling from source. It seems like > your upgrade got corrupted somehow maybe? > > > >> Cheers, >> Stan >> >> David Joyner wrote: >> >>> On Tue, Sep 1, 2009 at 6:03 AM, Stan Schymanski 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 -~--~~~~--~~--~--~---
[sage-devel] Re: How do I apply a patch or clean up a repository?
You may need to recompile from scratch. I would *never* apply a patch to the mai nbranch, for this reason! The reason the hg qimport failed is probably because i nyour .hgrc file you need to alert hg to the fact that you will be using wueues. Mine looks like this: [ui] username = John Cremona [extensions] hgext.mq = By the way, if you find that your system has an older version of hg which does not support queues then use "sage -hg" instead of hg. John 2009/9/1 Stan Schymanski : > > 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 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 -~--~~~~--~~--~--~---
[sage-devel] Re: How do I apply a patch or clean up a repository?
On Tue, Sep 1, 2009 at 8:03 AM, Stan Schymanski wrote: > > 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. > ... > > 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. Yes, I would create a new version by compiling from source. It seems like your upgrade got corrupted somehow maybe? > > Cheers, > Stan > > David Joyner wrote: >> On Tue, Sep 1, 2009 at 6:03 AM, Stan Schymanski 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 -~--~~~~--~~--~--~---
[sage-devel] Re: How do I apply a patch or clean up a repository?
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. real0m44.194s user0m33.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 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 -~--~~~~--~~--~--~---
[sage-devel] Re: How do I apply a patch or clean up a repository?
On Tue, Sep 1, 2009 at 6:03 AM, Stan Schymanski 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 -~--~~~~--~~--~--~---