batch checking for modifications?

8 views
Skip to first unread message

Niemann, Hartmut

unread,
Nov 15, 2022, 2:58:55 AM11/15/22
to TortoiseSVN mailing list (tortoisesvn@googlegroups.com)

Hello *!

 

I would like to check in a batch file, whether my working copy is still identical to HEAD.

 

Reason: an automatic build creates a tag (after the build) and I want to make sure that the input files are unchanged.

 

Steps:

  1. Create a fresh working copy
  2. Build
  3. Commit build results (I know that this is not the recommended way, but the project members want/need it that way)
  4. Tag

 

The problem:

If a commit in one of the input files happens between (1) and (3), the build results don’t match the input after (3).

I could tag the source with revision of (1) and the output with the revision of (3), but that is ugly and normally unnecessary (nobody is supposed to do a check in while a to-be-tagged (testing or) release candidate is built).

But if my input files change while building and tagging, results will be inconsistent.

So I would like to tag with the revision of the commit (3) and either

(a) check before tagging, that the input has not been changed in between and abort or

(b) check after tagging and remove the inconsistent tag.

 

Svn diff does not seem to have a suitable return code. It returns 0 whether it has found a difference or not.

Does anyone have an idea how I could accomplish my goal?

 

Regards

Hartmut

 

Daniel Sahlberg

unread,
Nov 15, 2022, 3:21:59 AM11/15/22
to TortoiseSVN
Does TortoiseSVN's Check for modifications, Check repository work for you?

I think the following would be a command line equivalent:

svn diff -r BASE:HEAD

That will show any changes from the BASE revision (ie, what you checked out in step 1) and the HEAD revision (current repository revision). It seems to work also with mixed-revision-wcs.

Kind regards,
Daniel

Stefan Pendl

unread,
Nov 15, 2022, 4:45:00 AM11/15/22
to TortoiseSVN
How about locking the repository during the bild process?
---
Stefan P.

--
You received this message because you are subscribed to the Google Groups "TortoiseSVN" group.
To unsubscribe from this group and stop receiving emails from it, send an email to tortoisesvn...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/tortoisesvn/204feee6-2e33-48a1-bd5d-c0fe44093cf3n%40googlegroups.com.

lorenz

unread,
Nov 15, 2022, 9:10:51 AM11/15/22
to torto...@googlegroups.com
TortoiseSVN on behalf of H. Niemann wrote:

>I would like to check in a batch file, whether my working copy is still identical to HEAD.
>
>Reason: an automatic build creates a tag (after the build) and I want to make sure that the input files are unchanged.

why not tag first, then build from the tag and add the build results
to the tag?
--

Lorenz

Reply all
Reply to author
Forward
0 new messages