Mercurial > hg-stable
changeset 1600:728fd9584993
add --update support to 'hg unbundle'
author | Muli Ben-Yehuda <mulix@mulix.org> |
---|---|
date | Tue, 27 Dec 2005 16:16:06 -0600 |
parents | f93fde8f5027 |
children | a1b25fb2e764 |
files | mercurial/commands.py |
diffstat | 1 files changed, 7 insertions(+), 3 deletions(-) [+] |
line wrap: on
line diff
--- a/mercurial/commands.py Tue Dec 27 13:12:53 2005 -0600 +++ b/mercurial/commands.py Tue Dec 27 16:16:06 2005 -0600 @@ -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,