tweakdefaults: make 'pull -u' support noconflict uncommitted changes

Summary: Like 'goto' command, 'pull -u' should accepts noconflict uncommitted changes as well.

Reviewed By: sggutier

Differential Revision: D56676346

fbshipit-source-id: f79ef9a31b9f84feb3ae6128087ac3453c834275
This commit is contained in:
Zhaolong Zhu 2024-04-29 08:31:25 -07:00 committed by Facebook GitHub Bot
parent 7f8ccfbaed
commit 4c32c746a1
2 changed files with 3 additions and 4 deletions

View File

@ -360,7 +360,7 @@ def pull(orig, ui, repo, *args, **opts):
rebasemodule.rebase, ui, repo, dest=dest, tool=tool rebasemodule.rebase, ui, repo, dest=dest, tool=tool
) )
if dest and update: if dest and update:
ret = ret or commands.update(ui, repo, node=dest, check=True) ret = ret or commands.update(ui, repo, node=dest)
return ret return ret

View File

@ -25,12 +25,11 @@ setup server and client
pulling from $TESTTMP/a pulling from $TESTTMP/a
1 files updated, 0 files merged, 0 files removed, 0 files unresolved 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
test a local modification (tofix: 'pull -u' should succeed ) test a local modification
$ echo aa > a $ echo aa > a
$ hg pull -u -B main $ hg pull -u -B main
pulling from $TESTTMP/a pulling from $TESTTMP/a
abort: uncommitted changes 0 files updated, 0 files merged, 0 files removed, 0 files unresolved
[255]
$ hg st $ hg st
M a M a