I have a trunk branch "A", and a testing branch "B".
"B" is branched from "A".
Now I want to merge "B" into "A", and did a "bzr merge -pull ${HOME}/B" under "A".
Then I realize that if now I do a "bzr info" under "A", I will find a new "submit branch B".
This sounds bad to me because all the committed changes in "A" will go to "B".
So my question is:
1. Is "bzr merge -pull ${HOME}/B" under "A" a good way to do what I want?
2. How to remove the "submit branch B" under "A"?
The submit branch is primarily used as a default for bzr send and bzr bundle. This should not create any problems for you (if you do use these commands, you can override the submit branch on the command line). It is also the default location for future merges if for some reason you do not specify one. The "submit" in "submit branch" refers to submitting changes for review, not to commits.
Most other commands should not be affected. Commits will go to the original branch unless you've made it a bound branch via bzr bind or bzr checkout, and those will go to the bound location, not the submit branch; pushes will go to the default push location, which is also different.
You can use bzr merge --no-remember to not set the submit branch (or edit .bzr/branch/branch.conf to remove the path afterwards). Similarly, you can use --remember to override an existing submit branch location.
Related
With ClearCase, you create views with cleartool mkview, and delete them with cleartool rmview. Similarly, you create branch types with:
cleartool mkbrtype -c "some comment" my_brance_type
... but there is no cleartool rmbrtype which would be the opposite command. How do you remove a branch type in CMake?
The unintuitive command for removing a branch type is:
ct rmtype -rmall brtype:my_branch_type
See the detailed documentation about this on IBM's website.
Note: The -rmall is often (always?) necessary even if you don't have any objects with revisions of that branch type. (At least with ClearCase v8.0.0.x.)
Warning: a cleartool rmtype won't succeed if you have any instance of the type you want to remove.
Even with -rmall, it can still fail if the instance you remove (here a branch based on a brtype) has hyperlink and other UCM metadata which would be dangling if the branch disappear.
I faced with the problem of writing my vcs current branch name each time I have written 'todo' comment.
Recently I learned about Intellij's 'Live Templates' which is quite comfortable to use. I tried to apply it to my problem but there's no templates to take out a branch name.
So the question is could I actually take out the name of my branch to code comments somehow?
It is possible to use the groovyScript predefined function and a script to extract the branch name. For example create the following live template:
$COMMENT$ todo [$BRANCH$]: $END$
with abbreviation "todo" and description "Inserts todo comment with branch name". Click Edit variables and give the variables the following definitions:
COMMENT:
lineCommentStart()
BRANCH (updated for 2020.2 and newer)
groovyScript("com.intellij.dvcs.repo.VcsRepositoryManager.getInstance(_editor.project).getRepositoryForFileQuick(com.intellij.openapi.fileEditor.FileDocumentManager.getInstance().getFile(_editor.document)).getCurrentBranchName()")
Skip if defined checked for both variables. The Groovy script is (unfortunately) all one line. Set applicable contexts to Everywhere.
With this live template it is now possible to type todoTab somewhere in a source file and a line comment with the branch name will be inserted. This will insert the proper line comment depending on the language of the file, or nothing in case of languages without a line comment like HTML. And should extract the branch name no matter the type of version control used (I tested with Git).
For live templates you can use predefined functions. Unfortunately there is no function to detect the current VCS branch.
But you can create a template to make work a little easier:
// TODO [$branch_name$]: $comment$
With this template, you still have to fill branch name, but you should not type symbols like [ and caret will be placed automatically.
You can also create a feature request for a new predefined function.
I am using the user exit USEREXIT_SAVE_DOCUMENT_PREPARE to check some positions in a delivery for some specific criteria.
I just want to do this whenever PGI is triggered. For this I use this condition in the user-exit:
IF ( sy-tcode EQ 'VL01N' OR
sy-tcode EQ 'VL02N' ) AND
sy-ucomm EQ 'WABU_T'.
But now I am afraid that this is not enough for cases like:
booking the exit directly from vl02n (without checking the positions)
book the exit via "Edit --> Post Good Issue"
editing the positions and book
Are there some further options which can be checked to make sure that there is a booking?
How can I make completely sure that a post of goods was triggered in fact?
You can try to utilize Workflow to cover all possible cases.
Create Workflow event which will be triggered upon delivery creation/change and check for Post Goods Issue there. Delivery BO is LIKP so go to tcode SWU_EWCD and enter data like this
Workflow events are based on change documents so every times smth is written to the table it will be fired. Check that your event is properly created in SWEC transaction.
You can also create events based on NACE conditions. After that use your event to generate your own workflow.
Also BAdI LE_SHP_DELIVERY_PROC may be of interest for you, it has method
SAVE_AND_PUBLISH_BEFORE_OUTPUT which is executed before saving of delivery.
You have to check value in T180-TRTYP. If value is 'H' then it is create booking otherwise it is change booking.It is better to remove transaction code and sy-ucomm condition and condition for T180-TRTYP.
regards,
Umar Abdullah
I've already enabled changelog on a standalone OpenDJ server and have "cn=changelog" appeared as one of nodes. And my problem is, that after fetching data from "cn=changelog", attribute "changes" contains only new value of changed attribute, without the old one. E.g. when attribute "cn" changed from "Peter" to "Paul", in "changes" there is only "Paul". Is it possible to get also old value of attribute? If yes, could you tell me where should I search for it or how should I configure OpenDJ to obtain it?
cn=changelog returns the performed operations:
an add operation contains the whole entry being added,
a delete operation contains only the dn of the deleted entry,
a modify dn contains the old dn and new rdn,
a modify operation may contain either the new value only (in case of REPLACE modification type), the removed value (in case of DELETE modification type), the new value (in case of ADD modification type), or no value at all (in case of INCREMENT modification type). Note that the various modification types can be combined in the same modify operation, so you may see a DELETE + ADD, containing the old value, but this is not mandatory.
Ok, after digging in documentation (Procedure 8.15), I found out that there is possibility to set 'ecl-include' option, which causes that changelog entry contains new attribute - 'includedAttributes'. This attribute includes old values (before entry's modification) for those attributes which we defined in 'ecl-include' option. But the disadvantage is, that 'includedAttributes' contains all defined attributes - regardless if those attributes has changed or not during entry's modification. So, for my question, it should be configured like this:
dsconfig set-external-changelog-domain-prop -h host -p port -D cn="Directory Manager" -w password --set ecl-include:"cn"
From now on, next changelog entries will contain 'includedAttributes' attribute with old 'cn' value, which is 'Peter'.
I'm using cvs2svn to convert my repository. I've done it with success in one repository, and now my new problem is a second repository.
In my new conversion, I want to convert only the HEAD and one branch. cvs2svn only have "exclude" function for branches, but not "include". I have many many branches and excluding each and every one of them will take A LOT of work....
is there any way to convert only the trunk (HEAD) and only one branch?
thanks,
Oded
If you only want to retain the one branch and no tags, then this is easy. The first rule that matches a symbol is used, so specify the branch that you want to be included then exclude everything else:
cvs2svn --force-branch=mybranch --exclude='.*' ...
If you want to include not only the branch but also as many tags as possible, then it is a little bit trickier. Not only don't you necessarily know the names of all of the tags, but you also cannot include tags that are dependent on excluded branches. In this case, it is easiest to work with the --write-symbol-info and --symbol-hints options:
cvs2svn --write-symbol-info=symbol-info.out --passes=1:3 ...
This will create a file called "symbol-info.out" containing information about all CVS symbols. In your editor, open this file, find all of the lines corresponding to branches that you want to exclude, and change the third column of those lines to the word "exclude". Make sure that the third column of the line for the branch that you want to include contains the word "branch" and its fourth column is the path where you want it to end up.
Now run cvs2svn again, starting at pass 3, and using the edited symbol-info file as a symbol hints file:
cvs2svn --symbol-hints=symbol-info.out --passes=3 ...
you will get a lot of errors like:
ERROR: ExcludedSymbol('FOO_BRANCH') cannot be excluded because the following symbols depend on it:
BAR_TAG
BAZ_TAG
Now go back into the editor and change the listed tags (BAR_TAG and BAZ_TAG in the example) to be excluded too, then try running pass3 again. This procedure might need to be iterated a couple of times, but it should not be cumbersome because pass3 runs very quickly.
When you have gotten pass3 to complete without errors, run the rest of the conversion:
cvs2svn --symbol-hints=symbol-info.out --passes=4: ...
One problem is that cvs2svn not only needs to determine whether to include a branch or not, but (simultaneously) whether a symbol is a branch or a tag in the first place. So if you want to include that one branch, and also some tags, it's more difficult than just saying "include only that branch" - doing so would kill all tags.
IOW, cvs2svn doesn't really support that. You can work around by editing its source code. In cvs2svn_lib.symbol_strategy.BranchIfCommits, change the case where it returns Branch(symbol) to
if symbol.name == 'my_branch':
return Branch(symbol)
else:
return ExcludedSymbol(symbol)
IIUC, BranchIfCommits should be used by default.
Personally, I would use a different strategy:
1. convert the repository once, with all branches.
2. do a "svn ls" on branches, and redirect that into a file.
3. edit the file to construct an exclude regex out of it, of the form `b1|b2|...|bn`
I wouldn't call that a LOT of work...