Merge branch 'mt/p4-depotFile-at-version'
authorJunio C Hamano <gitster@pobox.com>
Thu, 11 Jun 2015 16:29:55 +0000 (09:29 -0700)
committerJunio C Hamano <gitster@pobox.com>
Thu, 11 Jun 2015 16:29:55 +0000 (09:29 -0700)
* mt/p4-depotFile-at-version:
p4: retrieve the right revision of the file in UTF-16 codepath

1  2 
git-p4.py
diff --combined git-p4.py
index ca6bb95c573608f8477ed7f3388c5df1e63f8041,d0df1d92e0eaee1d3ba54e09860f00b42ee03d6b..26ad4bcf77e36624e4261ae2dfd93ba637914b9d
+++ b/git-p4.py
@@@ -1248,7 -1248,7 +1248,7 @@@ class P4Submit(Command, P4UserMap)
              editor = os.environ.get("P4EDITOR")
          else:
              editor = read_pipe("git var GIT_EDITOR").strip()
 -        system([editor, template_file])
 +        system(["sh", "-c", ('%s "$@"' % editor), editor, template_file])
  
          # If the file was not saved, prompt to see if this patch should
          # be skipped.  But skip this verification step if configured so.
@@@ -2145,7 -2145,7 +2145,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 ]