How to roll back to a label/date?

If you are having a problem using Vault, post a message here.

Moderator: SourceGear

jmagaram
Posts: 25
Joined: Wed May 21, 2008 11:17 am

How to roll back to a label/date?

Post by jmagaram » Tue Jul 15, 2008 12:46 am

I know this has been asked a lot of times, and I can't seem to get any of the proposed solutions to work for me. I'm tearing my hair out on this one. Should be very simple. What am I doing wrong?

I am using VS 2008 with Vault. How do I get back to a specific folder version? I've heard "just do a get on the old version and check it in." So I do these steps from within Vault

1. Go into Vault, right click on a folder, and do a recursive checkout, with all the default settings.
2. Right click the folder, choose History, select "view folder history by version", select a version, choose Get Tree, and press OK with all default settings.
3. Now next to each file I can see that the local version is different than the server version. If I right click and choose Check In... Vault tells me the file is unmodified and if I complete the Check In... it keep the newer server version.

I've tried a few different flavors of this - get to a different folder, make the files writable, etc. - but can't find the secret sauce.

Could someone provide a simple "do 1, 2, 3" that explains how to recursively get back to an old version? And please be clear what steps need to happen within Vault and which MUST happen within Visual Studio.

Thanks.

lbauer
Posts: 9736
Joined: Tue Dec 16, 2003 1:25 pm
Location: SourceGear

Post by lbauer » Tue Jul 15, 2008 7:32 am

2. Right click the folder, choose History, select "view folder history by version", select a version, choose Get Tree, and press OK with all default settings.
Vault won't checkin files with status of "Old." Usually the trick is to checkout the current version of the files, do the Get Tree from History into a non-working folder (you should be able to set the path in the Get dialog. Then copy the files from the non-working folder into the working folder.

Let me know if this does not resolve the problem.
Linda Bauer
SourceGear
Technical Support Manager

jmagaram
Posts: 25
Joined: Wed May 21, 2008 11:17 am

Post by jmagaram » Tue Jul 15, 2008 12:15 pm

I will try your suggestion. I am feeling uncertain, though, about messing something up.

