RE: AW: Timestamp issue with "svn status" in 1.9.3

2016-03-06 Thread Peter Klotz
Hello Philip

> > Instead of "why is the second change not reported" it should be "why
> > is the first change reported".
> >
> > Relevant part of the script:
> 
> At this point Subversion has recorded a timestamp for the file.
> 
> >   echo "2" > x
> >   touch -m -t "20121231.00" x
> >   svn -q status  <-- this change is detected by Subversion (why?)
> 
> The recorded timestamp is not 20121231.00 so it does not match the
> file's timestamp and Subversion detects the change.
> 
> >   svn commit -m "" x
> 
> Subversion records the current timestamp 20121231.00.
> 
> >   echo "3" > x
> 
> The file's timestamp is not 20121231.00 so it does not match the
> recorded timestamp and Subversion detects the change.
> 
> >   touch -m -t "20121231.00" x
> >   svn -q status <-- this change is not detected by Subversion (as
> expected)
> 
> The recorded timestamp and the file's timestamp are both
> 20121231.00
> and Subversion does not detect the change.

Thank you for explaining what happens here!

I falsely assumed that "svn status" looks for "newer than recorded" timestamps 
instead of "different than recorded" timestamps. So it of course makes sense 
that the first change is reported and the second is not.

Regards, Peter.


Can't get "svn log --use-merge-history" to list all

2016-03-06 Thread Stefan Karlsson
I will try to describe the "scenery", but I have also attached a Windows
batch file that creates a repository ("repos") and a work folder ("work"),
as well as the log file ("log.txt") described below. I have also attached
my copy of "log.txt".

This is in short was the batch file does:

A branch is created from trunk, and changes are made in the branch (but NO
CHANGE is made in the trunk). This branch is then merge into trunk.

A second branch is then created, but now there are changes made in both
trunk and branch. This branch is also merged into trunk. Now there are of
cause conflicts, but all changes are saved (trunk first, then branch)

So now to the actual problem.

Showing the log on the file, with:
"svn log --use-merge-history --verbose trunk\example.txt

It shows (as expected) each change made in the second branch,
but NOT each change made in the first branch !?!?!

...and the file does include all the changes, but why isn't it listed in
the log?

I am expecting to see r3, r4 and r5, (just like r9, r10 and r12 for the
second branch)
but they are NOT listed in the log, see attached file "log.txt"

BTW, I'm using svn, version 1.9.3 (r1718519)

Is this a bug or am I doing it wrong?

/Stefan
@echo off

if exist repos (
echo Repository "repos" already exist in current directory, aborting...
goto:QUIT_PAUSE
)
if exist work (
echo Work folder "work" already exist in current directory, aborting...
goto:QUIT_PAUSE
)

echo :: Create a new repository
svnadmin create repos

echo :: Check out a work copy
call:PathToURL repos URL
svn checkout %URL% work

echo :: Create the folder structure and create the file
mkdir work\branches
mkdir work\tags
mkdir work\trunk
echo Creation > work\trunk\example.txt
svn add work\branches
svn add work\tags
svn add work\trunk
svn commit work --message "Creation"
svn update work

call:AddTextIn "trunk""Change A"
call:CreateBranch "branch1"
call:AddTextIn "branches\branch1" "Change B"
call:AddTextIn "branches\branch1" "Change C"
call:MergeBranchToTrunk "branch1"
call:AddTextIn "trunk""Change D"
call:AddTextIn "trunk""Change E"
call:CreateBranch "branch2"
call:AddTextIn "branches\branch2" "Change F"
call:AddTextIn "trunk""Change G"
call:AddTextIn "branches\branch2" "Change H"
call:AddTextIn "trunk""Change I"

echo.
echo There will be a merge conflict, so when asked:
echo 1. Answer "m" (for merge)
echo 2. Answer "12" (for their version first, then yours)
echo 3. Answer "r" (for mark as resolved)
echo.
@timeout /t 5

call:MergeBranchToTrunk "branch2"
call:AddTextIn "trunk""Change J"

svn log --use-merge-history --verbose work\trunk\example.txt > log.txt



GOTO:QUIT_TIMEOUT
::=
::-- Function section starts below...
::=

:PathToURL  -- Converts a path to an URL
::  -- %~1: File/directory path
::  -- %~2: Variable for resulting URL
SETLOCAL

:: Copy argument into local variable for easy reading
set PATH_NAME=%~1
:: Make sure that we start with an empty URL
set PATH_URL=

:: Expand the relative path to an absolute one 
for /f "delims=" %%R in ("%PATH_NAME%") do set PATH_URL=%%~fR%

:: Prepend "file:///"
set PATH_URL=file:///%PATH_URL%

:: Handles the special case of a UNC path
set PATH_URL=%PATH_URL:///\\=//%

:: Make sure to only use forward slashes
set PATH_URL=%PATH_URL:\=/%

:: Return result
(ENDLOCAL
SET %~2=%PATH_URL%
)
GOTO:EOF

::=

:AddTextIn
::  -- %~1: Trunk/branch
::  -- %~2: Change text
echo :: Make %~2 in %~1
echo %~2 >> work\%~1\example.txt
svn commit work --message "%~2"
svn update work
GOTO:EOF

::=

:CreateBranch
::  -- %~1: Branch

echo :: Create %~1
svn copy work\trunk work\branches\%~1
svn commit work --message "Creating %~1"
svn update work
GOTO:EOF

::=

:MergeBranchToTrunk
::  -- %~1: Branch
echo :: Merge %~1 to trunk
cd work\trunk
svn merge ..\branches\%~1
cd ..\..
svn commit work --message "Merge %~1 to trunk"
svn update work
GOTO:EOF

::=

:QUIT_PAUSE
@pause "Press ENTER to close window"
GOTO:EOF

::=

:QUIT_TIMEOUT
@timeout /t 5
GOTO:EOF

::=

r15 | Stefan | 2016-03-06 18:45:53 +0100 (sön, 06 mar 2016) | 1 line
Changed paths:
   M /trunk/example.txt

Change J
---