equal
deleted
inserted
replaced
84 from mercurial import scmutil |
84 from mercurial import scmutil |
85 from mercurial import extensions |
85 from mercurial import extensions |
86 from mercurial import pushkey |
86 from mercurial import pushkey |
87 from mercurial import discovery |
87 from mercurial import discovery |
88 from mercurial import error |
88 from mercurial import error |
|
89 from mercurial import commands |
89 from mercurial.node import hex, bin, short |
90 from mercurial.node import hex, bin, short |
90 from mercurial.lock import release |
91 from mercurial.lock import release |
91 |
92 |
92 ### Patch changectx |
93 ### Patch changectx |
93 ############################# |
94 ############################# |
225 obj = repo[object] |
226 obj = repo[object] |
226 repo.addobsolete(sub.node(), obj.node()) |
227 repo.addobsolete(sub.node(), obj.node()) |
227 return 0 |
228 return 0 |
228 |
229 |
229 cmdtable = {'debugobsolete': (cmddebugobsolete, [], '<subject> <object>')} |
230 cmdtable = {'debugobsolete': (cmddebugobsolete, [], '<subject> <object>')} |
|
231 |
|
232 ### Altering existing command |
|
233 ############################# |
|
234 |
|
235 def wrapmayobsoletewc(origfn, ui, repo, *args, **opts): |
|
236 res = origfn(ui, repo, *args, **opts) |
|
237 if repo['.'].obsolete(): |
|
238 ui.warn(_('Working directory parent is obsolete\n')) |
|
239 return res |
|
240 |
|
241 def uisetup(ui): |
|
242 extensions.wrapcommand(commands.table, "update", wrapmayobsoletewc) |
|
243 extensions.wrapcommand(commands.table, "pull", wrapmayobsoletewc) |
230 |
244 |
231 ### serialisation |
245 ### serialisation |
232 ############################# |
246 ############################# |
233 |
247 |
234 def _obsserialise(obssubrels, flike): |
248 def _obsserialise(obssubrels, flike): |