It probably would be considered aganst the rules and unethical at the least. Now, if your opponent went up to move 15 without deviation, then you were likely still in theory and once one of you deviated, you were probably in unfamiliar territory.
Not really an excuse but you should only be relying on your own memory and not someone else in a live game.
There was a tournament where my opponent happened to play the exact same opening as the oponent of a GM playing on the top board (which was broadcast on a video screen outside the tournament hall). I'd periodically walk over to the screen to see what moves the GM played--- and I was able to copy him around 15 moves, gaining a significant advantage in the process!
What are your thoughts on this? Its not cheating but it seems kind of cheap that I was able to do this.