On Fri, 10 Jan 2014 16:56:51 +0000, Arnau Castello wrote:
> From: Yuya Nishihara Sent 10 January 2014 15:40
> > >
> > > When used from the command line those hooks work just right, but when
> > > used
> > 
> > Which kind of hook? "precommit" ?
> > 
> 
> Currently my repo structure is the following
> 
> 
> base/
> base/external/core
> base/external/patches
> base/external/londoncommon
> base/external/others...
> 
> All the directories under external are subrepositories of base.
> 
> Additionally, base/external/core has MQ enabled, and
> base/external/core/.hg/patches is symlinked to base/external/patches
> The problem with that is when committing to base, the ephemeral changeset
> hashes of the applied patches get added to .hgsubstate, causing errors when
> the patches are unapplied, or the new commit is pushed somewhere else.
> 
> To avoid commiting those by accident,

So you are trying to go against the "overly-strict tracking" of subrepos.

> I have the following on base/.hg/hgrc, under [hooks]:
> 
> precommit.subrepo = hg qpop -a -R external/core
> pre-update.subrepo = hg qpop -a -R external/core
> pre-merge.subrepo = hg qpop -a -R external/core
> 
> Still, when I try to update to a different changeset on base, I get the
> uncommitted local changes popup warning:
> 
> "Detected uncommitted local changes in working tree.
> Please select to continue:
> 
> Discard - discard local changes, no backup
> Shelve - move local changes to a patch
> Merge - allow to merge with local changes"
> 
> When trying to merge you get this on the merge window:
> 
> "Uncommitted local changes are detected
> Before merging, you must commit, shelve to patch, or discard changes"

Thanks for the detail.  Unfortunately, these messages are unavoidable.
They are checked before running the Mercurial command.

> > The wiki says that the recommended way is not to mix subrepositories with
> > code.
> 
> Indeed; We are doing it as we do want to have a strict tracking of the
> subrepositories, but the warnings about changes in the working folder would
> still be there
> 
> I'm aware there may be no clean way of doing this, but at least I'll improve
> my mercurial-fu :)

If you just need to avoid accidental commit with MQ patches, Mercurial 2.9
will provide "phases.checksubrepos=abort".  You'll be able to reject unexpected
commit with "mq.secret=True".

http://selenic.com/repo/hg/rev/4c96c50ef937  (not released yet)

Regards,

------------------------------------------------------------------------------
CenturyLink Cloud: The Leader in Enterprise Cloud Services.
Learn Why More Businesses Are Choosing CenturyLink Cloud For
Critical Workloads, Development Environments & Everything In Between.
Get a Quote or Start a Free Trial Today. 
http://pubads.g.doubleclick.net/gampad/clk?id=119420431&iu=/4140/ostg.clktrk
_______________________________________________
Tortoisehg-discuss mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/tortoisehg-discuss

Reply via email to