Skip Menu |

This queue is for tickets about the Dist-Zilla-Plugin-Mercurial CPAN distribution.

Report information
The Basics
Id: 107945
Status: stalled
Priority: 0/
Queue: Dist-Zilla-Plugin-Mercurial

People
Owner: Nobody in particular
Requestors: VDB [...] cpan.org
Cc:
AdminCc:

Bug Information
Severity: (no value)
Broken in: (no value)
Fixed in: (no value)



Subject: Mercurial::Tag implementation is probably incorrect
Hi, Current Mercurial::Tag plugin implementation parses .hgtags file. I think it is not correct implementation for two reasons: 1. It does not respect local tags (which are stored in .hg/localtags file). 2. It does not see "back-to-the-future tags". "back-to-the-future tags" is not an official Mercurial term. Let me show it in example. Let us assume we have a project with a dozen of releases, and so, tags: 0.001, 0.002, ... 0.012. Let us also assume the working dir is clean (i. e. there are no modified files, all the files are committed) to avoid conflicts. Now run "hg update -r 0.007" and look at .hgtags file. It contains tags from 0.001 up to 0.006, *not* including tag 0.007 and later tags, because .hgtag file is versioned, while we checked out an old version. In such a case, Mercurial::Tag plugin will allows tags/versions 0.007, 0.008, etc because they are not listed in .hgtags. However, "hg tags" command lists all the tags from 0.001 to 0.012. BTW, it also lists all local tags. Thus, I think it would be better to run "hg tags" and grep its output rather than scan file ".hgtags" directly.
On Fri Oct 23 16:06:29 2015, VDB wrote: Show quoted text
> Hi, > > Current Mercurial::Tag plugin implementation parses .hgtags file. I > think it is not correct implementation for two reasons: > > 1. It does not respect local tags (which are stored in .hg/localtags > file). > 2. It does not see "back-to-the-future tags". > > "back-to-the-future tags" is not an official Mercurial term. Let me > show it in example. Let us assume we have a project with a dozen of > releases, and so, tags: 0.001, 0.002, ... 0.012. Let us also assume > the working dir is clean (i. e. there are no modified files, all the > files are committed) to avoid conflicts. Now run "hg update -r 0.007" > and look at .hgtags file. It contains tags from 0.001 up to 0.006, > *not* including tag 0.007 and later tags, because .hgtag file is > versioned, while we checked out an old version. > > In such a case, Mercurial::Tag plugin will allows tags/versions 0.007, > 0.008, etc because they are not listed in .hgtags. > > However, "hg tags" command lists all the tags from 0.001 to 0.012. > BTW, it also lists all local tags. > > Thus, I think it would be better to run "hg tags" and grep its output > rather than scan file ".hgtags" directly.
Thanks for the report and sorry for my late reply. I am not really using this module and trying to phase out my use of hg anyway. Are you still interested in getting this fixed? If so - pull reqs will be welcome, and I can also try to give you COMAINT of full maintainer.