On 06/12/2012 11:52 PM, C. Michael Pilato wrote:
> Per subversion/svn/conflict-callbacks.c:show_diff():
>
> if (desc->merged_file && desc->base_abspath)
> {
> /* Show the conflict markers to the user */
> path1 = desc->base_abspath;
> path2 = desc->merged_file;
> }
> else
> {
> /* There's no base file, but we can show the
> difference between mine and theirs. */
> path1 = desc->their_abspath;
> path2 = desc->my_abspath;
> }
>
> Neither of those looks especially "weird", so I'm not sure what you were
> seeing in your situation.
>
In attached test case, I get this with svn 1.7:
[[[
+ svn merge -c5 '^/branch' trunk/
Conflict discovered in '/tmp/diff-full-minimal.57U/wc/trunk/a'.
Select: (p) postpone, (df) diff-full, (e) edit,
(mc) mine-conflict, (tc) theirs-conflict,
(s) show all options: df
--- /tmp/svn-U7fgdO Wed Jun 13 13:45:59 2012
+++ /tmp/diff-full-minimal.57U/wc/.svn/tmp/a.tmp Wed Jun 13 13:45:59 2012
@@ -1,6 +1,10 @@
-apples
+<<<<<<< .working
+r3
+=======
+r5 <<< r5 conflicts with WC
+>>>>>>> .merge-right.r5
oranges
tomatoes
-r4
+cheese <<< r4 is also shown in the diff!?
potatoes
]]]
then postpone and svn diff shows:
[[[
[...]
Index: trunk/a
===================================================================
--- trunk/a (revision 5)
+++ trunk/a (working copy)
@@ -1,4 +1,8 @@
+<<<<<<< .working
r3
+=======
+r5
+>>>>>>> .merge-right.r5
oranges
tomatoes
cheese <<< no r4, as expected
]]]
So it's definitely different.
So in the diff-full above, I get an unrelated change of an earlier revision
that took place on the branch (r4) even though I'm cherry-picking only r5
from the branch. Definitely wrong.
~Neels
#!/usr/bin/env 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
BASE="$(mktemp -d "/tmp/$(basename "$0").XXX")"
echo "BASE = $BASE"
REPOS="$BASE/repos"
WC="$BASE/wc"
URL="file://$REPOS"
svnadmin create "$REPOS"
svn co -q "$URL" "$WC"
set +e
set -x
cd "$WC"
## ACTUAL TEST
mkdir trunk
echo "apples
oranges
tomatoes
cheese
potatoes
" > trunk/a
svn add trunk
svn ci -m1
svn cp -m2 ^/trunk ^/branch
svn up
change() {
sed -i "s/^$1\$/$2/" a
svn ci -mm
}
cd trunk
change apples r3
cd ..
cd branch
change cheese r4
change apples r5
cd ..
svn up
echo -e "df\np\n" | svn merge -c5 ^/branch trunk/
#svn merge -c5 ^/branch trunk/
svn diff
## END
set +x
echo "BASE = $BASE"
signature.asc
Description: OpenPGP digital signature

