Exporting patch: # HG changeset patch # User Muli Ben-Yehuda # Node ID 01834ac7ddfc2329520109f9358b566c73c11390 # Parent 82c329a5df4181fb82e2506dab419e7d2519c5e6 add --update support to 'hg unbundle' diff -r 82c329a5df4181fb82e2506dab419e7d2519c5e6 -r 01834ac7ddfc2329520109f9358b566c73c11390 mercurial/commands.py --- a/mercurial/commands.py Mon Dec 26 10:05:57 2005 +0200 +++ b/mercurial/commands.py Mon Dec 26 10:19:02 2005 +0200 @@ -2095,7 +2095,7 @@ n = repo.changelog.tip() show_changeset(ui, repo, changenode=n) -def unbundle(ui, repo, fname): +def unbundle(ui, repo, fname, **opts): """apply a changegroup file Apply a compressed changegroup file generated by the bundle @@ -2113,6 +2113,10 @@ bzgen = bzgenerator(util.filechunkiter(f, 4096)) repo.addchangegroup(util.chunkbuffer(bzgen)) + if opts['update']: + return update(ui, repo) + else: + ui.status(_("(run 'hg update' to get a working copy)\n")) def undo(ui, repo): """undo the last commit or pull @@ -2406,8 +2410,8 @@ "tip": (tip, [], _('hg tip')), "unbundle": (unbundle, - [], - _('hg unbundle FILE')), + [('u', 'update', None, _('update the working directory to tip after unbundle'))], + _('hg unbundle [-u] FILE')), "undo": (undo, [], _('hg undo')), "^update|up|checkout|co": (update,