with the way "assimilate" handles them, you have no reason to avoid
causing them in the first place if that is convenient for you."""
-directory = DirectoryHasRepository()
+directory = DirectoryGotoToplevel()
options = []
class Commit(object):
If not given any options, switch to the named branch."""
-directory = DirectoryHasRepository()
+directory = DirectoryGotoToplevel()
options = [make_option('-c', '--create',
help = 'create a new development branch',
action = 'store_true'),
unapplied. A patch is considered empty if the two commit objects
representing its boundaries refer to the same tree object."""
-directory = DirectoryHasRepository()
+directory = DirectoryGotoToplevel()
options = [make_option('-a', '--applied',
help = 'delete the empty applied patches',
action = 'store_true'),
Use this command only if you want to permanently store the applied
patches and no longer manage them with StGIT."""
-directory = DirectoryHasRepository()
+directory = DirectoryGotoToplevel()
options = []
Note that the 'delete' operation is irreversible."""
-directory = DirectoryHasRepository()
+directory = DirectoryGotoToplevel()
options = [make_option('-b', '--branch',
help = 'use BRANCH instead of the default one')]
these files using the '--file' and '--diff' options.
"""
-directory = DirectoryHasRepository()
+directory = DirectoryGotoToplevel()
options = [make_option('-d', '--diff',
help = 'edit the patch diff',
action = 'store_true'),
dirname = options.dir
else:
dirname = 'patches-%s' % crt_series.get_name()
+ directory.cd_to_topdir()
if not options.branch and git.local_changes():
out.warn('Local changes in the tree;'
this. The '--series' option can be used to rearrange the (top) patches
as specified by the given series file (or the standard input)."""
-directory = DirectoryHasRepository()
+directory = DirectoryGotoToplevel()
options = [make_option('-s', '--series',
help = 'rearrange according to a series file',
action = 'store_true')]
--to' commands. There is no '--undo' option for 'goto'. Use the 'push'
command for this."""
-directory = DirectoryHasRepository()
+directory = DirectoryGotoToplevel()
options = [make_option('-k', '--keep',
help = 'keep the local changes when popping patches',
action = 'store_true')]
If no name is given for the new patch, one is generated from the first
line of the commit message."""
-directory = DirectoryHasRepository()
+directory = DirectoryGotoToplevel()
options = [make_option('-m', '--message',
help = 'use MESSAGE as the patch description'),
make_option('-s', '--showpatch',
option. A commit object can be reverted with the '--reverse'
option. The log and author information are those of the commit object."""
-directory = DirectoryHasRepository()
+directory = DirectoryGotoToplevel()
options = [make_option('-n', '--name',
help = 'use NAME as the patch name'),
make_option('-r', '--reverse',
the push operations may fail because of conflicts (push --undo would
revert the last push operation)."""
-directory = DirectoryHasRepository()
+directory = DirectoryGotoToplevel()
options = [make_option('-a', '--all',
help = 'pop all the applied patches',
action = 'store_true'),
Check the 'git fetch' documentation for the <repository> format."""
-directory = DirectoryHasRepository()
+directory = DirectoryGotoToplevel()
options = [make_option('-n', '--nopush',
help = 'do not push the patches back after pulling',
action = 'store_true'),
Pop all patches from current stack, move the stack base to the given
<new-base-id> and push the patches back."""
-directory = DirectoryHasRepository()
+directory = DirectoryGotoToplevel()
options = [make_option('-n', '--nopush',
help = 'do not push the patches back after rebasing',
action = 'store_true'),
def func(parser, options, args):
"""Mark the conflict as resolved
"""
+ args = git.ls_files(args)
+ directory.cd_to_topdir()
+
if options.reset \
and options.reset not in file_extensions():
raise CmdException, 'Unknown reset state: %s' % options.reset
then push back into place the formerly-applied patches (unless -n
is also given)."""
-directory = DirectoryHasRepository()
+directory = DirectoryGotoToplevel()
options = [make_option('-n', '--nopush',
help = 'do not push the patches back after sinking',
action = 'store_true'),
The sync operation can be reverted for individual patches with --undo."""
-directory = DirectoryHasRepository()
+directory = DirectoryGotoToplevel()
options = [make_option('-a', '--all',
help = 'synchronise all the patches',
action = 'store_true'),
Only commits with exactly one parent can be uncommitted; in other
words, you can't uncommit a merge."""
-directory = DirectoryHasRepository()
+directory = DirectoryGotoToplevel()
options = [make_option('-n', '--number', type = 'int',
help = 'uncommit the specified number of commits'),
make_option('-t', '--to',