git-upstream does not support using tags or sha1s for upstream revision to import from

Bug #1547180 reported by Darragh Bailey
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
git-upstream
Status tracked in Trunk
0.12
Fix Released
Undecided
Unassigned
Trunk
Fix Released
High
Darragh Bailey

Bug Description

Trying to import using a tag as the revision/branch I get the following:

$ git upstream import 1.4.0
ERROR : Specified ref does not exist: '1.4.0'
CRITICAL: Invalid ref

Similarly using the SHA1 rev instead:

$ git upstream import 6d8399765e806018d006a6d3e5777a9dd139489b
ERROR : Specified ref does not exist: '6d8399765e806018d006a6d3e5777a9dd139489b'
CRITICAL: Invalid ref

It appears git-upstream applies to strict a test by explicitly checking to see if the given rev is a branch instead of just a valid revision.

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Related fix proposed to git-upstream (master)

Related fix proposed to branch: master
Review: https://review.openstack.org/377913

Changed in git-upstream:
status: New → In Progress
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to git-upstream (master)

Fix proposed to branch: master
Review: https://review.openstack.org/377915

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Related fix merged to git-upstream (master)

Reviewed: https://review.openstack.org/377913
Committed: https://git.openstack.org/cgit/openstack/git-upstream/commit/?id=79b31d95d18f9be5806c94f87823588014a7cdf3
Submitter: Jenkins
Branch: master

commit 79b31d95d18f9be5806c94f87823588014a7cdf3
Author: Darragh Bailey <email address hidden>
Date: Tue Sep 27 16:35:24 2016 +0100

    Refactor test to allow additional

    Adjust unit test checking to make way for additional tests to be added
    to the same class while ensuring can verify the resulting tree while
    different commit messages may be recorded.

    Ensure separate parser is created for each test to prevent ensure the
    'search_refs' option is isolated per test scenario as otherwise each
    scenario will append entries as it is set on the class.

    These lay the ground work to adding tests to check that git-upstream
    can work with SHA1 and tags as inputs in addition to branches.

    Change-Id: I46a27281f3f0c01848a388ad05302599f4eff1c9
    Related-Bug: #1547180

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to git-upstream (master)

Reviewed: https://review.openstack.org/377914
Committed: https://git.openstack.org/cgit/openstack/git-upstream/commit/?id=5f4038e2682fa9f728f2e4d671cab20a02b08d52
Submitter: Jenkins
Branch: master

commit 5f4038e2682fa9f728f2e4d671cab20a02b08d52
Author: Darragh Bailey <email address hidden>
Date: Tue Sep 27 16:47:28 2016 +0100

    Allow SHA1 as reference for inputs

    Support specifying upstream and additional branches to import via
    SHA1s.

    Check for pattern character '*' in provided patterns to determine which
    to treat as patterns and which as explicit revisions.

    Include additional test function to check converting all refs to SHA1s
    as input, and an additional scenario to check passing in a relative ref
    using '~' to pick a different commit to the head of the branch.

    Change-Id: Ie6ad695a34307d96b95f81b017ba9f190bc258dc
    Partial-Bug: #1547180

Changed in git-upstream:
status: In Progress → Fix Released
Revision history for this message
OpenStack Infra (hudson-openstack) wrote :

Reviewed: https://review.openstack.org/377915
Committed: https://git.openstack.org/cgit/openstack/git-upstream/commit/?id=be781cc50b92b8ca0b748be09e96c6bc0f1a9493
Submitter: Jenkins
Branch: master

commit be781cc50b92b8ca0b748be09e96c6bc0f1a9493
Author: Darragh Bailey <email address hidden>
Date: Tue Sep 27 17:52:41 2016 +0100

    Support tags for input args

    Enable users to specify tags to be used to import and reference commits.

    Change-Id: If2a9a2fa52d6c34ab110ae7a7fdbd02fae82e3b9
    Closes-Bug: #1547180

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.