# HG changeset patch # User Matt Mackall # Date 1393534116 21600 # Node ID e0e223b0a506fbe00d769854e5fa8231302fede6 # Parent 5614f8cf0861d95bbe853f636db4bcdab77fe183# Parent de48422df393bbf80dcd5d4f9571e48663452d86 merge with stable diff -r 5614f8cf0861 -r e0e223b0a506 mercurial/commands.py --- a/mercurial/commands.py Thu Feb 27 14:46:29 2014 -0600 +++ b/mercurial/commands.py Thu Feb 27 14:48:36 2014 -0600 @@ -4590,47 +4590,50 @@ """ source, branches = hg.parseurl(ui.expandpath(source), opts.get('branch')) other = hg.peer(repo, opts, source) - ui.status(_('pulling from %s\n') % util.hidepassword(source)) - revs, checkout = hg.addbranchrevs(repo, other, branches, opts.get('rev')) - - remotebookmarks = other.listkeys('bookmarks') - - if opts.get('bookmark'): - if not revs: - revs = [] - for b in opts['bookmark']: - if b not in remotebookmarks: - raise util.Abort(_('remote bookmark %s not found!') % b) - revs.append(remotebookmarks[b]) - - if revs: + try: + ui.status(_('pulling from %s\n') % util.hidepassword(source)) + revs, checkout = hg.addbranchrevs(repo, other, branches, + opts.get('rev')) + + remotebookmarks = other.listkeys('bookmarks') + + if opts.get('bookmark'): + if not revs: + revs = [] + for b in opts['bookmark']: + if b not in remotebookmarks: + raise util.Abort(_('remote bookmark %s not found!') % b) + revs.append(remotebookmarks[b]) + + if revs: + try: + revs = [other.lookup(rev) for rev in revs] + except error.CapabilityError: + err = _("other repository doesn't support revision lookup, " + "so a rev cannot be specified.") + raise util.Abort(err) + + modheads = repo.pull(other, heads=revs, force=opts.get('force')) + bookmarks.updatefromremote(ui, repo, remotebookmarks, source) + if checkout: + checkout = str(repo.changelog.rev(other.lookup(checkout))) + repo._subtoppath = source try: - revs = [other.lookup(rev) for rev in revs] - except error.CapabilityError: - err = _("other repository doesn't support revision lookup, " - "so a rev cannot be specified.") - raise util.Abort(err) - - modheads = repo.pull(other, heads=revs, force=opts.get('force')) - bookmarks.updatefromremote(ui, repo, remotebookmarks, source) - if checkout: - checkout = str(repo.changelog.rev(other.lookup(checkout))) - repo._subtoppath = source - try: - ret = postincoming(ui, repo, modheads, opts.get('update'), checkout) - + ret = postincoming(ui, repo, modheads, opts.get('update'), checkout) + + finally: + del repo._subtoppath + + # update specified bookmarks + if opts.get('bookmark'): + marks = repo._bookmarks + for b in opts['bookmark']: + # explicit pull overrides local bookmark if any + ui.status(_("importing bookmark %s\n") % b) + marks[b] = repo[remotebookmarks[b]].node() + marks.write() finally: - del repo._subtoppath - - # update specified bookmarks - if opts.get('bookmark'): - marks = repo._bookmarks - for b in opts['bookmark']: - # explicit pull overrides local bookmark if any - ui.status(_("importing bookmark %s\n") % b) - marks[b] = repo[remotebookmarks[b]].node() - marks.write() - + other.close() return ret @command('^push', diff -r 5614f8cf0861 -r e0e223b0a506 mercurial/hgweb/hgwebdir_mod.py --- a/mercurial/hgweb/hgwebdir_mod.py Thu Feb 27 14:46:29 2014 -0600 +++ b/mercurial/hgweb/hgwebdir_mod.py Thu Feb 27 14:48:36 2014 -0600 @@ -365,7 +365,8 @@ description_sort=description.upper() or "unknown", lastchange=d, lastchange_sort=d[1]-d[0], - archives=archivelist(u, "tip", url)) + archives=archivelist(u, "tip", url), + isdirectory=None) seenrepos.add(name) yield row diff -r 5614f8cf0861 -r e0e223b0a506 mercurial/templates/static/style-coal.css --- a/mercurial/templates/static/style-coal.css Thu Feb 27 14:46:29 2014 -0600 +++ b/mercurial/templates/static/style-coal.css Thu Feb 27 14:48:36 2014 -0600 @@ -214,6 +214,13 @@ .source a { color: #999; font-size: smaller; font-family: monospace;} .bottomline { border-bottom: 1px solid #999; } +.sourcelines > div { + display: inline-block; + width: 100%; + padding: 1px 0px; + counter-increment: lineno; +} + .fileline { font-family: monospace; } .fileline img { border: 0; } diff -r 5614f8cf0861 -r e0e223b0a506 tests/test-bundle.t --- a/tests/test-bundle.t Thu Feb 27 14:46:29 2014 -0600 +++ b/tests/test-bundle.t Thu Feb 27 14:48:36 2014 -0600 @@ -84,6 +84,11 @@ searching for changes no changes found +Verify that there are no leaked temporary files after pull (issue2797) + + $ ls test/.hg | grep .hg10un + [1] + Pull full.hg into empty (using --cwd) $ hg --cwd empty pull ../full.hg