##// END OF EJS Templates
merge with stable
Matt Mackall -
r26030:52438902 merge default
parent child Browse files
Show More
@@ -247,6 +247,8 b' def getstandinmatcher(repo, rmatcher=Non'
247 247
248 248 if rmatcher and not rmatcher.always():
249 249 pats = [os.path.join(standindir, pat) for pat in rmatcher.files()]
250 if not pats:
251 pats = [standindir]
250 252 match = scmutil.match(repo[None], pats, badfn=badfn)
251 253 # if pats is empty, it would incorrectly always match, so clear _always
252 254 match._always = False
@@ -1026,40 +1026,46 b' def clearrebased(ui, repo, state, skippe'
1026 1026 def pullrebase(orig, ui, repo, *args, **opts):
1027 1027 'Call rebase after pull if the latter has been invoked with --rebase'
1028 1028 if opts.get('rebase'):
1029 if opts.get('update'):
1030 del opts['update']
1031 ui.debug('--update and --rebase are not compatible, ignoring '
1032 'the update flag\n')
1029 wlock = lock = None
1030 try:
1031 wlock = repo.wlock()
1032 lock = repo.lock()
1033 if opts.get('update'):
1034 del opts['update']
1035 ui.debug('--update and --rebase are not compatible, ignoring '
1036 'the update flag\n')
1033 1037
1034 movemarkfrom = repo['.'].node()
1035 revsprepull = len(repo)
1036 origpostincoming = commands.postincoming
1037 def _dummy(*args, **kwargs):
1038 pass
1039 commands.postincoming = _dummy
1040 try:
1041 orig(ui, repo, *args, **opts)
1038 movemarkfrom = repo['.'].node()
1039 revsprepull = len(repo)
1040 origpostincoming = commands.postincoming
1041 def _dummy(*args, **kwargs):
1042 pass
1043 commands.postincoming = _dummy
1044 try:
1045 orig(ui, repo, *args, **opts)
1046 finally:
1047 commands.postincoming = origpostincoming
1048 revspostpull = len(repo)
1049 if revspostpull > revsprepull:
1050 # --rev option from pull conflict with rebase own --rev
1051 # dropping it
1052 if 'rev' in opts:
1053 del opts['rev']
1054 # positional argument from pull conflicts with rebase's own
1055 # --source.
1056 if 'source' in opts:
1057 del opts['source']
1058 rebase(ui, repo, **opts)
1059 branch = repo[None].branch()
1060 dest = repo[branch].rev()
1061 if dest != repo['.'].rev():
1062 # there was nothing to rebase we force an update
1063 hg.update(repo, dest)
1064 if bookmarks.update(repo, [movemarkfrom], repo['.'].node()):
1065 ui.status(_("updating bookmark %s\n")
1066 % repo._activebookmark)
1042 1067 finally:
1043 commands.postincoming = origpostincoming
1044 revspostpull = len(repo)
1045 if revspostpull > revsprepull:
1046 # --rev option from pull conflict with rebase own --rev
1047 # dropping it
1048 if 'rev' in opts:
1049 del opts['rev']
1050 # positional argument from pull conflicts with rebase's own
1051 # --source.
1052 if 'source' in opts:
1053 del opts['source']
1054 rebase(ui, repo, **opts)
1055 branch = repo[None].branch()
1056 dest = repo[branch].rev()
1057 if dest != repo['.'].rev():
1058 # there was nothing to rebase we force an update
1059 hg.update(repo, dest)
1060 if bookmarks.update(repo, [movemarkfrom], repo['.'].node()):
1061 ui.status(_("updating bookmark %s\n")
1062 % repo._activebookmark)
1068 release(lock, wlock)
1063 1069 else:
1064 1070 if opts.get('tool'):
1065 1071 raise util.Abort(_('--tool can only be used with --rebase'))
@@ -6475,51 +6475,55 b' def update(ui, repo, node=None, rev=None'
6475 6475 if rev is None or rev == '':
6476 6476 rev = node
6477 6477
6478 cmdutil.clearunfinished(repo)
6479
6480 # with no argument, we also move the active bookmark, if any
6481 rev, movemarkfrom = bookmarks.calculateupdate(ui, repo, rev)
6482
6483 # if we defined a bookmark, we have to remember the original bookmark name
6484 brev = rev
6485 rev = scmutil.revsingle(repo, rev, rev).rev()
6486
6487 if check and clean:
6488 raise util.Abort(_("cannot specify both -c/--check and -C/--clean"))
6489
6490 if date:
6491 if rev is not None:
6492 raise util.Abort(_("you can't specify a revision and a date"))
6493 rev = cmdutil.finddate(ui, repo, date)
6494
6495 if check:
6496 cmdutil.bailifchanged(repo, merge=False)
6497 if rev is None:
6498 rev = repo[repo[None].branch()].rev()
6499
6500 repo.ui.setconfig('ui', 'forcemerge', tool, 'update')
6501
6502 if clean:
6503 ret = hg.clean(repo, rev)
6504 else:
6505 ret = hg.update(repo, rev)
6506
6507 if not ret and movemarkfrom:
6508 if bookmarks.update(repo, [movemarkfrom], repo['.'].node()):
6509 ui.status(_("updating bookmark %s\n") % repo._activebookmark)
6478 wlock = repo.wlock()
6479 try:
6480 cmdutil.clearunfinished(repo)
6481
6482 # with no argument, we also move the active bookmark, if any
6483 rev, movemarkfrom = bookmarks.calculateupdate(ui, repo, rev)
6484
6485 # if we defined a bookmark, we have to remember the original name
6486 brev = rev
6487 rev = scmutil.revsingle(repo, rev, rev).rev()
6488
6489 if check and clean:
6490 raise util.Abort(_("cannot specify both -c/--check and -C/--clean"))
6491
6492 if date:
6493 if rev is not None:
6494 raise util.Abort(_("you can't specify a revision and a date"))
6495 rev = cmdutil.finddate(ui, repo, date)
6496
6497 if check:
6498 cmdutil.bailifchanged(repo, merge=False)
6499 if rev is None:
6500 rev = repo[repo[None].branch()].rev()
6501
6502 repo.ui.setconfig('ui', 'forcemerge', tool, 'update')
6503
6504 if clean:
6505 ret = hg.clean(repo, rev)
6510 6506 else:
6511 # this can happen with a non-linear update
6512 ui.status(_("(leaving bookmark %s)\n") %
6513 repo._activebookmark)
6507 ret = hg.update(repo, rev)
6508
6509 if not ret and movemarkfrom:
6510 if bookmarks.update(repo, [movemarkfrom], repo['.'].node()):
6511 ui.status(_("updating bookmark %s\n") % repo._activebookmark)
6512 else:
6513 # this can happen with a non-linear update
6514 ui.status(_("(leaving bookmark %s)\n") %
6515 repo._activebookmark)
6516 bookmarks.deactivate(repo)
6517 elif brev in repo._bookmarks:
6518 bookmarks.activate(repo, brev)
6519 ui.status(_("(activating bookmark %s)\n") % brev)
6520 elif brev:
6521 if repo._activebookmark:
6522 ui.status(_("(leaving bookmark %s)\n") %
6523 repo._activebookmark)
6514 6524 bookmarks.deactivate(repo)
6515 elif brev in repo._bookmarks:
6516 bookmarks.activate(repo, brev)
6517 ui.status(_("(activating bookmark %s)\n") % brev)
6518 elif brev:
6519 if repo._activebookmark:
6520 ui.status(_("(leaving bookmark %s)\n") %
6521 repo._activebookmark)
6522 bookmarks.deactivate(repo)
6525 finally:
6526 wlock.release()
6523 6527
6524 6528 return ret
6525 6529
@@ -56,7 +56,7 b' HGENCODING'
56 56 incorrectly (often by using "?" as a placeholder for invalid
57 57 characters in the current locale).
58 58
59 Explcitly setting this environment variable is a good practice to
59 Explicitly setting this environment variable is a good practice to
60 60 guarantee consistent results. "utf-8" is a good choice on UNIX-like
61 61 environments.
62 62
@@ -428,7 +428,7 b' def clone(ui, peeropts, source, dest=Non'
428 428 shareopts = shareopts or {}
429 429 sharepool = shareopts.get('pool')
430 430 sharenamemode = shareopts.get('mode')
431 if sharepool:
431 if sharepool and islocal(dest):
432 432 sharepath = None
433 433 if sharenamemode == 'identity':
434 434 # Resolve the name from the initial changeset in the remote
@@ -119,8 +119,8 b' extension and python hooks - use the eol'
119 119 $ echo '[hooks]' >> .hg/hgrc
120 120 $ echo 'update = echo hooked' >> .hg/hgrc
121 121 $ hg update
122 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
122 123 hooked
123 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
124 124 $ hg blackbox -l 5
125 125 1970/01/01 00:00:00 bob> update
126 126 1970/01/01 00:00:00 bob> writing .hg/cache/tags2-visible with 0 tags
@@ -1013,3 +1013,15 b' Request to clone a single branch is resp'
1013 1013 adding remote bookmark bookA
1014 1014
1015 1015 $ ls share-1anowc
1016
1017 Test that auto sharing doesn't cause failure of "hg clone local remote"
1018
1019 $ cd $TESTTMP
1020 $ hg -R a id -r 0
1021 acb14030fe0a
1022 $ hg id -R remote -r 0
1023 abort: there is no Mercurial repository here (.hg not found)
1024 [255]
1025 $ hg --config share.pool=share -q clone -e "python \"$TESTDIR/dummyssh\"" a ssh://user@dummy/remote
1026 $ hg -R remote id -r 0
1027 acb14030fe0a
@@ -505,4 +505,8 b' into the hook command.'
505 505 1:9599899f62c0 a
506 506 0:79b99e9c8e49 b
507 507
508 $ echo "foo" > amended.txt
509 $ hg add amended.txt
510 $ hg ci -q --config extensions.largefiles= --amend -I amended.txt
511
508 512 $ cd ..
@@ -223,8 +223,8 b' update hook'
223 223 $ echo "update = printenv.py update" >> .hg/hgrc
224 224 $ hg update
225 225 preupdate hook: HG_PARENT1=539e4b31b6dc
226 2 files updated, 0 files merged, 0 files removed, 0 files unresolved
226 227 update hook: HG_ERROR=0 HG_PARENT1=539e4b31b6dc
227 2 files updated, 0 files merged, 0 files removed, 0 files unresolved
228 228
229 229 pushkey hook
230 230
@@ -644,8 +644,8 b' final release (and dirstate flush).'
644 644 $ hg ci -ma
645 645 223eafe2750c tip
646 646 $ hg up 0 --config extensions.largefiles=
647 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
647 648 cb9a9f314b8b
648 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
649 649
650 650 make sure --verbose (and --quiet/--debug etc.) are propagated to the local ui
651 651 that is passed to pre/post hooks
@@ -59,7 +59,6 b' One process waiting for another'
59 59 $ hg -R b up -q --config hooks.pre-update="python:`pwd`/hooks.py:sleephalf"
60 60 waiting for lock on working directory of b held by '*:*' (glob)
61 61 got lock after ? seconds (glob)
62 warning: ignoring unknown working parent d2ae7f538514!
63 62 $ wait
64 63 $ cat stdout
65 64 adding b
General Comments 0
You need to be logged in to leave comments. Login now