Conflicted when trying to commit to SVN
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Conflicted when trying to commit to SVN
Hi everyone,
I was trying to commit some of my new test sets to SVN, but I got some error saying the items are in conflicted status.
I go to one of the conflicted script, and saw below.
The blue content are not mine, was it because I was adding stuff to this script while another team member adding code to the script as well? In this case, what should I do? How can I commit my scripts in without mess up other people's work? Did I loss all of my work?
Thanks in advance!
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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.
Robert Martin
[Hall of Fame]
Please consider giving a Kudo if I write good stuff
----
Why automate? I do automated testing because there's only so much a human being can do and remain healthy. Sleep is a requirement. So, while people sleep, automation that I create does what I've described above in order to make sure that nothing gets past the final defense of the testing group.
I love good food, good books, good friends, and good fun.
Mysterious Gremlin Master
Vegas Thrill Rider
Extensions available
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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.
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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.
Robert Martin
[Hall of Fame]
Please consider giving a Kudo if I write good stuff
----
Why automate? I do automated testing because there's only so much a human being can do and remain healthy. Sleep is a requirement. So, while people sleep, automation that I create does what I've described above in order to make sure that nothing gets past the final defense of the testing group.
I love good food, good books, good friends, and good fun.
Mysterious Gremlin Master
Vegas Thrill Rider
Extensions available
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
@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.
/Alex [Community Hero]
____
[Community Heroes] are not employed by SmartBear Software but
are just volunteers who have some experience with the tools by SmartBear Software
and a desire to help others. Posts made by [Community Heroes]
may differ from the official policies of SmartBear Software and should be treated
as the own private opinion of their authors and under no circumstances as an
official answer from SmartBear Software.
The [Community Hero] signature is used with permission by SmartBear Software.
https://community.smartbear.com/t5/custom/page/page-id/hall-of-fame
================================
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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!
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi,
> but for the Namemapping
I never did it, but TestComplete contains the functionality to merge NameMapping files. Check the documentation and try to merge (I hope that you haven't delete your NameMapping file yet). Obviously, make copy of your file before merging.
/Alex [Community Hero]
____
[Community Heroes] are not employed by SmartBear Software but
are just volunteers who have some experience with the tools by SmartBear Software
and a desire to help others. Posts made by [Community Heroes]
may differ from the official policies of SmartBear Software and should be treated
as the own private opinion of their authors and under no circumstances as an
official answer from SmartBear Software.
The [Community Hero] signature is used with permission by SmartBear Software.
https://community.smartbear.com/t5/custom/page/page-id/hall-of-fame
================================
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I've used the name mapping merge frequently. Do what @AlexKaras says and keep a backup of the original and you should be fine.
Marsha_R
[Community Hero]
____
[Community Heroes] are not employed by SmartBear Software but
are just volunteers who have some experience with the tools by SmartBear Software
and a desire to help others. Posts made by [Community Heroes]
may differ from the official policies of SmartBear Software and should be treated
as the own private opinion of their authors and under no circumstances as an
official answer from SmartBear Software.
The [Community Hero] signature is used with permission by SmartBear Software.
https://community.smartbear.com/t5/custom/page/page-id/hall-of-fame
