Mercurial > hg
changeset 7856:166b6b12df44
Merge with stable
author | Matt Mackall <mpm@selenic.com> |
---|---|
date | Tue, 17 Mar 2009 13:46:53 -0500 |
parents | 1cb6836946be (current diff) aa1a87f7544f (diff) |
children | d24b367efab9 |
files | |
diffstat | 19 files changed, 86 insertions(+), 21 deletions(-) [+] |
line wrap: on
line diff
--- a/hgext/convert/subversion.py Mon Mar 09 18:44:44 2009 +0100 +++ b/hgext/convert/subversion.py Tue Mar 17 13:46:53 2009 -0500 @@ -463,7 +463,7 @@ return int(rev.split('@')[-1]) def revsplit(self, rev): - url, revnum = rev.encode(self.encoding).split('@', 1) + url, revnum = rev.encode(self.encoding).rsplit('@', 1) revnum = int(revnum) parts = url.split('/', 1) uuid = parts.pop(0)[4:]
--- a/hgext/fetch.py Mon Mar 09 18:44:44 2009 +0100 +++ b/hgext/fetch.py Tue Mar 17 13:46:53 2009 -0500 @@ -52,7 +52,9 @@ raise util.Abort(_('outstanding uncommitted changes')) if del_: raise util.Abort(_('working directory is missing some files')) - if len(repo.branchheads(branch)) > 1: + bheads = repo.branchheads(branch) + bheads = [head for head in bheads if len(repo[head].children()) == 0] + if len(bheads) > 1: raise util.Abort(_('multiple heads in this branch ' '(use "hg heads ." and "hg merge" to merge)')) @@ -76,6 +78,7 @@ # Is this a simple fast-forward along the current branch? newheads = repo.branchheads(branch) + newheads = [head for head in newheads if len(repo[head].children()) == 0] newchildren = repo.changelog.nodesbetween([parent], newheads)[2] if len(newheads) == 1: if newchildren[0] != parent:
--- a/hgext/keyword.py Mon Mar 09 18:44:44 2009 +0100 +++ b/hgext/keyword.py Tue Mar 17 13:46:53 2009 -0500 @@ -425,10 +425,14 @@ keyword substitutions. Monkeypatches patch and webcommands.''' - if (not hasattr(repo, 'dirstate') or not kwtools['inc'] - or kwtools['hgcmd'] in nokwcommands.split() - or '.hg' in util.splitpath(repo.root)): - return + try: + if (not repo.local() or not kwtools['inc'] + or kwtools['hgcmd'] in nokwcommands.split() + or '.hg' in util.splitpath(repo.root) + or repo._url.startswith('bundle:')): + return + except AttributeError: + pass kwtools['templater'] = kwt = kwtemplater(ui, repo)
--- a/mercurial/bundlerepo.py Mon Mar 09 18:44:44 2009 +0100 +++ b/mercurial/bundlerepo.py Tue Mar 17 13:46:53 2009 -0500 @@ -226,7 +226,7 @@ self.manifest return self.filestart else: - raise AttributeError(name) + return localrepo.localrepository.__getattr__(self, name) def url(self): return self._url
--- a/mercurial/commands.py Mon Mar 09 18:44:44 2009 +0100 +++ b/mercurial/commands.py Tue Mar 17 13:46:53 2009 -0500 @@ -331,7 +331,7 @@ try: while changesets: # update state - status = os.spawnl(os.P_WAIT, commandpath) + status = os.spawnl(os.P_WAIT, commandpath, commandpath) if status == 125: transition = "skip" elif status == 0: @@ -645,9 +645,6 @@ elif ui.verbose: ui.write(_('committed changeset %d:%s\n') % (rev,short(node))) - ms = merge_.mergestate(repo) - ms.reset(node) - def copy(ui, repo, *pats, **opts): """mark files as copied for the next commit @@ -2363,8 +2360,17 @@ else: wctx = repo[None] mctx = wctx.parents()[-1] + + # backup pre-resolve (merge uses .orig for its own purposes) + a = repo.wjoin(f) + util.copyfile(a, a + ".resolve") + + # resolve file ms.resolve(f, wctx, mctx) + # replace filemerge's .orig file with our resolve file + util.rename(a + ".resolve", a + ".orig") + def revert(ui, repo, *pats, **opts): """restore individual files or dirs to an earlier state
--- a/mercurial/localrepo.py Mon Mar 09 18:44:44 2009 +0100 +++ b/mercurial/localrepo.py Tue Mar 17 13:46:53 2009 -0500 @@ -824,8 +824,11 @@ "(see hg resolve)")) wctx = context.workingctx(self, (p1, p2), text, user, date, extra, changes) - return self._commitctx(wctx, force, force_editor, empty_ok, - use_dirstate, update_dirstate) + r = self._commitctx(wctx, force, force_editor, empty_ok, + use_dirstate, update_dirstate) + ms.reset() + return r + finally: del lock, wlock
--- a/mercurial/merge.py Mon Mar 09 18:44:44 2009 +0100 +++ b/mercurial/merge.py Tue Mar 17 13:46:53 2009 -0500 @@ -14,9 +14,10 @@ def __init__(self, repo): self._repo = repo self._read() - def reset(self, node): + def reset(self, node=None): self._state = {} - self._local = node + if node: + self._local = node shutil.rmtree(self._repo.join("merge"), True) def _read(self): self._state = {}
--- a/templates/atom/changelogentry.tmpl Mon Mar 09 18:44:44 2009 +0100 +++ b/templates/atom/changelogentry.tmpl Tue Mar 17 13:46:53 2009 -0500 @@ -1,6 +1,6 @@ <entry> <title>#desc|strip|firstline|strip|escape#</title> - <id>http://www.selenic.com/mercurial/#changeset-{node}</id> + <id>{urlbase}{url}#changeset-{node}</id> <link href="{urlbase}{url}rev/{node}"/> <author> <name>#author|person|escape#</name>
--- a/templates/atom/tagentry.tmpl Mon Mar 09 18:44:44 2009 +0100 +++ b/templates/atom/tagentry.tmpl Tue Mar 17 13:46:53 2009 -0500 @@ -1,7 +1,7 @@ <entry> <title>#tag|escape#</title> <link rel="alternate" href="{urlbase}{url}rev/{node}"/> - <id>http://www.selenic.com/mercurial/#tag-{node}</id> + <id>{urlbase}{url}#tag-{node}</id> <updated>#date|rfc3339date#</updated> <published>#date|rfc3339date#</published> <content type="text">#tag|strip|escape#</content>
--- a/tests/test-bundle Mon Mar 09 18:44:44 2009 +0100 +++ b/tests/test-bundle Tue Mar 17 13:46:53 2009 -0500 @@ -34,6 +34,7 @@ echo "====== Bundle --all" hg -R test bundle --all all.hg + echo "====== Bundle test to full.hg" hg -R test bundle full.hg empty echo "====== Unbundle full.hg in test" @@ -139,4 +140,10 @@ # but, regular verify must continue to work hg -R orig verify +echo "====== diff against bundle" +hg init b +cd b +hg -R ../all.hg diff -r tip +cd .. +
--- a/tests/test-bundle.out Mon Mar 09 18:44:44 2009 +0100 +++ b/tests/test-bundle.out Tue Mar 17 13:46:53 2009 -0500 @@ -317,3 +317,12 @@ crosschecking files in changesets and manifests checking files 2 files, 2 changesets, 2 total revisions +====== diff against bundle +diff -r 836ac62537ab anotherfile +--- a/anotherfile Mon Jan 12 13:46:40 1970 +0000 ++++ /dev/null Thu Jan 01 00:00:00 1970 +0000 +@@ -1,4 +0,0 @@ +-0 +-1 +-2 +-3
--- a/tests/test-fetch Mon Mar 09 18:44:44 2009 +0100 +++ b/tests/test-fetch Tue Mar 17 13:46:53 2009 -0500 @@ -170,6 +170,21 @@ hg -R n2 parents --template '{rev}\n' rm -fr n1 n2 +echo % test fetch with inactive branches +hg init ib1 +echo a > ib1/a +hg --cwd ib1 ci -Am base +hg --cwd ib1 branch second +echo b > ib1/b +hg --cwd ib1 ci -Am onsecond +hg --cwd ib1 branch -f default +echo c > ib1/c +hg --cwd ib1 ci -Am newdefault +hg clone ib1 ib2 +echo % fetch should succeed +hg --cwd ib2 fetch ../ib1 +rm -fr ib1 ib2 + "$TESTDIR/killdaemons.py" true
--- a/tests/test-fetch.out Mon Mar 09 18:44:44 2009 +0100 +++ b/tests/test-fetch.out Tue Mar 17 13:46:53 2009 -0500 @@ -178,3 +178,15 @@ abort: working dir not at branch tip (use "hg update" to check out branch tip) % parent should be 0 (fetch did not update or merge anything) 0 +% test fetch with inactive branches +adding a +marked working directory as branch second +adding b +marked working directory as branch default +adding c +updating working directory +3 files updated, 0 files merged, 0 files removed, 0 files unresolved +% fetch should succeed +pulling from ../ib1 +searching for changes +no changes found
--- a/tests/test-hgweb-no-path-info.out Mon Mar 09 18:44:44 2009 +0100 +++ b/tests/test-hgweb-no-path-info.out Tue Mar 17 13:46:53 2009 -0500 @@ -19,7 +19,7 @@ <entry> <title>test</title> - <id>http://www.selenic.com/mercurial/#changeset-4cbec7e6f8c42eb52b6b52670e1f7560ae9a101e</id> + <id>http://127.0.0.1/#changeset-4cbec7e6f8c42eb52b6b52670e1f7560ae9a101e</id> <link href="http://127.0.0.1/rev/4cbec7e6f8c42eb52b6b52670e1f7560ae9a101e"/> <author> <name>Testing</name>
--- a/tests/test-hgweb-no-request-uri.out Mon Mar 09 18:44:44 2009 +0100 +++ b/tests/test-hgweb-no-request-uri.out Tue Mar 17 13:46:53 2009 -0500 @@ -19,7 +19,7 @@ <entry> <title>test</title> - <id>http://www.selenic.com/mercurial/#changeset-4cbec7e6f8c42eb52b6b52670e1f7560ae9a101e</id> + <id>http://127.0.0.1/#changeset-4cbec7e6f8c42eb52b6b52670e1f7560ae9a101e</id> <link href="http://127.0.0.1/rev/4cbec7e6f8c42eb52b6b52670e1f7560ae9a101e"/> <author> <name>Testing</name>
--- a/tests/test-hgwebdir.out Mon Mar 09 18:44:44 2009 +0100 +++ b/tests/test-hgwebdir.out Tue Mar 17 13:46:53 2009 -0500 @@ -64,7 +64,7 @@ <entry> <title>a</title> - <id>http://127.0.0.1/mercurial/#changeset-8580ff50825a50c8f716709acdf8de0deddcd6ab</id> + <id>http://127.0.0.1/t/a/#changeset-8580ff50825a50c8f716709acdf8de0deddcd6ab</id> <link href="http://127.0.0.1/t/a/rev/8580ff50825a50c8f716709acdf8de0deddcd6ab"/> <author> <name>test</name> @@ -93,7 +93,7 @@ <entry> <title>a</title> - <id>http://127.0.0.1/mercurial/#changeset-8580ff50825a50c8f716709acdf8de0deddcd6ab</id> + <id>http://127.0.0.1/t/a/#changeset-8580ff50825a50c8f716709acdf8de0deddcd6ab</id> <link href="http://127.0.0.1/t/a/rev/8580ff50825a50c8f716709acdf8de0deddcd6ab"/> <author> <name>test</name>