user1934428
user1934428

Reputation: 22311

Subversion: Please explain "working revision" vs. "last committed revision"

In my directory, I do the usual working cycle:

svn update
#..... apply my modifications
svn add new_stuff
svn commit

When I do a

svn status -v

afterwards, the "working revision number" and the "last committed revision number" is always the same, unless with one file (which I have never touched), where svn status -v gives the following output:

  677      317 NameOfUser      NameOfFile

To investigate this, I did a svn log on this file, which showed only two entries: One for r317 (file creation) and one for r660 (restructuring the repository without change of file contents), both applied before I started programmming in this project.

I understand that in r317, the file was created, and the content had never changed after this. But what is the exact meaning of "working revision", 677?

Upvotes: 3

Views: 2908

Answers (1)

Atilla Ozgur
Atilla Ozgur

Reputation: 14721

Subversion Global Revision Number

Subversion uses global revision numbers to track changes to files. When anytime, anyone made changes and committed this revision number increases.

working revision

When you checkout your source code, you get a source code at revision number. Whenever you update your code, your revision number updates to latest one. Your working revision is the your latest update revision. Your working revision may be behind server's latest revision.

For example

  1. You update all of your files and get 1002 revision number
  2. Someone makes couple of commits, server get revision of 1010
  3. Your working copy will show 1002 till you update your source code. Since svn allows you to update files or folders individually, some of your files may show different numbers. For example if you update only a.txt it will show 1010 but your other files will show 1002.

Last committed revision

This one easy, this is the last commit number which changed this file. Whenever you change any file, your repository global revision number increases even though this particular file has no change. Using Last committed revision number allows you to understand when was the last time this file/folder changed.

Upvotes: 4

Related Questions