[ Index ] |
PHP Cross Reference of Phabricator |
[Summary view] [Print] [Text view]
1 <?php 2 3 /** 4 * Execute and parse a low-level Mercurial paths query using `hg locate`. 5 */ 6 final class DiffusionLowLevelMercurialPathsQuery 7 extends DiffusionLowLevelQuery { 8 9 private $commit; 10 private $path; 11 12 public function withCommit($commit) { 13 $this->commit = $commit; 14 return $this; 15 } 16 17 public function withPath($path) { 18 $this->path = $path; 19 return $this; 20 } 21 22 protected function executeQuery() { 23 $repository = $this->getRepository(); 24 $path = $this->path; 25 $commit = $this->commit; 26 27 $match_against = trim($path, '/'); 28 $prefix = trim('./'.$match_against, '/'); 29 list($entire_manifest) = $repository->execxLocalCommand( 30 'locate --print0 --rev %s -I %s', 31 hgsprintf('%s', $commit), 32 $prefix); 33 return explode("\0", $entire_manifest); 34 } 35 36 }
title
Description
Body
title
Description
Body
title
Description
Body
title
Body
Generated: Sun Nov 30 09:20:46 2014 | Cross-referenced by PHPXref 0.7.1 |