crew: qrefresh -D/-d confusion

Peter Arrenbrecht peter.arrenbrecht at gmail.com
Mon Jun 8 07:19:06 CDT 2009


qref -D never inserts dates. It only updates them when the original
patch already contained them. The idea is that you can safely have

  [defaults]
  qrefresh = -D

in your .hgrc without worrying about adding dates to patches that did
not use to have them.
-parren

On Sun, Jun 7, 2009 at 12:04 AM, Giorgos
Keramidas<keramida at ceid.upatras.gr> wrote:
> I think I'm a bit confused about -D and/or remember something that is
> not true.  After running the following commands I'd expect that the
> `qrefresh -D' command would update the MQ patch to contain the current
> date, but it doesn't.
>
>  keramida at kobe:/tmp$ hg init hgtest
>  keramida at kobe:/tmp$ cd hgtest
>  keramida at kobe:/tmp/hgtest$ echo foo > foo
>  keramida at kobe:/tmp/hgtest$ hg add
>  adding foo
>  keramida at kobe:/tmp/hgtest$ hg ci -d '0 0' -m 'add foo'
>  keramida at kobe:/tmp/hgtest$ hg log --style compact
>  0[tip]   4c221c707433   1970-01-01 00:00 +0000   keramida
>    add foo
>
>  keramida at kobe:/tmp/hgtest$ hg qinit -c
>  keramida at kobe:/tmp/hgtest$ echo foobar > foo
>  keramida at kobe:/tmp/hgtest$ hg qnew --git -f -m 'patch foo' patch-001
>  keramida at kobe:/tmp/hgtest$ head .hg/patches/patch-001
>  patch foo
>
>  diff --git a/foo b/foo
>  --- a/foo
>  +++ b/foo
>  @@ -1,1 +1,1 @@
>  -foo
>  +foobar
>
> After explicitly overwriting the patch with 'hg export' it seems to work
> though:
>
>  keramida at kobe:/tmp/hgtest$ hg export tip > .hg/patches/patch-001
>  keramida at kobe:/tmp/hgtest$ hg qpop
>  keramida at kobe:/tmp/hgtest$ hg qpush
>  keramida at kobe:/tmp/hgtest$ hg log --style compact
>  1[qtip,patch-001,tip,qbase]   a6049da4f398   2009-06-07 00:56 +0300   keramida
>    patch foo
>  ...
>  keramida at kobe:/tmp/hgtest$ sleep 30 ; hg qrefresh -D
>  keramida at kobe:/tmp/hgtest$ hg log --style compact
>  1[qtip,patch-001,tip,qbase]   9e262a412b99   2009-06-07 00:58 +0300   keramida
>    patch foo
>
> If I want to update the dates of related patches to a single date/time,
> do I really have to *always* overwrite them with hg export before using
> the -D or -d options of qrefresh?
>
>
> _______________________________________________
> Mercurial mailing list
> Mercurial at selenic.com
> http://selenic.com/mailman/listinfo/mercurial
>
>



More information about the Mercurial mailing list