Skip to content

stg branch --rename forgets to update refs for hidden patches #68

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
richardb64 opened this issue Aug 19, 2020 · 2 comments
Closed

stg branch --rename forgets to update refs for hidden patches #68

richardb64 opened this issue Aug 19, 2020 · 2 comments

Comments

@richardb64
Copy link

When renaming a branch using stg branch --rename, the refs under refs/patches relating to hidden patches are missed. Any further attempt to use stgit on the affected branch gives a KeyError stacktrace.

In the particular example where I hit this problem, the refs in question (for the patchname itself, and patchname.log) were in .git/packed-refs rather than .git/refs/patches, but that shouldn't be relevant (provided stgit always uses git update-ref rather than directly editing files).

Version details:

Stacked GIT 0.19-1-g2f5bb-dirty
git version 2.26.0
Python version 2.7.5 (default, Sep 26 2019, 13:23:47)

NonLogicalDev added a commit to NonLogicalDev/fork.stgit that referenced this issue Nov 14, 2020
NonLogicalDev added a commit to NonLogicalDev/fork.stgit that referenced this issue Nov 14, 2020
NonLogicalDev added a commit to NonLogicalDev/fork.stgit that referenced this issue Nov 14, 2020
@NonLogicalDev
Copy link
Contributor

@richardb64 I tried reproducing this error in tests by:

  • Creating patches h0 (hidden) > p0 (popped) > p1 (applied)
  • Renaming initial branch frantically =] (for other test cases)
  • Renaming branch back to original name
  • Renaming branch again and testing stg id works for all of the ids of the initially created patches.

That however did not produce any KeyErrors, could you double check if this is still an issue for you @richardb64?

Also @jpgrayson, when you get a chance take a look at the slight cleanup of the stg branch --rename tests I did along with covering this scenario.

@jpgrayson
Copy link
Collaborator

Closing since this was last observed on an old version of StGit (v0.19) and @NonLogicalDev was not able to reproduce with a more recent version. Please reopen if this remains an issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants