mirror of
				https://github.com/mnauw/git-remote-hg.git
				synced 2025-10-31 00:25:48 +01:00 
			
		
		
		
	Compare commits
	
		
			3 Commits
		
	
	
		
	
	| Author | SHA1 | Date | |
|---|---|---|---|
|  | e71a8963af | ||
|  | f20dbc33c3 | ||
|  | e4aeae6d4b | 
| @@ -5,13 +5,14 @@ install: | ||||
|     then pip install -q Mercurial${HG_VERSION+==$HG_VERSION}; | ||||
|     else pip install -q http://selenic.com/repo/hg/archive/tip.tar.gz; | ||||
|     fi | ||||
|   - pip install -q dulwich hg-git==0.6.1 || true | ||||
|   - pip install -q dulwich hg-git || true | ||||
|  | ||||
| before_script: | ||||
|   - hg --version || true | ||||
|   - pip show hg-git dulwich | ||||
|  | ||||
| script: | ||||
|   - export TEST_OPTS='-v' | ||||
|   - make test | ||||
|  | ||||
| matrix: | ||||
| @@ -20,9 +21,6 @@ matrix: | ||||
|     - env: HG_VERSION=2.8.2 | ||||
|     - env: HG_VERSION=2.7.2 | ||||
|     - env: HG_VERSION=3.0 | ||||
|     - env: HG_VERSION=3.5.2 | ||||
|     - env: HG_VERSION=3.6.3 | ||||
|     - env: HG_VERSION=3.7 | ||||
|     - env: HG_VERSION=dev | ||||
|     - python: 2.7 | ||||
|     - python: 2.6 | ||||
|   | ||||
| @@ -15,8 +15,6 @@ chmod +x ~/bin/git-remote-hg | ||||
|  | ||||
| That's it :) | ||||
|  | ||||
| Obviously you will need Mercurial installed. | ||||
|  | ||||
| == Configuration == | ||||
|  | ||||
| If you want to see Mercurial revisions as Git commit notes: | ||||
|   | ||||
| @@ -430,12 +430,7 @@ def get_repo(url, alias): | ||||
|             peer = hg.peer(repo.ui, {}, url) | ||||
|         except: | ||||
|             die('Repository error') | ||||
|  | ||||
|         if check_version(3, 0): | ||||
|             from mercurial import exchange | ||||
|             exchange.pull(repo, peer, heads=None, force=True) | ||||
|         else: | ||||
|             repo.pull(peer, heads=None, force=True) | ||||
|         repo.pull(peer, heads=None, force=True) | ||||
|  | ||||
|         updatebookmarks(repo, peer) | ||||
|  | ||||
| @@ -503,7 +498,7 @@ def export_ref(repo, name, kind, head): | ||||
|         if 'committer' in extra: | ||||
|             try: | ||||
|                 cuser, ctime, ctz = extra['committer'].rsplit(' ', 2) | ||||
|                 committer = "%s %s %s" % (fixup_user(cuser), ctime, gittz(int(ctz))) | ||||
|                 committer = "%s %s %s" % (cuser, ctime, gittz(int(ctz))) | ||||
|             except ValueError: | ||||
|                 cuser = extra['committer'] | ||||
|                 committer = "%s %d %s" % (fixup_user(cuser), time, gittz(tz)) | ||||
| @@ -808,23 +803,9 @@ def parse_commit(parser): | ||||
|     def getfilectx(repo, memctx, f): | ||||
|         of = files[f] | ||||
|         if 'deleted' in of: | ||||
|             if check_version(3, 2): | ||||
|                 return None | ||||
|             else: | ||||
|                 raise IOError | ||||
|             raise IOError | ||||
|         if 'ctx' in of: | ||||
|             if mode == 'hg': | ||||
|                 ctx = of['ctx'] | ||||
|                 is_exec = ctx.isexec() | ||||
|                 is_link = ctx.islink() | ||||
|                 if check_version(3, 1): | ||||
|                     return context.memfilectx(repo, f, ctx.data(), | ||||
|                             is_link, is_exec) | ||||
|                 else: | ||||
|                     return context.memfilectx(f, ctx.data(), | ||||
|                             is_link, is_exec) | ||||
|             else: | ||||
|                 return of['ctx'] | ||||
|             return of['ctx'] | ||||
|         is_exec = of['mode'] == 'x' | ||||
|         is_link = of['mode'] == 'l' | ||||
|         rename = of.get('rename', None) | ||||
| @@ -1055,9 +1036,7 @@ def push_unsafe(repo, remote, parsed_refs, p_revs): | ||||
|     if not checkheads(repo, remote, p_revs): | ||||
|         return None | ||||
|  | ||||
|     if check_version(3, 2): | ||||
|         cg = changegroup.getchangegroup(repo, 'push', heads=list(p_revs), common=common) | ||||
|     elif check_version(3, 0): | ||||
|     if check_version(3, 0): | ||||
|         cg = changegroup.getbundle(repo, 'push', heads=list(p_revs), common=common) | ||||
|     else: | ||||
|         cg = repo.getbundle('push', heads=list(p_revs), common=common) | ||||
|   | ||||
| @@ -1,6 +1,6 @@ | ||||
| RM ?= rm -f | ||||
|  | ||||
| T = main.t bidi.t | ||||
| T = $(wildcard *.t) | ||||
| TEST_DIRECTORY := $(CURDIR) | ||||
|  | ||||
| export TEST_DIRECTORY | ||||
|   | ||||
| @@ -36,6 +36,8 @@ fi | ||||
|  | ||||
| hg_version=$(python2 -c 'from mercurial import util; print util.version()') | ||||
|  | ||||
| echo "hg_version: $hg_version" | ||||
|  | ||||
| case $hg_version in | ||||
| 3.0*+*) | ||||
| 	skip_all='skipping remote-hg tests; unsuported version of hg by hg-git' | ||||
| @@ -115,6 +117,7 @@ setup () { | ||||
| 	debugrawcommit = -d "0 0" | ||||
| 	tag = -d "0 0" | ||||
| 	[extensions] | ||||
| 	hgext.bookmarks = | ||||
| 	$hggit = | ||||
| 	graphlog = | ||||
| 	EOF | ||||
|   | ||||
| @@ -470,7 +470,7 @@ rm -rf hgrepo | ||||
| test_expect_success 'fetch special filenames' ' | ||||
| 	test_when_finished "rm -rf hgrepo gitrepo && LC_ALL=C" && | ||||
|  | ||||
| 	LC_ALL=en_US.UTF-8 | ||||
| 	LC_ALL=C.UTF-8 | ||||
| 	export LC_ALL | ||||
|  | ||||
| 	( | ||||
| @@ -503,7 +503,7 @@ test_expect_success 'push special filenames' ' | ||||
|  | ||||
| 	mkdir -p tmp && cd tmp && | ||||
|  | ||||
| 	LC_ALL=en_US.UTF-8 | ||||
| 	LC_ALL=C.UTF-8 | ||||
| 	export LC_ALL | ||||
|  | ||||
| 	( | ||||
|   | ||||
		Reference in New Issue
	
	Block a user