3

I am trying to identify local (not automated build server) builds of SVN projects with externals (and sub-externals) by their URL, revision, and dirty/clean status. The overall result will simply be all clean or something somewhere is dirty, I do not care what is dirty. Is such a program/script already handy? Or must I be less lazy and write it myself... (I have been unlazy enough to search a bit). In short, a fancy version of svnversion which is aware of externals.

I have tried svnversion. Here is a redacted copy from my Cygwin shell.

altendky@ly /svn/myProject.clean
$ svnversion
606

altendky@ly /svn/myProject.clean
$ svn propget svn:externals
^/../the_canopen_library@223 libs/canopen

altendky@ly /svn/myProject.clean
$ echo blue >> libs/canopen/wrapper/CANOpenGuard.c

altendky@ly /svn/myProject.clean
$ svnversion
606

altendky@ly /svn/myProject.clean
$ echo blue >> src/App_Main.c

altendky@ly /svn/myProject.clean
$ svnversion
606M

altendky@ly /svn/myProject.clean
$ svnversion --version
svnversion, version 1.8.3 (r1516576)
   compiled Aug 30 2013, 11:03:40 on i686-pc-cygwin

Copyright (C) 2013 The Apache Software Foundation.
This software consists of contributions made by many people;
see the NOTICE file for more information.
Subversion is open source software, see http://subversion.apache.org/

altendky@ly /svn/myProject.clean
$

1 Answer 1

1

Did you try to read svnversion -h and test WC with externals? I see - no, because presence or absence of exernals inside WC does change nothing in result

The version identifier will be a single number if the working copy is single revision, unmodified, not switched and with a URL that matches the TRAIL_URL argument. If the working copy is unusual the version identifier will be more complex

For clean checkout of repo-URL with externals inside

>dir /B
core_mod.txt
lib

(lib is directory-externals in foreign repo)

svnversion for the root of WC generates, as expected

>svnversion
7

In case of any modifications inside WC, which will destroy "vanilla" state, version identity will be more complex than pure single number:

A[:B[MSP]]

Sign up to request clarification or add additional context in comments.

5 Comments

A lazy question gets a response from the lazy badger. :] But is this meant as an answer? Yes, svnversion does what I want for a WC without externals but I need similar functionality against externals. Even just an E indicator would be helpful. (which really just means I should extend svnversion with the feature I want)
@altendky - which "similar functionality" exactly?! svnversion output only version
svnversion always outputs the version but also outputs indicators when the working copy is not clean (not only the version). I would like an indicator that would be triggered by a dirty/missing/wrong revision/mixed revision external.
@altendky - svnversion do it, because externals are part of WC
Have you actually seen it do what I want? It does not for me (I tried it before posting), see the edited question.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.