Re: SVN Merge !!
From: Himanshu Raina <raina_himanshu_at_yahoo.com>
Date: 2007-02-06 05:50:04 CET
thanks for the help guys !!
regards
Himanshu Raina
----- Original Message ----
From: Erik Hemdal <erik_at_comprehensivepower.com>
To: Himanshu Raina <raina_himanshu_at_yahoo.com>; Janine Sisk <janine_at_furfly.net>; Subversion List <users_at_subversion.tigris.org>
Sent: Monday, February 5, 2007 7:39:44 PM
Subject: RE: SVN Merge !!
Message
DIV {
MARGIN:0px;}
My query is
say tow users downloaded the same file.Let's say user A and B.Now A updates
the file a.sh and commits to the repository.Now when B makes changes to a.sh
and does commit he gets error about his file being out-of-date,now if B wants
his changes to be merged with that of A on the repository how can that be
done.what if i don't want to do an svn update
Himanshu:
For B to commit
his changes, he must do the svn update in this situation. This is
because A and B are both working on the same branch. A's changes have
put B's working copy out of date, regardless of whether B's changes are the
latest as far as the project is concerned.
The update
operation will mix together A's changes and B's changes, possibly with some
conflicts B can fix and possibly by silently undoing some of B's
changes. I think this is what you mean by "losing B's work". What
actually happens depends on how the files were actually changed and B needs to
examine the results carefully to make sure he gets the results he wants.
because i am assuming that the copy that
i have with me is the latest one
Yes, if B makes
that assumption, this will happen. When I return to a workinig copy that
I haven't used in a while, I check the log for updates and do an svn update if
needed before I begin.
and based on that assumption i have now
modified the file.In this scenario if i do svn update whole of my work is lost
and i need to modify the a.sh file again.So is there a method by which i can
achieve this and if yes how can that be done.I tried svn merge but couldn't
get the right syntax.
I work around
these issues by giving each user a development branch, then we decide together
when we should merge. When two people work on the same branch,
they have to talk together a lot to make sure that each one knows the state of
the files they are sharing.
This is all
described in the Subversion book and in several other books about
SVN. Start with the book to understand merging, because that's how
you will (I believe) resolve your problem. You might find that it's
useful to set up a play repository and practice with some simple files until
you get the merge commands right and can teach your users. That will be
time well spent. Good luck. Erik
____________________________________________________________________________________
Never miss an email again!
Yahoo! Toolbar alerts you the instant new Mail arrives.
http://tools.search.yahoo.com/toolbar/features/mail/
|
This is an archived mail posted to the Subversion Users mailing list.
This site is subject to the Apache Privacy Policy and the Apache Public Forum Archive Policy.