mirror of
				https://github.com/mnauw/git-remote-hg.git
				synced 2025-10-31 08:35:48 +01:00 
			
		
		
		
	Compare commits
	
		
			1 Commits
		
	
	
		
			v0.4
			...
			topic_note
		
	
	| Author | SHA1 | Date | |
|---|---|---|---|
|  | 8f9d2797fd | 
| @@ -110,6 +110,12 @@ def get_config_bool(config, default=False): | |||||||
|     else: |     else: | ||||||
|         return default |         return default | ||||||
|  |  | ||||||
|  | def rev_parse(rev): | ||||||
|  |     cmd = ['git', 'rev-parse', '--verify', '-q', rev] | ||||||
|  |     process = subprocess.Popen(cmd, stdout=subprocess.PIPE) | ||||||
|  |     output, _ = process.communicate() | ||||||
|  |     return output | ||||||
|  |  | ||||||
| class Marks: | class Marks: | ||||||
|  |  | ||||||
|     def __init__(self, path, repo): |     def __init__(self, path, repo): | ||||||
| @@ -602,8 +608,11 @@ def export_ref(repo, name, kind, head): | |||||||
|         desc = "Notes for %s\n" % (name) |         desc = "Notes for %s\n" % (name) | ||||||
|         print "data %d" % (len(desc)) |         print "data %d" % (len(desc)) | ||||||
|         print desc |         print desc | ||||||
|         if marks.last_note: |         # continue incrementally on current notes branch (whenever possible) | ||||||
|             print "from :%u" % marks.last_note |         # to avoid wiping out present content upon fetch of new repo | ||||||
|  |         current_note = rev_parse(ref) | ||||||
|  |         if current_note: | ||||||
|  |             print 'from %s^0' % (ref) | ||||||
|  |  | ||||||
|         for rev in pending_revs: |         for rev in pending_revs: | ||||||
|             notes.add(rev) |             notes.add(rev) | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user