On Sun, Feb 6, 2011 at 08:15, Antoine Pitrou <solip...@pitrou.net> wrote: > On Sun, 06 Feb 2011 02:10:15 +0100 > brett.cannon <python-check...@python.org> wrote: >> >> To create your patch, you should generate a unified diff from your >> checkout's >> top-level directory:: >> >> - svn diff > patch.diff >> + hg outgoing --path > patch.diff > > Should be --patch. > The problem is that it will show one several patch per changeset, which > is normally not what you want (it's a pity "hg out" doesn't have an > option to collapse them all).
Yeah, that is a perk of mq. > >> If your work needs some new files to be added to the source tree, remember >> -to ``svn add`` them before generating the patch:: >> +to ``hg add`` them before generating the patch:: >> >> - svn add Lib/newfile.py >> - svn diff > patch.diff >> + hg add Lib/newfile.py >> + hg outgoing --patch > patch.diff > > You should commit before using "outgoing", otherwise the added file is > not in the repo (and therefore not in the patch). > > The problem with hg (and other DVCSes) is that allows for *several* > local workflows, and therefore it's harder to advocate one of them in > such tutorial docs. I wonder what Georg and Dirkjan suggest. Well, I wouldn't say harder. We just choose one we like the most and advocate that while stating upfront this is just one of many different ways someone can choose to work. > > We could perhaps present SVN-like "work in the working copy" workflow > (without local commits), and let seasoned hg users choose other > workflows they like more (they don't need our help anyway). I would rather give people some simple workflow that has some benefit over svn. Basically whatever is the easiest to comprehend and work with should be what we start people with. > >> To undo a patch, you can revert **all** changes made in your checkout:: >> >> - svn revert -R . >> + hg revert --all >> + > > Or "hg revert -a", which is nicer to type. I prefer being explicit over implicit in the tutorial. _______________________________________________ Python-Dev mailing list Python-Dev@python.org http://mail.python.org/mailman/listinfo/python-dev Unsubscribe: http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com