mirror of
				https://github.com/mnauw/git-remote-hg.git
				synced 2025-10-31 16:45: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 | 	install -m 644 doc/git-remote-hg.1 $(D)$(mandir)/git-remote-hg.1 | ||||||
|  |  | ||||||
| pypi: | pypi: | ||||||
|  | 	version=`git describe --tags ${REV}` && \ | ||||||
|  | 		sed -i "s/version = .*/version = '$$version'/" setup.py | ||||||
| 	-rm -rf dist build | 	-rm -rf dist build | ||||||
| 	python setup.py sdist bdist_wheel | 	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 | 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 :) | That's it :) | ||||||
|  |  | ||||||
| Obviously you will need Mercurial installed. | Obviously you will need Mercurial installed. | ||||||
|   | |||||||
| @@ -285,10 +285,16 @@ class Parser: | |||||||
|         return (user, int(date), -tz) |         return (user, int(date), -tz) | ||||||
|  |  | ||||||
| def fix_file_path(path): | 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) |     path = os.path.normpath(path) | ||||||
|     if not os.path.isabs(path): |     if not os.path.isabs(path): | ||||||
|         return path |         return posix_path(path) | ||||||
|     return os.path.relpath(path, '/') |     return posix_path(os.path.relpath(path, '/')) | ||||||
|  |  | ||||||
| def export_files(files): | def export_files(files): | ||||||
|     final = [] |     final = [] | ||||||
| @@ -1483,6 +1489,11 @@ def do_push_refspec(parser, refspec, revs): | |||||||
|         if tmpmarks and os.path.exists(tmpmarks): |         if tmpmarks and os.path.exists(tmpmarks): | ||||||
|             if ok and not dry_run: |             if ok and not dry_run: | ||||||
|                 # the commits made it through, now we can commit |                 # 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) |                 os.rename(tmpmarks, marks) | ||||||
|                 revs[:] = nparser.context.revs |                 revs[:] = nparser.context.revs | ||||||
|             else: |             else: | ||||||
|   | |||||||
							
								
								
									
										9
									
								
								setup.py
									
									
									
									
									
								
							
							
						
						
									
										9
									
								
								setup.py
									
									
									
									
									
								
							| @@ -5,15 +5,8 @@ import subprocess | |||||||
| import sys | import sys | ||||||
| import os | 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 | # strip leading v | ||||||
| version = version[1:] | version = 'v1.0.1' | ||||||
|  |  | ||||||
| # check for released version | # check for released version | ||||||
| assert (len(version) > 0) | assert (len(version) > 0) | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user