How to update workspace with an old revision of a branch ?

70 views
Skip to first unread message

Guillaume M

unread,
Nov 18, 2010, 9:51:16 AM11/18/10
to plasticscm
This is probably very basic, but I can't find how to do this.

How do I update my workspace with an old revision of a branch (ex:
from an old changeset) ?
For example, i would like to test if a bug was present in an old
version, or i would like to add a label to a previous revision.

pablo

unread,
Nov 18, 2010, 11:14:43 AM11/18/10
to plasticscm
Hi Guillaume,

The operation is just about to update your workspace to go to this
given point.

For instance, suppose you want to go back to release 170 (I'd label it
as BL170 down here): I'd go to the label's list, select BL170 and then
"switch workspace to this label".

But, you're asking about changesets. Unfortunately (and it is
basically something that could be added in minutes... I'll schedule it
ASAP, promised :P) we do not have a "switch workspace to this
changeset" despite it would be pretty doable.

To do that you must edit the selector and type something like

rep "yourrep"
path "/"
branch "yourbranch here" changeset "XXXX" // the changeset you
want to jump to

And you're done.

We'll add it to the GUI since it doesn't make a lot of sense not to
have it.

pablo

Borja Ruiz Arroyo

unread,
Nov 18, 2010, 11:16:41 AM11/18/10
to plast...@googlegroups.com
Hi,

     You have 2 different options:

          1º We can do an update on the CLI to a given changeset of the current configuration (the changeset must be in the current branch). Example: if we are pointing "br:/main/task01" and we want to download the configuration of this branch on the changeset 7, we need to use the following command:
    cm update . --changeset=7

          2º You can change the selector to download the configuration of a branch on a given changeset. On this way:

if we are pointing to the branch "br:/main/task01", with the next selector:

repository "default"
    path "/"
        smartbranch "/main/task01"


and we want the configuration on the changeset 7, we need to type the following:

repository "default"
    path "/"
        smartbranch "/main/task01"    changeset "7"

Regards

            Borja
--

Borja Ruiz Arroyo
www.codicesoftware.com

Plastic SCM by Codice Software

psan...@codicesoftware.com

unread,
Nov 18, 2010, 11:18:05 AM11/18/10
to plast...@googlegroups.com
Borja's answer is better than mine! :O Ouch!

On 18/11/2010 17:16, Borja Ruiz Arroyo wrote:
> Hi,
>
> You have 2 different options:
>
> 1º We can do an update on the CLI to a given changeset of the
> current configuration (the changeset must be in the current branch).
> Example: if we are pointing "br:/main/task01" and we want to download
> the configuration of this branch on the changeset 7, we need to use the
> following command:
>

> / cm update . --changeset=7/


>
>
> 2º You can change the selector to download the configuration
> of a branch on a given changeset. On this way:
>
> if we are pointing to the branch "br:/main/task01", with the next
> selector:
>

> /repository "default"
> path "/"
> smartbranch "/main/task01"/


>
>
> and we want the configuration on the changeset 7, we need to type
> the following:
>

> /repository "default"/
> / path "/"/
> / smartbranch "/main/task01" changeset "7"/


>
>
> Regards
>
> Borja
>
>
>
>
>
> El 18/11/2010 15:51, Guillaume M escribió:
>> This is probably very basic, but I can't find how to do this.
>>
>> How do I update my workspace with an old revision of a branch (ex:
>> from an old changeset) ?
>> For example, i would like to test if a bug was present in an old
>> version, or i would like to add a label to a previous revision.
>
>
> --
>
> Borja Ruiz Arroyo

> www.codicesoftware.com <http://www.codicesoftware.com>
>
> Plastic SCM by Codice Software <http://www.plasticscm.com>
> <http://www.plasticscm.com>
>

Guillaume M

unread,
Nov 18, 2010, 12:00:37 PM11/18/10
to plasticscm
I tried using the GUI to change the selector for a specific changeset,
but even if I have the option "Auto-update workspace after selector
change", my workspace was not updated. I had to go into Items view,
right-click on rootpath and select Update to have the old revision
downloaded. Seems to be a problem here.
And yes, a "Switch workspace to this changeset/label" from the
BranchExplorer view would be great.
Reply all
Reply to author
Forward
0 new messages