[svn.haxx.se] · SVN Dev · SVN Users · SVN Org · TSVN Dev · TSVN Users · Subclipse Dev · Subclipse Users · this month's index

Re: Taking stock: BASE keyword on the command line

From: Neels J Hofmeyr <neels_at_elego.de>
Date: Sat, 30 Jan 2010 12:51:42 +0100

Bert Huijben wrote:
> On Sat, Jan 30, 2010 at 4:14 AM, Neels J Hofmeyr <neels_at_elego.de> wrote:
>> Neels J Hofmeyr wrote:
>>> Starting from 'svn help', I see these commands where @BASE is applicable:

[...]
[...]
[...]

> I would like to compare the result to a 1.6.X version, but I don't
> have the time to do that today :(
> (I hope your script can help here)

Sure! Ran it on 1.6.x and looked at the diff -u between trunk and 1.6.x output.

The differences are:

'svn blame file' does not show the locally edited file in 1.6.x, as you
said.

'svn info' has a tiny difference where it doesn't show the Repos UUID in
1.6.x though it did in trunk:

[[[
---- trunk.output
++++ 1.6.x.output
[svn copy -rBASE file copy2_of_file]
[svn info copy2_of_file]
@@ -189,7 +187,6 @@
 Name: copy2_of_file
 URL: file:///home/neels/hg/svn/tests/cat_replaced/repos/copy2_of_file
 Repository Root: file:///home/neels/hg/svn/tests/cat_replaced/repos
-Repository UUID: c57cfc0c-0d49-11df-b658-41678fc56d06
 Revision: 4
 Node Kind: file
 Schedule: add
]]]

'svn log' has a number of differences where it shows one revision earlier
than trunk. I haven't looked at the meaning of this yet. Feel free...

[[[
@@ -305,30 +301,29 @@
 this_is_revision_1_of_folder
 + svn log -v file
 ------------------------------------------------------------------------
-r4 | neels | 2010-01-30 12:43:01 +0100 (Sat, 30 Jan 2010) | 1 line
+r3 | neels | 2010-01-30 12:26:14 +0100 (Sat, 30 Jan 2010) | 1 line
 Changed paths:
- D /folder
- M /other_file
+ M /file
+ M /file_with_props
+ A /folder/no,_this_is_revision_3_of_folder
    M /other_file_with_props
- D /other_folder/file.r2
- A /other_folder/file.r4
+ A /other_folder/file.r3

-r4
+r3
 ------------------------------------------------------------------------
-r2 | neels | 2010-01-30 12:42:57 +0100 (Sat, 30 Jan 2010) | 1 line
+r1 | neels | 2010-01-30 12:26:10 +0100 (Sat, 30 Jan 2010) | 1 line
 Changed paths:
- M /file_with_props
- A /folder/no,_this_is_revision_2_of_folder
- A /other_file
- A /other_file_with_props
- A /other_folder
- A /other_folder/file.r2
+ A /file
+ A /file_with_props
+ A /folder
+ A /folder/this_is_revision_1_of_folder
+ A /old_state_of_file

-r2
+r1
 ------------------------------------------------------------------------
 + svn log -v file_at_BASE
 ------------------------------------------------------------------------
-r3 | neels | 2010-01-30 12:42:59 +0100 (Sat, 30 Jan 2010) | 1 line
+r3 | neels | 2010-01-30 12:26:14 +0100 (Sat, 30 Jan 2010) | 1 line
 Changed paths:
    M /file
    M /file_with_props
@@ -338,7 +333,7 @@

 r3
 ------------------------------------------------------------------------
-r1 | neels | 2010-01-30 12:42:55 +0100 (Sat, 30 Jan 2010) | 1 line
+r1 | neels | 2010-01-30 12:26:10 +0100 (Sat, 30 Jan 2010) | 1 line
 Changed paths:
    A /file
    A /file_with_props
@@ -352,23 +347,11 @@
 ------------------------------------------------------------------------
 + svn log -v -rBASE file
 ------------------------------------------------------------------------
-r4 | neels | 2010-01-30 12:43:01 +0100 (Sat, 30 Jan 2010) | 1 line
-Changed paths:
- D /folder
- M /other_file
- M /other_file_with_props
- D /other_folder/file.r2
- A /other_folder/file.r4
-
-r4
-------------------------------------------------------------------------
]]]

Those are all the differences (ingoring UUID and Date diffs of course).

~Neels

svn, version 1.7.0 (dev build)
   compiled Jan 26 2010, 22:16:34

Copyright (C) 2010 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/

The following repository access (RA) modules are available:

* ra_neon : Module for accessing a repository via WebDAV protocol using Neon.
  - handles 'http' scheme
  - handles 'https' scheme
* ra_svn : Module for accessing a repository using the svn network protocol.
  - handles 'svn' scheme
* ra_local : Module for accessing a repository on local disk.
  - handles 'file' scheme

+ cd wc
+ echo 'r1 for file, i.e. the deleted file'\''s history.'
+ cp file old_state_of_file
+ svn add file old_state_of_file
A file
A old_state_of_file
+ mkdir folder
+ echo r1
+ svn add folder
A folder
A folder/this_is_revision_1_of_folder
+ echo file_with_props
+ svn add file_with_props
A file_with_props
+ svn ps prop_r1_on_deleted_file value_r1 file_with_props
property 'prop_r1_on_deleted_file' set on 'file_with_props'
+ svn ps this_is_rev deleted_r1 file_with_props
property 'this_is_rev' set on 'file_with_props'
+ svn ci -mr1
Adding file
Adding file_with_props
Adding folder
Adding folder/this_is_revision_1_of_folder
Adding old_state_of_file
Transmitting file data ....
Committed revision 1.
+ svn up
At revision 1.
+ echo r2
+ svn add folder/no,_this_is_revision_2_of_folder
A folder/no,_this_is_revision_2_of_folder
+ svn ps prop_r2_on_deleted_file deleted_r2 file_with_props
property 'prop_r2_on_deleted_file' set on 'file_with_props'
+ svn ps this_is_rev deleted_r2 file_with_props
property 'this_is_rev' set on 'file_with_props'
+ echo 'r2 for other_file, i.e. the *copied-here* file'\''s history!'
+ svn add other_file
A other_file
+ mkdir other_folder
+ echo other_folder/file.r2.
+ svn add other_folder
A other_folder
A other_folder/file.r2
+ echo other_file_with_props
+ svn add other_file_with_props
A other_file_with_props
+ svn ps prop_r2_on_copied_here_file copied_r2 other_file_with_props
property 'prop_r2_on_copied_here_file' set on 'other_file_with_props'
+ svn ps this_is_rev copied_r2 other_file_with_props
property 'this_is_rev' set on 'other_file_with_props'
+ svn ci -mr2
Sending file_with_props
Adding folder/no,_this_is_revision_2_of_folder
Adding other_file
Adding other_file_with_props
Adding other_folder
Adding other_folder/file.r2
Transmitting file data ....
Committed revision 2.
+ svn up
At revision 2.
+ echo r3
+ svn add folder/no,_this_is_revision_3_of_folder
A folder/no,_this_is_revision_3_of_folder
+ echo 'r3 for file, i.e. the deleted file'\''s history.'
+ svn ps prop_r3_on_deleted_file deleted_r3 file_with_props
property 'prop_r3_on_deleted_file' set on 'file_with_props'
+ svn ps this_is_rev deleted_r3 file_with_props
property 'this_is_rev' set on 'file_with_props'
+ svn ps prop_r3_on_deleted_file deleted_r3 file_with_props
property 'prop_r3_on_deleted_file' set on 'file_with_props'
+ svn ps this_is_rev copied_r3 other_file_with_props
property 'this_is_rev' set on 'other_file_with_props'
+ echo other_folder/file.r3.
+ svn add other_folder/file.r3
A other_folder/file.r3
+ svn ci -mr3
Sending file
Sending file_with_props
Adding folder/no,_this_is_revision_3_of_folder
Sending other_file_with_props
Adding other_folder/file.r3
Transmitting file data ...
Committed revision 3.
+ svn up
At revision 3.
+ svn rm folder
D folder/no,_this_is_revision_2_of_folder
D folder/no,_this_is_revision_3_of_folder
D folder/this_is_revision_1_of_folder
D folder
+ echo 'r4 for other_file, i.e. the copied-here file'\''s *later* history!'
+ svn rm other_folder/file.r2
D other_folder/file.r2
+ echo other_folder/file.r4.
+ svn add other_folder/file.r4
A other_folder/file.r4
+ svn ps prop_r4_on_copied_here_file copied_r4 other_file_with_props
property 'prop_r4_on_copied_here_file' set on 'other_file_with_props'
+ svn ps this_is_rev copied_r4 other_file_with_props
property 'this_is_rev' set on 'other_file_with_props'
+ svn ci -mr4
Deleting folder
Sending other_file
Sending other_file_with_props
Deleting other_folder/file.r2
Adding other_folder/file.r4
Transmitting file data ..
Committed revision 4.
+ svn up
At revision 4.
+ svn rm file
D file
+ svn cp '^/other_file_at_2' file
A file
+ echo 'now WORKING for file'
+ svn cp '^/other_folder_at_2' folder
A folder/file.r2
Checked out revision 2.
A folder
+ echo 'now WORKING for folder/file.r2'
+ echo new
+ svn add folder/now_WORKING_for_folder
A folder/now_WORKING_for_folder
+ svn rm file_with_props
D file_with_props
+ svn cp '^/other_file_with_props_at_2' file_with_props
A file_with_props
+ tmp=/tmp/testing_BASE
+ mkdir -p /tmp/testing_BASE
+ svn st
R + file
A + folder
M + folder/file.r2
A folder/now_WORKING_for_folder
R + file_with_props
+ set +e
+ svn cat file_at_BASE
r2 for other_file, i.e. the *copied-here* file's history!
+ svn copy file_at_BASE copy_of_file
A copy_of_file
+ cat copy_of_file
r2 for other_file, i.e. the *copied-here* file's history!
+ svn st -v copy_of_file
A + - 2 neels copy_of_file
+ svn info copy_of_file
Path: copy_of_file
Name: copy_of_file
URL: file:///home/neels/hg/svn/tests/cat_replaced/repos/copy_of_file
Repository Root: file:///home/neels/hg/svn/tests/cat_replaced/repos
Repository UUID: 9ac0405a-0d94-11df-9f8f-4da5f8b8ed68
Revision: 4
Node Kind: file
Schedule: add
Copied From URL: file:///home/neels/hg/svn/tests/cat_replaced/repos/other_file
Copied From Rev: 2
Last Changed Author: neels
Last Changed Rev: 2
Last Changed Date: 2010-01-30 12:42:57 +0100 (Sat, 30 Jan 2010)
Text Last Updated: 2010-01-30 12:43:06 +0100 (Sat, 30 Jan 2010)
Checksum: 74caf578c8e8a5a1a206e5ee3a0deacc

+ svn copy -rBASE file copy2_of_file
A copy2_of_file
+ cat copy2_of_file
r2 for other_file, i.e. the *copied-here* file's history!
+ svn st -v copy2_of_file
A + - 2 neels copy2_of_file
+ svn info copy2_of_file
Path: copy2_of_file
Name: copy2_of_file
URL: file:///home/neels/hg/svn/tests/cat_replaced/repos/copy2_of_file
Repository Root: file:///home/neels/hg/svn/tests/cat_replaced/repos
Repository UUID: 9ac0405a-0d94-11df-9f8f-4da5f8b8ed68
Revision: 4
Node Kind: file
Schedule: add
Copied From URL: file:///home/neels/hg/svn/tests/cat_replaced/repos/other_file
Copied From Rev: 2
Last Changed Author: neels
Last Changed Rev: 2
Last Changed Date: 2010-01-30 12:42:57 +0100 (Sat, 30 Jan 2010)
Text Last Updated: 2010-01-30 12:43:07 +0100 (Sat, 30 Jan 2010)
Checksum: 74caf578c8e8a5a1a206e5ee3a0deacc

+ svn diff --old=file_at_BASE --new=file
Index: file
===================================================================
--- file (working copy)
+++ file (working copy)
@@ -1 +1,2 @@
 r2 for other_file, i.e. the *copied-here* file's history!
+now WORKING for file
+ svn diff -rBASE file
Index: file
===================================================================
--- file (working copy)
+++ file (working copy)
@@ -1 +1,2 @@
 r2 for other_file, i.e. the *copied-here* file's history!
+now WORKING for file
+ svn export file_at_BASE /tmp/testing_BASE/exported
Export complete.
+ cat /tmp/testing_BASE/exported
r2 for other_file, i.e. the *copied-here* file's history!
+ svn info file_at_BASE
Path: file
Name: file
URL: file:///home/neels/hg/svn/tests/cat_replaced/repos/file
Repository Root: file:///home/neels/hg/svn/tests/cat_replaced/repos
Repository UUID: 9ac0405a-0d94-11df-9f8f-4da5f8b8ed68
Revision: 4
Node Kind: file
Last Changed Author: neels
Last Changed Rev: 3
Last Changed Date: 2010-01-30 12:42:59 +0100 (Sat, 30 Jan 2010)

+ svn info -rBASE file
Path: other_file
Name: other_file
URL: file:///home/neels/hg/svn/tests/cat_replaced/repos/other_file
Repository Root: file:///home/neels/hg/svn/tests/cat_replaced/repos
Repository UUID: 9ac0405a-0d94-11df-9f8f-4da5f8b8ed68
Revision: 4
Node Kind: file
Last Changed Author: neels
Last Changed Rev: 4
Last Changed Date: 2010-01-30 12:43:01 +0100 (Sat, 30 Jan 2010)

+ svn info -rBASE file_at_BASE
Path: file
Name: file
URL: file:///home/neels/hg/svn/tests/cat_replaced/repos/file
Repository Root: file:///home/neels/hg/svn/tests/cat_replaced/repos
Repository UUID: 9ac0405a-0d94-11df-9f8f-4da5f8b8ed68
Revision: 4
Node Kind: file
Last Changed Author: neels
Last Changed Rev: 3
Last Changed Date: 2010-01-30 12:42:59 +0100 (Sat, 30 Jan 2010)

+ svn info file
Path: file
Name: file
URL: file:///home/neels/hg/svn/tests/cat_replaced/repos/file
Repository Root: file:///home/neels/hg/svn/tests/cat_replaced/repos
Repository UUID: 9ac0405a-0d94-11df-9f8f-4da5f8b8ed68
Revision: 4
Node Kind: file
Schedule: replace
Copied From URL: file:///home/neels/hg/svn/tests/cat_replaced/repos/other_file
Copied From Rev: 2
Last Changed Author: neels
Last Changed Rev: 2
Last Changed Date: 2010-01-30 12:42:57 +0100 (Sat, 30 Jan 2010)
Text Last Updated: 2010-01-30 12:43:03 +0100 (Sat, 30 Jan 2010)
Checksum: 74caf578c8e8a5a1a206e5ee3a0deacc

+ echo 'folder exists in -r1:2 and does not exist in -r3:4.'
folder exists in -r1:2 and does not exist in -r3:4.
+ svn list folder
file.r2
+ svn list -rBASE folder
file.r2
+ svn list folder_at_BASE
no,_this_is_revision_2_of_folder
this_is_revision_1_of_folder
+ svn list -rBASE folder_at_BASE
no,_this_is_revision_2_of_folder
this_is_revision_1_of_folder
+ svn mkdir folder/another_one
A folder/another_one
+ touch folder/unversioned
+ svn list folder
file.r2
+ svn rm --force folder/file.r2
D folder/file.r2
+ svn list folder
file.r2
+ svn list -rBASE folder
file.r2
+ svn list -rBASE folder_at_BASE
no,_this_is_revision_2_of_folder
this_is_revision_1_of_folder
+ svn list folder_at_BASE
no,_this_is_revision_2_of_folder
this_is_revision_1_of_folder
+ svn log -v file
------------------------------------------------------------------------
r4 | neels | 2010-01-30 12:43:01 +0100 (Sat, 30 Jan 2010) | 1 line
Changed paths:
   D /folder
   M /other_file
   M /other_file_with_props
   D /other_folder/file.r2
   A /other_folder/file.r4

r4
------------------------------------------------------------------------
r2 | neels | 2010-01-30 12:42:57 +0100 (Sat, 30 Jan 2010) | 1 line
Changed paths:
   M /file_with_props
   A /folder/no,_this_is_revision_2_of_folder
   A /other_file
   A /other_file_with_props
   A /other_folder
   A /other_folder/file.r2

r2
------------------------------------------------------------------------
+ svn log -v file_at_BASE
------------------------------------------------------------------------
r3 | neels | 2010-01-30 12:42:59 +0100 (Sat, 30 Jan 2010) | 1 line
Changed paths:
   M /file
   M /file_with_props
   A /folder/no,_this_is_revision_3_of_folder
   M /other_file_with_props
   A /other_folder/file.r3

r3
------------------------------------------------------------------------
r1 | neels | 2010-01-30 12:42:55 +0100 (Sat, 30 Jan 2010) | 1 line
Changed paths:
   A /file
   A /file_with_props
   A /folder
   A /folder/this_is_revision_1_of_folder
   A /old_state_of_file

r1
------------------------------------------------------------------------
+ svn log -v -rBASE file_at_BASE
------------------------------------------------------------------------
+ svn log -v -rBASE file
------------------------------------------------------------------------
r4 | neels | 2010-01-30 12:43:01 +0100 (Sat, 30 Jan 2010) | 1 line
Changed paths:
   D /folder
   M /other_file
   M /other_file_with_props
   D /other_folder/file.r2
   A /other_folder/file.r4

r4
------------------------------------------------------------------------
+ cat old_state_of_file
r1 for file, i.e. the deleted file's history.
+ svn merge --accept=postpone -r1:HEAD file old_state_of_file
--- Merging r2 through r4 into 'old_state_of_file':
U old_state_of_file
--- Recording mergeinfo for merge of r2 through r4 into 'old_state_of_file':
 U old_state_of_file
+ svn st old_state_of_file
MM old_state_of_file
+ cat old_state_of_file
r3 for file, i.e. the deleted file's history.
+ svn revert old_state_of_file
Reverted 'old_state_of_file'
+ cat old_state_of_file
r1 for file, i.e. the deleted file's history.
+ svn merge --accept=postpone -r1:HEAD file_at_BASE old_state_of_file
--- Merging r2 through r4 into 'old_state_of_file':
U old_state_of_file
--- Recording mergeinfo for merge of r2 through r4 into 'old_state_of_file':
 U old_state_of_file
+ svn st old_state_of_file
MM old_state_of_file
+ cat old_state_of_file
r3 for file, i.e. the deleted file's history.
+ svn revert old_state_of_file
Reverted 'old_state_of_file'
+ cat old_state_of_file
r1 for file, i.e. the deleted file's history.
+ svn merge --accept=postpone -r1:BASE file_at_BASE old_state_of_file
--- Merging r2 through r4 into 'old_state_of_file':
U old_state_of_file
--- Recording mergeinfo for merge of r2 through r4 into 'old_state_of_file':
 U old_state_of_file
+ svn st old_state_of_file
MM old_state_of_file
+ cat old_state_of_file
r3 for file, i.e. the deleted file's history.
+ svn revert old_state_of_file
Reverted 'old_state_of_file'
+ cat old_state_of_file
r1 for file, i.e. the deleted file's history.
+ svn merge --accept=postpone -r1:BASE file old_state_of_file
--- Merging r2 through r4 into 'old_state_of_file':
U old_state_of_file
--- Recording mergeinfo for merge of r2 through r4 into 'old_state_of_file':
 U old_state_of_file
+ svn st old_state_of_file
MM old_state_of_file
+ cat old_state_of_file
r3 for file, i.e. the deleted file's history.
+ svn mergeinfo file_at_BASE old_state_of_file
r3
+ svn proplist file_with_props
Properties on 'file_with_props':
  prop_r2_on_copied_here_file
  this_is_rev
+ svn proplist file_with_props_at_BASE
Properties on 'file_with_props':
  prop_r2_on_copied_here_file
  this_is_rev
+ svn propget this_is_rev file_with_props
copied_r2
+ svn propget this_is_rev file_with_props_at_BASE
copied_r2
+ svn propset --revprop -r1 testrevprop value_in_r1
property 'testrevprop' set on repository revision 1
+ svn propset --revprop -r2 testrevprop value_in_r2
property 'testrevprop' set on repository revision 2
+ svn propdel --revprop -rBASE testrevprop
subversion/svn/main.c:2244: (apr_err=205000)
svn: Try 'svn help' for more info
subversion/svn/propdel-cmd.c:108: (apr_err=205000)
subversion/svn/props.c:60: (apr_err=205000)
svn: Must specify the revision as a number, a date or 'HEAD' when operating on a revision property
+ svn propset --revprop -rBASE newrevprop new_value
subversion/svn/main.c:2244: (apr_err=205000)
svn: Try 'svn help' for more info
subversion/svn/propset-cmd.c:121: (apr_err=205000)
subversion/svn/props.c:60: (apr_err=205000)
svn: Must specify the revision as a number, a date or 'HEAD' when operating on a revision property
+ svn proplist --revprop -r1
Unversioned properties on revision 1:
  svn:log
  svn:author
  testrevprop
  svn:date
+ svn proplist --revprop -r2
Unversioned properties on revision 2:
  svn:log
  svn:author
  testrevprop
  svn:date
+ svn blame file
     - - r2 for other_file, i.e. the *copied-here* file's history!
     - - now WORKING for file
+ svn blame -rBASE file
     4 neels r4 for other_file, i.e. the copied-here file's *later* history!
+ svn blame -rBASE file_at_BASE
     3 neels r3 for file, i.e. the deleted file's history.
+ svn blame file_at_BASE
     3 neels r3 for file, i.e. the deleted file's history.
+ svn mkdir -m a_new_revision '^/r5'

Committed revision 5.
+ svn update -rBASE file
At revision 4.
+ ls -d r5
ls: cannot access r5: No such file or directory
+ svn up
A r5
Updated to revision 5.
+ cd r5
+ svn switch -rBASE ../folder
subversion/svn/switch-cmd.c:141: (apr_err=125002)
svn: '../folder' does not appear to be a URL
+ ls

svn, version 1.6.10 (dev build)
   compiled Jan 23 2010, 02:30:54

Copyright (C) 2000-2009 CollabNet.
Subversion is open source software, see http://subversion.tigris.org/
This product includes software developed by CollabNet (http://www.Collab.Net/).

The following repository access (RA) modules are available:

* ra_neon : Module for accessing a repository via WebDAV protocol using Neon.
  - handles 'http' scheme
  - handles 'https' scheme
* ra_svn : Module for accessing a repository using the svn network protocol.
  - handles 'svn' scheme
* ra_local : Module for accessing a repository on local disk.
  - handles 'file' scheme

+ cd wc
+ echo 'r1 for file, i.e. the deleted file'\''s history.'
+ cp file old_state_of_file
+ svn add file old_state_of_file
A file
A old_state_of_file
+ mkdir folder
+ echo r1
+ svn add folder
A folder
A folder/this_is_revision_1_of_folder
+ echo file_with_props
+ svn add file_with_props
A file_with_props
+ svn ps prop_r1_on_deleted_file value_r1 file_with_props
property 'prop_r1_on_deleted_file' set on 'file_with_props'
+ svn ps this_is_rev deleted_r1 file_with_props
property 'this_is_rev' set on 'file_with_props'
+ svn ci -mr1
Adding file
Adding file_with_props
Adding folder
Adding folder/this_is_revision_1_of_folder
Adding old_state_of_file
Transmitting file data ....
Committed revision 1.
+ svn up
At revision 1.
+ echo r2
+ svn add folder/no,_this_is_revision_2_of_folder
A folder/no,_this_is_revision_2_of_folder
+ svn ps prop_r2_on_deleted_file deleted_r2 file_with_props
property 'prop_r2_on_deleted_file' set on 'file_with_props'
+ svn ps this_is_rev deleted_r2 file_with_props
property 'this_is_rev' set on 'file_with_props'
+ echo 'r2 for other_file, i.e. the *copied-here* file'\''s history!'
+ svn add other_file
A other_file
+ mkdir other_folder
+ echo other_folder/file.r2.
+ svn add other_folder
A other_folder
A other_folder/file.r2
+ echo other_file_with_props
+ svn add other_file_with_props
A other_file_with_props
+ svn ps prop_r2_on_copied_here_file copied_r2 other_file_with_props
property 'prop_r2_on_copied_here_file' set on 'other_file_with_props'
+ svn ps this_is_rev copied_r2 other_file_with_props
property 'this_is_rev' set on 'other_file_with_props'
+ svn ci -mr2
Sending file_with_props
Adding folder/no,_this_is_revision_2_of_folder
Adding other_file
Adding other_file_with_props
Adding other_folder
Adding other_folder/file.r2
Transmitting file data ....
Committed revision 2.
+ svn up
At revision 2.
+ echo r3
+ svn add folder/no,_this_is_revision_3_of_folder
A folder/no,_this_is_revision_3_of_folder
+ echo 'r3 for file, i.e. the deleted file'\''s history.'
+ svn ps prop_r3_on_deleted_file deleted_r3 file_with_props
property 'prop_r3_on_deleted_file' set on 'file_with_props'
+ svn ps this_is_rev deleted_r3 file_with_props
property 'this_is_rev' set on 'file_with_props'
+ svn ps prop_r3_on_deleted_file deleted_r3 file_with_props
property 'prop_r3_on_deleted_file' set on 'file_with_props'
+ svn ps this_is_rev copied_r3 other_file_with_props
property 'this_is_rev' set on 'other_file_with_props'
+ echo other_folder/file.r3.
+ svn add other_folder/file.r3
A other_folder/file.r3
+ svn ci -mr3
Sending file
Sending file_with_props
Adding folder/no,_this_is_revision_3_of_folder
Sending other_file_with_props
Adding other_folder/file.r3
Transmitting file data ...
Committed revision 3.
+ svn up
At revision 3.
+ svn rm folder
D folder/this_is_revision_1_of_folder
D folder/no,_this_is_revision_2_of_folder
D folder/no,_this_is_revision_3_of_folder
D folder
+ echo 'r4 for other_file, i.e. the copied-here file'\''s *later* history!'
+ svn rm other_folder/file.r2
D other_folder/file.r2
+ echo other_folder/file.r4.
+ svn add other_folder/file.r4
A other_folder/file.r4
+ svn ps prop_r4_on_copied_here_file copied_r4 other_file_with_props
property 'prop_r4_on_copied_here_file' set on 'other_file_with_props'
+ svn ps this_is_rev copied_r4 other_file_with_props
property 'this_is_rev' set on 'other_file_with_props'
+ svn ci -mr4
Deleting folder
Sending other_file
Sending other_file_with_props
Deleting other_folder/file.r2
Adding other_folder/file.r4
Transmitting file data ..
Committed revision 4.
+ svn up
At revision 4.
+ svn rm file
D file
+ svn cp '^/other_file_at_2' file
A file
+ echo 'now WORKING for file'
+ svn cp '^/other_folder_at_2' folder
A folder/file.r2
Checked out revision 2.
A folder
+ echo 'now WORKING for folder/file.r2'
+ echo new
+ svn add folder/now_WORKING_for_folder
A folder/now_WORKING_for_folder
+ svn rm file_with_props
D file_with_props
+ svn cp '^/other_file_with_props_at_2' file_with_props
A file_with_props
+ tmp=/tmp/testing_BASE
+ mkdir -p /tmp/testing_BASE
+ svn st
R + file
A + folder
M + folder/file.r2
A folder/now_WORKING_for_folder
R + file_with_props
+ set +e
+ svn cat file_at_BASE
r2 for other_file, i.e. the *copied-here* file's history!
+ svn copy file_at_BASE copy_of_file
A copy_of_file
+ cat copy_of_file
r2 for other_file, i.e. the *copied-here* file's history!
+ svn st -v copy_of_file
A + - 2 neels copy_of_file
+ svn info copy_of_file
Path: copy_of_file
Name: copy_of_file
URL: file:///home/neels/hg/svn/tests/cat_replaced/repos/copy_of_file
Repository Root: file:///home/neels/hg/svn/tests/cat_replaced/repos
Revision: 4
Node Kind: file
Schedule: add
Copied From URL: file:///home/neels/hg/svn/tests/cat_replaced/repos/other_file
Copied From Rev: 2
Last Changed Author: neels
Last Changed Rev: 2
Last Changed Date: 2010-01-30 12:26:12 +0100 (Sat, 30 Jan 2010)
Text Last Updated: 2010-01-30 12:26:21 +0100 (Sat, 30 Jan 2010)
Checksum: 74caf578c8e8a5a1a206e5ee3a0deacc

+ svn copy -rBASE file copy2_of_file
A copy2_of_file
+ cat copy2_of_file
r2 for other_file, i.e. the *copied-here* file's history!
+ svn st -v copy2_of_file
A + - 2 neels copy2_of_file
+ svn info copy2_of_file
Path: copy2_of_file
Name: copy2_of_file
URL: file:///home/neels/hg/svn/tests/cat_replaced/repos/copy2_of_file
Repository Root: file:///home/neels/hg/svn/tests/cat_replaced/repos
Revision: 4
Node Kind: file
Schedule: add
Copied From URL: file:///home/neels/hg/svn/tests/cat_replaced/repos/other_file
Copied From Rev: 2
Last Changed Author: neels
Last Changed Rev: 2
Last Changed Date: 2010-01-30 12:26:12 +0100 (Sat, 30 Jan 2010)
Text Last Updated: 2010-01-30 12:26:22 +0100 (Sat, 30 Jan 2010)
Checksum: 74caf578c8e8a5a1a206e5ee3a0deacc

+ svn diff --old=file_at_BASE --new=file
Index: file
===================================================================
--- file (revision 4)
+++ file (working copy)
@@ -1 +1,2 @@
 r2 for other_file, i.e. the *copied-here* file's history!
+now WORKING for file
+ svn diff -rBASE file
Index: file
===================================================================
--- file (revision 4)
+++ file (working copy)
@@ -1 +1,2 @@
 r2 for other_file, i.e. the *copied-here* file's history!
+now WORKING for file
+ svn export file_at_BASE /tmp/testing_BASE/exported
Export complete.
+ cat /tmp/testing_BASE/exported
r2 for other_file, i.e. the *copied-here* file's history!
+ svn info file_at_BASE
Path: file
Name: file
URL: file:///home/neels/hg/svn/tests/cat_replaced/repos/file
Repository Root: file:///home/neels/hg/svn/tests/cat_replaced/repos
Repository UUID: 4315d70e-0d92-11df-979a-4964b7e6c33c
Revision: 4
Node Kind: file
Last Changed Author: neels
Last Changed Rev: 3
Last Changed Date: 2010-01-30 12:26:14 +0100 (Sat, 30 Jan 2010)

+ svn info -rBASE file
Path: other_file
Name: other_file
URL: file:///home/neels/hg/svn/tests/cat_replaced/repos/other_file
Repository Root: file:///home/neels/hg/svn/tests/cat_replaced/repos
Repository UUID: 4315d70e-0d92-11df-979a-4964b7e6c33c
Revision: 4
Node Kind: file
Last Changed Author: neels
Last Changed Rev: 4
Last Changed Date: 2010-01-30 12:26:16 +0100 (Sat, 30 Jan 2010)

+ svn info -rBASE file_at_BASE
Path: file
Name: file
URL: file:///home/neels/hg/svn/tests/cat_replaced/repos/file
Repository Root: file:///home/neels/hg/svn/tests/cat_replaced/repos
Repository UUID: 4315d70e-0d92-11df-979a-4964b7e6c33c
Revision: 4
Node Kind: file
Last Changed Author: neels
Last Changed Rev: 3
Last Changed Date: 2010-01-30 12:26:14 +0100 (Sat, 30 Jan 2010)

+ svn info file
Path: file
Name: file
URL: file:///home/neels/hg/svn/tests/cat_replaced/repos/file
Repository Root: file:///home/neels/hg/svn/tests/cat_replaced/repos
Revision: 4
Node Kind: file
Schedule: replace
Copied From URL: file:///home/neels/hg/svn/tests/cat_replaced/repos/other_file
Copied From Rev: 2
Last Changed Author: neels
Last Changed Rev: 2
Last Changed Date: 2010-01-30 12:26:12 +0100 (Sat, 30 Jan 2010)
Text Last Updated: 2010-01-30 12:26:18 +0100 (Sat, 30 Jan 2010)
Checksum: 74caf578c8e8a5a1a206e5ee3a0deacc

+ echo 'folder exists in -r1:2 and does not exist in -r3:4.'
folder exists in -r1:2 and does not exist in -r3:4.
+ svn list folder
file.r2
+ svn list -rBASE folder
file.r2
+ svn list folder_at_BASE
no,_this_is_revision_2_of_folder
this_is_revision_1_of_folder
+ svn list -rBASE folder_at_BASE
no,_this_is_revision_2_of_folder
this_is_revision_1_of_folder
+ svn mkdir folder/another_one
A folder/another_one
+ touch folder/unversioned
+ svn list folder
file.r2
+ svn rm --force folder/file.r2
D folder/file.r2
+ svn list folder
file.r2
+ svn list -rBASE folder
file.r2
+ svn list -rBASE folder_at_BASE
no,_this_is_revision_2_of_folder
this_is_revision_1_of_folder
+ svn list folder_at_BASE
no,_this_is_revision_2_of_folder
this_is_revision_1_of_folder
+ svn log -v file
------------------------------------------------------------------------
r3 | neels | 2010-01-30 12:26:14 +0100 (Sat, 30 Jan 2010) | 1 line
Changed paths:
   M /file
   M /file_with_props
   A /folder/no,_this_is_revision_3_of_folder
   M /other_file_with_props
   A /other_folder/file.r3

r3
------------------------------------------------------------------------
r1 | neels | 2010-01-30 12:26:10 +0100 (Sat, 30 Jan 2010) | 1 line
Changed paths:
   A /file
   A /file_with_props
   A /folder
   A /folder/this_is_revision_1_of_folder
   A /old_state_of_file

r1
------------------------------------------------------------------------
+ svn log -v file_at_BASE
------------------------------------------------------------------------
r3 | neels | 2010-01-30 12:26:14 +0100 (Sat, 30 Jan 2010) | 1 line
Changed paths:
   M /file
   M /file_with_props
   A /folder/no,_this_is_revision_3_of_folder
   M /other_file_with_props
   A /other_folder/file.r3

r3
------------------------------------------------------------------------
r1 | neels | 2010-01-30 12:26:10 +0100 (Sat, 30 Jan 2010) | 1 line
Changed paths:
   A /file
   A /file_with_props
   A /folder
   A /folder/this_is_revision_1_of_folder
   A /old_state_of_file

r1
------------------------------------------------------------------------
+ svn log -v -rBASE file_at_BASE
------------------------------------------------------------------------
+ svn log -v -rBASE file
------------------------------------------------------------------------
+ cat old_state_of_file
r1 for file, i.e. the deleted file's history.
+ svn merge --accept=postpone -r1:HEAD file old_state_of_file
--- Merging r2 through r4 into 'old_state_of_file':
U old_state_of_file
+ svn st old_state_of_file
MM old_state_of_file
+ cat old_state_of_file
r3 for file, i.e. the deleted file's history.
+ svn revert old_state_of_file
Reverted 'old_state_of_file'
+ cat old_state_of_file
r1 for file, i.e. the deleted file's history.
+ svn merge --accept=postpone -r1:HEAD file_at_BASE old_state_of_file
--- Merging r2 through r4 into 'old_state_of_file':
U old_state_of_file
+ svn st old_state_of_file
MM old_state_of_file
+ cat old_state_of_file
r3 for file, i.e. the deleted file's history.
+ svn revert old_state_of_file
Reverted 'old_state_of_file'
+ cat old_state_of_file
r1 for file, i.e. the deleted file's history.
+ svn merge --accept=postpone -r1:BASE file_at_BASE old_state_of_file
--- Merging r2 through r4 into 'old_state_of_file':
U old_state_of_file
+ svn st old_state_of_file
MM old_state_of_file
+ cat old_state_of_file
r3 for file, i.e. the deleted file's history.
+ svn revert old_state_of_file
Reverted 'old_state_of_file'
+ cat old_state_of_file
r1 for file, i.e. the deleted file's history.
+ svn merge --accept=postpone -r1:BASE file old_state_of_file
--- Merging r2 through r4 into 'old_state_of_file':
U old_state_of_file
+ svn st old_state_of_file
MM old_state_of_file
+ cat old_state_of_file
r3 for file, i.e. the deleted file's history.
+ svn mergeinfo file_at_BASE old_state_of_file
r3
+ svn proplist file_with_props
Properties on 'file_with_props':
  prop_r2_on_copied_here_file
  this_is_rev
+ svn proplist file_with_props_at_BASE
Properties on 'file_with_props':
  prop_r2_on_copied_here_file
  this_is_rev
+ svn propget this_is_rev file_with_props
copied_r2
+ svn propget this_is_rev file_with_props_at_BASE
copied_r2
+ svn propset --revprop -r1 testrevprop value_in_r1
property 'testrevprop' set on repository revision 1
+ svn propset --revprop -r2 testrevprop value_in_r2
property 'testrevprop' set on repository revision 2
+ svn propdel --revprop -rBASE testrevprop
subversion/svn/main.c:2129: (apr_err=205000)
svn: Try 'svn help' for more info
subversion/svn/props.c:54: (apr_err=205000)
svn: Must specify the revision as a number, a date or 'HEAD' when operating on a revision property
+ svn propset --revprop -rBASE newrevprop new_value
subversion/svn/main.c:2129: (apr_err=205000)
svn: Try 'svn help' for more info
subversion/svn/props.c:54: (apr_err=205000)
svn: Must specify the revision as a number, a date or 'HEAD' when operating on a revision property
+ svn proplist --revprop -r1
Unversioned properties on revision 1:
  svn:log
  svn:author
  testrevprop
  svn:date
+ svn proplist --revprop -r2
Unversioned properties on revision 2:
  svn:log
  svn:author
  testrevprop
  svn:date
+ svn blame file
     4 neels r4 for other_file, i.e. the copied-here file's *later* history!
+ svn blame -rBASE file
     4 neels r4 for other_file, i.e. the copied-here file's *later* history!
+ svn blame -rBASE file_at_BASE
     3 neels r3 for file, i.e. the deleted file's history.
+ svn blame file_at_BASE
     3 neels r3 for file, i.e. the deleted file's history.
+ svn mkdir -m a_new_revision '^/r5'

Committed revision 5.
+ svn update -rBASE file
At revision 4.
+ ls -d r5
ls: cannot access r5: No such file or directory
+ svn up
A r5
Updated to revision 5.
+ cd r5
+ svn switch -rBASE ../folder
subversion/svn/switch-cmd.c:136: (apr_err=125002)
svn: '../folder' does not appear to be a URL
+ ls

#!/bin/bash

## TO MAKE THIS RUN YOUR CUSTOM COMPILED SVN, two simple options:
## 1. Adjust your PATH to point at your custom installed location:
## export PATH="$HOME/prefix/svn_trunk/bin:$PATH"
## OR
## 2. Uncomment the four lines below to use aliases into your
## built source tree. The next line is the only line you should
## need to adjust.
# SVNDIR=/path/to/built_subversion_source_tree
# function svn() { ${SVNDIR}/subversion/svn/svn "$@"; }
# function svnserve() { ${SVNDIR}/subversion/svnserve/svnserve "$@"; }
# function svnadmin() { ${SVNDIR}/subversion/svnadmin/svnadmin "$@"; }

set -e

svn --version
REPOS="`pwd`/repos"
URL="file://$REPOS"
rm -rf repos wc
svnadmin create repos
cat > repos/hooks/pre-revprop-change <<EOF
#!/bin/sh
exit 0;
EOF
chmod a+x repos/hooks/pre-revprop-change

svn co -q ${URL} wc

set -x
cd wc

## ACTUAL TEST

# make a file that is locally replaced...
echo "r1 for file, i.e. the deleted file's history." > file
cp file old_state_of_file
svn add file old_state_of_file

mkdir folder
echo "r1" > folder/this_is_revision_1_of_folder
svn add folder

echo file_with_props > file_with_props
svn add file_with_props
svn ps prop_r1_on_deleted_file value_r1 file_with_props
svn ps this_is_rev deleted_r1 file_with_props

svn ci -mr1
svn up

echo "r2" > folder/no,_this_is_revision_2_of_folder
svn add folder/no,_this_is_revision_2_of_folder

svn ps prop_r2_on_deleted_file deleted_r2 file_with_props
svn ps this_is_rev deleted_r2 file_with_props

echo "r2 for other_file, i.e. the *copied-here* file's history!" > other_file
svn add other_file

mkdir other_folder
echo other_folder/file.r2. > other_folder/file.r2
svn add other_folder

echo other_file_with_props > other_file_with_props
svn add other_file_with_props
svn ps prop_r2_on_copied_here_file copied_r2 other_file_with_props
svn ps this_is_rev copied_r2 other_file_with_props

svn ci -mr2
svn up

#svn rm folder

echo "r3" > folder/no,_this_is_revision_3_of_folder
svn add folder/no,_this_is_revision_3_of_folder

echo "r3 for file, i.e. the deleted file's history." > file
svn ps prop_r3_on_deleted_file deleted_r3 file_with_props
svn ps this_is_rev deleted_r3 file_with_props

svn ps prop_r3_on_deleted_file deleted_r3 file_with_props
svn ps this_is_rev copied_r3 other_file_with_props

echo other_folder/file.r3. > other_folder/file.r3
svn add other_folder/file.r3

svn ci -mr3
svn up

# to test log, remove these changes:
#echo "r4 for file, i.e. the deleted file's history." > file
#svn ps prop_r4_on_deleted_file deleted_r4 file_with_props
#svn ps this_is_rev deleted_r4 file_with_props

svn rm folder

echo "r4 for other_file, i.e. the copied-here file's *later* history!" > other_file

svn rm other_folder/file.r2
echo other_folder/file.r4. > other_folder/file.r4
svn add other_folder/file.r4

svn ps prop_r4_on_copied_here_file copied_r4 other_file_with_props
svn ps this_is_rev copied_r4 other_file_with_props

svn ci -mr4
svn up

svn rm file
svn cp ^/other_file_at_2 file
echo "now WORKING for file" >> file

svn cp ^/other_folder_at_2 folder
echo "now WORKING for folder/file.r2" >> folder/file.r2
echo new > folder/now_WORKING_for_folder
svn add folder/now_WORKING_for_folder

svn rm file_with_props
svn cp ^/other_file_with_props_at_2 file_with_props

tmp=/tmp/testing_BASE
mkdir -p "$tmp"

svn st

set +e

svn cat file_at_BASE

svn copy file_at_BASE copy_of_file
cat copy_of_file
svn st -v copy_of_file
svn info copy_of_file

svn copy -rBASE file copy2_of_file
cat copy2_of_file
svn st -v copy2_of_file
svn info copy2_of_file

svn diff --old=file_at_BASE --new=file
svn diff -rBASE file

svn export file_at_BASE "$tmp/exported"
cat "$tmp/exported"

svn info file_at_BASE
svn info -rBASE file
svn info -rBASE file_at_BASE
svn info file

echo "folder exists in -r1:2 and does not exist in -r3:4."
svn list folder
svn list -rBASE folder
svn list folder_at_BASE
svn list -rBASE folder_at_BASE
svn mkdir folder/another_one
touch folder/unversioned
svn list folder
svn rm --force folder/file.r2
svn list folder
svn list -rBASE folder
svn list -rBASE folder_at_BASE
svn list folder_at_BASE

svn log -v file
svn log -v file_at_BASE
svn log -v -rBASE file_at_BASE
svn log -v -rBASE file

cat old_state_of_file
svn merge --accept=postpone -r1:HEAD file old_state_of_file
svn st old_state_of_file
cat old_state_of_file
svn revert old_state_of_file
cat old_state_of_file
svn merge --accept=postpone -r1:HEAD file_at_BASE old_state_of_file
svn st old_state_of_file
cat old_state_of_file
svn revert old_state_of_file
cat old_state_of_file
svn merge --accept=postpone -r1:BASE file_at_BASE old_state_of_file
svn st old_state_of_file
cat old_state_of_file
svn revert old_state_of_file
cat old_state_of_file
svn merge --accept=postpone -r1:BASE file old_state_of_file
svn st old_state_of_file
cat old_state_of_file
# don't svn revert old_state_of_file for mergeinfo:

svn mergeinfo file_at_BASE old_state_of_file

svn proplist file_with_props
svn proplist file_with_props_at_BASE
#svn propedit

svn propget this_is_rev file_with_props
svn propget this_is_rev file_with_props_at_BASE

svn propset --revprop -r1 testrevprop value_in_r1
svn propset --revprop -r2 testrevprop value_in_r2
svn propdel --revprop -rBASE testrevprop
svn propset --revprop -rBASE newrevprop new_value
svn proplist --revprop -r1
svn proplist --revprop -r2

svn blame file
svn blame -rBASE file
svn blame -rBASE file_at_BASE
svn blame file_at_BASE

svn mkdir -m a_new_revision ^/r5
svn update -rBASE file
ls -d r5

svn up
cd r5
svn switch -rBASE ../folder
ls

Received on 2010-01-30 12:52:53 CET

This is an archived mail posted to the Subversion Dev mailing list.

This site is subject to the Apache Privacy Policy and the Apache Public Forum Archive Policy.