Show More
@@ -2013,13 +2013,11 b' def paths(ui, repo, search=None):' | |||
|
2013 | 2013 | for name, path in ui.configitems("paths"): |
|
2014 | 2014 | ui.write("%s = %s\n" % (name, path)) |
|
2015 | 2015 | |
|
2016 |
def postincoming(ui, repo, modheads, optupdate |
|
|
2016 | def postincoming(ui, repo, modheads, optupdate): | |
|
2017 | 2017 | if modheads == 0: |
|
2018 | 2018 | return |
|
2019 | 2019 | if optupdate: |
|
2020 |
if |
|
|
2021 | return hg.update(repo, repo.lookup('default')) | |
|
2022 | elif modheads == 1: | |
|
2020 | if modheads == 1: | |
|
2023 | 2021 | return hg.update(repo, repo.changelog.tip()) # update |
|
2024 | 2022 | else: |
|
2025 | 2023 | ui.status(_("not updating, since new heads added\n")) |
@@ -2081,9 +2079,8 b' def pull(ui, repo, source="default", **o' | |||
|
2081 | 2079 | error = _("Other repository doesn't support revision lookup, so a rev cannot be specified.") |
|
2082 | 2080 | raise util.Abort(error) |
|
2083 | 2081 | |
|
2084 | wasempty = repo.changelog.count() == 0 | |
|
2085 | 2082 | modheads = repo.pull(other, heads=revs, force=opts['force']) |
|
2086 |
return postincoming(ui, repo, modheads, opts['update'] |
|
|
2083 | return postincoming(ui, repo, modheads, opts['update']) | |
|
2087 | 2084 | |
|
2088 | 2085 | def push(ui, repo, dest=None, **opts): |
|
2089 | 2086 | """push changes to the specified destination |
@@ -2647,7 +2644,6 b' def unbundle(ui, repo, fname1, *fnames, ' | |||
|
2647 | 2644 | """ |
|
2648 | 2645 | fnames = (fname1,) + fnames |
|
2649 | 2646 | result = None |
|
2650 | wasempty = repo.changelog.count() == 0 | |
|
2651 | 2647 | for fname in fnames: |
|
2652 | 2648 | if os.path.exists(fname): |
|
2653 | 2649 | f = open(fname, "rb") |
@@ -2656,7 +2652,7 b' def unbundle(ui, repo, fname1, *fnames, ' | |||
|
2656 | 2652 | gen = changegroup.readbundle(f, fname) |
|
2657 | 2653 | modheads = repo.addchangegroup(gen, 'unbundle', 'bundle:' + fname) |
|
2658 | 2654 | |
|
2659 |
return postincoming(ui, repo, modheads, opts['update'] |
|
|
2655 | return postincoming(ui, repo, modheads, opts['update']) | |
|
2660 | 2656 | |
|
2661 | 2657 | def update(ui, repo, node=None, rev=None, clean=False, date=None): |
|
2662 | 2658 | """update working directory |
General Comments 0
You need to be logged in to leave comments.
Login now