Closed Bug 1591092 Opened 6 years ago Closed 6 years ago

File mode is wrong in Windows with --no-arc

Categories

(Conduit :: moz-phab, defect, P1)

defect

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: zalun, Unassigned)

Details

(Keywords: conduit-triaged)

Attachments

(1 file)

Patch submitted with --no-arc are reported as 3-digit number, and with arc as 6-digit.

Without arc:

$ moz-phab patch D1503 --raw
diff --git a/notepad.txt b/notepad.txt
new file mode 644

With arc

$ moz-phab patch D1504 --raw
diff --git a/notepad.txt b/notepad.txt
new file mode 100644

This is generating an error when patching:

☿ moz-phab patch D1503
Patching revision: D1503
Checked out 101726fb9ac6
Bookmark set to D1503_1
** unknown exception encountered, please report by visiting
** https://mercurial-scm.org/wiki/BugTracker
** Python 2.7.16 (default, Sep  2 2019, 11:59:44) [GCC 4.2.1 Compatible Apple LLVM 10.0.1 (clang-1001.0.46.4)]
** Mercurial Distributed SCM (version 5.1.1)
** Extensions loaded: evolve, rebase
Traceback (most recent call last):
  File "/usr/local/bin/hg", line 43, in <module>
    dispatch.run()
  File "/usr/local/lib/python2.7/site-packages/mercurial/dispatch.py", line 99, in run
    status = dispatch(req)
  File "/usr/local/lib/python2.7/site-packages/mercurial/dispatch.py", line 225, in dispatch
    ret = _runcatch(req) or 0
  File "/usr/local/lib/python2.7/site-packages/mercurial/dispatch.py", line 376, in _runcatch
    return _callcatch(ui, _runcatchfunc)
  File "/usr/local/lib/python2.7/site-packages/mercurial/dispatch.py", line 384, in _callcatch
    return scmutil.callcatch(ui, func)
  File "/usr/local/lib/python2.7/site-packages/mercurial/scmutil.py", line 167, in callcatch
    return func()
  File "/usr/local/lib/python2.7/site-packages/mercurial/dispatch.py", line 367, in _runcatchfunc
    return _dispatch(req)
  File "/usr/local/lib/python2.7/site-packages/mercurial/dispatch.py", line 1021, in _dispatch
    cmdpats, cmdoptions)
  File "/usr/local/lib/python2.7/site-packages/mercurial/dispatch.py", line 756, in runcommand
    ret = _runcommand(ui, options, cmd, d)
  File "/usr/local/lib/python2.7/site-packages/mercurial/dispatch.py", line 1030, in _runcommand
    return cmdfunc()
  File "/usr/local/lib/python2.7/site-packages/mercurial/dispatch.py", line 1018, in <lambda>
    d = lambda: util.checksignature(func)(ui, *args, **strcmdopt)
  File "/usr/local/lib/python2.7/site-packages/mercurial/util.py", line 1682, in check
    return func(*args, **kwargs)
  File "/usr/local/lib/python2.7/site-packages/mercurial/commands.py", line 3512, in import_
    msgs, hg.clean)
  File "/usr/local/lib/python2.7/site-packages/hgext3rd/evolve/__init__.py", line 844, in tryimportone
    ret = orig(ui, repo, hunk, parents, opts, *args, **kwargs)
  File "/usr/local/lib/python2.7/site-packages/mercurial/cmdutil.py", line 1458, in tryimportone
    files=files, eolmode=None, similarity=sim / 100.0)
  File "/usr/local/lib/python2.7/site-packages/mercurial/patch.py", line 2227, in patch
    similarity)
  File "/usr/local/lib/python2.7/site-packages/mercurial/patch.py", line 2200, in internalpatch
    return patchbackend(ui, backend, patchobj, strip, prefix, files, eolmode)
  File "/usr/local/lib/python2.7/site-packages/mercurial/patch.py", line 2185, in patchbackend
    eolmode=eolmode)
  File "/usr/local/lib/python2.7/site-packages/mercurial/patch.py", line 2030, in applydiff
    prefix=prefix, eolmode=eolmode)
  File "/usr/local/lib/python2.7/site-packages/mercurial/patch.py", line 2049, in _applydiff
    for state, values in iterhunks(fp):
  File "/usr/local/lib/python2.7/site-packages/mercurial/patch.py", line 1914, in iterhunks
    gitpatches = scangitpatch(lr, x)
  File "/usr/local/lib/python2.7/site-packages/mercurial/patch.py", line 1864, in scangitpatch
    gitpatches = readgitpatch(gitlr)
  File "/usr/local/lib/python2.7/site-packages/mercurial/patch.py", line 401, in readgitpatch
    gp.setmode(int(line[-6:], 8))
ValueError: invalid literal for int() with base 8: 'de 644'
CommandError: command 'hg' failed to complete successfully
Status: NEW → RESOLVED
Closed: 6 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: