[PATCH 2 of 4] update: replace workingctx.dirty and raising Abort by cmdutil.bailifchanged
FUJIWARA Katsunori
foozy at lares.dti.ne.jp
Fri Mar 13 10:35:01 CDT 2015
# HG changeset patch
# User FUJIWARA Katsunori <foozy at lares.dti.ne.jp>
# Date 1426260651 -32400
# Sat Mar 14 00:30:51 2015 +0900
# Node ID 7cbefdfd926ca9c1bbd7483c1361357f64fd6f27
# Parent 06060b1642b66ec9d123e265182dce0a5f0d7c7c
update: replace workingctx.dirty and raising Abort by cmdutil.bailifchanged
This patch makes wrapping "commands.update()" by largefiles extension
useless, because "cmdutil.bailifchanged()" can detect changes of
largefiles in the working directory.
This patch also changes test-update-branches.t, because
"cmdutil.bailifchanged()" shows more detailed information about
dirty-ness of the working directory than "workingctx.dirty()".
diff --git a/mercurial/commands.py b/mercurial/commands.py
--- a/mercurial/commands.py
+++ b/mercurial/commands.py
@@ -6259,9 +6259,7 @@
rev = cmdutil.finddate(ui, repo, date)
if check:
- c = repo[None]
- if c.dirty(merge=False, branch=False, missing=True):
- raise util.Abort(_("uncommitted changes"))
+ cmdutil.bailifchanged(repo, merge=False)
if rev is None:
rev = repo[repo[None].branch()].rev()
diff --git a/tests/test-update-branches.t b/tests/test-update-branches.t
--- a/tests/test-update-branches.t
+++ b/tests/test-update-branches.t
@@ -161,7 +161,7 @@
M foo
$ revtest '-c dirtysub linear' dirtysub 1 2 -c
- abort: uncommitted changes
+ abort: uncommitted changes in subrepo sub
parent=1
M sub/suba
More information about the Mercurial-devel
mailing list