简体   繁体   中英

Is it possible to do a subversion checkin with a specific version number?

An existing svn repo got damaged in a way I couldn't repair, so I started a new one. But, of course, the numbers of the new revisions start at 1, which is getting in the way of some other record-keeping about my project that use the revision numbers. I'd like to keep the new repo going, but with the revision numbers pushed forward to follow on from where the old repo left off.

I haven't found any clues about how to do this in the "svn commit" docs, and I suppose there are good reasons for why this would not be allowed. But I'd still find it handy; any advice?

Where are your backups of the repository? That should at least get you restored to close to the right place.

The svn revision number is a running count of the number of times the repository has been modified - just a counter of how many times someone has successfully executed svn commit against it.

You cannot force svn to start revisions at a particular number. Your best option is to commit "dummy" changes to the repository repeatedly until you reach the number you need.

No significance should be placed in this number for purposes beyond referencing the repository itself. Timestamps are usually more valid for record-keeping, or creating your own release versioning scheme.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM