It's not the same without you

Join the community to find out what other Atlassian users are discussing, debating and creating.

Atlassian Community Hero Image Collage

Why doesn't SHELVE work anymore?

In SourceTree I cannot shelve anything anymore, after I deleted something shelved (called announceVars) I cannot now shelve anything else -- whatever it is named, I get the following error message:

hg shelve -y --git --force av 
abort: No such file or directory: /Users/spowell/dev/rmq/rabbitmq-umbrella/rabbitmq-server/.hg/attic/announceVars
Completed with errors, see above

and no clue as to what is wrong. Notice it refers to the shelf with the original name (which I deleted from the shelved list). Why is this?

There is no help for shelve I can find. Why not?

1 answer

1 accepted

0 votes
Answer accepted

Hmm, I haven't seen that particular problem before - I have seen hgattic get confused once before, but dealt with that particular case a while back, this is not quite the same. There's no specific help for shelve/unshelve because it should be very straight forward.

How did you delete 'annouceVars', was it inside SourceTree or elsewhere? Had you applied it beforehand? I'd quite like to identify that so I can prevent this case happening in future.

In any case, the problem is likely to be that hgattic thinks 'announceVars' is still being referenced for some reason. hgattic is actually quite simple, it just puts patch files in .hg/attic, and keeps some state about patches in the simple text files .applied, .current and .saved. It should just be a case of removing any lines in those files which refer to 'announceVars' to get going again.

As I say, it would be nice to know more precisely what steps you took to get to this stage so I can try to prevent it in future, because obviously requiring people to dig around in these files manually is not ideal.

Actually, I've figured out how to reproduce this myself:

  1. Shelve something
  2. Apply the shelved changes but uncheck the 'Delete after applying'
  3. Delete the shelved changes
  4. Try to shelve something else

The problem is that hgattic doesn't clean up properly if you don't delete the shelf while applying, but then delete later, so I'm going to have to do this manually.

The workaround I posted above should work, this is basically what I'm going to need to make SourceTree do anyway.

I've fixed this, it'll miss this week's release but it will be in the build soon. Until the fix makes it into a new build you can avoid the problem by leaving the 'Delete after applying' option checked when you unshelve.

Thanks Steve; I should have made it clearer what I did. I deliberately unchecked the delete while apply option (for the first) because I wanted to apply this shelved patch several times.

I got out of my dead end by deleting the attic directory (fortunately there were no other shelved items I needed), buyt your workaround sounds better. [I did try to install attic in my cmd line hg, but it simply caused hg to stop working, so I gave that one up.]

Great response, thanks.

PS: You say "There's no specific help for shelve/unshelve because it should be very straight forward."

I'm sorry, but I think this is just wrong. Every feature should have some help, simple or not, if only to reassure the user that it is an intended, stable part of the product and not some hack, experimental extension, or pirate mod. If you have options on the panels, then help is needed even more so.

In this case there ought to be some background info about applying shelved patches, and why they might not be applicable (and what to do if they're not). (By the way they aren't called patches anywhere the GUI -- that is why I referred to them as shelved items.)

Please consider some help text for this feature. What seems straight forward (sic) to you may be bent backwards to some.

A fair point well made. I've been writing help for all the 'major' parts as I add them but you're right that it should be more universal. I'll try harder :)

Suggest an answer

Log in or Sign up to answer
This widget could not be displayed.
This widget could not be displayed.
Community showcase
Posted yesterday in Industry Groups

Upcoming Team Tour Government Symposium in Washington D.C.

Calling all Community members from the Washington D.C. area! Atlassian’s Team Tour is heading to your city to host a Government Symposium on May 1st. Join our team and other government agencies to le...

14 views 0 1
View post

Atlassian User Groups

Connect with like-minded Atlassian users at free events near you!

Find a group

Connect with like-minded Atlassian users at free events near you!

Find my local user group

Unfortunately there are no AUG chapters near you at the moment.

Start an AUG

You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs

Groups near you