You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Using the command-line adapter, I sometimes get incorrect results when requesting
getInfoFromWorkingCopy for a directory that contains both managed and unmanaged
entries.
In the implementation, the code first gets status information for the path, which
returns status information of all directory entries. The implementation then
incorrectly assumes the first entry is the directory itself. This is not true for
subversion v1.4.5.
Metadata Imported from Tigris (Issue 1264)
Creation Date: 2011-04-27 04:21:51
Reporter: bartvh
Subcomponent: svnClientAdapter
Version: 1.1.x
Milestone: not determined
Keywords:
Cc:
Comments
2011-04-27 04:23:09 by bartvh
Created an attachment (id=342)
proposed patch that will check all results instead of only the first one
Attachments
client-1.4-info.patch - proposed patch that will check all results instead of only the first one
Posted 2011-04-27 04:23:09 by bartvh
Index: src/commandline/org/tigris/subversion/svnclientadapter/commandline/CmdLineClientAdapter.java
===================================================================
--- src/commandline/org/tigris/subversion/svnclientadapter/commandline/CmdLineClientAdapter.java (revision 4859)
+++ src/commandline/org/tigris/subversion/svnclientadapter/commandline/CmdLineClientAdapter.java (working copy)
@@ -1286,12 +1286,17 @@
// first we get the status of the files to find out whether it is versioned
CmdLineStatusPart[] cmdLineStatusParts = getCmdStatuses(new File[] {path}, false, true, false, false);
// if the file is managed, it is safe to call info
- if ((cmdLineStatusParts.length > 0) && (cmdLineStatusParts[0].isManaged())) {
- String cmdLineInfoStrings = _cmd.info(new String[] { toString(path) }, null, null);
- return new CmdLineInfoPart(cmdLineInfoStrings);
- } else {
- return CmdLineInfoPart.createUnversioned(path.getPath());
+ for (int i = 0; i < cmdLineStatusParts.length; i++) {
+ if (cmdLineStatusParts[i].getPath().equals(path.getPath())) {
+ if (cmdLineStatusParts[i].isManaged()) {
+ String cmdLineInfoStrings = _cmd.info(new String[] { toString(path) }, null, null);
+ return new CmdLineInfoPart(cmdLineInfoStrings);
+ } else {
+ return CmdLineInfoPart.createUnversioned(path.getPath());
+ }
+ }
}
+ return CmdLineInfoPart.createUnversioned(path.getPath());
} catch (CmdLineException e) {
throw SVNClientException.wrapException(e);
}
The text was updated successfully, but these errors were encountered:
Description
Metadata Imported from Tigris (Issue 1264)
Comments
2011-04-27 04:23:09 by bartvh
Attachments
client-1.4-info.patch - proposed patch that will check all results instead of only the first one
Posted 2011-04-27 04:23:09 by bartvh
The text was updated successfully, but these errors were encountered: