[Coco] making patches to NitrOS-9 (part I)
Gene Heskett
gheskett at wdtv.com
Wed Jan 22 16:18:51 EST 2014
On Wednesday 22 January 2014 16:18:29 Tormod Volden did opine:
> Dear NitrOS-9 contributors,
>
> Mercurial (hg) seems to put many off, but can really be of good help
> to us all. There is lot of documentation around, for instance
> <http://hgbook.red-bean.com/>. However, I will outline some of the
> basics to get you going.
>
> 1) How to make a patch the simplest way
>
> You have cloned the repo, pulled and updated it. Now you have made
> some modifications that you want to share with others. Simply type:
> hg diff
> and it will list your changes as a patch. To make a patch file, type:
> hg diff > my_little_change.patch
> Now you can send this file to others, for instance to a maintainer who
> will commit this to the repository for you.
>
> 2) How to undo your changes
>
> To bring a file back to the repo version (or last commit), type
> hg revert filename
>
> 3) How to apply a patch
>
> If you have a patch file and want to apply it to your working tree, run
> patch -p1 < some_change.patch
> The changes will now appear when you run "hg diff".
>
> If you want to undo this patch, but don't want to rewind the file back
> to the repo version with "hg revert" (because the file has other
> changes that you want to keep), you can apply the patch in reverse:
> patch -R -p1 < some_change.patch
>
> 4) How to check the status of your repo
>
> At any time type "hg status" to see which files you have modified
> (indicated by "M") or added to your local working directory tree.
> Files that are only added to your local directory will not be included
> in "hg diff".
>
> "hg summ" gives a summary of what the latest commit is, which branch
> you are on and statistics on modified or new files. It will be even
> more useful later.
>
> 5) Conclusion
>
> Run "hg diff" and "hg status" all the time. It makes it easy to see
> what changes you did and helps you avoid adding something unwanted to
> your patches.
>
> Next part will be about using the mercurial "mq" extension to keep
> track of several patches. If you can't wait, see for instance
> <http://hgbook.red-bean.com/read/managing-change-with-mercurial-queues.h
> tml> or <http://mercurial.selenic.com/wiki/MqExtension>.
>
> Regards,
> Tormod
This is helpful, thank you.
>
> --
> Coco mailing list
> Coco at maltedmedia.com
> http://five.pairlist.net/mailman/listinfo/coco
Cheers, Gene
--
"There are four boxes to be used in defense of liberty:
soap, ballot, jury, and ammo. Please use in that order."
-Ed Howdershelt (Author)
Genes Web page <http://geneslinuxbox.net:6309/gene>
Required reading:
<http://culturalslagheap.wordpress.com/2014/01/12/elemental/>
A man who fishes for marlin in ponds
will put his money in Etruscan bonds.
A pen in the hand of this president is far more
dangerous than 200 million guns in the hands of
law-abiding citizens.
More information about the Coco
mailing list