git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: [PATCH] p4: Retrieve the right revision of the UTF-16 file

From
Luke Diamand <luke@diamand.org>
Date
May 27, 2015, 22:04 UTC
Message-ID
<55663F72.6010800@diamand.org>
In-Reply-To
<1432765918-7352-1-git-send-email-miguel.torroja@gmail.com>
On 27/05/15 23:31, Miguel Torroja wrote:
> Fixing bug with UTF-16 files when they are retreived by git-p4.
> It was always getting the tip version of the file and the history of the
> file was lost.
This looks sensible to me, and seems to work in some simple testing, thanks!
Ack.
Luke
Show 18 quoted lines
> ---
>   git-p4.py |    2 +-
>   1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/git-p4.py b/git-p4.py
> index cdfa2df..be2c7da 100755
> --- a/git-p4.py
> +++ b/git-p4.py
> @@ -2098,7 +2098,7 @@ class P4Sync(Command, P4UserMap):
>               # them back too.  This is not needed to the cygwin windows version,
>               # just the native "NT" type.
>               #
> -            text = p4_read_pipe(['print', '-q', '-o', '-', file['depotFile']])
> +            text = p4_read_pipe(['print', '-q', '-o', '-', "%s@%s" % (file['depotFile'], file['change']) ])
>               if p4_version_string().find("/NT") >= 0:
>                   text = text.replace("\r\n", "\n")
>               contents = [ text ]
>
Previous: Miguel TorrojaNext: Junio C Hamano
Message 2 of 4 in “p4: Retrieve the right revision of the UTF-16 file”
  1. p4: Retrieve the right revision of the UTF-16 fileMiguel Torroja, May 27, 2015
  2. Luke DiamandMay 27, 2015
  3. Junio C HamanoMay 27, 2015
  4. p4: Retrieve the right revision of the UTF-16 fileMiguel Torroja, May 27, 2015

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.