Question

  • There is a repository repository repo.fossil
  • bug.c modified many times (eg. revision 10a3->34bd->152c).
  • There are many files changes in 10a3, 34bd and 152c revision.
  • Bug will fixed if combine 152c revision with bug.c at 34bd.

How to keep such version, I use following command but failed?

fossil open ~/fs/repo.fossil # contains many files
fossil update -r 34bd bug.c
fossil ci   <-- why there is no change?
Was it helpful?

Solution

This seems to be two questions packed into one

1 Why is there no change.

There is no change because you have not made any changes. You have have opened ( copied into the working directory ) the file that belong to "old_revision". You have not changed anything It remains identical to the file for the version as stored in the repository.

2 How to revert a particular file

fossil open ~/fs/repo # contains many files
fossil revert-r <old_revision> one_file
fossil ci

Notice that I am using the revert command, NOT the update command

Here are the details of the revert command http://www.fossil-scm.org/fossil/help?cmd=revert

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top