Bug 1261397 - Failing 'rhpkg switch-branch' gives too little information
Summary: Failing 'rhpkg switch-branch' gives too little information
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Fedora
Classification: Fedora
Component: rpkg
Version: rawhide
Hardware: Unspecified
OS: Unspecified
unspecified
medium
Target Milestone: ---
Assignee: Ales Raszka
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2015-09-09 08:56 UTC by Tomáš Hozza
Modified: 2016-02-22 13:19 UTC (History)
5 users (show)

Fixed In Version:
Clone Of:
Environment:
Last Closed: 2016-02-22 13:19:30 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)

Description Tomáš Hozza 2015-09-09 08:56:51 UTC
Description of problem:
When I executed 'rhpkg switch-branch' inside a dist-git repository, the command fails with message that is too vague:

$ rhpkg switch-branch rhel-6.8 
Could not execute switch_branch: Could not check out rhel-6.8

One is not able to figure out what is the problem. I had to use directly 'git checkout' to get some meaningful error message. 

Version-Release number of selected component (if applicable):
rhpkg-1.26-1.fc22.noarch

How reproducible:
always if you have the the proper situation in your repository

Steps to Reproduce:
1. branch $(A) contains tracked file $(file)
2. branch $(B) does NOT contain file $(file)
3. switch to branch $(B)
4. touch $(file)
5. switch back to branch $(a) using 'rhpkg switch-branch'

Actual results:
$ rhpkg switch-branch rhel-6.8 
Could not execute switch_branch: Could not check out rhel-6.8

Expected results:
some meaningful error message helping me to resolve the issue.

Additional info:
Git gives such a meaningful error message.

$ git checkout rhel-6.8
error: The following untracked working tree files would be overwritten by checkout:
	bind98-CVE-2015-5722.patch
Please move or remove them before you can switch branches.
Aborting

Comment 1 Ales Raszka 2015-10-05 09:22:19 UTC
Pull-request: https://pagure.io/rpkg/pull-request/21


Note You need to log in before you can comment on or make changes to this bug.