History | Log In     View a printable version of the current page.  
Issue Details (XML | Word | Printable)

Key: QB-2395
Type: Bug Bug
Status: Resolved Resolved
Resolution: Fixed
Priority: Major Major
Assignee: Unassigned
Reporter: Alexey Shumkin
Votes: 0
Watchers: 0
Operations

If you were logged in you would be able to see more operations.
QuickBuild

Git proof build fails if run for a "detached HEAD".

Created: 31/Mar/15 02:40 PM   Updated: 18/May/15 08:48 PM
Component/s: None
Affects Version/s: 5.1.43
Fix Version/s: 6.0.11

Original Estimate: Unknown Remaining Estimate: Unknown Time Spent: Unknown
Environment:
System Date and Time 2015-03-31 17:15:53
Operating System Linux 3.13.0-32-generic, amd64
JVM OpenJDK 64-Bit Server VM 1.7.0_65, Oracle Corporation
QuickBuild Version 5.1.43 - Sat Jan 17 05:04:39 MSK 2015


 Description  « Hide
Setup user agent and config to run proof builds.
If working copy is a "detached HEAD" then proof build fails with the following error
17:03:51,926 ERROR - fatal: ambiguous argument 'origin/master..(detached from 0a75bb3)': unknown revision or path not in the working tree.
17:03:51,926 ERROR - Use '--' to separate paths from revisions, like this:
17:03:51,926 ERROR - 'git <command> [<revision>...] -- [<file>...]'
17:03:51,764 INFO - Executing post-execute action...
17:03:51,764 ERROR - Step 'master>checkout repo>checkout Git' is failed: Failed to run command: git log --name-status --pretty=raw --reverse "origin/master..(detached from 0a75bb3)"
Command return code: 128
Command error output: fatal: ambiguous argument 'origin/master..(detached from 0a75bb3)': unknown revision or path not in the working tree.
Use '--' to separate paths from revisions, like this:
'git <command> [<revision>...] -- [<file>...]'

Obviously, the reason for this QB executes `git branch` command to get current SHA-1 to get changes between origin/master and current commit.
Here is an appropriate log cut:
17:03:49,954 INFO - Getting local change...
17:03:49,980 INFO - Checking working branch...
17:03:50,188 DEBUG - Executing command: git branch
17:03:50,188 DEBUG - Command working directory: d:\AShu\projects\1C-Mirror
17:03:50,246 INFO - * (detached from 0a75bb3)
17:03:50,246 INFO - dUnit
17:03:50,246 INFO - db-export-powershell
17:03:50,246 INFO - err-580-service
17:03:50,246 INFO - fpc
17:03:50,246 INFO - master

But current commit is not always a named branch, e.g. we want to test several previous commit(s) in our test branch.

I expect QB wouldn't fail to get changes between a current commit and an upstream branch.
I guess, `git rev-parse HEAD` is a more suitable command to get a current commit ID.

 All   Comments   Work Log   Change History      Sort Order:
Change by PMEase JIRA Administrator [03/Apr/15 07:26 AM]
Field Original Value New Value
Status Open [ 1 ] Resolved [ 5 ]
Assignee Robin Shen [ robinshine ]
Resolution Fixed [ 1 ]

Change by PMEase JIRA Administrator [03/Apr/15 07:26 AM]
Fix Version/s 6.0.11 [ 11565 ]