#737614 subversion: When updating a repository, please tell from which revision we update

Package:
subversion
Source:
subversion
Description:
Advanced version control system
Submitter:
Date:
2015-05-18 11:27:25 UTC
Severity:
wishlist
#737614#5
Date:
2014-02-04 09:59:51 UTC
From:
To:
Hi,

when updating a repository, svn tells me to which revision it has been updated,
but not from which revision. I have attached an untested draft patch that is
expected to do exact this. Please consider applying it to the Debian package or
forwarding it upstream.

Thank you!

 - Fabian

#737614#10
Date:
2014-02-05 05:37:24 UTC
From:
To:
[Fabian Greffrath]

What would you expect the software to say in a mixed-rev wc?

#737614#15
Date:
2014-02-05 08:44:44 UTC
From:
To:
Am Dienstag, den 04.02.2014, 23:37 -0600 schrieb Peter Samuelson:

I don't know, I have never worked with such a repository (and my patch
only addresses the simple single-rev wc case).

What does it say which revision it updated to in a mixed-rev wc? If it
tells you multiple current revisions, it could as well tell you multiple
previous revisions. Or in other words, if the nb->revision variable is
set, the nb->old_revision variable should be set as well.

- Fabian

#737614#20
Date:
2014-02-05 21:51:52 UTC
From:
To:
[Fabian Greffrath]

I doubt that.  Mixed-rev working copies are the common case, not the
exception.  Almost every time you run 'svn commit', you get a mixed-rev
wc.  The files you commit are updated to the revision you committed,
while the rest of the wc is not.

To understand why this happens, consider 2 facts:

  - You are permitted to commit from an out-of-date wc, so long as the
    specific files you are committing are up to date;

  - 'svn commit' does not automatically run 'svn update'.

'svn update' always updates to a single revision (HEAD by default, or
you can specify a revision with -r), so it prints that single revision.
(Well, except for externals, but those are handled separately, as
though you were running 'svn update' individually for each external.)

Of course you can update just a subset of the wc (e.g., 'svn update
foo.txt'), to create a mixed-rev wc, but 'update' itself still only has
a single target revision to report.

Peter

#737614#25
Date:
2014-02-06 08:05:14 UTC
From:
To:
Am Mittwoch, den 05.02.2014, 15:51 -0600 schrieb Peter Samuelson:

So, the question boils down to "What should be shown as old revision, if
not all files in the repo had the same old revision?".

Honestly, I don't know. :/

- Fabian

#737614#30
Date:
2014-02-06 20:19:00 UTC
From:
To:
[Fabian Greffrath]

If you really want this feature and are trying to figure out the
design, look at 'svnversion'.  In the mixed-rev case, it shows a range.
(It also explicitly indicates whether there are any switched subdirs or
modified files, which you probably don't need here.)

Also, note that 'svn update' can be thought of as just a special case
of 'svn switch'.  (That is, switch does 2 things, changes the
repository path _and_ updates to a specified revision, or to HEAD.)
With that in mind, as you implement this, you should probably make sure
it works for both 'svn update' and 'svn switch'.

Peter