And experiment: Publishing my mercurial patch queue
Ian Lepore
ian at FreeBSD.org
Sun Oct 6 20:31:02 UTC 2013
On Sun, 2013-10-06 at 13:21 -0600, Warner Losh wrote:
> Greetings,
>
> With the code freeze, I'm starting to accumulate a few patches in my tree. I've started using mercurial to manage my patch queue after the utter fail of svn-stash to do what I want. Patch queues are a thing that hg has optimized for upstream submission, so publishing it seems a reasonable thing.
>
> If you don't have mercurial, or don't want to, you can look at the raw patch queue at this URL:
>
> http://people.freebsd.org/~imp/embedded-patch-queue/patches/
>
> and brows the patches. All the files in this directory are patches, except series which lists the order.
>
> If you want to replicate what I have with mercurial:
>
> svn co <blah>
> cd <blah>
> hg init
> hg add
> hg forget .svn
> cd .hg
> hg clone http://people.freebsd.org/~imp/embedded-patch-queue/patches
> cd ..
> hg qpush, etc
>
> Anyway, thought I'd mention it here, since this may be a good way to get more involvement on my patches, some of which take months to fully bake due to the large range of mips and arm platforms we have.
>
> Comments?
>
You can speed up things like creating a new sandbox if you exclude .svn
by default rather than adding it then forgetting it. I have in
my .hgrc:
[defaults]
add = --exclude=.svn --exclude="glob:**.orig"
status = --exclude=.svn
and conversely in my .subversion/config I have:
[Miscellany]
global-ignores=.hg *.orig
If you want to re-sync a svn+hg sandbox with -current, the incantations
I've been using go like this...
* hg commit any outstanding changes, or if they're not commitable
yet use something like the hg attic extension to set them aside.
In general, you want hg status to show a clean sandbox,
including "unknown" files like .orig or ~ backups.
* svn up
* Now find everything svn up deleted and tell hg to delete it as
well: hg status | grep "^!" | cut2 | xargs hg delete
* Now tell hg to add new files added by svn up: hg status -u |
grep "^?" | cut2 | xargs hg add
* hg commit -m "Sync with svn rNNNNNNN"
The "cut2" in those command sequences is this script:
#!/bin/sh
tr -s '\t ' ' ' | cut -d' ' -f2
-- Ian
More information about the freebsd-embedded
mailing list