##// END OF EJS Templates
merge: update some docstrings
Matt Mackall -
r3315:38be819a default
parent child Browse files
Show More
@@ -13,13 +13,9 b' demandload(globals(), "errno util os tem'
13 13 def filemerge(repo, fw, fo, wctx, mctx):
14 14 """perform a 3-way merge in the working directory
15 15
16 fw = filename in the working directory and first parent
16 fw = filename in the working directory
17 17 fo = filename in other parent
18 18 wctx, mctx = working and merge changecontexts
19
20 TODO:
21 if fw is copied in the working directory, we get confused
22 implement move and fd
23 19 """
24 20
25 21 def temp(prefix, ctx):
@@ -64,9 +60,7 b' def filemerge(repo, fw, fo, wctx, mctx):'
64 60 return r
65 61
66 62 def checkunknown(wctx, mctx):
67 """
68 check for collisions between unknown files and files in m2
69 """
63 "check for collisions between unknown files and files in mctx"
70 64 man = mctx.manifest()
71 65 for f in wctx.unknown():
72 66 if f in man:
@@ -94,9 +88,7 b' def forgetremoved(wctx, mctx):'
94 88 return action
95 89
96 90 def nonoverlap(d1, d2):
97 """
98 Return list of elements in d1 not in d2
99 """
91 "Return list of elements in d1 not in d2"
100 92
101 93 l = []
102 94 for d in d1:
@@ -107,9 +99,7 b' def nonoverlap(d1, d2):'
107 99 return l
108 100
109 101 def findold(fctx, limit):
110 """
111 find files that path was copied from, back to linkrev limit
112 """
102 "find files that path was copied from, back to linkrev limit"
113 103
114 104 old = {}
115 105 orig = fctx.path()
@@ -174,7 +164,10 b' def findcopies(repo, m1, m2, limit):'
174 164
175 165 def manifestmerge(repo, p1, p2, pa, overwrite, partial):
176 166 """
177 Merge manifest m1 with m2 using ancestor ma and generate merge action list
167 Merge p1 and p2 with ancestor ma and generate merge action list
168
169 overwrite = whether we clobber working files
170 partial = function to filter file lists
178 171 """
179 172
180 173 repo.ui.note(_("resolving manifests\n"))
@@ -275,6 +268,8 b' def manifestmerge(repo, p1, p2, pa, over'
275 268 return action
276 269
277 270 def applyupdates(repo, action, wctx, mctx):
271 "apply the merge action list to the working directory"
272
278 273 updated, merged, removed, unresolved = 0, 0, 0, 0
279 274 action.sort()
280 275 for a in action:
@@ -319,6 +314,8 b' def applyupdates(repo, action, wctx, mct'
319 314 return updated, merged, removed, unresolved
320 315
321 316 def recordupdates(repo, action, branchmerge, mctx):
317 "record merge actions to the dirstate"
318
322 319 for a in action:
323 320 f, m = a[:2]
324 321 if m == "r": # remove
@@ -357,6 +354,16 b' def recordupdates(repo, action, branchme'
357 354
358 355 def update(repo, node, branchmerge=False, force=False, partial=None,
359 356 wlock=None, show_stats=True, remind=True):
357 """
358 Perform a merge between the working directory and the given node
359
360 branchmerge = whether to merge between branches
361 force = whether to force branch merging or file overwriting
362 partial = a function to filter file lists (dirstate not updated)
363 wlock = working dir lock, if already held
364 show_stats = whether to report merge statistics
365 remind = whether to remind about merge
366 """
360 367
361 368 if not wlock:
362 369 wlock = repo.wlock()
General Comments 0
You need to be logged in to leave comments. Login now