当前位置:网站首页>Fallback operation in SVN

Fallback operation in SVN

2022-06-10 22:59:00 White whoring leader

Preface

Let's study it today svn Version fallback in , Based on the project version number 270 give an example

Three fallback operations

One 、 Update item to revision

This command is simply to view past versions , Unable to do other operations ( Unable to submit and other operations )

After the operation, it will fall back 271 ~ 276 Version changes , Make the local code 270 Version code , amount to 270 The code after version has not been updated locally , The update will come back . This operation is mainly used for testing 270 Whether the version code behaves correctly , If correct, lock the problem code in 271 ~ 276 Between
 Insert picture description here

perform Update item to revision operation

 Insert picture description here

perform Update item to revision After operation Log

You can see that after the operation , The version of the current project is 270, here Commit Also empty , Although the local code is different from the server code , But because of the older version , So you can't submit

 Insert picture description here

Commit

If you still want to go back to the latest version , perform svn to update , Just pull the latest code .
Updated and back
 Insert picture description here

Update

 Insert picture description here

Update After Log

Two 、 Revert to this revision

The big use of this is that the boss' needs are uncertain , At the beginning, I said that scheme 1 was not good , Then I made scheme two , Plan 2: the boss doesn't think so , Then I made scheme three , Plan 3: the boss doesn't think so , Then I made scheme four ...... Last , You did 100 A plan . one day , The boss suddenly said the plan 50 I remember well , You show me the plan 50 Well , Do you want to scold in an instant , Because your plan 50 I lost it long ago. . Last , The boss said it was better to use scheme one , At this time, scheme 1 has been lost , At this point Revert to this revision It comes in handy , It allows you to save every version , It is convenient to come back and check again 、 Revise and submit .

After the operation, it will fall back 271 ~ 276 Version changes , Make the local code 270 Version code , Equivalent to a new modification , But this modification is to invalidate the original modification . It's like planning to add a function first , Add it and then say you don't want it , Generally used in this situation . differ Update item to revision Yes. , This is because it is a real fallback modification ( Can submit ) So there will be a secondary pop-up prompt .

 Insert picture description here

Secondary pop-up prompt

Revert Then you can see svn The server thinks that the local code is the latest , This also means that all local submissions will generate the latest version 277

 Insert picture description here

Confirm... After operation Log

The update shows that there are no updates , Because it's the latest version ( The mosaic drops the path )
 Insert picture description here

Update

Commit The fallback changes will be displayed , And these changes are 271 ~ 276 Fallback of , Note that once submitted , Change the version number on the server to 277 It also means that the latest version on the server is actually the same as 270 Same version ,271 ~ 276 It's just a passer-by . If it is your own misoperation , Be sure not to upload and make your own changes Revert fall .

 Insert picture description here

Commit

3、 ... and 、 Revert changes from this revision

The use method and function of this operation are the same as Revert to this revision It's almost exactly the same , The only difference is :Revert to this revision Will fall back to the specified version and Keep the changes made in this version , and Revert changes from this revision Will fall back to the specified version Changes made in this version are not preserved .
The meaning of this operation is to modify a certain item, such as 270 Modify fallback for , Others are the same Revert to this revision. You can select multiple items, such as 270、271、272 This option becomes Revert changes from these revisions
 Insert picture description here

Revert changes from these revisions

原网站

版权声明
本文为[White whoring leader]所创,转载请带上原文链接,感谢
https://yzsam.com/2022/161/202206101619232338.html