nqramjets Posted April 17, 2014 Report Share Posted April 17, 2014 In order to maintain state in Plastic I'm attempting to use multiple attributes; It's easy enough to apply multiple attributes to a single branch, but I can't seem to get a find command to work. Unless I'm missing something there is no obvious way to get a cm find where clause to feature more than one attribute/attrvalue combination. In my case I have a branch with the following two attributes and values: Status = 'Deprecated' TestFlag = 'TRUE' This is only thing that seems reasonable to try, but does not work (not surprised really because there is only a single, unqualified "attrvalue") >cm find branches where attribute = 'Status' and attrvalue = 'Deprecated' and attribute = 'TestFlag' and attrvalue = 'TRUE' >Total: 0 Obviously I can test for one attribute individually and it works just fine. >cm find branches where attribute = 'TestFlag' and attrvalue = 'TRUE' >Total: 1 >cm find branches where attribute = 'Status' and attrvalue = 'Deprecated' >Total: 1 Isn't this a common thing? Is this not possible? Furthermore, I would really like this for use in the branch inclusion/exclusion/format rules! Thanks, Ryan Link to comment Share on other sites More sharing options...
omris Posted November 18, 2018 Report Share Posted November 18, 2018 Hello, Maybe someone has answer to this question? Link to comment Share on other sites More sharing options...
manu Posted November 23, 2018 Report Share Posted November 23, 2018 Hi @nqramjets! (OMG so sorry about the 4 years delay!) Hi @omris! (and welcome) My attributes: >cm find attributes objid:6@repid:490@repserver:localhost:8087 -- git-repo-sync --> 1ead4e7c-2305-411e-a36a-08283ad7eb50|Test1@catacroquer@cloud|https://github.com/PlasticSCM/plastic-cmdrunner.git objid:4@repid:490@repserver:localhost:8087 -- BUILD --> OK objid:4@repid:490@repserver:localhost:8087 -- STAGE --> B objid:496@repid:490@repserver:localhost:8087 -- BUILD --> NOK objid:496@repid:490@repserver:localhost:8087 -- STAGE --> B Total: 5 Combined query example #1: >cm find "branch where (attribute='BUILD' and attrvalue='OK') and (attribute='STAGE' and attrvalue='B')" --nototal 4 11/07/2013 12:42:36 /main manu LocalBoatGameTest1 T Combined query example #2: >cm find "branch where (attribute='BUILD' and attrvalue='NOK') and (attribute='STAGE' and attrvalue='B')" --nototal 496 23/11/2018 10:37:49 /main/task002 manu LocalBoatGameTest1 T Hope it helps! Link to comment Share on other sites More sharing options...
omris Posted November 25, 2018 Report Share Posted November 25, 2018 Thank's manu Link to comment Share on other sites More sharing options...
nqramjets Posted December 18, 2018 Author Report Share Posted December 18, 2018 Well this certainly would have helped! 1 Link to comment Share on other sites More sharing options...
manu Posted December 19, 2018 Report Share Posted December 19, 2018 Sorry for the long delay! @omris Revealed the unanswered topic. Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now