/brz/remove-bazaar

To get this branch, use:
bzr branch http://gegoxaren.bato24.eu/bzr/brz/remove-bazaar

« back to all changes in this revision

Viewing changes to breezy/plugins/quilt/wrapper.py

  • Committer: Jelmer Vernooij
  • Date: 2019-09-21 17:08:09 UTC
  • mfrom: (7389 work)
  • mto: This revision was merged to the branch mainline in revision 7390.
  • Revision ID: jelmer@jelmer.uk-20190921170809-ejewbeue585deajo
merge trunk.

Show diffs side-by-side

added added

removed removed

Lines of Context:
159
159
        patches_dir=patches_dir, series_file=series_file, quiet=quiet)
160
160
 
161
161
 
162
 
def quilt_push(working_dir, patch, patches_dir=None, series_file=None, quiet=None):
 
162
def quilt_push(working_dir, patch, patches_dir=None, series_file=None,
 
163
               quiet=None, force=False, refresh=False):
163
164
    """Push a patch.
164
165
 
165
166
    :param working_dir: Directory to work in
166
167
    :param patch: Patch to push
167
168
    :param patches_dir: Optional patches directory
168
169
    :param series_file: Optional series file
 
170
    :param force: Force push
 
171
    :param refresh: Refresh
169
172
    """
 
173
    args = []
 
174
    if force:
 
175
        args.append("-f")
 
176
    if refresh:
 
177
        args.append("--refresh")
170
178
    return run_quilt(
171
 
        ["push", patch], working_dir=working_dir,
 
179
        ["push", patch] + args, working_dir=working_dir,
172
180
        patches_dir=patches_dir, series_file=series_file, quiet=quiet)
173
181
 
174
182
 
 
183
def quilt_delete(working_dir, patch, patches_dir=None, series_file=None,
 
184
                 remove=False):
 
185
    """Delete a patch.
 
186
 
 
187
    :param working_dir: Directory to work in
 
188
    :param patch: Patch to push
 
189
    :param patches_dir: Optional patches directory
 
190
    :param series_file: Optional series file
 
191
    :param remove: Remove the patch file as well
 
192
    """
 
193
    args = []
 
194
    if remove:
 
195
        args.append("-r")
 
196
    return run_quilt(
 
197
        ["delete", patch] + args, working_dir=working_dir,
 
198
        patches_dir=patches_dir, series_file=series_file)
 
199
 
 
200
 
175
201
def quilt_upgrade(working_dir):
176
202
    return run_quilt(["upgrade"], working_dir=working_dir)
177
203