[PATCH 1 of 1] subrepo: check for dirty warns on missing revision instead of abort

Friedrich Kastner-Masilko face at snoopie.at
Fri May 13 11:02:22 CDT 2011


Zitat von Matt Mackall <mpm at selenic.com>:

>> Changed that here, thanks for the update. It worked with .node(), too.
>
> Well, no, it didn't. The test always failed because it tried to compare
> a hex value to a binary and thus always claimed the subrepo was dirty.

Ok. I only checked my work-flow, not the obvious function of dirty().  
My fault.

>> The previously written statement still applies, though. No warning on
>> "hg update" to a changeset containing the same subrepo hash. I guess
>> this is because the .hgsubstate is not in the applyaction-list and
>> thus the subrepo-system is not touched besides evaluating dirty() .
>
> Are we talking about something else now?

I am talking about my first reply to your patch here:  
http://www.selenic.com/pipermail/mercurial-devel/2011-May/031481.html

> The bug you originally reported was: hg aborts while checking dirty() if
> the subrepo revision it's checking for has vanished. I believe my
> current patch fixes that while leaving everything else unchanged, please
> confirm.

Well, to be precise I didn't report a bug. I reported a faulty  
work-flow and provided a patch to repair this.

I'm not sure if you can define the behaviour of the dirty() function  
as bug per se. It might be OK for the function to abort (no  
stack-trace!) if the referenced revision is not found, but it  
interferes with the work-flow.

The update is not consistent with the subrepo missing, that's why I  
proposed a patch to just capture the exception and give a warning.

I can confirm that your patch is fixing the dirty() function to give a  
positive result on missing subrepo revisions.

What I cannot say is that your patch is doing what I want (as you  
asked in your first reply), because I'd like to have a warning for the  
reasons given in the reply referenced above.

> If there are other issues remaining in this function, please describe
> them separately. We are simple folk here and like to fix one thing at a
> time.

Sorry if I express myself in a complicated manner, I'm no native  
English speaker. Please be patient with me ;) .




More information about the Mercurial-devel mailing list