[Updated] D12094: debugbuilddag: add a flag to allow running it from a non-empty repository
marmoute (Pierre-Yves David)
phabricator at mercurial-scm.org
Thu Feb 3 16:56:12 UTC 2022
Closed by commit rHGb4bc9c4f925d: debugbuilddag: add a flag to allow running it from a non-empty repository (authored by marmoute).
This revision was automatically updated to reflect the committed changes.
REPOSITORY
rHG Mercurial
CHANGES SINCE LAST UPDATE
https://phab.mercurial-scm.org/D12094?vs=31990&id=32049
CHANGES SINCE LAST ACTION
https://phab.mercurial-scm.org/D12094/new/
REVISION DETAIL
https://phab.mercurial-scm.org/D12094
AFFECTED FILES
mercurial/debugcommands.py
tests/test-completion.t
CHANGE DETAILS
diff --git a/tests/test-completion.t b/tests/test-completion.t
--- a/tests/test-completion.t
+++ b/tests/test-completion.t
@@ -272,7 +272,7 @@
debugantivirusrunning:
debugapplystreamclonebundle:
debugbackupbundle: recover, patch, git, limit, no-merges, stat, graph, style, template
- debugbuilddag: mergeable-file, overwritten-file, new-file
+ debugbuilddag: mergeable-file, overwritten-file, new-file, from-existing
debugbundle: all, part-type, spec
debugcapabilities:
debugchangedfiles: compute
diff --git a/mercurial/debugcommands.py b/mercurial/debugcommands.py
--- a/mercurial/debugcommands.py
+++ b/mercurial/debugcommands.py
@@ -178,6 +178,12 @@
_(b'add single file all revs overwrite'),
),
(b'n', b'new-file', None, _(b'add new file at each rev')),
+ (
+ b'',
+ b'from-existing',
+ None,
+ _(b'continue from a non-empty repository'),
+ ),
],
_(b'[OPTION]... [TEXT]'),
)
@@ -188,6 +194,7 @@
mergeable_file=False,
overwritten_file=False,
new_file=False,
+ from_existing=False,
):
"""builds a repo with a given DAG from scratch in the current empty repo
@@ -226,7 +233,7 @@
text = ui.fin.read()
cl = repo.changelog
- if len(cl) > 0:
+ if len(cl) > 0 and not from_existing:
raise error.Abort(_(b'repository is not empty'))
# determine number of revs in DAG
To: marmoute, #hg-reviewers, Alphare
Cc: mercurial-patches
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mercurial-scm.org/pipermail/mercurial-patches/attachments/20220203/7a4d18da/attachment-0002.html>
More information about the Mercurial-patches
mailing list