[PATCH 2 of 3 STABLE] mq: create patch file after commit to import diff of ".hgsubstate" at qrefresh

FUJIWARA Katsunori foozy at lares.dti.ne.jp
Fri Jun 22 03:00:30 CDT 2012


At Thu, 21 Jun 2012 11:33:45 -0500,
Kevin Bullock wrote:
> 
> [1  <text/plain; utf-8 (quoted-printable)>]
> On Jun 21, 2012, at 5:55 AM, FUJIWARA Katsunori wrote:
> 
> > # HG changeset patch
> > # User FUJIWARA Katsunori <foozy at lares.dti.ne.jp>
> > # Date 1340275737 -32400
> > # Branch stable
> > # Node ID b8a0b3a9ca354d42e212ee7e5f025d52e27b9de4
> > # Parent  658e4c908b3782f44bf4c3b541abfbd0b86e9acc
> > mq: create patch file after commit to import diff of ".hgsubstate" at qrefresh
> > 
> > even though the committed revision contains diff of ".hgsubstate", the
> > patch file created by qrefresh doesn't contain it, because:
> > 
> >  - target files of the path are listed up according to current status
> >    of files in working directory, so clean ".hgsubstate" is not
> >    listed up
> > 
> >  - the patch file is created before commit processing which updates
> >    or creates ".hgsubstate" automatically, so there is no diff for it
> >    at that time
> > 
> > this patch resolves this problem by:
> > 
> >  - creating the patch file after commit processing, and
> >  - putting ".hgsubstate" into target list of the patch, if needed
> 
> Are both necessary? It seems that one or the other should solve the problem.

The former is necessary to update ".hgsubstate" in working directory,
and the latter is necessary to create diff between not-updated and
updated one.

If only the former is done, "patch.diff()" creates diff only other
than ".hgsubstate", because it creates diff only for files specified
by "changes" argument.

If only the latter is done, ".hgsubstate" is not updated yet at
"patch.diff()" invocation, so "patch.diff()" can't create diff of
".hgsubstate".

So, I think both are necessary.

----------------------------------------------------------------------
[FUJIWARA Katsunori]                             foozy at lares.dti.ne.jp


More information about the Mercurial-devel mailing list