1
0
Fork 0
mirror of https://github.com/git/git.git synced 2024-05-18 03:06:17 +02:00

p4: retrieve the right revision of the file in UTF-16 codepath

Fixing bug with UTF-16 files when they are retrieved by git-p4.  It
was always getting the tip version of the file and the history of
the file was lost.

Signed-off-by: Miguel Torroja <miguel.torroja@gmail.com>
Acked-by: Luke Diamand <luke@diamand.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
This commit is contained in:
Miguel Torroja 2015-05-28 01:14:39 +02:00 committed by Junio C Hamano
parent 77bd3ea9f5
commit f5f53f1410

View File

@ -2145,7 +2145,7 @@ def streamOneP4File(self, file, contents):
# 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 ]