logo       

Re: request for clear docs for 'push' and conflicts: msg#00644

Subject: Re: request for clear docs for 'push' and conflicts
On 2004-10-30, David Roundy <droundy-pO0ceuy0HdYnY2huQ288Gg@xxxxxxxxxxxxxxxx> 
wrote:
> On Fri, Oct 29, 2004 at 02:11:56PM +0000, Mark Stosberg wrote:
>> On 2004-10-29, David Roundy 
>> <droundy-pO0ceuy0HdYnY2huQ288Gg@xxxxxxxxxxxxxxxx> wrote:
>> > On Thu, Oct 28, 2004 at 04:39:58PM +0000, Mark Stosberg wrote:
>> >> Hello,
>> >> 
>> >> I'd like to ask one of the more experienced people here to update the
>> >> docs for 'push' to explain what happens when there is a conflict. 
>> >> 
>> >> I created this myself with some play archives. darcs will report
>> >> that the push succeeded, but also that there are conflicts. 
>> >> 
>> >> But what state is the remote repo in after this? The local one? What
>> >> needs to happen to resolve the conflict?
>> >
>> > I've added a paragraph to the 'push' documentation.  If it's unclear, ask
>> > again...
>> 
>> Thank you very much. I'm still unclear on one point in the explanation:
>> 
>> "perhaps by pulling the conflicting patch"
>> 
>> How do I know which patch is conflicting? The feedback I get from darcs only
>> tells me the conflicted files, which could be in many patches.
>
> There's no way to know which patches conflict.  I would pull all patches,
> since this would make your local repository a mirror of the remote one
> (which you pushed to).  If you don't *want* all those patches, I'd do this
> in a clone.

Thanks. With these explanations, I've just submitted a patch to the
'apply' and 'push' documentation to clarify them further. I think there
are a few remaining bits to iron out:

1. Is it true that this is another case that should be built into:
        darcs init --public vs. darcs init --working ?

  It seems like for working repos, you want to default to
  resolving conflicts, but for public repos you want to default to not
  resolving the conflicts. 

  If these init options are much in the distance, it would be nice to
  have  a suggestion for this defaults cases in the manual. 

2. Let me make sure I understand what "--no-resolve-conflict" does when
  used on a push:

  The conflict is not worked in the working directory or in the remote repo,
  but darcs "knows" there is a conflict. It is expected that my working
  repo will default to resolving conflicts, while the remote won't. 

  Thus, when I pull the conflicting patch (which mean pulling all
  patches) from the remote repo, /then/ conflict markers appear
  in my working repo, which I can resolve and resubmit. 

3. And for "--resolve-conflicts": If my remote repo is set to resolve 
   conflicts and I push to it, I will still get a warning that there
   is a conflict, but it will only be marked in the remote repo
   not my working repo. 

   I basically can't fix this remotely, because if I /then/ try to pull
   from remote repo, darcs will report 'No Changes!" despite that the
   contents of one of my files differs from the conflicting file 
   in the remote repo. (That's confusing! I expected it would pull down 
   the conflicted file). 

#########

Some observations:

1. The default for conflict resolution for 'apply' is not documented
   anywhere that I could find.

2. It makes sense to me to create the 'defaults' file as part of init,
   with the current defaults. This serves as documentation, but it also
   means that if the darcs defaults ever change, people will get the
   defaults they are used to. 

3. There out to be some part of darcs that verifies that contents of the
   'defaults' file are valid.
   I added 'record wrong' to mine to test it. 'darcs check' did not
   detect a problem and even 'darcs record' worked without complaint. 

4. This whole experience speaks to me about the importance of making it 
   easy to init public and working repos with different defaults. 


   Mark


-- 
http://mark.stosberg.com/ 


<Prev in Thread] Current Thread [Next in Thread>
Google Custom Search

Recently Viewed:
boot-loaders.gr...    php.pear.genera...    debugging.valgr...    kde.redhat.user...    text.xml.xsl.ge...    culture.languag...    hardware.microc...    java.servicemix...    redhat.release....    web.zope.plone....    user-groups.lin...    opendarwin.webk...    video.mjpeg.use...    sysutils.bcfg2....    encryption.gpg....    lx-office.devel...    xfree86.forum/2...    mail.mutt.devel...    acpi.devel/2003...    qnx.openqnx.dev...    network.irc.irs...    freebsd.devel.m...   
Home | blog view | USPTO Patent Archive | advertise | OSDir is an inevitable website. super tiny logo

Free Magazines

Cisco News
Receive a free quarterly e-newsletter with exclusive articles on how Cisco IT uses its own products and solutions to enable the business.
subscribe

Systems Management News, the newspaper for IT systems administration and data center managers! Each issue of Systems Management News is chock-full of news and analysis to help you understand what's happening in your field.
subscribe

The Enterprise Newsweekly eWeek is the essential technology information source for builders of e-business.
subscribe

Oracle Magazine Oracle Magazine contains technology strategy articles, sample code, tips, Oracle and partner news, how to articles for developers and DBAs, and more. Oracle (NASDAQ: ORCL) is the world's largest enterprise software company.
subscribe

Total Telecom Total Telecom is "The Economist of the communications industry".
subscribe