I am using BC to manage multiple branches that I have checked out.
I have close to 100 comparisons I actively use, BC is addictive
.
I find myself creating duplicate comparison rules to deal with each branch when only the base paths are different, Example:
TRUNK
Compare: TRUNK\A\src\java <--> TRUNK\A\target\java
DEV
Compare: DEV\A\src\java <--> DEV\A\target\java
TEST
Compare: TEST\A\src\java <--> TEST\A\target\java
STAGE
Compare: STAGE\A\src\java <--> STAGE\A\target\java
etc...
It would be nice if these comparisons and paths could be defined once and only the base path change. This would allow me to keep all rules across branches in sync.
Most likely what ever approach that was taken would require the user to abstract their folder comparison to:
%BASEDIR%\A\src\java <--> %BASEDIR%\A\target\java
Then %BASEDIR% would be associated not with the session itself but with the folder used to organize the comparison in the session Manager.
Just this simple abstraction with no other changes would allow me to copy rules between folders and have them point to the correct place.
Then if you invest additional development time with this approach there are several ways to think about solving this in a larger context:
1) Use some sort of inheritance between folders defined in the Session Manager. [The Apache Commons Validator used inheritance between XML files which was very practicle and handy.]
2) Use a template method. This can be viewed as a limited form of inheritance and would serve most needs w/o coding for multiple levels of inheritance.
In either case it would be nice if comparisons could be refactored.
A comparison with hardcoded paths could be promoted, Pulled up, to serve as a template for use by other siblings folders. Conversely, if we had the ability to, push down, to all child folders that would also be nice. Then copy.... Anyway its easy to get carried away when you are not the one implementing the code.
What do you think ?
I have close to 100 comparisons I actively use, BC is addictive

I find myself creating duplicate comparison rules to deal with each branch when only the base paths are different, Example:
TRUNK
Compare: TRUNK\A\src\java <--> TRUNK\A\target\java
DEV
Compare: DEV\A\src\java <--> DEV\A\target\java
TEST
Compare: TEST\A\src\java <--> TEST\A\target\java
STAGE
Compare: STAGE\A\src\java <--> STAGE\A\target\java
etc...
It would be nice if these comparisons and paths could be defined once and only the base path change. This would allow me to keep all rules across branches in sync.
Most likely what ever approach that was taken would require the user to abstract their folder comparison to:
%BASEDIR%\A\src\java <--> %BASEDIR%\A\target\java
Then %BASEDIR% would be associated not with the session itself but with the folder used to organize the comparison in the session Manager.
Just this simple abstraction with no other changes would allow me to copy rules between folders and have them point to the correct place.
Then if you invest additional development time with this approach there are several ways to think about solving this in a larger context:
1) Use some sort of inheritance between folders defined in the Session Manager. [The Apache Commons Validator used inheritance between XML files which was very practicle and handy.]
2) Use a template method. This can be viewed as a limited form of inheritance and would serve most needs w/o coding for multiple levels of inheritance.
In either case it would be nice if comparisons could be refactored.
A comparison with hardcoded paths could be promoted, Pulled up, to serve as a template for use by other siblings folders. Conversely, if we had the ability to, push down, to all child folders that would also be nice. Then copy.... Anyway its easy to get carried away when you are not the one implementing the code.

What do you think ?
Comment