<html><head><meta http-equiv="Content-Type" content="text/html charset=us-ascii"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class="">Hi<div class=""><br class=""></div><div class="">I already asked the following question on the users mailing list, but I did not receive an answer, which helps me further. Has someone here an idea, how I can get a list of files in a precommit (or similar) hook, which will be committed (respecting the passed command line arguments)?</div><div class=""><br class=""></div><div class="">See the thread on the other mailing list for some already mentioned ideas:</div><div class=""><a href="https://www.mercurial-scm.org/pipermail/mercurial/2016-July/049720.html" class="">https://www.mercurial-scm.org/pipermail/mercurial/2016-July/049720.html</a></div><div class=""><br class=""></div><div class="">Best</div><div class="">Ulrich</div><div class=""><br class=""><div><br class=""><blockquote type="cite" class=""><div class="">Anfang der weitergeleiteten Nachricht:</div><br class="Apple-interchange-newline"><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px;" class=""><span style="font-family: -webkit-system-font, Helvetica Neue, Helvetica, sans-serif; color:rgba(0, 0, 0, 1.0);" class=""><b class="">Von: </b></span><span style="font-family: -webkit-system-font, Helvetica Neue, Helvetica, sans-serif;" class="">Ulrich Thomas Gabor <<a href="mailto:ulrich.thomas.gabor@googlemail.com" class="">ulrich.thomas.gabor@googlemail.com</a>><br class=""></span></div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px;" class=""><span style="font-family: -webkit-system-font, Helvetica Neue, Helvetica, sans-serif; color:rgba(0, 0, 0, 1.0);" class=""><b class="">Betreff: </b></span><span style="font-family: -webkit-system-font, Helvetica Neue, Helvetica, sans-serif;" class=""><b class="">before commit hook; list files to be committed respecting cmd arguments?</b><br class=""></span></div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px;" class=""><span style="font-family: -webkit-system-font, Helvetica Neue, Helvetica, sans-serif; color:rgba(0, 0, 0, 1.0);" class=""><b class="">Datum: </b></span><span style="font-family: -webkit-system-font, Helvetica Neue, Helvetica, sans-serif;" class="">11. Juli 2016 um 19:24:44 MESZ<br class=""></span></div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px;" class=""><span style="font-family: -webkit-system-font, Helvetica Neue, Helvetica, sans-serif; color:rgba(0, 0, 0, 1.0);" class=""><b class="">An: </b></span><span style="font-family: -webkit-system-font, Helvetica Neue, Helvetica, sans-serif;" class=""><a href="mailto:mercurial@mercurial-scm.org" class="">mercurial@mercurial-scm.org</a><br class=""></span></div><br class=""><div class=""><div class="">Hi<br class=""><br class="">I'd like to write an in-process Python hook that runs a check on the files that will be committed and based on that information has the possibility to abort the commit process.<br class=""><br class="">My first attempt was to use a precommit hook, which can abort a commit, but I did not find a possibility to get a list of all the files, which will be committed. There is repo[None].files(), which lists all the files that have changed, but it does not respect command line arguments. When someone appends file arguments to the hg call (e.g. hg commit -m "lorem" only_this_file.txt) I found no possibility to respect this "filter". The files method always returns all files.<br class=""><br class="">Is there a way to get a list of only those files, which have changed and will actually be processed by mercurial respecting the passed command line arguments?<br class=""><br class="">Best<br class="">Ulrich<br class=""><br class=""></div></div></blockquote></div><br class=""></div></body></html>