[Bug 5033] New: `makepatchname()=?UTF-8?Q?=60=20function=20generate=20=C2=ABreserved=C2=BB=20patch=20name?=, that cann't be used as patch name

mercurial-bugs at selenic.com mercurial-bugs at selenic.com
Thu Jan 7 14:26:40 UTC 2016


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

            Bug ID: 5033
           Summary: `makepatchname()` function generate «reserved» patch
                    name, that cann't be used as patch name
           Product: Mercurial
           Version: default branch
          Hardware: PC
                OS: Windows
            Status: UNCONFIRMED
          Keywords: easy, regression
          Severity: feature
          Priority: wish
         Component: mq
          Assignee: bugzilla at selenic.com
          Reporter: alexander_sergey at mail.ru
                CC: mercurial-devel at selenic.com

After commit **143b52fce68e5080db4ccb022bc859ae3e65de4e** will introduce
function `makepatchname()` which generate patch name from first line of
description. But this function may generate «reserved» name (like «status»)
when first line of description contains only this reserved name. In result
command fails with message «abort: "<patch-name>" cannot be used as the name of
a patch».

List of reserved words is on line 1110 in `mq.py` file::

    _reserved = ('series', 'status', 'guards', '.', '..')

Test case::

  $ hg init
  $ echo > test
  $ hg add
  adding test
  $ hg commit --message='Status.'
  $ hg qimport --rev 0
  abort: "status" cannot be used as the name of a patch
  # Should be create patch 0.diff instead

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


More information about the Mercurial-devel mailing list