Forum Discussion
I always do a pull and merge before I commit. That makes sure that my local copy is up to date with the remote copy before I commit.
That said... no, you didn't lose everything. You just need to pick and choose and be diligent in how to do the merge. Manual merging is probably what you're going to have to do.
Thanks tristaanogre , so you mean right now I have to pick my codes out and the pull the latest version from SVN, and then commit my codes in? Did I understand you right? Also, can you let me know what these codes stands for? Like ||||||| .r3244, =======, >>>>>>> .r3384, <<<<<<< .mine. It looks to me that content below <<<<<<< .mine is my code, ||||||| .r3244, ======= is the start of someone else's code, >>>>>>> .r3384 is the end of someone else's code. Am I right?
In Addition, how can I get my namemapping objects out? it shows the namemapping was in confiliceted as well, but when I go to NameMapping, I don't see any highlights there. I namemapped many objects, I don't remember exactly which ones I named.
- tristaanogre6 years agoEsteemed Contributor
1. Pull from SVN
2. Merge into your code what was pulled from SVN (this does not mean remove your stuff, just blend the two, keeping yours and keeping theirs and making sure it all stays functional)
3. Commit changes
However, probably better, is to do branches so that you work in one branch, someone else works in another, and there is someone whose responsibilty when it comes time to deploy changes to "production", to merge the branches into a single repository.
All this is "standard" code repository stuff... not strictly TestComplete.
NameMapping merging... now that's a different story. And there are multiple topics here on that with techniques on how to do so. Go searching and see what works best for you.
- AlexKaras6 years agoChampion Level 3
whuang :
Hi,
> and there is someone whose responsibilty [...] to merge the branches into a single repository.
No... I wouldn't recommend this...
Well, it is quite easy to merge when you need to insert, say, a complete new function.
But if there is a merge conflict within the same function, than the one who does manual merge must have clear understanding as for all changes to be merged (and, probably, about external code that is supposed to call this changed function and calling code's expectations) to be able to do correct merge.
Instead, I would recommend:
a) Decompose your test code between several code units. Keep in one unit only one test or a set of tests that work with the same tested functionality. Then you will be able to work on one tested functionality and make changes into just one code unit while your colleague will work on another functionality and make changes to another code unit. This will reduce the probability of merge conflicts;
b) Move common reusable code to separate library code units and create a policy that library code units must be changes as little as possible and change must take not more than 5-10 minutes. To make this possible, if you need to create some reusable library function, create it first within some test code unit that needs this function. Debug and enchance it until it works as expected. Than notify the team about upcoming change, get latest version of the corresponding library code unit from the repository, move your code from the test code unit to the library one, save changed and commit to the repository. Notify team to update their local test code with the changes from the repository.
P.S. And, as it was mentioned a lot of times here: only script unit files can be merged with acceptable risk level. All other files from TestComplete's project must not be merged because of high level of risk of their internal structure corruption.
- whuang6 years agoRegular Contributor
Thanks AlexKaras tristaanogre now the SVN has been reverted to the previous version. I will pull the latest version from it and put my codes in, but for the Namemapping, as suggested by AlexKaras, I guess I will have to manually add them again? The problem is I don't remember how many and which objects I namemapped.
Also, in case I break anything again, do I need to make a copy of anything or how I can revert the changes back if anything goes wrong? because the revert from my bad version was not done by myself, so I would like to make sure how to revert it before going forward.
Thanks!
Related Content
- 6 years ago
- 12 years ago
- 2 years ago
Recent Discussions
- 7 hours ago