> -----Original Message-----
> From: Mark Phippard [mailto:markphip_at_gmail.com]
> Sent: vrijdag 11 april 2008 15:35
> To: Bert Huijben
> Cc: dev_at_subversion.tigris.org
> Subject: Re: [PATCH] RE: Commit strips common prefix instead of current
> 2008/4/11 Bert Huijben <bert_at_vmoo.com>:
> > > -----Original Message-----
> > > From: Bert Huijben [mailto:bert_at_vmoo.com]
> > > Sent: donderdag 10 april 2008 12:03
> > > To: dev_at_subversion.tigris.org
> > > Subject: Commit strips common prefix instead of current directory
> > > RE: Commit notifies invalid paths (Issue #3168))
> > >
> > > I would like to send a patch to resolve this issue for 1.5, but I
> > > some
> > > more input on which solution to take.
> > Here is an initial patch which unbreaks the notifications and keeps
> > short
> > Notifications in the common cases.
> Did you do any investigation to determine what change broke this and
> introduced the problem? Also, a test case would be useful to have.
This mail got into my spam box :(
(Which I checked after reading #svn-dev on irc)
In my investigation I found out it probably never worked. At least not after
1.0 was released (all code around it is from the first few milestones and
not really touched after that).
The problem with the commit code is that all paths are normalized on a
calculated common parent directory containing all files to commit. All other
client handlers I checked just passes the given paths (absolute or relative)
around and gives those to the notify handler.
After normalizing the paths the commit gets the largest common path of the
current directory and the calculated common parent and passes that as the
path to make the notifications relative to. (This is suggested by the
variable names used)
The handler then uses the given path as the point to hide the first part of
the path (not to make the path relative to as the commit code assumed).
So both functions work correctly, following their own definition.. But the
result of those two combined is commit notifications use a not-relative and
a not-absolute path. (Which breaks using the notifications to keep an in
memory-file-state-cache up to date).
The real problem is: How can we fix this?
A user does not expect to see absolute paths when committing, unless he
passed absolute paths to 'svn ci' and he does not expect to see relative
paths if he passed only absolute paths.
(My patch only fixes the fact that the paths are invalid in specific cases..
But it will give you absolute paths in the notifications if you use 'svn ci
../file -m ""')
I will try if I can get some testcase running in the python framework \
The simple example
(From a working copy in /home/bert/tst/wc)
# mkdir b
# cd b
# svn mkdir ../a
# svn ci ../a -m ""
Transmitting file data .
Committed revision 1.
Shows the issue (but I think nobody noticed before).. There should have been
a 'Adding ../a' or 'Adding /home/bert/tst/wc/a', unless this case was
special cased in the notification handler (which it isn't)
Note that 'svn mkdir' does the right thing.
> Mark Phippard
To unsubscribe, e-mail: dev-unsubscribe_at_subversion.tigris.org
For additional commands, e-mail: dev-help_at_subversion.tigris.org
Received on 2008-05-01 00:17:07 CEST