feng63600
feng63600

Reputation: 183

svn - file-based revision number instead of the repo

Is there any way I can keep the revision number incremented on each single file, instead of on the whole repository? A simpler way to put it is probably the number of commits of a file.

SVN does this for me:

  1. two files under a repo: a.txt, b.txt
  2. commit a.txt, the revision comes to 1
  3. commit b.txt, the revision comes to 2
  4. commit a.txt one more time, the revision comes to 3

What I think is more convenient is in step 4, the revision should be 2, because it refer to "the second commit of a.txt"

Upvotes: 0

Views: 63

Answers (1)

Lazy Badger
Lazy Badger

Reputation: 97375

No, you can't do it in SVN (by design). Independent version of single and every file in repository was implemented and used in CVS - and globally abandoned later in favor of the concept of global revisions with the scope "Repository"

Your file-revision definition:

  • Have minimal value for any real task
  • Can be easy obtained on the fly from existing metadata

Do not reinvent the wheel!!!

Upvotes: 4

Related Questions