Issue #2280 resolved

Cannot copy patch into the clipboard

Anonymous created an issue

The command 'Export'->'Copy patch' from the context menu on a patch stopped to work. Nothing gets copied into the clipboard and in the status line it says "object of type 'Writable' has no len()"

Comments (2)

  1. Yuya Nishihara

    copypatch: have dummy Writable object acts like a string (fixes #2280)

    Since Mercurial 2.4, output (=template) parameter must be string 1. We can simply pass output='' for 2.4, but Mercurial 2.3 still requires dummy file-like object. As a workaround, this implements len(writable), so that it can bypass len(template) > 0 of cmdutil.export().

    I'll write another patch for default branch, which should take away dummy Writable hack.

    → <<cset 28b1faba5516>>

  2. Log in to comment