Find chronological errors or bad timestamps in a Subversion repository

URL=http://svn.example.org/project; diff -u <(TZ=UTC svn -q log -r1:HEAD $URL | grep \|) <(TZ=UTC svn log -q $URL | grep \| | sort -k3 -t \|)
Lists revisions in a Subversion repository with a timestamp that doesn't follow the revision numbering order. If everything is OK, nothing is displayed.

2
By: sunny256
2009-06-03 14:26:55

These Might Interest You

  • These part of the command: svn status | grep '^\?' => find new file or directory on working copy sed -e 's/^\?//g' => remove "^" character on the first character of file name xargs svn add => add file to subversion repository You can modify above command to other circumtances, like revert addition files or commit files that have been modified. ^_^


    0
    svn status | grep '^\?' | sed -e 's/^\?//g' | xargs svn add
    dollyaswin · 2009-02-28 03:00:28 4
  • Assuming you are working within a git repository, you can run the above command & see what has changed in reverse chronological order, with one commit per line. Other formatting variations to 'oneline' include 'short', 'medium', 'full', 'fuller', 'email' or 'raw'. Show Sample Output


    2
    git log --pretty=oneline
    smcpherson · 2009-03-27 04:16:43 0
  • If (when) you forget to "svn rm" files from your repository, use this to let your repository know you want those files gone. Of course this works with adding and reverting too.


    0
    svn rm `svn status | grep "\!" | cut -c 8-`
    benschw · 2009-03-29 13:28:55 1

  • 4
    svn ci `svn stat |awk '/^A/{printf $2" "}'`
    realist · 2009-11-04 03:30:07 0

What do you think?

Any thoughts on this command? Does it work on your machine? Can you do the same thing with only 14 characters?

You must be signed in to comment.

What's this?

commandlinefu.com is the place to record those command-line gems that you return to again and again. That way others can gain from your CLI wisdom and you from theirs too. All commands can be commented on, discussed and voted up or down.

Share Your Commands



Stay in the loop…

Follow the Tweets.

Every new command is wrapped in a tweet and posted to Twitter. Following the stream is a great way of staying abreast of the latest commands. For the more discerning, there are Twitter accounts for commands that get a minimum of 3 and 10 votes - that way only the great commands get tweeted.

» http://twitter.com/commandlinefu
» http://twitter.com/commandlinefu3
» http://twitter.com/commandlinefu10

Subscribe to the feeds.

Use your favourite RSS aggregator to stay in touch with the latest commands. There are feeds mirroring the 3 Twitter streams as well as for virtually every other subset (users, tags, functions,…):

Subscribe to the feed for: