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, 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"

When committing, the patches get unapplied correctly and they don't actually 
appear on the commit

> Could you copy the exact message so that it can be easily grepped?
> 

See above

> 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 :)

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