Here's an anecdote I heard. Lexus puts a small glove in the tire changing kit. So if you are unfortunate enough to get a flat tire at least you can keep your hands clean while you replace it. That shows consideration. Similarly when someone needs to rollback they have probably messed up somehow. And they might be under time pressure to undo their mistake. At moments like these I want the "Save me Sourcegear!" button that will take care of it all easily. I don't want to have to work around the product (because it won't let me check in an old version). I don't want to have to scrounge around in a help file that doesn't explain any of this. I don't want to have to search the support forums for the specific steps that can't be found. I really think you need to improve this in the next version - all the technology is probably there, its just that customers don't know how to piece it together.

lbauer
Posts: 9736
Joined: Tue Dec 16, 2003 1:25 pm
Location: SourceGear

Post by lbauer » Tue Jul 15, 2008 12:23 pm

It sounds like you would benefit from the ability to roll back a changeset. This hasn't been implemented yet in Vault but I will add your vote to the feature request that we already have logged for this.

In the meantime, we hope that Technical Support can help with the problem.
Linda Bauer
SourceGear
Technical Support Manager

jmagaram
Posts: 25
Joined: Wed May 21, 2008 11:17 am

Post by jmagaram » Tue Jul 15, 2008 12:34 pm

Yes, sort of. I worked on product teams at Microsoft for 10 years and I understand the need for tradeoffs. At a bare minimum I think you should post step-by-step instructions for how to accomplish this in the help file and in support forums. Otherwise people like me start to think "I'm stupid because I can't figure this out".

I don't know if I'm asking for the same feature that other people are asking for. I don't know what a changeset it. And there are probably a few ways to "rollback" -

(1) undo all changes in Vault to a specific date - everything later than that date/label is destroyed.
(2) check back in the old files to the current project. so the history will show old=>new=>old.
(3) branch off from the old date

I can imagine the "new" rollback feature asking the user what they are trying to accomplish. "Do you want to keep a record of the changes made after this specific date/label?" If no, then do #1 for them. Otherwise ask a question to determine if #2 or #3 is the better way to go. If you can't implement the code for implementing what the customer wants, tell them "sorry - it can't be done but we'll consider it for later" or show them the step-by-step instructions that they can copy/paste or print.

By the way SourceSafe makes the task confusing/impossible too.

jmagaram
Posts: 25
Joined: Wed May 21, 2008 11:17 am

Post by jmagaram » Tue Jul 15, 2008 12:38 pm

I'm trying your suggestion. I did a CheckOut recursive of latest version into directory X. If did a Get of the old version into directory Y. Now I'm not sure how to copy Y into X. Should I copy every single file? If so, when I check it back it won't it show every since file being changed?

jmagaram
Posts: 25
Joined: Wed May 21, 2008 11:17 am

Post by jmagaram » Tue Jul 15, 2008 12:50 pm

I just used Windows drag/drop of the old files on top of the new ones. I then opened Visual Studio and am trying to rebuild the project. It keeps prompting me to save files when I choose Build and then complains the files I'm trying to write over are read-only. Still fumbling around here. If you're able to post step-by-step instructions that would really help me out. Thanks.

Beth
Posts: 8550
Joined: Wed Jun 21, 2006 8:24 pm
Location: SourceGear
Contact:

Post by Beth » Wed Jul 16, 2008 3:53 pm

I just used Windows drag/drop of the old files on top of the new ones.
That's a perfectly fine way to do it.
I then opened Visual Studio and am trying to rebuild the project.
Was this before or after checking in the files? If before...then why?
I
t keeps prompting me to save files when I choose Build and then complains the files I'm trying to write over are read-only.
If files are being changed in any way during the build, then they will need to be checked out or you can change them to never be read-only. Go to VS Tools - Options - Source Control and set the On Edit option to Check Out.
If you're able to post step-by-step instructions that would really help me out.
With the beginning part, you were already doing the right thing. If there's still confusion, it might work better if you send an email to support at sourcegear.com with a link to this thread and we can help you a little more directly.

jmagaram
Posts: 25
Joined: Wed May 21, 2008 11:17 am

Post by jmagaram » Wed Jul 16, 2008 3:56 pm

i eventually got it done. i used windiff to show me exactly which files had changed and copied over just those.

Beth
Posts: 8550
Joined: Wed Jun 21, 2006 8:24 pm
Location: SourceGear
Contact:

Post by Beth » Wed Jul 16, 2008 4:00 pm

Thanks for the update.

SCarroll
Posts: 3
Joined: Fri Nov 07, 2008 10:25 am

Re: How to roll back to a label/date?

Post by SCarroll » Fri Nov 07, 2008 10:28 am

YES. I want to be able to roll back a specific change set/list. This seems like an elementary feature that should be available, so I was surprised to find out that it wasn't already included in Vault. My organization is planning to switch source control, and the lack of this feature may cause us to select something else. This seems very important to me, and the fact that there's no easy way to do this doesn't make any sense.

lbauer
Posts: 9736
Joined: Tue Dec 16, 2003 1:25 pm
Location: SourceGear

Re: How to roll back to a label/date?

Post by lbauer » Thu Nov 13, 2008 4:56 pm

We have work item 11336 logged for this. I'll add your "vote" and also bump it up in priority.
Linda Bauer
SourceGear
Technical Support Manager

avonwyss
Posts: 99
Joined: Mon Oct 04, 2004 9:06 am

Re: How to roll back to a label/date?

Post by avonwyss » Mon Nov 17, 2008 6:40 am

Please add my vote as well... (we have had several users asking for this feature).

lbauer
Posts: 9736
Joined: Tue Dec 16, 2003 1:25 pm
Location: SourceGear

Re: How to roll back to a label/date?

Post by lbauer » Tue Nov 18, 2008 8:51 am

Done.
Linda Bauer
SourceGear
Technical Support Manager

jmagaram
Posts: 25
Joined: Wed May 21, 2008 11:17 am

Re: How to roll back to a label/date?

Post by jmagaram » Tue Apr 28, 2009 7:08 pm

It doesn't appear this feature has been implemented yet. I'm really just curious about something - please do not take this as a criticism. To me, as a user, this feature - a recursive rollback to a particular date - seems like an elementary, version 1 type of feature. A core benefit of source control is being able to protect your source code from mistakes - accidental deletions and buggy checkins. And yet Vault - despite being an incredible product in so many ways - doesn't support it. And I don't think Microsoft SourceSafe supported it either. Why hasn't this feature been implemented yet? Is it technically really difficult? Or am I mis-using source control in some fashion and experienced users of source control don't need this capability?

Post Reply