|
List Info
Thread: diff/paths problem
|
|
| diff/paths problem |

|
2007-07-12 03:05:28 |
Hi,
Apologies in advance if this a newbie-type problem...
I've implemented a pre-commit hook in Java called from a
pre-commit.bat
file. The code is intended to check the log message for the
commit exists
and is valid (this works ok), and also does a diff and
checks the output for
conflict markers. It works ok when committing a single
file, but on
committing more than one file the second filenename gets
concatenated on to
the path to the first one, which makes the
SVNNodeEditor.diffImpl() method
blow up.
I'm using the SVNLookClientTrace, the code looks like this:
protected int checkForConflictMarkers() {
try {
FSRoot root =
fsfs.createTransactionRoot(txn.getTxnId());
long baseRevision = txn.getBaseRevision();
log("baserevision is "+baseRevision);
SVNLookClient lookClient = new SVNLookClient(
SVNWCUtil.createDefaultAuthenticationManager(),
SVNWCUtil.createDefaultOptions(true));
ByteArrayOutputStream out = new
ByteArrayOutputStream();
log("About to do the diff...");
lookClient.doGetDiff(fsfs.getRepositoryRoot(),
txn.getTxnId(),
false,
false,
true,
out);
if(findConflictMarkers(out.toString()))
return -1;
} catch (SVNException svne) {
svne.printStackTrace();
error("System error occurred.");
}
log("No conflict markers found, commit may
proceed.");
return 0; // checkin is permitted
}
output from the method looks like this:
About to do the diff...
entered diffImpl, path is: /
entered diffImpl, path is: /trunk
entered diffImpl, path is: /trunk/ClientApp
entered diffImpl, path is: /trunk/ClientApp/src
entered diffImpl, path is: /trunk/ClientApp/src/com
entered diffImpl, path is: /trunk/ClientApp/src/com/app
entered diffImpl, path is: /trunk/ClientApp/src/com/app/ui
entered diffImpl, path is:
/trunk/ClientApp/src/com/app/ui/module
entered diffImpl, path is:
/trunk/ClientApp/src/com/app/ui/module/model
entered diffImpl, path is:
/trunk/ClientApp/src/com/app/ui/module/model/OperatorAvailab
leOverridesMB.java
entered diffImpl, path is:
/trunk/ClientApp/src/com/app/ui/module/model/OperatorAvailab
leOverridesMB.java/OperatorDiaryMB.java
org.tmatesoft.svn.core.SVNException: svn: Failure opening
'/trunk/ClientApp/src/com/app/ui/module/model/OperatorAvaila
bleOverridesMB.java/OperatorDiaryMB.java'
svn:
'/trunk/ClientApp/src/com/app/ui/module/model/OperatorAvaila
bleOverridesMB.java'
is not a directory in filesystem
'd:svnrootTestEnterpriseAppdb'
at
org.tmatesoft.svn.core.internal.wc.SVNErrorManager.error(SVN
ErrorManager.java:49)
at
org.tmatesoft.svn.core.internal.io.fs.FSRoot.openPath(FSRoot
.java:119)
at
org.tmatesoft.svn.core.internal.io.fs.FSRoot.getRevisionNode
(FSRoot.java:51)
at
org.tmatesoft.svn.core.internal.wc.SVNNodeEditor.prepareTmpF
ile(SVNNodeEditor.java:320)
at
org.tmatesoft.svn.core.internal.wc.SVNNodeEditor.diffImpl(SV
NNodeEditor.java:235)
at
org.tmatesoft.svn.core.internal.wc.SVNNodeEditor.diffImpl(SV
NNodeEditor.java:313)
at
org.tmatesoft.svn.core.internal.wc.SVNNodeEditor.diffImpl(SV
NNodeEditor.java:313)
at
org.tmatesoft.svn.core.internal.wc.SVNNodeEditor.diffImpl(SV
NNodeEditor.java:313)
at
org.tmatesoft.svn.core.internal.wc.SVNNodeEditor.diffImpl(SV
NNodeEditor.java:313)
at
org.tmatesoft.svn.core.internal.wc.SVNNodeEditor.diffImpl(SV
NNodeEditor.java:313)
at
org.tmatesoft.svn.core.internal.wc.SVNNodeEditor.diffImpl(SV
NNodeEditor.java:313)
at
org.tmatesoft.svn.core.internal.wc.SVNNodeEditor.diffImpl(SV
NNodeEditor.java:313)
at
org.tmatesoft.svn.core.internal.wc.SVNNodeEditor.diffImpl(SV
NNodeEditor.java:313)
at
org.tmatesoft.svn.core.internal.wc.SVNNodeEditor.diffImpl(SV
NNodeEditor.java:313)
at
org.tmatesoft.svn.core.internal.wc.SVNNodeEditor.diff(SVNNod
eEditor.java:192)
at
precommithook.PreCommitHook.checkForConflictMarkers(PreCommi
tHook.java:182)
at precommithook.PreCommitHook.main(PreCommitHook.java:94)
Any help greatly appreciated...
Thanks,
Tim
--
View this message in context: http://www.nabble.com/diff-paths-problem-tf4066
635.html#a11555390
Sent from the SVNKit - Users mailing list archive at
Nabble.com.
------------------------------------------------------------
---------
To unsubscribe, e-mail: svnkit-users-unsubscribe svnkit.com
For additional commands, e-mail: svnkit-users-help svnkit.com
|
|
| Re: diff/paths problem |

|
2007-07-12 04:15:58 |
Hello Tim,
Does the latest code from trunk also fails? You can get a
fresh hight
build from https://teamcity.svnkit.c
om - follow artifacts link for the
svnkit.trunk full project configuration. If it fails,
please, give us a
sign here.
----
Alexander Sinyushkin,
TMate Software,
http://svnkit.com/ - Java
[Sub]Versioning Library!
Tim wrote:
> Hi,
>
> Apologies in advance if this a newbie-type problem...
>
> I've implemented a pre-commit hook in Java called from
a pre-commit.bat
> file. The code is intended to check the log message
for the commit exists
> and is valid (this works ok), and also does a diff and
checks the output for
> conflict markers. It works ok when committing a single
file, but on
> committing more than one file the second filenename
gets concatenated on to
> the path to the first one, which makes the
SVNNodeEditor.diffImpl() method
> blow up.
> I'm using the SVNLookClientTrace, the code looks like
this:
> protected int checkForConflictMarkers() {
>
> try {
> FSRoot root =
fsfs.createTransactionRoot(txn.getTxnId());
>
> long baseRevision = txn.getBaseRevision();
> log("baserevision is
"+baseRevision);
> SVNLookClient lookClient = new
SVNLookClient(
>
> SVNWCUtil.createDefaultAuthenticationManager(),
>
> SVNWCUtil.createDefaultOptions(true));
>
> ByteArrayOutputStream out = new
ByteArrayOutputStream();
> log("About to do the diff...");
>
>
lookClient.doGetDiff(fsfs.getRepositoryRoot(),
> txn.getTxnId(),
> false,
> false,
> true,
> out);
>
> if(findConflictMarkers(out.toString()))
> return -1;
>
> } catch (SVNException svne) {
> svne.printStackTrace();
> error("System error occurred.");
> }
>
> log("No conflict markers found, commit may
proceed.");
> return 0; // checkin is permitted
> }
>
> output from the method looks like this:
>
> About to do the diff...
> entered diffImpl, path is: /
> entered diffImpl, path is: /trunk
> entered diffImpl, path is: /trunk/ClientApp
> entered diffImpl, path is: /trunk/ClientApp/src
> entered diffImpl, path is: /trunk/ClientApp/src/com
> entered diffImpl, path is:
/trunk/ClientApp/src/com/app
> entered diffImpl, path is:
/trunk/ClientApp/src/com/app/ui
> entered diffImpl, path is:
/trunk/ClientApp/src/com/app/ui/module
> entered diffImpl, path is:
/trunk/ClientApp/src/com/app/ui/module/model
> entered diffImpl, path is:
>
/trunk/ClientApp/src/com/app/ui/module/model/OperatorAvailab
leOverridesMB.java
> entered diffImpl, path is:
>
/trunk/ClientApp/src/com/app/ui/module/model/OperatorAvailab
leOverridesMB.java/OperatorDiaryMB.java
> org.tmatesoft.svn.core.SVNException: svn: Failure
opening
>
'/trunk/ClientApp/src/com/app/ui/module/model/OperatorAvaila
bleOverridesMB.java/OperatorDiaryMB.java'
> svn:
>
'/trunk/ClientApp/src/com/app/ui/module/model/OperatorAvaila
bleOverridesMB.java'
> is not a directory in filesystem
'd:svnrootTestEnterpriseAppdb'
> at
>
org.tmatesoft.svn.core.internal.wc.SVNErrorManager.error(SVN
ErrorManager.java:49)
> at
org.tmatesoft.svn.core.internal.io.fs.FSRoot.openPath(FSRoot
.java:119)
> at
>
org.tmatesoft.svn.core.internal.io.fs.FSRoot.getRevisionNode
(FSRoot.java:51)
> at
>
org.tmatesoft.svn.core.internal.wc.SVNNodeEditor.prepareTmpF
ile(SVNNodeEditor.java:320)
> at
>
org.tmatesoft.svn.core.internal.wc.SVNNodeEditor.diffImpl(SV
NNodeEditor.java:235)
> at
>
org.tmatesoft.svn.core.internal.wc.SVNNodeEditor.diffImpl(SV
NNodeEditor.java:313)
> at
>
org.tmatesoft.svn.core.internal.wc.SVNNodeEditor.diffImpl(SV
NNodeEditor.java:313)
> at
>
org.tmatesoft.svn.core.internal.wc.SVNNodeEditor.diffImpl(SV
NNodeEditor.java:313)
> at
>
org.tmatesoft.svn.core.internal.wc.SVNNodeEditor.diffImpl(SV
NNodeEditor.java:313)
> at
>
org.tmatesoft.svn.core.internal.wc.SVNNodeEditor.diffImpl(SV
NNodeEditor.java:313)
> at
>
org.tmatesoft.svn.core.internal.wc.SVNNodeEditor.diffImpl(SV
NNodeEditor.java:313)
> at
>
org.tmatesoft.svn.core.internal.wc.SVNNodeEditor.diffImpl(SV
NNodeEditor.java:313)
> at
>
org.tmatesoft.svn.core.internal.wc.SVNNodeEditor.diffImpl(SV
NNodeEditor.java:313)
> at
>
org.tmatesoft.svn.core.internal.wc.SVNNodeEditor.diffImpl(SV
NNodeEditor.java:313)
> at
>
org.tmatesoft.svn.core.internal.wc.SVNNodeEditor.diff(SVNNod
eEditor.java:192)
> at
>
precommithook.PreCommitHook.checkForConflictMarkers(PreCommi
tHook.java:182)
> at
precommithook.PreCommitHook.main(PreCommitHook.java:94)
>
> Any help greatly appreciated...
>
> Thanks,
>
> Tim
>
>
>
------------------------------------------------------------
---------
To unsubscribe, e-mail: svnkit-users-unsubscribe svnkit.com
For additional commands, e-mail: svnkit-users-help svnkit.com
|
|
| Re: diff/paths problem |

|
2007-07-12 04:48:36 |
Hi
Just tried the latest nightly build (1.3.1.3176) and yes, it
still fails.
cheers
Tim
Alexander Sinyushkin-2 wrote:
>
> Hello Tim,
>
> Does the latest code from trunk also fails? You can get
a fresh hight
> build from https://teamcity.svnkit.c
om - follow artifacts link for the
> svnkit.trunk full project configuration. If it fails,
please, give us a
> sign here.
>
> ----
> Alexander Sinyushkin,
> TMate Software,
> http://svnkit.com/ -
Java [Sub]Versioning Library!
>
>
--
View this message in context: http://www.nabble.com/diff-paths-problem-tf4066
635.html#a11556700
Sent from the SVNKit - Users mailing list archive at
Nabble.com.
------------------------------------------------------------
---------
To unsubscribe, e-mail: svnkit-users-unsubscribe svnkit.com
For additional commands, e-mail: svnkit-users-help svnkit.com
|
|
| Re: diff/paths problem |

|
2007-07-12 08:05:44 |
Might there be something wrong in the way I'm using
SVNLookClient.doGetDiff()? I'm presuming that a diff is
performed for each
file involved in the commit transaction, and the results of
each diff
written to the output stream.
I shouldn't be getting all of the files from the
transaction, then iterating
over them calling 'diff' should I?
Timsk wrote:
>
> Hi
>
> Just tried the latest nightly build (1.3.1.3176) and
yes, it still fails.
>
> cheers
>
> Tim
>
>
> Alexander Sinyushkin-2 wrote:
>>
>> Hello Tim,
>>
>> Does the latest code from trunk also fails? You can
get a fresh hight
>> build from https://teamcity.svnkit.c
om - follow artifacts link for the
>> svnkit.trunk full project configuration. If it
fails, please, give us a
>> sign here.
>>
>> ----
>> Alexander Sinyushkin,
>> TMate Software,
>> http://svnkit.com/
- Java [Sub]Versioning Library!
>>
>>
>
>
--
View this message in context: http://www.nabble.com/diff-paths-problem-tf4066
635.html#a11559587
Sent from the SVNKit - Users mailing list archive at
Nabble.com.
------------------------------------------------------------
---------
To unsubscribe, e-mail: svnkit-users-unsubscribe svnkit.com
For additional commands, e-mail: svnkit-users-help svnkit.com
|
|
| Re: diff/paths problem |

|
2007-07-12 09:38:37 |
Hello Tim,
> I shouldn't be getting all of the files from the
transaction, then
iterating
> over them calling 'diff' should I?
No, doGetDiff() should work just as the command svnlook diff
works, i.e.
getting diff for multiple files is valid, there must be a
big in
SVNNodeEditor. Could you please send us a copy of your
repository (if it
is not huge) with the transaction in question for us to be
able to
reproduce the bug?
----
Alexander Sinyushkin,
TMate Software,
http://svnkit.com/ - Java
[Sub]Versioning Library!
Tim wrote:
> Might there be something wrong in the way I'm using
> SVNLookClient.doGetDiff()? I'm presuming that a diff
is performed for each
> file involved in the commit transaction, and the
results of each diff
> written to the output stream.
> I shouldn't be getting all of the files from the
transaction, then iterating
> over them calling 'diff' should I?
>
>
> Timsk wrote:
>> Hi
>>
>> Just tried the latest nightly build (1.3.1.3176)
and yes, it still fails.
>>
>> cheers
>>
>> Tim
>>
>>
>> Alexander Sinyushkin-2 wrote:
>>> Hello Tim,
>>>
>>> Does the latest code from trunk also fails? You
can get a fresh hight
>>> build from https://teamcity.svnkit.c
om - follow artifacts link for the
>>> svnkit.trunk full project configuration. If it
fails, please, give us a
>>> sign here.
>>>
>>> ----
>>> Alexander Sinyushkin,
>>> TMate Software,
>>> http://svnkit.com/ - Java
[Sub]Versioning Library!
>>>
>>>
>>
>
------------------------------------------------------------
---------
To unsubscribe, e-mail: svnkit-users-unsubscribe svnkit.com
For additional commands, e-mail: svnkit-users-help svnkit.com
|
|
| Re: diff/paths problem |

|
2007-07-12 09:59:02 |
Hello Tim,
I seem to have fixed the bug but am not sure for 100%. Could
you try the
latest code in trunk (it was committed in revision 3222).
Thanks.
----
Alexander Sinyushkin,
TMate Software,
http://svnkit.com/ - Java
[Sub]Versioning Library!
Timsk wrote:
> Might there be something wrong in the way I'm using
> SVNLookClient.doGetDiff()? I'm presuming that a diff
is performed for each
> file involved in the commit transaction, and the
results of each diff
> written to the output stream.
> I shouldn't be getting all of the files from the
transaction, then iterating
> over them calling 'diff' should I?
>
>
> Timsk wrote:
>> Hi
>>
>> Just tried the latest nightly build (1.3.1.3176)
and yes, it still fails.
>>
>> cheers
>>
>> Tim
>>
>>
>> Alexander Sinyushkin-2 wrote:
>>> Hello Tim,
>>>
>>> Does the latest code from trunk also fails? You
can get a fresh hight
>>> build from https://teamcity.svnkit.c
om - follow artifacts link for the
>>> svnkit.trunk full project configuration. If it
fails, please, give us a
>>> sign here.
>>>
>>> ----
>>> Alexander Sinyushkin,
>>> TMate Software,
>>> http://svnkit.com/ - Java
[Sub]Versioning Library!
>>>
>>>
>>
>
------------------------------------------------------------
---------
To unsubscribe, e-mail: svnkit-users-unsubscribe svnkit.com
For additional commands, e-mail: svnkit-users-help svnkit.com
|
|
| Re: diff/paths problem |

|
2007-07-13 05:24:18 |
Yes, that's 100% ok now. Thanks for the fix!
Tim
Alexander Sinyushkin-2 wrote:
>
> Hello Tim,
>
> I seem to have fixed the bug but am not sure for 100%.
Could you try the
> latest code in trunk (it was committed in revision
3222). Thanks.
>
> ----
> Alexander Sinyushkin,
> TMate Software,
> http://svnkit.com/ -
Java [Sub]Versioning Library!
>
> Timsk wrote:
>> Might there be something wrong in the way I'm
using
>> SVNLookClient.doGetDiff()? I'm presuming that a
diff is performed for
>> each
>> file involved in the commit transaction, and the
results of each diff
>> written to the output stream.
>> I shouldn't be getting all of the files from the
transaction, then
>> iterating
>> over them calling 'diff' should I?
>>
>>
>> Timsk wrote:
>>> Hi
>>>
>>> Just tried the latest nightly build
(1.3.1.3176) and yes, it still
>>> fails.
>>>
>>> cheers
>>>
>>> Tim
>>>
>>>
>>> Alexander Sinyushkin-2 wrote:
>>>> Hello Tim,
>>>>
>>>> Does the latest code from trunk also fails?
You can get a fresh hight
>>>> build from https://teamcity.svnkit.c
om - follow artifacts link for the
>>>> svnkit.trunk full project configuration. If
it fails, please, give us a
>>>> sign here.
>>>>
>>>> ----
>>>> Alexander Sinyushkin,
>>>> TMate Software,
>>>> http://svnkit.com/ - Java
[Sub]Versioning Library!
>>>>
>>>>
>>>
>>
>
>
------------------------------------------------------------
---------
> To unsubscribe, e-mail: svnkit-users-unsubscribe svnkit.com
> For additional commands, e-mail: svnkit-users-help svnkit.com
>
>
>
--
View this message in context: http://www.nabble.com/diff-paths-problem-tf4066
635.html#a11576820
Sent from the SVNKit - Users mailing list archive at
Nabble.com.
------------------------------------------------------------
---------
To unsubscribe, e-mail: svnkit-users-unsubscribe svnkit.com
For additional commands, e-mail: svnkit-users-help svnkit.com
|
|
[1-7]
|
|