[Bug 5117] New: mq generated patch filenames are too long

mercurial-bugs at selenic.com mercurial-bugs at selenic.com
Fri Feb 26 13:46:36 UTC 2016


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

            Bug ID: 5117
           Summary: mq generated patch filenames are too long
           Product: Mercurial
           Version: 3.7.1
          Hardware: PC
                OS: Windows
            Status: UNCONFIRMED
          Severity: feature
          Priority: wish
         Component: mq
          Assignee: bugzilla at selenic.com
          Reporter: gauravphadke at yahoo.co.in
                CC: mercurial-devel at selenic.com

This defect was caused since patch
https://www.mercurial-scm.org/pipermail/mercurial-devel/2015-October/074644.html
was added.

As part of patch
https://www.mercurial-scm.org/pipermail/mercurial-devel/2015-October/074644.html
mq was changed so that the patch file name was generated using the first line
of the commit message.

Although if the first line of the commit message is too long then mq fails to
create a patch file. This is because the max filename allowed is 260 character
on Windows, and 255 characters on Linux. This could be fixed by adding
truncation logic.

To recreate this issue please use a command prompt and use the commands as
below:
mkdir TestRepo
cd TestRepo
hg init
ECHO This is a test File > TestFile.txt
hg add TestFile.txt
hg commit -m "Adding Test File, and now adding random text
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"
* hg qimport --rev 0::

This fails with an error message as below:
abort:
C:\TestRepo\.hg\patches\adding_test_file_and_now_adding_random_text_aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa:
The system cannot find the path specified

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


More information about the Mercurial-devel mailing list