[Bug 6473] New: __index__.py is generated with str instead of bytes
https://bz.mercurial-scm.org/show_bug.cgi?id=6473 Bug ID: 6473 Summary: __index__.py is generated with str instead of bytes Product: Mercurial Version: 5.7rc0 Hardware: All OS: All Status: UNCONFIRMED Severity: bug Priority: wish Component: Mercurial Assignee: bugzi...@mercurial-scm.org Reporter: matt_harbi...@yahoo.com CC: martinv...@gmail.com, mercurial-devel@mercurial-scm.org Python Version: --- After building the py2 WiX packaging, `test-check-help.t` fails on py3 trying to interpolate `str` into `bytes`. The reason being that the generated `__index__.py` file is left around, which the extension code looks at first if it exists to get a list of disabled extensions. The content of the file is something like: ``` docs = {'absorb': 'apply working directory changes to changesets (EXPERIMENTAL)', ... } ``` It doesn't matter too much if it's only used for py2exe, but I thought there was some work to use it for PyOxidizer binaries. I was able to fix it by converting inside the extensions module where it is used, but it seems to me that it should be generated with the right content. However, I wasn't able to get the installer build to work when converting to have b'' prefixes. -- You are receiving this mail because: You are on the CC list for the bug. ___ Mercurial-devel mailing list Mercurial-devel@mercurial-scm.org https://www.mercurial-scm.org/mailman/listinfo/mercurial-devel
D9858: contrib: update PyOxidizer to 0.10.3
indygreg created this revision. Herald added a reviewer: hg-reviewers. Herald added a subscriber: mercurial-patches. REVISION SUMMARY This is necessary to work around a bug that caused build failures on current stable with 0.9.0. This patch was used to build the 5.7rc0 Windows installers. REPOSITORY rHG Mercurial BRANCH stable REVISION DETAIL https://phab.mercurial-scm.org/D9858 AFFECTED FILES contrib/automation/hgautomation/linux.py contrib/install-windows-dependencies.ps1 CHANGE DETAILS diff --git a/contrib/install-windows-dependencies.ps1 b/contrib/install-windows-dependencies.ps1 --- a/contrib/install-windows-dependencies.ps1 +++ b/contrib/install-windows-dependencies.ps1 @@ -125,7 +125,7 @@ Invoke-Process "${prefix}\cargo\bin\rustup.exe" "component add clippy" # Install PyOxidizer for packaging. -Invoke-Process "${prefix}\cargo\bin\cargo.exe" "install --version 0.9.0 pyoxidizer" +Invoke-Process "${prefix}\cargo\bin\cargo.exe" "install --version 0.10.3 pyoxidizer" } function Install-Dependencies($prefix) { diff --git a/contrib/automation/hgautomation/linux.py b/contrib/automation/hgautomation/linux.py --- a/contrib/automation/hgautomation/linux.py +++ b/contrib/automation/hgautomation/linux.py @@ -75,7 +75,7 @@ sudo -H -u hg -g hg /home/hg/.cargo/bin/rustup install 1.31.1 1.46.0 sudo -H -u hg -g hg /home/hg/.cargo/bin/rustup component add clippy -sudo -H -u hg -g hg /home/hg/.cargo/bin/cargo install --version 0.9.0 pyoxidizer +sudo -H -u hg -g hg /home/hg/.cargo/bin/cargo install --version 0.10.3 pyoxidizer ''' To: indygreg, #hg-reviewers Cc: mercurial-patches, mercurial-devel ___ Mercurial-devel mailing list Mercurial-devel@mercurial-scm.org https://www.mercurial-scm.org/mailman/listinfo/mercurial-devel
D9856: packaging: allow specifying modules to include with py2exe
mharbison72 created this revision. Herald added a reviewer: hg-reviewers. Herald added a subscriber: mercurial-patches. REVISION SUMMARY Maybe this was missing because there wasn't a need for it. REPOSITORY rHG Mercurial BRANCH stable REVISION DETAIL https://phab.mercurial-scm.org/D9856 AFFECTED FILES contrib/packaging/hgpackaging/py2exe.py setup.py CHANGE DETAILS diff --git a/setup.py b/setup.py --- a/setup.py +++ b/setup.py @@ -1694,6 +1694,8 @@ 'mercurial.pure', ] +py2exe_includes = [] + py2exeexcludes = [] py2exedllexcludes = ['crypt32.dll'] @@ -1722,6 +1724,10 @@ if extrapackages: py2exepackages.extend(extrapackages.split(' ')) +extra_includes = os.environ.get('HG_PY2EXE_EXTRA_INCLUDES') +if extra_includes: +py2exe_includes.extend(extra_includes.split(' ')) + excludes = os.environ.get('HG_PY2EXE_EXTRA_EXCLUDES') if excludes: py2exeexcludes.extend(excludes.split(' ')) @@ -1821,6 +1827,7 @@ 'py2exe': { 'bundle_files': 3, 'dll_excludes': py2exedllexcludes, +'includes': py2exe_includes, 'excludes': py2exeexcludes, 'packages': py2exepackages, }, diff --git a/contrib/packaging/hgpackaging/py2exe.py b/contrib/packaging/hgpackaging/py2exe.py --- a/contrib/packaging/hgpackaging/py2exe.py +++ b/contrib/packaging/hgpackaging/py2exe.py @@ -67,6 +67,7 @@ extra_excludes=None, extra_dll_excludes=None, extra_packages_script=None, +extra_includes=None, ): """Build Mercurial with py2exe. @@ -176,6 +177,8 @@ ) if hgext3rd_extras: env['HG_PY2EXE_EXTRA_INSTALL_PACKAGES'] = ' '.join(hgext3rd_extras) +if extra_includes: +env['HG_PY2EXE_EXTRA_INCLUDES'] = ' '.join(sorted(extra_includes)) if extra_excludes: env['HG_PY2EXE_EXTRA_EXCLUDES'] = ' '.join(sorted(extra_excludes)) if extra_dll_excludes: To: mharbison72, #hg-reviewers Cc: mercurial-patches, mercurial-devel ___ Mercurial-devel mailing list Mercurial-devel@mercurial-scm.org https://www.mercurial-scm.org/mailman/listinfo/mercurial-devel
D9857: packaging: include `windows_curses` when building py2exe
mharbison72 created this revision. Herald added a reviewer: hg-reviewers. Herald added a subscriber: mercurial-patches. REVISION SUMMARY The `_curses.pyd` module was previously being included by py2exe's module search, but it left out `_curses_panel.pyd`. REPOSITORY rHG Mercurial BRANCH stable REVISION DETAIL https://phab.mercurial-scm.org/D9857 AFFECTED FILES contrib/packaging/hgpackaging/inno.py contrib/packaging/hgpackaging/wix.py CHANGE DETAILS diff --git a/contrib/packaging/hgpackaging/wix.py b/contrib/packaging/hgpackaging/wix.py --- a/contrib/packaging/hgpackaging/wix.py +++ b/contrib/packaging/hgpackaging/wix.py @@ -39,6 +39,10 @@ 'win32ctypes', } +EXTRA_INCLUDES = { +'_curses', +'_curses_panel', +} EXTRA_INSTALL_RULES = [ ('contrib/packaging/wix/COPYING.rtf', 'COPYING.rtf'), @@ -330,6 +334,7 @@ requirements_txt, extra_packages=EXTRA_PACKAGES, extra_packages_script=extra_packages_script, +extra_includes=EXTRA_INCLUDES, ) build_dir = hg_build_dir / ('wix-%s' % arch) diff --git a/contrib/packaging/hgpackaging/inno.py b/contrib/packaging/hgpackaging/inno.py --- a/contrib/packaging/hgpackaging/inno.py +++ b/contrib/packaging/hgpackaging/inno.py @@ -33,6 +33,11 @@ 'win32ctypes', } +EXTRA_INCLUDES = { +'_curses', +'_curses_panel', +} + EXTRA_INSTALL_RULES = [ ('contrib/win32/mercurial.ini', 'defaultrc/mercurial.rc'), ] @@ -78,6 +83,7 @@ 'inno', requirements_txt, extra_packages=EXTRA_PACKAGES, +extra_includes=EXTRA_INCLUDES, ) # Purge the staging directory for every build so packaging is To: mharbison72, #hg-reviewers Cc: mercurial-patches, mercurial-devel ___ Mercurial-devel mailing list Mercurial-devel@mercurial-scm.org https://www.mercurial-scm.org/mailman/listinfo/mercurial-devel
Re: Getting the revisions of .hgtags programatically
On Sun, Jan 24, 2021 at 10:59:30PM +, Roy Marples wrote: > On 24/01/2021 22:50, Joerg Sonnenberger wrote: > > On Sun, Jan 24, 2021 at 10:16:46PM +, Roy Marples wrote: > > > Hi Joerg > > > > > > On 24/01/2021 22:03, Joerg Sonnenberger wrote: > > > > Hello Roy, > > > > isn't repo.tagslist() (and maybe filtering out local tags) already doing > > > > what you want? > > > > > > It is sort of. I use it to get a list of tag and yes, I filter out non > > > globals already. > > > However, it only returns the revision tagged with the name, not which > > > revision created the tag. > > > > Why do you care? > > Because fast-import requires the author and date to create the equivalent tag. > This could be different from the author and date of the commit tagged and if > any commit message is given for the tag, that would likely be different > also. > > Currently to get by, I create a light-weight tag instead, but this lacks any > author or date information and unlike the fast-import tag command is not > versioned in the repository like our global tags. > > But more importantly, why do I care? Because the information that should be > exportable is then lost and I have zero tolerance for lost data. Well, the point of the question is that it is a not very well defined property. I mean just look at the rules to decide which value is visible for conflicting defitions. tags._updatetags is where the merge rules are defined. The relationship to the commit graph is ...interesting at best. So, no, I don't think "tagger" and "tag time" are properties I would naturally associate with a tag. Joerg ___ Mercurial-devel mailing list Mercurial-devel@mercurial-scm.org https://www.mercurial-scm.org/mailman/listinfo/mercurial-devel
Re: Getting the revisions of .hgtags programatically
On 1/24/21 11:16 PM, Roy Marples via Mercurial-devel wrote: > Hi Joerg > > On 24/01/2021 22:03, Joerg Sonnenberger wrote: >> Hello Roy, >> isn't repo.tagslist() (and maybe filtering out local tags) already doing >> what you want? > > It is sort of. I use it to get a list of tag and yes, I filter out non > globals already. > However, it only returns the revision tagged with the name, not which > revision created the tag. > For the record, we have a similar problem in Heptapod, which exposes to a machinery heavily tailored for Git, namely GitLab. It would make sense to consider the details (author, description) of the tagging changesets to be the equivalent of annotated Git tags. At the time I looked into it, I couldn't find any internal API to retrieve that information in an efficient way. But I didn't spend more than half an hour on this and went on to more pressing matters. Maybe would something like that counter-balance the heaviness of our global tags by giving it more applications? In any case, it's still low on my personal list of problems to tackle. For reference, here's our tracking issue for this: https://foss.heptapod.net/heptapod/hgitaly/-/issues/5 Best, -- Georges Racinet https://octobus.net, https://about.heptapod.host, https://heptapod.net GPG: BF5456F4DC625443849B6E58EE20CA44EF691D39, sur serveurs publics ___ Mercurial-devel mailing list Mercurial-devel@mercurial-scm.org https://www.mercurial-scm.org/mailman/listinfo/mercurial-devel
Re: Getting the revisions of .hgtags programatically
On 24/01/2021 22:50, Joerg Sonnenberger wrote: On Sun, Jan 24, 2021 at 10:16:46PM +, Roy Marples wrote: Hi Joerg On 24/01/2021 22:03, Joerg Sonnenberger wrote: Hello Roy, isn't repo.tagslist() (and maybe filtering out local tags) already doing what you want? It is sort of. I use it to get a list of tag and yes, I filter out non globals already. However, it only returns the revision tagged with the name, not which revision created the tag. Why do you care? Because fast-import requires the author and date to create the equivalent tag. This could be different from the author and date of the commit tagged and if any commit message is given for the tag, that would likely be different also. Currently to get by, I create a light-weight tag instead, but this lacks any author or date information and unlike the fast-import tag command is not versioned in the repository like our global tags. But more importantly, why do I care? Because the information that should be exportable is then lost and I have zero tolerance for lost data. Roy ___ Mercurial-devel mailing list Mercurial-devel@mercurial-scm.org https://www.mercurial-scm.org/mailman/listinfo/mercurial-devel
Re: Getting the revisions of .hgtags programatically
On Sun, Jan 24, 2021 at 10:16:46PM +, Roy Marples wrote: > Hi Joerg > > On 24/01/2021 22:03, Joerg Sonnenberger wrote: > > Hello Roy, > > isn't repo.tagslist() (and maybe filtering out local tags) already doing > > what you want? > > It is sort of. I use it to get a list of tag and yes, I filter out non > globals already. > However, it only returns the revision tagged with the name, not which > revision created the tag. Why do you care? Joerg ___ Mercurial-devel mailing list Mercurial-devel@mercurial-scm.org https://www.mercurial-scm.org/mailman/listinfo/mercurial-devel
Re: Getting the revisions of .hgtags programatically
Hi Joerg On 24/01/2021 22:03, Joerg Sonnenberger wrote: Hello Roy, isn't repo.tagslist() (and maybe filtering out local tags) already doing what you want? It is sort of. I use it to get a list of tag and yes, I filter out non globals already. However, it only returns the revision tagged with the name, not which revision created the tag. Roy ___ Mercurial-devel mailing list Mercurial-devel@mercurial-scm.org https://www.mercurial-scm.org/mailman/listinfo/mercurial-devel
mercurial@46352: 10 new changesets (10 on stable)
10 new changesets (10 on stable) in mercurial: https://www.mercurial-scm.org/repo/hg/rev/47b11629a0f2 changeset: 46343:47b11629a0f2 branch: stable user:Matt Harbison date:Wed Jan 20 00:40:41 2021 -0500 summary: tests: skip a detailed exit status in test-lfs-test-server https://www.mercurial-scm.org/repo/hg/rev/6bb52cc08855 changeset: 46344:6bb52cc08855 branch: stable user:Pierre-Yves David date:Wed Jan 20 12:08:10 2021 +0100 summary: doc: relocate doc for `share.safe-mismatch.source-safe.warn` https://www.mercurial-scm.org/repo/hg/rev/043781c0ffd6 changeset: 46345:043781c0ffd6 branch: stable user:Pierre-Yves David date:Wed Jan 20 12:11:41 2021 +0100 summary: doc: remove the section about share-safe from its verbose gating https://www.mercurial-scm.org/repo/hg/rev/60e6bf3bf681 changeset: 46346:60e6bf3bf681 branch: stable user:Pierre-Yves David date:Wed Jan 20 12:12:31 2021 +0100 summary: doc: improves the share-safe documentation https://www.mercurial-scm.org/repo/hg/rev/5249ac2bc7a4 changeset: 46347:5249ac2bc7a4 branch: stable user:Pierre-Yves David date:Wed Jan 20 12:13:17 2021 +0100 summary: doc: point to the main share-safe doc in the "mismatch" config https://www.mercurial-scm.org/repo/hg/rev/4a58561ace0f changeset: 46348:4a58561ace0f branch: stable user:Pierre-Yves David date:Wed Jan 20 12:23:40 2021 +0100 summary: share-share: have the hint issue more consistently and point to the right doc https://www.mercurial-scm.org/repo/hg/rev/86842c4accc1 changeset: 46349:86842c4accc1 branch: stable user:Matt Harbison date:Thu Jan 21 23:21:45 2021 -0500 summary: doc: drop the `exp-` prefix from the `share-safe` requirement https://www.mercurial-scm.org/repo/hg/rev/e30ef4a36e1d changeset: 46350:e30ef4a36e1d branch: stable user:Matt Harbison date:Thu Jan 21 23:22:12 2021 -0500 summary: doc: fix a formatting error in requirements.txt https://www.mercurial-scm.org/repo/hg/rev/085294a8c0e0 changeset: 46351:085294a8c0e0 branch: stable user:Matt Harbison date:Thu Jan 21 23:24:58 2021 -0500 summary: share-safe: fix an abort message that references the experimental requirement https://www.mercurial-scm.org/repo/hg/rev/e78dea142968 changeset: 46352:e78dea142968 branch: stable tag: tip user:Raphaël Gomès date:Fri Jan 08 16:58:23 2021 +0100 summary: contrib: stop building rust for every job -- Repository URL: https://www.mercurial-scm.org/repo/hg ___ Mercurial-devel mailing list Mercurial-devel@mercurial-scm.org https://www.mercurial-scm.org/mailman/listinfo/mercurial-devel
Re: Getting the revisions of .hgtags programatically
Hello Roy, isn't repo.tagslist() (and maybe filtering out local tags) already doing what you want? Joerg On Sat, Jan 23, 2021 at 01:56:52AM +, Roy Marples via Mercurial-devel wrote: > Hi List > > I'm working on added tag support to the fastexport extension. > I have little idea about the internals of mercurial so asking here for > guidance. > > My idea is to walk the revisions of .hgtags backwards until I find a > changeset which added the tag name. > Once found I can export the user, date and message into the fastexport. > > What is the best way of achieving this please? > I am currently looking at the annotate code as that gets what I want, but > it's slow going working it all out and would appreciate somem guidance if > possible. > > Please include me directly in replies as I'm not subbed to this list. > Thanks > > Roy > ___ > Mercurial-devel mailing list > Mercurial-devel@mercurial-scm.org > https://www.mercurial-scm.org/mailman/listinfo/mercurial-devel ___ Mercurial-devel mailing list Mercurial-devel@mercurial-scm.org https://www.mercurial-scm.org/mailman/listinfo/mercurial-devel
Re: Getting the revisions of .hgtags programatically
On 24/01/2021 20:08, Pierre-Yves David wrote: Just a small note: Finding the revision introducing a tag is not that simple… because: 1) they might be multiple of them 2) merge "introduce" tags without being their first appearance. So you best bet is probably to walk history of the .hgtags revlogs (which might be what your are suggesting) and compare which tags are being newly introduced (actually, (name, node) pair). That is probably the "best" you can hope for that. Yes, that is what I was suggesting. Is there some sample code to access .hgtags revlog directly, or is looking at the way annotate walks the tree with a matcher the best bet? If you are a repository using some filtering (eg: evolution) it can become trickier since the `linkrev` pointer can point to filtered content, making it useless. In that case you need to walk the normal changelog revision (I would recommende walking up) and apply the same logic when the .hgtags files changed. Wouldn't the filtering only be applied if you were on an active topic? Thanks Roy ___ Mercurial-devel mailing list Mercurial-devel@mercurial-scm.org https://www.mercurial-scm.org/mailman/listinfo/mercurial-devel
mercurial@46342: new changeset (1 on stable)
New changeset (1 on stable) in mercurial: https://www.mercurial-scm.org/repo/hg/rev/c4787ea85cc7 changeset: 46342:c4787ea85cc7 branch: stable tag: tip parent: 46340:7e44d5ca2a2f user:Joerg Sonnenberger date:Wed Jan 20 14:57:56 2021 +0100 summary: tests: deal with more timing differences in output -- Repository URL: https://www.mercurial-scm.org/repo/hg ___ Mercurial-devel mailing list Mercurial-devel@mercurial-scm.org https://www.mercurial-scm.org/mailman/listinfo/mercurial-devel
Re: Getting the revisions of .hgtags programatically
Just a small note: Finding the revision introducing a tag is not that simple… because: 1) they might be multiple of them 2) merge "introduce" tags without being their first appearance. So you best bet is probably to walk history of the .hgtags revlogs (which might be what your are suggesting) and compare which tags are being newly introduced (actually, (name, node) pair). That is probably the "best" you can hope for that. If you are a repository using some filtering (eg: evolution) it can become trickier since the `linkrev` pointer can point to filtered content, making it useless. In that case you need to walk the normal changelog revision (I would recommende walking up) and apply the same logic when the .hgtags files changed. I hope this help. On 1/23/21 2:56 AM, Roy Marples via Mercurial-devel wrote: Hi List I'm working on added tag support to the fastexport extension. I have little idea about the internals of mercurial so asking here for guidance. My idea is to walk the revisions of .hgtags backwards until I find a changeset which added the tag name. Once found I can export the user, date and message into the fastexport. What is the best way of achieving this please? I am currently looking at the annotate code as that gets what I want, but it's slow going working it all out and would appreciate somem guidance if possible. Please include me directly in replies as I'm not subbed to this list. Thanks Roy ___ Mercurial-devel mailing list Mercurial-devel@mercurial-scm.org https://www.mercurial-scm.org/mailman/listinfo/mercurial-devel -- Pierre-Yves David ___ Mercurial-devel mailing list Mercurial-devel@mercurial-scm.org https://www.mercurial-scm.org/mailman/listinfo/mercurial-devel