• R/O
  • HTTP
  • SSH
  • HTTPS

Commit

Tags
No Tags

Frequently used words (click to add to your profile)

javac++androidlinuxc#windowsobjective-ccocoa誰得qtpythonphprubygameguibathyscaphec計画中(planning stage)翻訳omegatframeworktwitterdomtestvb.netdirectxゲームエンジンbtronarduinopreviewer

Commit MetaInfo

Revisiónd4c8572b7187cc21ca39d185fd19813e69fbd515 (tree)
Tiempo2016-03-18 12:27:39
AutorSimon Glass <sjg@chro...>
CommiterSimon Glass

Log Message

buildman: Allow branch names which conflict with directories

At present if you try to use buildman with the branch 'test' it will
complain that it is unsure whether you mean the branch or the directory.
This is a feature of the 'git log' command that buildman uses. Fix it
by resolving the ambiguity.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Joe Hershberger <joe.hershberger@ni.com>

Cambiar Resumen

Diferencia incremental

--- a/tools/buildman/func_test.py
+++ b/tools/buildman/func_test.py
@@ -255,6 +255,8 @@ class TestFunctional(unittest.TestCase):
255255 self.assertEqual(gitutil.use_no_decorate, True)
256256
257257 def _HandleCommandGitLog(self, args):
258+ if args[-1] == '--':
259+ args = args[:-1]
258260 if '-n0' in args:
259261 return command.CommandResult(return_code=0)
260262 elif args[-1] == 'upstream/master..%s' % self._test_branch:
--- a/tools/patman/gitutil.py
+++ b/tools/patman/gitutil.py
@@ -44,6 +44,11 @@ def LogCmd(commit_range, git_dir=None, oneline=False, reverse=False,
4444 cmd.append('-n%d' % count)
4545 if commit_range:
4646 cmd.append(commit_range)
47+
48+ # Add this in case we have a branch with the same name as a directory.
49+ # This avoids messages like this, for example:
50+ # fatal: ambiguous argument 'test': both revision and filename
51+ cmd.append('--')
4752 return cmd
4853
4954 def CountCommitsToBranch():