changeset 17856:917a37b76845

merge with stable
author Thomas Arendsen Hein <thomas@intevation.de>
date Tue, 23 Oct 2012 09:28:42 +0200
parents 653d2afdaf88 (current diff) 526081552f3d (diff)
children df84bec19dce
files
diffstat 10 files changed, 72 insertions(+), 22 deletions(-) [+]
line wrap: on
line diff
--- a/hgext/largefiles/overrides.py	Mon Oct 22 21:56:13 2012 -0700
+++ b/hgext/largefiles/overrides.py	Tue Oct 23 09:28:42 2012 +0200
@@ -681,9 +681,9 @@
             def _dummy(*args, **kwargs):
                 pass
             commands.postincoming = _dummy
-            repo.lfpullsource = source
             if not source:
                 source = 'default'
+            repo.lfpullsource = source
             try:
                 result = commands.pull(ui, repo, source, **opts)
             finally:
@@ -694,9 +694,9 @@
         finally:
             repo._isrebasing = False
     else:
-        repo.lfpullsource = source
         if not source:
             source = 'default'
+        repo.lfpullsource = source
         oldheads = lfutil.getcurrentheads(repo)
         result = orig(ui, repo, source, **opts)
         # If we do not have the new largefiles for any new heads we pulled, we
--- a/mercurial/commands.py	Mon Oct 22 21:56:13 2012 -0700
+++ b/mercurial/commands.py	Tue Oct 23 09:28:42 2012 +0200
@@ -4842,11 +4842,18 @@
     s = repo.status(match=m, clean=True)
     modified, added, deleted, clean = s[0], s[1], s[3], s[6]
 
+    # warn about failure to delete explicit files/dirs
+    wctx = repo[None]
     for f in m.files():
-        if f not in repo.dirstate and not os.path.isdir(m.rel(f)):
-            if os.path.exists(m.rel(f)):
+        if f in repo.dirstate or f in wctx.dirs():
+            continue
+        if os.path.exists(m.rel(f)):
+            if os.path.isdir(m.rel(f)):
+                ui.warn(_('not removing %s: no tracked files\n') % m.rel(f))
+            else:
                 ui.warn(_('not removing %s: file is untracked\n') % m.rel(f))
-            ret = 1
+        # missing files will generate a warning elsewhere
+        ret = 1
 
     if force:
         list = modified + deleted + clean + added
@@ -5887,7 +5894,7 @@
 
     if check:
         c = repo[None]
-        if c.dirty(merge=False, branch=False):
+        if c.dirty(merge=False, branch=False, missing=True):
             raise util.Abort(_("uncommitted local changes"))
         if rev is None:
             rev = repo[repo[None].branch()].rev()
--- a/mercurial/localrepo.py	Mon Oct 22 21:56:13 2012 -0700
+++ b/mercurial/localrepo.py	Tue Oct 23 09:28:42 2012 +0200
@@ -1880,11 +1880,11 @@
                             for node in outgoing.missingheads:
                                 ctx = self[node]
                                 if ctx.obsolete():
-                                    raise util.Abort(_(mso) % ctx)
+                                    raise util.Abort(mso % ctx)
                                 elif ctx.unstable():
-                                    raise util.Abort(_(msu) % ctx)
+                                    raise util.Abort(msu % ctx)
                                 elif ctx.bumped():
-                                    raise util.Abort(_(msb) % ctx)
+                                    raise util.Abort(msb % ctx)
                         discovery.checkheads(self, remote, outgoing,
                                              remoteheads, newbranch,
                                              bool(inc))
--- a/mercurial/scmutil.py	Mon Oct 22 21:56:13 2012 -0700
+++ b/mercurial/scmutil.py	Tue Oct 23 09:28:42 2012 +0200
@@ -32,8 +32,7 @@
         raise util.Abort(_("the name '%s' is reserved") % lbl)
     for c in (':', '\0', '\n', '\r'):
         if c in lbl:
-            raise util.Abort(_("%r cannot be used in a %s name") %
-                               (c, kind))
+            raise util.Abort(_("%r cannot be used in a name") % c)
 
 def checkfilename(f):
     '''Check that the filename f is an acceptable filename for a tracked file'''
--- a/tests/test-bookmarks.t	Mon Oct 22 21:56:13 2012 -0700
+++ b/tests/test-bookmarks.t	Tue Oct 23 09:28:42 2012 +0200
@@ -302,12 +302,12 @@
 invalid bookmark
 
   $ hg bookmark 'foo:bar'
-  abort: ':' cannot be used in a bookmark name
+  abort: ':' cannot be used in a name
   [255]
 
   $ hg bookmark 'foo
   > bar'
-  abort: '\n' cannot be used in a bookmark name
+  abort: '\n' cannot be used in a name
   [255]
 
 the bookmark extension should be ignored now that it is part of core
