New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Use XML output to compute SVN.is_pristine() #3653
Use XML output to compute SVN.is_pristine() #3653
Conversation
Note.- If externals do not define a revision the |
class SVNToolTestsPristineWithExternals(SVNLocalRepoTestCase): | ||
|
||
def _propset_cmd(self, relpath, rev, url): | ||
return 'propset svn:externals "{} -r{} {}" .'.format(relpath, rev, url) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I thought the definition is `svn:externals "-r148 http://svn.example.com/skinproj third-party/skins", so ' relpath' and 'revsion' changed
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I just recognized, that this is the new scheme (from Subversion 1.5). The old is still usable.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
These means, we have to check both schemes, because we have to find the revision & local path of it. We have to watch, because there are also some different whitepace possibilities:
$ svn propget svn:externals paint
http://svn.thirdparty.com/repos/My%20Project "My Project"
http://svn.thirdparty.com/repos/%22Quotes%20Too%22 \"Quotes\ Too\"
$
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
But Conan works only from the consumer point of view, and I hope --xml
output will be the same regardless of the externals property syntax.
I've added some tests. I'm finding it quite difficult to build tests using a peg_revision 😖 |
Conflicts |
conans/test/util/tools_test.py
Outdated
|
||
shutil.rmtree(repo_url, ignore_errors=False, onerror=try_remove_readonly) | ||
self.assertFalse(os.path.exists(repo_url)) | ||
with self.assertRaisesRegexp(subprocess.CalledProcessError, "non-zero exit status 1"): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This shouldn't be an Exception, should return False, to allow creating the package, even if it is not pristine.
Use XML output to compute SVN.is_pristine()
Changelog: Fix: Use XML output from SVN command line interface to compute if the repository is pristine.
Tests needed (from comments):
svn:externals
definition without fixed revision --> should lead to error, because not fixedsvn:externals
definition with pegged revisionsvn:externals
definition with pegged revision & operative revision --> could be different revsisions, we must use operative revisionis_pristine
function.