Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 06 Oct 2013 14:30:55 -0600
From:      Ian Lepore <ian@FreeBSD.org>
To:        Warner Losh <imp@bsdimp.com>
Cc:        embedded@FreeBSD.org
Subject:   Re: And experiment: Publishing my mercurial patch queue
Message-ID:  <1381091455.1152.58.camel@revolution.hippie.lan>
In-Reply-To: <E00A3CB0-40FD-43D0-BF33-3F9A7D393D1F@bsdimp.com>
References:  <E00A3CB0-40FD-43D0-BF33-3F9A7D393D1F@bsdimp.com>

index | next in thread | previous in thread | raw e-mail

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




help

Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?1381091455.1152.58.camel>