chiark / gitweb /
Merge branch 'master' of http://homepage.ntlworld.com/cmarinas/stgit
authorCatalin Marinas <cmarinas@pc1117.(none)>
Sat, 7 Jan 2006 11:45:08 +0000 (11:45 +0000)
committerCatalin Marinas <cmarinas@pc1117.(none)>
Sat, 7 Jan 2006 11:45:08 +0000 (11:45 +0000)
gitmergeonefile.py
stgit/commands/pull.py
stgit/commands/series.py

index 1cba19366d33c73975154eed2d83fce1f0ff9977..9344d33b8a17eee746fd8f0163eec4ba04dc9f12 100755 (executable)
@@ -180,6 +180,30 @@ if orig_hash:
             os.remove(path)
         __remove_files()
         sys.exit(os.system('git-update-index --remove -- %s' % path))
+    # file deleted in one and changed in the other
+    else:
+        # Do something here - we must at least merge the entry in the cache,
+        # instead of leaving it in U(nmerged) state. In fact, stg resolved
+        # does not handle that.
+
+        # Do the same thing cogito does - remove the file in any case.
+        os.system('git-update-index --remove -- %s' % path)
+
+        #if file1_hash:
+            ## file deleted upstream and changed in the patch. The patch is
+            ## probably going to move the changes elsewhere.
+
+            #os.system('git-update-index --remove -- %s' % path)
+        #else:
+            ## file deleted in the patch and changed upstream. We could re-delete
+            ## it, but for now leave it there - and let the user check if he
+            ## still wants to remove the file.
+
+            ## reset the cache to the first branch
+            #os.system('git-update-index --cacheinfo %s %s %s'
+                      #% (file1_mode, file1_hash, path))
+        __conflict()
+
 # file does not exist in origin
 else:
     # file added in both
index 69b8d88f114bc33272a5e71a69d4ec5c9e37329a..25832a5add0e51200fa82adae7e2058fc4c79213 100644 (file)
@@ -29,7 +29,7 @@ usage = """%prog [options] [<repository>] [<refspec>]
 Pull the latest changes from the given repository (defaulting to
 'origin'). This command works by popping all the patches from the
 stack, pulling the changes in the parent repository, setting the base
-of the stack to the latest parent HEAD and pusing the patches back
+of the stack to the latest parent HEAD and pushing the patches back
 (unless '--nopush' is specified). The 'push' operation can fail if
 there are conflicts. They need to be resolved and the patch pushed
 again.
index ec1aaaf991f47b0d403f71c2cf0cce141c6709e9..571055840f61bf07c104814565383bd4b04256bd 100644 (file)
@@ -34,7 +34,7 @@ prefixed with a '>'. Empty patches are prefixed with a '0'."""
 options = [make_option('-b', '--branch',
                        help = 'use BRANCH instead of the default one'),
            make_option('-d', '--description',
-                       help = 'show a show description for each patch',
+                       help = 'show a short description for each patch',
                        action = 'store_true'),
            make_option('-e', '--empty',
                        help = 'check whether patches are empty '