Edwin Thomson wrote:
Hello
When pulling, I've been routinely using --external-merge, because a
kdiff3 is a much more pleasant way to resolve conflicts than digging
through conflict markers. However, darcs creates about four copies of
my source tree (version1, version2, ancestor, merged) for the pull,
whether there end up being conflicts or not, which is very slow. Is
there a way to make it only do this when there are actual conflicts?
It seems that darcs doesn't always do this, and I can't reproduce it on
a simple test repository. I've made a patch that stops it from doing
so, but it's almost certainly a hack applied to the wrong part of the
code, as I don't understand why it happened in the first place.
Edwin
New patches:
[Don't make merge folders when we don't need them
[EMAIL PROTECTED]
] {
hunk ./Pull.lhs 151
- announce_merge_conflicts standard_resolved_pw
- check_unrecorded_conflicts pc
+ have_conflicts <- announce_merge_conflicts standard_resolved_pw
+ have_unrecorded_conflicts <- check_unrecorded_conflicts pc
hunk ./Pull.lhs 155
- case want_external_merge opts of
- Nothing -> return $ join_patches standard_resolved_pw
- Just c -> do pend <- get_unrecorded repository (AnyOrder:opts)
- join_patches `liftM` external_resolution c working
- (join_patches $ (++catMaybes [pend]) $
- map fromJustPatch $ reverse $ head us')
- (join_patches to_be_pulled) pw
+ case (want_external_merge opts, have_conflicts ||
have_unrecorded_conflicts) of
+ (Nothing,_) -> return $ join_patches standard_resolved_pw
+ (_,False) -> return $ join_patches standard_resolved_pw
+ (Just c, True) -> do pend <- get_unrecorded repository
(AnyOrder:opts)
+ join_patches `liftM` external_resolution c
working
+ (join_patches $ (++catMaybes [pend]) $
+ map fromJustPatch $ reverse $ head us')
+ (join_patches to_be_pulled) pw
hunk ./Pull.lhs 286
-announce_merge_conflicts :: [Patch] -> IO ()
+announce_merge_conflicts :: [Patch] -> IO Bool
hunk ./Pull.lhs 289
- [] -> return ()
+ [] -> return False
hunk ./Pull.lhs 292
+ return True
hunk ./Pull.lhs 294
-check_unrecorded_conflicts :: Patch -> IO ()
+check_unrecorded_conflicts :: Patch -> IO Bool
hunk ./Pull.lhs 299
- Nothing -> return ()
+ Nothing -> return False
hunk ./Pull.lhs 305
- [] -> return ()
+ [] -> return False
hunk ./Pull.lhs 312
+ return True
}
Context:
[TAG 1.0.5
Tommy Pettersson <[EMAIL PROTECTED]>**20051207112730]
Patch bundle hash:
07145265341baf147577fd63fb96f7ab4c439fa8
_______________________________________________
darcs-users mailing list
[email protected]
http://www.abridgegame.org/mailman/listinfo/darcs-users