Question: is there any way to break a branch?

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

Moderator: SourceGear

Post Reply
Balthazor
Posts: 81
Joined: Fri Mar 11, 2005 4:10 pm
Location: Hartford, Wisconsin

Question: is there any way to break a branch?

Post by Balthazor » Fri May 05, 2006 8:39 am

We've had a lot of users here who've been using branching as a way to move files from one folder to another. You know, branch the file to the target location, then delete the file from the original location. This has resulted in us having a large number of deleted files which can apparently never be obliterated due to their relationship to a branched file. So I'm wondering if there's any way to break the branches here so that we can be rid of these deleted files.

dan
Posts: 2448
Joined: Wed Dec 17, 2003 5:03 pm
Location: SourceGear
Contact:

Post by dan » Fri May 05, 2006 10:34 am

Unfortunately, there is not a good way to get rid of unwanted trunk files. In the database, they actually contain the file history up to the branch point, and the branched version contains history only from the branch point forward, which is why you are not allowed to obliterate a trunk version, since you would be removing history on the branched file.

The only way to get rid of them is to delete all branched copies first, and then the trunk, so you would have to essentially start over with the history of the file. Note that this would cause any labels you had associated with the file to no longer be correct, since the file would not exist any longer.

mlippert
Posts: 252
Joined: Wed Oct 06, 2004 10:49 am
Location: Cambridge, MA

Post by mlippert » Mon May 08, 2006 10:24 am

Meantime, if what your users want to do is move a file, I'd suggest that you tell them about Vault's "Move" command. Unfortunately it isn't on the context menu, so you must access it from the main File menu, but it does exist, and actually performs the operation your users actually want to accomplish.

Mike

Balthazor
Posts: 81
Joined: Fri Mar 11, 2005 4:10 pm
Location: Hartford, Wisconsin

Post by Balthazor » Wed May 10, 2006 3:17 pm

That's cool. I don't suppose you've happened to find a "Copy" command hiding somewhere?

mlippert
Posts: 252
Joined: Wed Oct 06, 2004 10:49 am
Location: Cambridge, MA

Post by mlippert » Wed May 10, 2006 3:20 pm

I haven't, but isn't Branch Copy? Or I guess what I mean is, how is the Branch command different from what you'd expect Copy to do?

Mike

Balthazor
Posts: 81
Joined: Fri Mar 11, 2005 4:10 pm
Location: Hartford, Wisconsin

Post by Balthazor » Wed May 10, 2006 3:22 pm

Well, copy the file without branching it. Basically the same as getting latest on the file, then adding that same file to a different Vault folder. That's what we've been doing to "copy" files.

mlippert
Posts: 252
Joined: Wed Oct 06, 2004 10:49 am
Location: Cambridge, MA

Post by mlippert » Wed May 10, 2006 3:29 pm

I see the difference, however is there a downside to branching it?

I'd think it would be nice, and possibly very useful, to have the history of the original available in the "copy".

Is there something else that branching the file instead of newly adding it makes difficult? Or is it that you just don't want the history, and if so why not?

Mike

Balthazor
Posts: 81
Joined: Fri Mar 11, 2005 4:10 pm
Location: Hartford, Wisconsin

Post by Balthazor » Thu May 11, 2006 7:34 am

We have files that we end up branching to different locations, but seldom actually edit. So we don't really need to maintain a history on these files since they never change, and we'd rather not get a new date stamp on these files when we branch them, which Vault does. So at the moment, we're getting a copy of the file, then adding it to the new location.

I notice that SourceSafe doesn't appear to have a copy function either, so I can't really complain about Vault not having one. It's just one of those "would be nice" kind of things.

dan
Posts: 2448
Joined: Wed Dec 17, 2003 5:03 pm
Location: SourceGear
Contact:

Post by dan » Thu May 11, 2006 7:46 am

Note that if the purpose of doing this is to be able to retrieve files at a given state (and they won't be edited after that), you could always use labels to mark the folder version, and then get the tree as of the label at any time in the future.

Balthazor
Posts: 81
Joined: Fri Mar 11, 2005 4:10 pm
Location: Hartford, Wisconsin

Post by Balthazor » Thu May 11, 2006 8:07 am

I'm not sure if I'm following you here. But then, I'm not sure I have the slightest idea of how labelling works, so that's probably why.

dan
Posts: 2448
Joined: Wed Dec 17, 2003 5:03 pm
Location: SourceGear
Contact:

Post by dan » Thu May 11, 2006 8:56 am

Take a look at the label command help. You can apply a label to a folder, then do a Show Labels later, select the label, and get the folder tree as it existed at the time of the label.

If the purpose of creating a new folder for a tree and copying files there is just to have a historical record and the ability to retrieve them later, this could be accomplished with labels.

However, if you are ever going to modify those files, it would be better to do what you are doing.

Post Reply