--- a/tests/test-branches.t	Mon Oct 22 21:56:13 2012 -0700
+++ b/tests/test-branches.t	Tue Oct 23 09:28:42 2012 +0200
@@ -60,12 +60,12 @@
 invalid characters
 
   $ hg branch 'foo:bar'
-  abort: ':' cannot be used in a branch name
+  abort: ':' cannot be used in a name
   [255]
 
   $ hg branch 'foo
   > bar'
-  abort: '\n' cannot be used in a branch name
+  abort: '\n' cannot be used in a name
   [255]
 
   $ echo 'd' >d
--- a/tests/test-largefiles.t	Mon Oct 22 21:56:13 2012 -0700
+++ b/tests/test-largefiles.t	Tue Oct 23 09:28:42 2012 +0200
@@ -765,7 +765,9 @@
   abort: --all-largefiles is incompatible with non-local destination ssh://localhost/a
   [255]
 
-Test pulling with --all-largefiles flag
+Test pulling with --all-largefiles flag.  Also test that the largefiles are
+downloaded from 'default' instead of 'default-push' when no source is specified
+(issue3584)
 
   $ rm -Rf a-backup
   $ hg clone -r 1 a a-backup
@@ -779,7 +781,7 @@
   2 largefiles updated, 0 removed
   $ rm "${USERCACHE}"/*
   $ cd a-backup
-  $ hg pull --all-largefiles
+  $ hg pull --all-largefiles --config paths.default-push=bogus/path
   pulling from $TESTTMP/a (glob)
   searching for changes
   adding changesets
@@ -821,8 +823,12 @@
   getting changed largefiles
   3 largefiles updated, 0 removed
   $ cd d
-  $ hg pull --rebase ../b
-  pulling from ../b
+
+More rebase testing, but also test that the largefiles are downloaded from
+'default' instead of 'default-push' when no source is specified (issue3584).
+The error messages go away if repo 'b' is created with --all-largefiles.
+  $ hg pull --rebase --all-largefiles --config paths.default-push=bogus/path --config paths.default=../b
+  pulling from $TESTTMP/b (glob)
   searching for changes
   adding changesets
   adding manifests
@@ -832,6 +838,26 @@
   M sub/normal4
   M sub2/large6
   saved backup bundle to $TESTTMP/d/.hg/strip-backup/f574fb32bb45-backup.hg (glob)
+  large3: can't get file locally
+  (no default or default-push path set in hgrc)
+  sub/large4: can't get file locally
+  (no default or default-push path set in hgrc)
+  large1: can't get file locally
+  (no default or default-push path set in hgrc)
+  sub/large2: can't get file locally
+  (no default or default-push path set in hgrc)
+  sub/large2: can't get file locally
+  (no default or default-push path set in hgrc)
+  large1: can't get file locally
+  (no default or default-push path set in hgrc)
+  sub/large2: can't get file locally
+  (no default or default-push path set in hgrc)
+  large1: can't get file locally
+  (no default or default-push path set in hgrc)
+  sub/large2: can't get file locally
+  (no default or default-push path set in hgrc)
+  0 additional largefiles cached
+  9 largefiles failed to download
   nothing to rebase
   $ hg log --template '{rev}:{node|short}  {desc|firstline}\n'
   9:598410d3eb9a  modify normal file largefile in repo d
--- a/tests/test-merge5.t	Mon Oct 22 21:56:13 2012 -0700
+++ b/tests/test-merge5.t	Tue Oct 23 09:28:42 2012 +0200
@@ -16,6 +16,11 @@
   $ hg update
   abort: crosses branches (merge branches or update --check to force update)
   [255]
+  $ rm b
+  $ hg update -c
+  abort: uncommitted local changes
+  [255]
+  $ hg revert b
   $ hg update -c
   0 files updated, 0 files merged, 1 files removed, 0 files unresolved
   $ mv a c
--- a/tests/test-remove.t	Mon Oct 22 21:56:13 2012 -0700
+++ b/tests/test-remove.t	Tue Oct 23 09:28:42 2012 +0200
@@ -265,4 +265,17 @@
   nothing changed
   [1]
 
-  $ cd ..
+handling of untracked directories and missing files
+
+  $ mkdir d1
+  $ echo a > d1/a
+  $ hg rm --after d1
+  not removing d1: no tracked files
+  [1]
+  $ hg add d1/a
+  $ rm d1/a
+  $ hg rm --after d1
+  removing d1/a
+  $ hg rm --after nosuch
+  nosuch: No such file or directory
+  [1]
--- a/tests/test-tag.t	Mon Oct 22 21:56:13 2012 -0700
+++ b/tests/test-tag.t	Tue Oct 23 09:28:42 2012 +0200
@@ -116,10 +116,10 @@
 
   $ hg tag -l 'xx
   > newline'
-  abort: '\n' cannot be used in a tag name
+  abort: '\n' cannot be used in a name
   [255]
   $ hg tag -l 'xx:xx'
-  abort: ':' cannot be used in a tag name
+  abort: ':' cannot be used in a name
   [255]
 
 cloning local tags