[Bug 6439] New: annotate method yields bad results when some non-default arguments are used

mercurial-bugs at mercurial-scm.org mercurial-bugs at mercurial-scm.org
Tue Nov 24 11:54:51 UTC 2020


https://bz.mercurial-scm.org/show_bug.cgi?id=6439

            Bug ID: 6439
           Summary: annotate method yields bad results when some
                    non-default arguments are used
           Product: Mercurial
           Version: unspecified
          Hardware: All
                OS: All
            Status: UNCONFIRMED
          Severity: bug
          Priority: wish
         Component: hglib
          Assignee: bugzilla at mercurial-scm.org
          Reporter: mcastelluccio at mozilla.com
                CC: mercurial-devel at mercurial-scm.org
    Python Version: ---

STR:
1) Clone https://hg.mozilla.org/mozilla-central
2) Run:
```
import hglib

with hglib.open(".") as hg:
    # Good results:
    print(list(hg.annotate("moz.build"))
    # Bad results:
    print(list(hg.annotate("moz.build", line=True))
```

The `hg.annotate` method relies on splitting by ': ', but this works correctly
in the default case, but doesn't work correctly in many other cases.

E.g. for line=True, you'd have inconsistent results like:
> (b'336794', b' 1: # -*- Mode: python; indent-tabs-mode: nil; tab-width: 40 -*-')
> (b'622307:194', b'SPHINX_TREES["writing-rust-code"] = "docs/writing-rust-code"')

-- 
You are receiving this mail because:
You are on the CC list for the bug.


More information about the Mercurial-devel mailing list