mirror of
				https://github.com/mnauw/git-remote-hg.git
				synced 2025-10-31 00:25:48 +01:00 
			
		
		
		
	Compare commits
	
		
			5 Commits
		
	
	
		
	
	| Author | SHA1 | Date | |
|---|---|---|---|
|  | de95133416 | ||
|  | e0b752be8f | ||
|  | f050de1bcc | ||
|  | 0bf3db826b | ||
|  | 3698638e98 | 
							
								
								
									
										2
									
								
								Makefile
									
									
									
									
									
								
							
							
						
						
									
										2
									
								
								Makefile
									
									
									
									
									
								
							| @@ -27,6 +27,8 @@ install-doc: doc | ||||
| 	install -m 644 doc/git-remote-hg.1 $(D)$(mandir)/git-remote-hg.1 | ||||
|  | ||||
| pypi: | ||||
| 	version=`git describe --tags ${REV}` && \ | ||||
| 		sed -i "s/version = .*/version = '$$version'/" setup.py | ||||
| 	-rm -rf dist build | ||||
| 	python setup.py sdist bdist_wheel | ||||
|  | ||||
|   | ||||
| @@ -13,6 +13,13 @@ wget https://raw.github.com/mnauw/git-remote-hg/master/git-remote-hg -O ~/bin/gi | ||||
| chmod +x ~/bin/git-remote-hg | ||||
| -------------------------------------- | ||||
|  | ||||
| In Windows, you also need to put and an NTFS symbolic link named `python2.exe` somewhere | ||||
| on your `$PATH` pointing to your Python 2 executable: | ||||
|  | ||||
| -------------------------------------- | ||||
| mklink <path to link> <path to python.exe> | ||||
| -------------------------------------- | ||||
|  | ||||
| That's it :) | ||||
|  | ||||
| Obviously you will need Mercurial installed. | ||||
|   | ||||
| @@ -285,10 +285,16 @@ class Parser: | ||||
|         return (user, int(date), -tz) | ||||
|  | ||||
| def fix_file_path(path): | ||||
|     def posix_path(path): | ||||
|         if os.sep == '/': | ||||
|             return path | ||||
|         # even Git for Windows expects forward | ||||
|         return path.replace(os.sep, '/') | ||||
|     # also converts forward slash to backwards slash on Win | ||||
|     path = os.path.normpath(path) | ||||
|     if not os.path.isabs(path): | ||||
|         return path | ||||
|     return os.path.relpath(path, '/') | ||||
|         return posix_path(path) | ||||
|     return posix_path(os.path.relpath(path, '/')) | ||||
|  | ||||
| def export_files(files): | ||||
|     final = [] | ||||
| @@ -1483,6 +1489,11 @@ def do_push_refspec(parser, refspec, revs): | ||||
|         if tmpmarks and os.path.exists(tmpmarks): | ||||
|             if ok and not dry_run: | ||||
|                 # the commits made it through, now we can commit | ||||
|                 # sigh ... no atomic rename for existing destination on some platform ... | ||||
|                 # (use unofficial platform check) | ||||
|                 if os.sep != '/': | ||||
|                   if os.path.exists(marks): | ||||
|                     os.remove(marks) | ||||
|                 os.rename(tmpmarks, marks) | ||||
|                 revs[:] = nparser.context.revs | ||||
|             else: | ||||
|   | ||||
							
								
								
									
										9
									
								
								setup.py
									
									
									
									
									
								
							
							
						
						
									
										9
									
								
								setup.py
									
									
									
									
									
								
							| @@ -5,15 +5,8 @@ import subprocess | ||||
| import sys | ||||
| import os | ||||
|  | ||||
| # derive version from git repo | ||||
| cmd = ["git", "describe", "--tags"] | ||||
| commit = os.environ.get('REV', None) | ||||
| if commit: | ||||
|   cmd.append(commit) | ||||
| process = subprocess.Popen(cmd, stdout=subprocess.PIPE) | ||||
| version = process.communicate()[0].strip() | ||||
| # strip leading v | ||||
| version = version[1:] | ||||
| version = 'v1.0.1' | ||||
|  | ||||
| # check for released version | ||||
| assert (len(version) > 0) | ||||
|   | ||||
		Reference in New Issue
	
	Block a user