svn checkout/update to latest revision up until deadline

Scenario: Students have access to a subfolder in an SVN repository where they will check in the solutions to their assignments.

The assignments have a fixed deadline (e.g. Tuesday, 12:00).

It is possible that students change the files after this deadline.

Question: Is there a convenient way to update my working copy to include all commits up to specified datetime?

My approach: So far, i looked at the log and figured out what the last commit before the deadline was. Then i remember that commit's revision number and update my working copy to that state with svn up -rNNN. But I'm sure there's a better way to do that.

Any tips are greatly appreciated.

1 Answer

You can use { DATE } in your revision (-r). For example if you want status at 2017-11-06 date (today) you can use svn update -r "{2017-11-06}". You can be more precise, see Revision Specifiers/Revision Dates:

$ svn update -r {2006-02-17}
$ svn update -r {15:30}
$ svn update -r {15:30:00.200000}
$ svn update -r {"2006-02-17 15:30"}
$ svn update -r {"2006-02-17 15:30 +0230"}
$ svn update -r {2006-02-17T15:30}
$ svn update -r {2006-02-17T15:30Z}
$ svn update -r {2006-02-17T15:30-04:00}
$ svn update -r {20060217T1530}
$ svn update -r {20060217T1530Z}
$ svn update -r {20060217T1530-0500}
1

Your Answer

Sign up or log in

Sign up using Google Sign up using Facebook Sign up using Email and Password

Post as a guest

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

You Might Also Like