Skip to content

Commit

Permalink
git-p4: handle files with shell metacharacters
Browse files Browse the repository at this point in the history
git-p4 used to simply pass strings into system() and popen(), and
relied on the shell doing the necessary expansion. This though meant
that shell metacharacters in file names would be corrupted - for
example files with $ or space in them.

Switch to using subprocess.Popen() and friends, and pass in explicit
arrays in the places where it matters. This then avoids needing shell
expansion.

Add trivial helper functions for some common perforce operations. Add
test case.

[pw: test cleanup]

Signed-off-by: Luke Diamand <luke@diamand.org>
Signed-off-by: Pete Wyckoff <pw@padd.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
  • Loading branch information
Luke Diamand authored and Junio C Hamano committed Oct 18, 2011
1 parent cb585a9 commit 6de040d
Show file tree
Hide file tree
Showing 2 changed files with 187 additions and 77 deletions.
Loading

0 comments on commit 6de040d

Please sign in to comment.