- Project tools
-
-
-
- How do I...
-
| Category |
Featured projects |
| scm |
Subversion,
Subclipse,
TortoiseSVN,
RapidSVN
|
| issuetrack |
Scarab |
| requirements |
xmlbasedsrs |
| design |
ArgoUML |
| techcomm |
SubEtha,
eyebrowse,
midgard,
cowiki |
| construction |
antelope,
scons,
frameworx,
build-interceptor,
propel,
phing
|
| testing |
maxq,
aut
|
| deployment |
current |
| process |
ReadySET |
| libraries |
GEF,
Axion,
Style,
SSTree
|
| Over 500 more tools... |
|
Click here to access Issue tracker direct from Eclipse or Visual Studio and to obtain other CollabNet integrations.
subversion Issue 3623
Query | Reports
Issue 3623
| Description: |
Opened: Thu Apr 29 09:35:00 -0700 2010 |
Sort by: Oldest first | Newest first |
Tobias Bading <tbading{_AT_}web.de> reports on the dev-list that when performing
a foreign repository merge, new files added via the merge lose all their properties.
Here's a modified version of his recipe script:
#!/bin/sh
##############################################################################
## ##
## Script to reproduce a bug where properties are lost in merges ##
## between two repositories. ##
## ##
##############################################################################
SVN=`which svn`
SVNADMIN=`which svnadmin`
SVN=/home/cmpilato/projects/subversion/trunk/subversion/svn/svn
SVNADMIN=/home/cmpilato/projects/subversion/trunk/subversion/svnadmin/svnadmin
URL1=file:///`pwd`/lost-props-repos1
URL2=file:///`pwd`/lost-props-repos2
rm -rf lost-props-repos1 lost-props-repos2 lost-props-wc1 lost-props-wc2
${SVNADMIN} create lost-props-repos1
${SVNADMIN} create lost-props-repos2
# setting up the first repository:
echo ""
echo "### Checking out working copy of first empty repository..."
${SVN} co -q ${URL1} lost-props-wc1
echo ""
echo "### Creating file 'configure' and assigning properties..."
echo "echo This sucks..." > lost-props-wc1/configure
chmod 755 lost-props-wc1/configure
${SVN} add -q lost-props-wc1/configure
${SVN} propset -q svn:eol-style native lost-props-wc1/configure
echo ""
echo "### Properties of file 'configure' in first working copy:"
${SVN} proplist -v lost-props-wc1/configure
echo ""
echo "### Commiting changes to first repository..."
${SVN} ci -m "file configure added" lost-props-wc1
echo ""
echo "### Properties of file 'configure' in first repository:"
echo "### (svn:executable and svn:eol-style should be set and are indeed set)"
${SVN} proplist -v ${URL1}/configure
echo ""
# merging into a working copy of the second repository:
echo "### Checking out working copy of second empty repository..."
${SVN} co -q ${URL2} lost-props-wc2
echo ""
echo "### Merging r1 of first repository into working copy of second repository..."
${SVN} merge -c 1 ${URL1} lost-props-wc2
echo ""
echo "### Properties of file 'configure' in second working copy:"
${SVN} proplist -v lost-props-wc2/configure
echo ""
echo "### Commiting changes to second repository..."
${SVN} ci -m "r1 merged" lost-props-wc2
echo ""
echo "### Properties of file 'configure' in second working copy after the commit:"
${SVN} proplist -v lost-props-wc2/configure
echo ""
echo "### Properties of file 'configure' in second repository:"
echo "### (svn:executable and svn:eol-style should be set but are NOT)"
${SVN} proplist -v ${URL2}/configure
echo ""
echo "### Diff of r1 in second repository:"
echo "### (should show property changes but does NOT)"
${SVN} diff -c 1 ${URL2}
echo ""
------- Additional comments from C. Michael Pilato Thu Apr 29 09:41:32 -0700 2010 -------
I've isolated the cause of this bug.
The code in the merge callbacks (merge_file_added) which handles newly added
files needs to treat adds from foreign repositories as pure adds -- without
history, with no base data, only working data scheduled for addition. (This is
different from same-repos merges, where adds are treated as copies from the
repository source, perhaps with local mods atop them.) But the code was doing a
part of this work differently from the same-repos case. (Specifically, it was
handling the copyfrom_url/rev correctly, but was still installing file contents
and props as base data, resulting in a working copy that appeared to have no
property changes. (It's puzzling to me why such files didn't also show up as
having no content, but...)
------- Additional comments from C. Michael Pilato Thu Apr 29 09:48:51 -0700 2010 -------
Extended a foreign repos merge test to catch this problem:
Sending cmdline/merge_tests.py
Transmitting file data .
Committed revision 939375.
------- Additional comments from C. Michael Pilato Thu Apr 29 09:50:12 -0700 2010 -------
And fix the bug on trunk:
Sending trunk/subversion/libsvn_client/merge.c
Transmitting file data .
Committed revision 939376.
------- Additional comments from C. Michael Pilato Thu Apr 29 09:57:05 -0700 2010 -------
And proposed for backport to 1.6.x.
------- Additional comments from Hyrum K. Wright Wed Feb 2 13:42:23 -0700 2011 -------
Updating milestone to match release.
|